From c8390c4b56f92d08dccc7fda6e858c4fa8414691 Mon Sep 17 00:00:00 2001 From: Philipp Fruck Date: Wed, 20 May 2026 20:21:16 +0000 Subject: [PATCH] nightly API update --- .openapi-generator/FILES | 495 +- README.md | 244 +- docs/AccountOrgResponse.md | 32 + docs/AccountsListResponse.md | 31 + docs/AdditionalIp.md | 2 +- docs/ApiBulkDeleteDnsZoneRecordsResponse.md | 30 + docs/ApiDnsZoneRecordResponse.md | 30 + docs/ApiDnsZoneResponse.md | 30 + docs/ApiPtrRecordResponse.md | 30 + docs/ApplicationConfig.md | 1 + docs/ApplicationMetaData.md | 33 + docs/AssignInstanceFirewallResponse.md | 29 + docs/AuditCountResponse.md | 33 + docs/BaseCheckCollectionCreateRequest.md | 31 + docs/BaseCheckCreateRequest.md | 32 + docs/BaseRemedyCreateRequest.md | 32 + docs/BulkDeleteDnsZoneRecordsRequest.md | 29 + ...nseData.md => BulkDeleteResultResponse.md} | 17 +- docs/CancelDomainRequest.md | 31 + docs/CancelInstanceRequest.md | 29 + docs/CancelObjectStorageRequest.md | 29 + docs/CancelRequest.md | 29 + docs/ChangedAuthCode.md | 30 + docs/Changes.md | 30 + docs/CheckCollectionCheckTemplates.md | 33 + docs/CheckCollectionCreateRequest.md | 33 + docs/CheckCollectionResponse.md | 40 + docs/CheckCollectionTemplateResponse.md | 38 + docs/CheckCollectionTemplatesApi.md | 190 + .../CheckCollectionTemplatesCheckTemplates.md | 32 + docs/CheckCollectionTemplatesGetResponse.md | 30 + docs/CheckCollectionTemplatesListResponse.md | 31 + docs/CheckCollectionsApi.md | 366 ++ docs/CheckCollectionsAuditListResponse.md | 31 + docs/CheckCollectionsAuditResponse.md | 42 + docs/CheckCollectionsGetResponse.md | 30 + docs/CheckCollectionsListResponse.md | 31 + docs/CheckCollectionsReplayRequest.md | 34 + docs/CheckCreateRequest.md | 34 + docs/CheckResponse.md | 44 + docs/CheckTemplateResponse.md | 40 + docs/CheckTemplatesGetResponse.md | 30 + docs/CheckTemplatesListResponse.md | 31 + docs/ChecksApi.md | 352 ++ docs/ChecksAuditListResponse.md | 31 + docs/ChecksAuditResponse.md | 42 + docs/ChecksGetResponse.md | 30 + docs/ChecksListResponse.md | 31 + docs/ChecksReplayRequest.md | 34 + docs/CreateDnsZoneRecordRequest.md | 37 + docs/CreateDnsZoneRequest.md | 29 + docs/CreateFirewallRequest.md | 32 + docs/CreateFirewallResponse.md | 30 + docs/CreateInstanceAddons.md | 7 +- docs/CreateInstanceRequest.md | 4 +- docs/CreateInstanceResponseData.md | 2 +- docs/CreatePtrRecordRequest.md | 31 + docs/CreateTagRequest.md | 1 + docs/CreateTicketRequest.md | 31 - docs/CreateTicketResponse.md | 30 - docs/CreateUserRequest.md | 2 +- docs/DNSApi.md | 1203 +++++ docs/DNSAuditsApi.md | 202 + docs/DnsZoneRecordResponse.md | 40 + docs/DnsZoneResponse.md | 31 + docs/DomainAuditResponse.md | 31 + docs/DomainAuditResponseData.md | 39 + docs/DomainAuthCodeRegenerateResponse.md | 30 + docs/DomainAuthCodeResponse.md | 43 + docs/DomainCancel.md | 34 + docs/DomainCancelResponse.md | 30 + docs/DomainCreateRequest.md | 34 + docs/DomainCreateResponse.md | 30 + docs/DomainDetails.md | 31 + docs/DomainFindResponse.md | 30 + docs/DomainHandles.md | 32 + docs/DomainPatchRequest.md | 30 + docs/DomainPatchResponse.md | 30 + docs/DomainResponse.md | 41 + docs/DomainsApi.md | 1004 ++++ docs/DomainsAuditsApi.md | 105 + docs/DomainsListResponse.md | 31 + docs/ExtCheckCollectionResponse.md | 40 + docs/ExtCheckCollectionTemplateResponse.md | 38 + .../ExtCheckCollectionTemplatesGetResponse.md | 30 + ...ExtCheckCollectionTemplatesListResponse.md | 31 + docs/ExtCheckCollectionsGetResponse.md | 30 + docs/ExtCheckCollectionsListResponse.md | 31 + docs/ExtCheckResponse.md | 43 + docs/ExtChecksGetResponse.md | 30 + docs/ExtChecksListResponse.md | 31 + docs/ExtRemediesGetResponse.md | 30 + docs/ExtRemediesListResponse.md | 31 + docs/ExtRemedyResponse.md | 42 + docs/FindFirewallResponse.md | 30 + docs/FirewallAuditResponse.md | 39 + docs/FirewallResponse.md | 39 + docs/FirewallRuleRequest.md | 34 + docs/FirewallRuleResponse.md | 34 + docs/FirewallsApi.md | 785 +++ docs/FirewallsAuditsApi.md | 105 + docs/HandleAddress.md | 35 + docs/HandleAuditResponse.md | 31 + docs/HandleAuditResponseData.md | 39 + docs/HandleBirthInfo.md | 32 + docs/HandleCreateRequest.md | 38 + docs/HandleCreateResponse.md | 30 + docs/HandleFindResponse.md | 30 + docs/HandleListResponse.md | 31 + docs/HandlePatchRequest.md | 34 + docs/HandlePatchResponse.md | 30 + docs/HandlePhone.md | 30 + docs/HandleResponse.md | 42 + docs/HandlesApi.md | 525 ++ docs/HandlesAuditsApi.md | 105 + docs/ImagesApi.md | 6 +- docs/ImagesAuditsApi.md | 4 +- docs/InstanceActionsAuditsApi.md | 4 +- docs/InstanceAssignmentSelfLinks1.md | 31 + docs/InstanceDetails.md | 37 + docs/InstanceResponse.md | 5 +- docs/InstanceStatus.md | 1 + docs/InstanceStatusRepresentation.md | 31 + docs/InstancesApi.md | 21 +- docs/InstancesAuditsApi.md | 4 +- docs/InternalApi.md | 175 - docs/InternalCheckAuditsApi.md | 111 + docs/InternalCheckCollectionAuditsApi.md | 111 + docs/InternalCheckCollectionReplayApi.md | 92 + docs/InternalCheckCollectionTemplatesApi.md | 196 + docs/InternalCheckCollectionsApi.md | 374 ++ docs/InternalCheckReplayApi.md | 92 + docs/InternalCheckTemplatesApi.md | 200 + docs/InternalChecksApi.md | 374 ++ docs/InternalRemediesApi.md | 374 ++ docs/InternalRemedyAuditsApi.md | 111 + docs/InternalRemedyReplayApi.md | 92 + docs/InternalRemedyTemplatesApi.md | 200 + docs/IpConfig.md | 2 +- docs/IpConfig1.md | 30 + docs/IpConfig2.md | 30 + docs/IpV4.md | 6 +- docs/IpV41.md | 6 +- docs/IpV42.md | 31 + docs/IpV43.md | 31 + docs/ListDnsZoneRecordsResponse.md | 31 + docs/ListDnsZonesResponse.md | 31 + docs/ListFirewallAuditResponse.md | 31 + docs/ListFirewallResponse.md | 31 + docs/ListFirewallResponseData.md | 39 + docs/ListInstancesResponseData.md | 5 +- docs/ListPresetRulesResponse.md | 30 + docs/ListPtrRecordsResponse.md | 31 + docs/ListVipResponseData.md | 2 +- docs/MinimumRequirements.md | 1 + docs/Nameserver.md | 31 + docs/ObjectStoragesApi.md | 9 +- docs/OptimalRequirements.md | 1 + docs/PatchFirewallRequest.md | 31 + docs/PatchFirewallResponse.md | 30 + docs/PatchInstanceRequest.md | 2 +- docs/PresetRulesResponse.md | 30 + docs/PrivateIpConfig.md | 2 +- docs/PtrRecordResponse.md | 33 + docs/PutFirewallRequest.md | 29 + docs/PutFirewallResponse.md | 30 + docs/RecordAuditResponse.md | 31 + docs/RecordAuditResponseData.md | 40 + docs/ReinstallInstanceRequest.md | 2 +- docs/RemediesApi.md | 352 ++ docs/RemediesAuditListResponse.md | 31 + docs/RemediesAuditResponse.md | 42 + docs/RemediesCreateRequest.md | 34 + docs/RemediesGetResponse.md | 30 + docs/RemediesListResponse.md | 31 + docs/RemediesReplayRequest.md | 34 + docs/RemedyResponse.md | 44 + docs/RemedyTemplateResponse.md | 41 + docs/RemedyTemplatesGetResponse.md | 30 + docs/RemedyTemplatesListResponse.md | 31 + docs/ReplayResponse.md | 29 + docs/Rules.md | 29 + docs/RulesRequest.md | 29 + docs/SetDefaultHandleResponse.md | 30 + docs/SnapshotsAuditsApi.md | 4 +- docs/SrcCidr.md | 30 + docs/TagAssignmentsAuditsApi.md | 4 +- docs/TagResponse.md | 1 + docs/TagsAuditsApi.md | 4 +- docs/UnassignInstanceFirewallResponse.md | 29 + docs/UpdateDnsZoneRecordRequest.md | 36 + docs/UpdatePtrRecordRequest.md | 29 + docs/UpdateTagRequest.md | 1 + docs/UpdateUserRequest.md | 2 +- docs/UpgradeInstanceRequest.md | 1 + docs/UserResponse.md | 2 +- docs/UsersApi.md | 304 +- docs/UsersObjectStorageCredentialsApi.md | 277 + docs/VipResponse.md | 2 +- docs/ZoneAuditResponse.md | 31 + docs/ZoneAuditResponseData.md | 39 + pfruck_contabo/__init__.py | 165 +- pfruck_contabo/api/__init__.py | 26 +- ...i.py => check_collection_templates_api.py} | 336 +- pfruck_contabo/api/check_collections_api.py | 1464 ++++++ pfruck_contabo/api/checks_api.py | 1305 +++++ pfruck_contabo/api/dns_api.py | 4484 +++++++++++++++++ pfruck_contabo/api/dns_audits_api.py | 897 ++++ pfruck_contabo/api/domains_api.py | 3627 +++++++++++++ pfruck_contabo/api/domains_audits_api.py | 468 ++ pfruck_contabo/api/firewalls_api.py | 2942 +++++++++++ pfruck_contabo/api/firewalls_audits_api.py | 468 ++ pfruck_contabo/api/handles_api.py | 1964 ++++++++ pfruck_contabo/api/handles_audits_api.py | 468 ++ pfruck_contabo/api/images_api.py | 17 + pfruck_contabo/api/instances_api.py | 90 +- .../api/internal_check_audits_api.py | 520 ++ .../internal_check_collection_audits_api.py | 520 ++ .../internal_check_collection_replay_api.py | 341 ++ ...internal_check_collection_templates_api.py | 842 ++++ .../api/internal_check_collections_api.py | 1529 ++++++ .../api/internal_check_replay_api.py | 341 ++ .../api/internal_check_templates_api.py | 876 ++++ pfruck_contabo/api/internal_checks_api.py | 1527 ++++++ pfruck_contabo/api/internal_remedies_api.py | 1527 ++++++ .../api/internal_remedy_audits_api.py | 520 ++ .../api/internal_remedy_replay_api.py | 341 ++ .../api/internal_remedy_templates_api.py | 876 ++++ pfruck_contabo/api/object_storages_api.py | 33 +- pfruck_contabo/api/remedies_api.py | 1305 +++++ pfruck_contabo/api/users_api.py | 1016 +--- .../users_object_storage_credentials_api.py | 1067 ++++ pfruck_contabo/models/__init__.py | 139 +- pfruck_contabo/models/account_org_response.py | 95 + .../models/accounts_list_response.py | 103 + pfruck_contabo/models/additional_ip.py | 6 +- ...i_bulk_delete_dns_zone_records_response.py | 101 + .../models/api_dns_zone_record_response.py | 101 + .../models/api_dns_zone_response.py | 101 + ...response.py => api_ptr_record_response.py} | 14 +- pfruck_contabo/models/application_config.py | 10 +- .../models/application_meta_data.py | 95 + .../assign_instance_firewall_response.py | 91 + pfruck_contabo/models/audit_count_response.py | 97 + .../base_check_collection_create_request.py | 98 + .../models/base_check_create_request.py | 100 + .../models/base_remedy_create_request.py | 100 + .../bulk_delete_dns_zone_records_request.py | 87 + .../models/bulk_delete_result_response.py | 92 + .../models/cancel_domain_request.py | 102 + .../models/cancel_instance_request.py | 88 + .../models/cancel_object_storage_request.py | 88 + pfruck_contabo/models/cancel_request.py | 97 + pfruck_contabo/models/changed_auth_code.py | 90 + pfruck_contabo/models/changes.py | 89 + .../check_collection_check_templates.py | 104 + .../models/check_collection_create_request.py | 102 + .../models/check_collection_response.py | 141 + .../check_collection_template_response.py | 122 + ...ck_collection_templates_check_templates.py | 102 + ...check_collection_templates_get_response.py | 101 + ...heck_collection_templates_list_response.py | 107 + .../check_collections_audit_list_response.py | 107 + .../check_collections_audit_response.py | 126 + .../models/check_collections_get_response.py | 101 + .../models/check_collections_list_response.py | 107 + .../check_collections_replay_request.py | 98 + pfruck_contabo/models/check_create_request.py | 104 + pfruck_contabo/models/check_response.py | 133 + .../models/check_template_response.py | 118 + .../models/check_templates_get_response.py | 101 + .../models/check_templates_list_response.py | 107 + .../models/checks_audit_list_response.py | 107 + .../models/checks_audit_response.py | 126 + pfruck_contabo/models/checks_get_response.py | 101 + pfruck_contabo/models/checks_list_response.py | 107 + .../models/checks_replay_request.py | 98 + .../models/create_dns_zone_record_request.py | 111 + .../models/create_dns_zone_request.py | 87 + .../models/create_firewall_request.py | 105 + .../models/create_firewall_response.py | 101 + .../models/create_instance_addons.py | 4 +- .../models/create_instance_request.py | 10 +- .../models/create_instance_response_data.py | 2 +- .../create_object_storage_response_data.py | 4 +- .../models/create_ptr_record_request.py | 91 + pfruck_contabo/models/create_tag_request.py | 10 +- pfruck_contabo/models/create_user_request.py | 6 +- .../models/dns_zone_record_response.py | 110 + ..._response_data.py => dns_zone_response.py} | 16 +- .../models/domain_audit_response.py | 107 + .../models/domain_audit_response_data.py | 116 + .../domain_auth_code_regenerate_response.py | 101 + .../models/domain_auth_code_response.py | 136 + pfruck_contabo/models/domain_cancel.py | 99 + .../models/domain_cancel_response.py | 101 + .../models/domain_create_request.py | 119 + .../models/domain_create_response.py | 101 + pfruck_contabo/models/domain_details.py | 91 + pfruck_contabo/models/domain_find_response.py | 101 + pfruck_contabo/models/domain_handles.py | 93 + pfruck_contabo/models/domain_patch_request.py | 101 + .../models/domain_patch_response.py | 101 + pfruck_contabo/models/domain_response.py | 128 + .../models/domains_list_response.py | 107 + .../models/ext_check_collection_response.py | 141 + .../ext_check_collection_template_response.py | 122 + ...check_collection_templates_get_response.py | 101 + ...heck_collection_templates_list_response.py | 107 + .../ext_check_collections_get_response.py | 101 + .../ext_check_collections_list_response.py | 107 + pfruck_contabo/models/ext_check_response.py | 131 + .../models/ext_checks_get_response.py | 101 + .../models/ext_checks_list_response.py | 107 + .../models/ext_remedies_get_response.py | 101 + .../models/ext_remedies_list_response.py | 107 + pfruck_contabo/models/ext_remedy_response.py | 129 + .../models/find_firewall_response.py | 101 + .../models/firewall_audit_response.py | 116 + pfruck_contabo/models/firewall_response.py | 136 + .../models/firewall_rule_request.py | 123 + .../models/firewall_rule_response.py | 122 + pfruck_contabo/models/handle_address.py | 100 + .../models/handle_audit_response.py | 107 + .../models/handle_audit_response_data.py | 116 + pfruck_contabo/models/handle_birth_info.py | 95 + .../models/handle_create_request.py | 135 + .../models/handle_create_response.py | 101 + pfruck_contabo/models/handle_find_response.py | 101 + pfruck_contabo/models/handle_list_response.py | 107 + pfruck_contabo/models/handle_patch_request.py | 120 + .../models/handle_patch_response.py | 101 + ...eate_ticket_request.py => handle_phone.py} | 20 +- pfruck_contabo/models/handle_response.py | 143 + .../models/instance_assignment_self_links1.py | 91 + pfruck_contabo/models/instance_details.py | 107 + pfruck_contabo/models/instance_response.py | 14 +- pfruck_contabo/models/instance_status.py | 2 +- .../models/instance_status_representation.py | 98 + pfruck_contabo/models/ip_config.py | 6 +- pfruck_contabo/models/ip_config1.py | 97 + pfruck_contabo/models/ip_config2.py | 97 + pfruck_contabo/models/ip_v4.py | 12 +- pfruck_contabo/models/ip_v41.py | 12 +- pfruck_contabo/models/ip_v42.py | 91 + pfruck_contabo/models/ip_v43.py | 91 + .../models/list_dns_zone_records_response.py | 107 + .../models/list_dns_zones_response.py | 107 + .../models/list_firewall_audit_response.py | 107 + .../models/list_firewall_response.py | 107 + .../models/list_firewall_response_data.py | 136 + .../models/list_instances_response_data.py | 14 +- .../models/list_preset_rules_response.py | 101 + .../models/list_ptr_records_response.py | 107 + .../models/list_vip_response_data.py | 6 +- pfruck_contabo/models/minimum_requirements.py | 8 +- pfruck_contabo/models/nameserver.py | 91 + .../models/object_storage_response.py | 4 +- pfruck_contabo/models/optimal_requirements.py | 8 +- .../models/patch_firewall_request.py | 102 + .../models/patch_firewall_response.py | 101 + .../models/patch_instance_request.py | 2 +- .../models/preset_rules_response.py | 89 + pfruck_contabo/models/private_ip_config.py | 6 +- pfruck_contabo/models/ptr_record_response.py | 96 + pfruck_contabo/models/put_firewall_request.py | 91 + .../models/put_firewall_response.py | 101 + .../models/record_audit_response.py | 107 + .../models/record_audit_response_data.py | 118 + .../models/reinstall_instance_request.py | 4 +- .../models/remedies_audit_list_response.py | 107 + .../models/remedies_audit_response.py | 126 + .../models/remedies_create_request.py | 104 + .../models/remedies_get_response.py | 101 + .../models/remedies_list_response.py | 107 + .../models/remedies_replay_request.py | 98 + pfruck_contabo/models/remedy_response.py | 133 + .../models/remedy_template_response.py | 120 + .../models/remedy_templates_get_response.py | 101 + .../models/remedy_templates_list_response.py | 107 + pfruck_contabo/models/replay_response.py | 95 + pfruck_contabo/models/rules.py | 95 + pfruck_contabo/models/rules_request.py | 95 + .../models/set_default_handle_response.py | 101 + pfruck_contabo/models/src_cidr.py | 89 + pfruck_contabo/models/tag_response.py | 8 +- .../unassign_instance_firewall_response.py | 91 + .../models/update_dns_zone_record_request.py | 109 + .../models/update_ptr_record_request.py | 87 + pfruck_contabo/models/update_tag_request.py | 8 +- pfruck_contabo/models/update_user_request.py | 6 +- .../models/upgrade_instance_request.py | 6 +- .../upgrade_object_storage_response_data.py | 4 +- pfruck_contabo/models/user_response.py | 6 +- pfruck_contabo/models/vip_response.py | 6 +- pfruck_contabo/models/zone_audit_response.py | 107 + .../models/zone_audit_response_data.py | 116 + setup.py | 244 +- test/test_account_org_response.py | 58 + test/test_accounts_list_response.py | 76 + test/test_additional_ip.py | 4 +- ...i_bulk_delete_dns_zone_records_response.py | 66 + test/test_api_dns_zone_record_response.py | 84 + ...ponse.py => test_api_dns_zone_response.py} | 32 +- test/test_api_ptr_record_response.py | 70 + test/test_application_config.py | 22 +- test/test_application_meta_data.py | 68 + test/test_application_requirements.py | 6 +- test/test_application_response.py | 6 +- .../test_assign_instance_firewall_response.py | 58 + test/test_assign_vip_response.py | 4 +- test/test_audit_count_response.py | 60 + ...st_base_check_collection_create_request.py | 56 + test/test_base_check_create_request.py | 57 + test/test_base_remedy_create_request.py | 57 + ...st_bulk_delete_dns_zone_records_request.py | 52 + ...py => test_bulk_delete_result_response.py} | 26 +- ...quest.py => test_cancel_domain_request.py} | 31 +- test/test_cancel_instance_request.py | 51 + test/test_cancel_object_storage_request.py | 51 + test/test_cancel_request.py | 51 + test/test_changed_auth_code.py | 52 + test/test_changes.py | 54 + test/test_check_collection_check_templates.py | 72 + test/test_check_collection_create_request.py | 60 + test/test_check_collection_response.py | 110 + ...test_check_collection_template_response.py | 70 + test/test_check_collection_templates_api.py | 45 + ...ck_collection_templates_check_templates.py | 68 + ...check_collection_templates_get_response.py | 80 + ...heck_collection_templates_list_response.py | 98 + test/test_check_collections_api.py | 59 + ...t_check_collections_audit_list_response.py | 106 + test/test_check_collections_audit_response.py | 82 + test/test_check_collections_get_response.py | 120 + test/test_check_collections_list_response.py | 138 + test/test_check_collections_replay_request.py | 58 + test/test_check_create_request.py | 61 + test/test_check_response.py | 82 + test/test_check_template_response.py | 74 + test/test_check_templates_get_response.py | 84 + test/test_check_templates_list_response.py | 102 + test/test_checks_api.py | 59 + test/test_checks_audit_list_response.py | 106 + test/test_checks_audit_response.py | 82 + test/test_checks_get_response.py | 92 + test/test_checks_list_response.py | 110 + test/test_checks_replay_request.py | 58 + test/test_create_dns_zone_record_request.py | 63 + test/test_create_dns_zone_request.py | 52 + test/test_create_firewall_request.py | 65 + test/test_create_firewall_response.py | 152 + test/test_create_instance_addons.py | 1 + test/test_create_instance_request.py | 3 +- test/test_create_instance_response.py | 8 +- test/test_create_instance_response_data.py | 4 +- test/test_create_private_network_response.py | 8 +- test/test_create_ptr_record_request.py | 56 + test/test_create_tag_request.py | 3 +- test/test_dns_api.py | 129 + test/test_dns_audits_api.py | 45 + test/test_dns_zone_record_response.py | 74 + test/test_dns_zone_response.py | 56 + test/test_domain_audit_response.py | 100 + test/test_domain_audit_response_data.py | 71 + ...st_domain_auth_code_regenerate_response.py | 90 + test/test_domain_auth_code_response.py | 98 + test/test_domain_cancel.py | 62 + test/test_domain_cancel_response.py | 72 + test/test_domain_create_request.py | 77 + test/test_domain_create_response.py | 86 + test/test_domain_details.py | 56 + test/test_domain_find_response.py | 86 + test/test_domain_handles.py | 58 + test/test_domain_patch_request.py | 61 + test/test_domain_patch_response.py | 86 + test/test_domain_response.py | 90 + test/test_domains_api.py | 115 + test/test_domains_audits_api.py | 38 + test/test_domains_list_response.py | 104 + test/test_ext_check_collection_response.py | 74 + ..._ext_check_collection_template_response.py | 70 + ...check_collection_templates_get_response.py | 80 + ...heck_collection_templates_list_response.py | 98 + ...test_ext_check_collections_get_response.py | 84 + ...est_ext_check_collections_list_response.py | 102 + test/test_ext_check_response.py | 80 + test/test_ext_checks_get_response.py | 90 + test/test_ext_checks_list_response.py | 108 + test/test_ext_remedies_get_response.py | 88 + test/test_ext_remedies_list_response.py | 106 + test/test_ext_remedy_response.py | 78 + test/test_find_firewall_response.py | 152 + test/test_find_instance_response.py | 22 +- test/test_find_private_network_response.py | 8 +- test/test_find_tag_response.py | 6 +- test/test_find_vip_response.py | 4 +- test/test_firewall_audit_response.py | 71 + test/test_firewall_response.py | 142 + test/test_firewall_rule_request.py | 65 + test/test_firewall_rule_response.py | 66 + test/test_firewalls_api.py | 94 + test/test_firewalls_audits_api.py | 38 + test/test_handle_address.py | 62 + test/test_handle_audit_response.py | 100 + test/test_handle_audit_response_data.py | 71 + test/test_handle_birth_info.py | 54 + test/test_handle_create_request.py | 91 + test/test_handle_create_response.py | 88 + test/test_handle_find_response.py | 88 + test/test_handle_list_response.py | 106 + test/test_handle_patch_request.py | 84 + test/test_handle_patch_response.py | 88 + test/test_handle_phone.py | 54 + test/test_handle_response.py | 99 + test/test_handles_api.py | 73 + test/test_handles_audits_api.py | 38 + test/test_instance_assignment_self_links1.py | 56 + test/test_instance_details.py | 84 + test/test_instance_response.py | 16 +- test/test_instance_status_representation.py | 55 + test/test_instances.py | 8 +- test/test_internal_api.py | 45 - test/test_internal_check_audits_api.py | 38 + ...st_internal_check_collection_audits_api.py | 38 + ...st_internal_check_collection_replay_api.py | 38 + ...internal_check_collection_templates_api.py | 45 + test/test_internal_check_collections_api.py | 59 + test/test_internal_check_replay_api.py | 38 + test/test_internal_check_templates_api.py | 45 + test/test_internal_checks_api.py | 59 + test/test_internal_remedies_api.py | 59 + test/test_internal_remedy_audits_api.py | 38 + test/test_internal_remedy_replay_api.py | 38 + test/test_internal_remedy_templates_api.py | 45 + test/test_ip_config.py | 4 +- test/test_ip_config1.py | 66 + test/test_ip_config2.py | 66 + test/test_ip_v4.py | 16 +- test/test_ip_v41.py | 16 +- test/test_ip_v42.py | 56 + test/test_ip_v43.py | 56 + test/test_list_applications_response.py | 6 +- test/test_list_dns_zone_records_response.py | 102 + test/test_list_dns_zones_response.py | 84 + test/test_list_firewall_audit_response.py | 100 + test/test_list_firewall_response.py | 170 + test/test_list_firewall_response_data.py | 142 + test/test_list_instances_response.py | 22 +- test/test_list_instances_response_data.py | 16 +- test/test_list_preset_rules_response.py | 94 + test/test_list_private_network_response.py | 8 +- ...test_list_private_network_response_data.py | 8 +- test/test_list_ptr_records_response.py | 88 + test/test_list_tag_response.py | 6 +- test/test_list_vip_response.py | 4 +- test/test_list_vip_response_data.py | 2 +- test/test_minimum_requirements.py | 3 +- test/test_nameserver.py | 54 + test/test_optimal_requirements.py | 3 +- test/test_patch_firewall_request.py | 53 + test/test_patch_firewall_response.py | 152 + test/test_patch_private_network_response.py | 8 +- test/test_preset_rules_response.py | 84 + test/test_private_ip_config.py | 4 +- test/test_private_network_response.py | 8 +- test/test_ptr_record_response.py | 60 + test/test_put_firewall_request.py | 60 + test/test_put_firewall_response.py | 152 + test/test_record_audit_response.py | 102 + test/test_record_audit_response_data.py | 73 + test/test_reinstall_instance_request.py | 2 +- test/test_remedies_api.py | 59 + test/test_remedies_audit_list_response.py | 106 + test/test_remedies_audit_response.py | 82 + test/test_remedies_create_request.py | 61 + test/test_remedies_get_response.py | 92 + test/test_remedies_list_response.py | 110 + test/test_remedies_replay_request.py | 58 + test/test_remedy_response.py | 82 + test/test_remedy_template_response.py | 76 + test/test_remedy_templates_get_response.py | 86 + test/test_remedy_templates_list_response.py | 104 + test/test_replay_response.py | 66 + test/test_rules.py | 72 + test/test_rules_request.py | 68 + test/test_set_default_handle_response.py | 88 + test/test_src_cidr.py | 52 + test/test_tag_response.py | 4 +- ...est_unassign_instance_firewall_response.py | 58 + test/test_update_dns_zone_record_request.py | 62 + test/test_update_ptr_record_request.py | 52 + test/test_update_tag_request.py | 3 +- test/test_upgrade_instance_request.py | 3 +- test/test_users_api.py | 28 +- ...st_users_object_storage_credentials_api.py | 52 + test/test_vip_response.py | 2 +- test/test_zone_audit_response.py | 100 + test/test_zone_audit_response_data.py | 71 + 599 files changed, 70973 insertions(+), 1925 deletions(-) create mode 100644 docs/AccountOrgResponse.md create mode 100644 docs/AccountsListResponse.md create mode 100644 docs/ApiBulkDeleteDnsZoneRecordsResponse.md create mode 100644 docs/ApiDnsZoneRecordResponse.md create mode 100644 docs/ApiDnsZoneResponse.md create mode 100644 docs/ApiPtrRecordResponse.md create mode 100644 docs/ApplicationMetaData.md create mode 100644 docs/AssignInstanceFirewallResponse.md create mode 100644 docs/AuditCountResponse.md create mode 100644 docs/BaseCheckCollectionCreateRequest.md create mode 100644 docs/BaseCheckCreateRequest.md create mode 100644 docs/BaseRemedyCreateRequest.md create mode 100644 docs/BulkDeleteDnsZoneRecordsRequest.md rename docs/{CreateTicketResponseData.md => BulkDeleteResultResponse.md} (50%) create mode 100644 docs/CancelDomainRequest.md create mode 100644 docs/CancelInstanceRequest.md create mode 100644 docs/CancelObjectStorageRequest.md create mode 100644 docs/CancelRequest.md create mode 100644 docs/ChangedAuthCode.md create mode 100644 docs/Changes.md create mode 100644 docs/CheckCollectionCheckTemplates.md create mode 100644 docs/CheckCollectionCreateRequest.md create mode 100644 docs/CheckCollectionResponse.md create mode 100644 docs/CheckCollectionTemplateResponse.md create mode 100644 docs/CheckCollectionTemplatesApi.md create mode 100644 docs/CheckCollectionTemplatesCheckTemplates.md create mode 100644 docs/CheckCollectionTemplatesGetResponse.md create mode 100644 docs/CheckCollectionTemplatesListResponse.md create mode 100644 docs/CheckCollectionsApi.md create mode 100644 docs/CheckCollectionsAuditListResponse.md create mode 100644 docs/CheckCollectionsAuditResponse.md create mode 100644 docs/CheckCollectionsGetResponse.md create mode 100644 docs/CheckCollectionsListResponse.md create mode 100644 docs/CheckCollectionsReplayRequest.md create mode 100644 docs/CheckCreateRequest.md create mode 100644 docs/CheckResponse.md create mode 100644 docs/CheckTemplateResponse.md create mode 100644 docs/CheckTemplatesGetResponse.md create mode 100644 docs/CheckTemplatesListResponse.md create mode 100644 docs/ChecksApi.md create mode 100644 docs/ChecksAuditListResponse.md create mode 100644 docs/ChecksAuditResponse.md create mode 100644 docs/ChecksGetResponse.md create mode 100644 docs/ChecksListResponse.md create mode 100644 docs/ChecksReplayRequest.md create mode 100644 docs/CreateDnsZoneRecordRequest.md create mode 100644 docs/CreateDnsZoneRequest.md create mode 100644 docs/CreateFirewallRequest.md create mode 100644 docs/CreateFirewallResponse.md create mode 100644 docs/CreatePtrRecordRequest.md delete mode 100644 docs/CreateTicketRequest.md delete mode 100644 docs/CreateTicketResponse.md create mode 100644 docs/DNSApi.md create mode 100644 docs/DNSAuditsApi.md create mode 100644 docs/DnsZoneRecordResponse.md create mode 100644 docs/DnsZoneResponse.md create mode 100644 docs/DomainAuditResponse.md create mode 100644 docs/DomainAuditResponseData.md create mode 100644 docs/DomainAuthCodeRegenerateResponse.md create mode 100644 docs/DomainAuthCodeResponse.md create mode 100644 docs/DomainCancel.md create mode 100644 docs/DomainCancelResponse.md create mode 100644 docs/DomainCreateRequest.md create mode 100644 docs/DomainCreateResponse.md create mode 100644 docs/DomainDetails.md create mode 100644 docs/DomainFindResponse.md create mode 100644 docs/DomainHandles.md create mode 100644 docs/DomainPatchRequest.md create mode 100644 docs/DomainPatchResponse.md create mode 100644 docs/DomainResponse.md create mode 100644 docs/DomainsApi.md create mode 100644 docs/DomainsAuditsApi.md create mode 100644 docs/DomainsListResponse.md create mode 100644 docs/ExtCheckCollectionResponse.md create mode 100644 docs/ExtCheckCollectionTemplateResponse.md create mode 100644 docs/ExtCheckCollectionTemplatesGetResponse.md create mode 100644 docs/ExtCheckCollectionTemplatesListResponse.md create mode 100644 docs/ExtCheckCollectionsGetResponse.md create mode 100644 docs/ExtCheckCollectionsListResponse.md create mode 100644 docs/ExtCheckResponse.md create mode 100644 docs/ExtChecksGetResponse.md create mode 100644 docs/ExtChecksListResponse.md create mode 100644 docs/ExtRemediesGetResponse.md create mode 100644 docs/ExtRemediesListResponse.md create mode 100644 docs/ExtRemedyResponse.md create mode 100644 docs/FindFirewallResponse.md create mode 100644 docs/FirewallAuditResponse.md create mode 100644 docs/FirewallResponse.md create mode 100644 docs/FirewallRuleRequest.md create mode 100644 docs/FirewallRuleResponse.md create mode 100644 docs/FirewallsApi.md create mode 100644 docs/FirewallsAuditsApi.md create mode 100644 docs/HandleAddress.md create mode 100644 docs/HandleAuditResponse.md create mode 100644 docs/HandleAuditResponseData.md create mode 100644 docs/HandleBirthInfo.md create mode 100644 docs/HandleCreateRequest.md create mode 100644 docs/HandleCreateResponse.md create mode 100644 docs/HandleFindResponse.md create mode 100644 docs/HandleListResponse.md create mode 100644 docs/HandlePatchRequest.md create mode 100644 docs/HandlePatchResponse.md create mode 100644 docs/HandlePhone.md create mode 100644 docs/HandleResponse.md create mode 100644 docs/HandlesApi.md create mode 100644 docs/HandlesAuditsApi.md create mode 100644 docs/InstanceAssignmentSelfLinks1.md create mode 100644 docs/InstanceDetails.md create mode 100644 docs/InstanceStatusRepresentation.md delete mode 100644 docs/InternalApi.md create mode 100644 docs/InternalCheckAuditsApi.md create mode 100644 docs/InternalCheckCollectionAuditsApi.md create mode 100644 docs/InternalCheckCollectionReplayApi.md create mode 100644 docs/InternalCheckCollectionTemplatesApi.md create mode 100644 docs/InternalCheckCollectionsApi.md create mode 100644 docs/InternalCheckReplayApi.md create mode 100644 docs/InternalCheckTemplatesApi.md create mode 100644 docs/InternalChecksApi.md create mode 100644 docs/InternalRemediesApi.md create mode 100644 docs/InternalRemedyAuditsApi.md create mode 100644 docs/InternalRemedyReplayApi.md create mode 100644 docs/InternalRemedyTemplatesApi.md create mode 100644 docs/IpConfig1.md create mode 100644 docs/IpConfig2.md create mode 100644 docs/IpV42.md create mode 100644 docs/IpV43.md create mode 100644 docs/ListDnsZoneRecordsResponse.md create mode 100644 docs/ListDnsZonesResponse.md create mode 100644 docs/ListFirewallAuditResponse.md create mode 100644 docs/ListFirewallResponse.md create mode 100644 docs/ListFirewallResponseData.md create mode 100644 docs/ListPresetRulesResponse.md create mode 100644 docs/ListPtrRecordsResponse.md create mode 100644 docs/Nameserver.md create mode 100644 docs/PatchFirewallRequest.md create mode 100644 docs/PatchFirewallResponse.md create mode 100644 docs/PresetRulesResponse.md create mode 100644 docs/PtrRecordResponse.md create mode 100644 docs/PutFirewallRequest.md create mode 100644 docs/PutFirewallResponse.md create mode 100644 docs/RecordAuditResponse.md create mode 100644 docs/RecordAuditResponseData.md create mode 100644 docs/RemediesApi.md create mode 100644 docs/RemediesAuditListResponse.md create mode 100644 docs/RemediesAuditResponse.md create mode 100644 docs/RemediesCreateRequest.md create mode 100644 docs/RemediesGetResponse.md create mode 100644 docs/RemediesListResponse.md create mode 100644 docs/RemediesReplayRequest.md create mode 100644 docs/RemedyResponse.md create mode 100644 docs/RemedyTemplateResponse.md create mode 100644 docs/RemedyTemplatesGetResponse.md create mode 100644 docs/RemedyTemplatesListResponse.md create mode 100644 docs/ReplayResponse.md create mode 100644 docs/Rules.md create mode 100644 docs/RulesRequest.md create mode 100644 docs/SetDefaultHandleResponse.md create mode 100644 docs/SrcCidr.md create mode 100644 docs/UnassignInstanceFirewallResponse.md create mode 100644 docs/UpdateDnsZoneRecordRequest.md create mode 100644 docs/UpdatePtrRecordRequest.md create mode 100644 docs/UsersObjectStorageCredentialsApi.md create mode 100644 docs/ZoneAuditResponse.md create mode 100644 docs/ZoneAuditResponseData.md rename pfruck_contabo/api/{internal_api.py => check_collection_templates_api.py} (62%) create mode 100644 pfruck_contabo/api/check_collections_api.py create mode 100644 pfruck_contabo/api/checks_api.py create mode 100644 pfruck_contabo/api/dns_api.py create mode 100644 pfruck_contabo/api/dns_audits_api.py create mode 100644 pfruck_contabo/api/domains_api.py create mode 100644 pfruck_contabo/api/domains_audits_api.py create mode 100644 pfruck_contabo/api/firewalls_api.py create mode 100644 pfruck_contabo/api/firewalls_audits_api.py create mode 100644 pfruck_contabo/api/handles_api.py create mode 100644 pfruck_contabo/api/handles_audits_api.py create mode 100644 pfruck_contabo/api/internal_check_audits_api.py create mode 100644 pfruck_contabo/api/internal_check_collection_audits_api.py create mode 100644 pfruck_contabo/api/internal_check_collection_replay_api.py create mode 100644 pfruck_contabo/api/internal_check_collection_templates_api.py create mode 100644 pfruck_contabo/api/internal_check_collections_api.py create mode 100644 pfruck_contabo/api/internal_check_replay_api.py create mode 100644 pfruck_contabo/api/internal_check_templates_api.py create mode 100644 pfruck_contabo/api/internal_checks_api.py create mode 100644 pfruck_contabo/api/internal_remedies_api.py create mode 100644 pfruck_contabo/api/internal_remedy_audits_api.py create mode 100644 pfruck_contabo/api/internal_remedy_replay_api.py create mode 100644 pfruck_contabo/api/internal_remedy_templates_api.py create mode 100644 pfruck_contabo/api/remedies_api.py create mode 100644 pfruck_contabo/api/users_object_storage_credentials_api.py create mode 100644 pfruck_contabo/models/account_org_response.py create mode 100644 pfruck_contabo/models/accounts_list_response.py create mode 100644 pfruck_contabo/models/api_bulk_delete_dns_zone_records_response.py create mode 100644 pfruck_contabo/models/api_dns_zone_record_response.py create mode 100644 pfruck_contabo/models/api_dns_zone_response.py rename pfruck_contabo/models/{create_ticket_response.py => api_ptr_record_response.py} (86%) create mode 100644 pfruck_contabo/models/application_meta_data.py create mode 100644 pfruck_contabo/models/assign_instance_firewall_response.py create mode 100644 pfruck_contabo/models/audit_count_response.py create mode 100644 pfruck_contabo/models/base_check_collection_create_request.py create mode 100644 pfruck_contabo/models/base_check_create_request.py create mode 100644 pfruck_contabo/models/base_remedy_create_request.py create mode 100644 pfruck_contabo/models/bulk_delete_dns_zone_records_request.py create mode 100644 pfruck_contabo/models/bulk_delete_result_response.py create mode 100644 pfruck_contabo/models/cancel_domain_request.py create mode 100644 pfruck_contabo/models/cancel_instance_request.py create mode 100644 pfruck_contabo/models/cancel_object_storage_request.py create mode 100644 pfruck_contabo/models/cancel_request.py create mode 100644 pfruck_contabo/models/changed_auth_code.py create mode 100644 pfruck_contabo/models/changes.py create mode 100644 pfruck_contabo/models/check_collection_check_templates.py create mode 100644 pfruck_contabo/models/check_collection_create_request.py create mode 100644 pfruck_contabo/models/check_collection_response.py create mode 100644 pfruck_contabo/models/check_collection_template_response.py create mode 100644 pfruck_contabo/models/check_collection_templates_check_templates.py create mode 100644 pfruck_contabo/models/check_collection_templates_get_response.py create mode 100644 pfruck_contabo/models/check_collection_templates_list_response.py create mode 100644 pfruck_contabo/models/check_collections_audit_list_response.py create mode 100644 pfruck_contabo/models/check_collections_audit_response.py create mode 100644 pfruck_contabo/models/check_collections_get_response.py create mode 100644 pfruck_contabo/models/check_collections_list_response.py create mode 100644 pfruck_contabo/models/check_collections_replay_request.py create mode 100644 pfruck_contabo/models/check_create_request.py create mode 100644 pfruck_contabo/models/check_response.py create mode 100644 pfruck_contabo/models/check_template_response.py create mode 100644 pfruck_contabo/models/check_templates_get_response.py create mode 100644 pfruck_contabo/models/check_templates_list_response.py create mode 100644 pfruck_contabo/models/checks_audit_list_response.py create mode 100644 pfruck_contabo/models/checks_audit_response.py create mode 100644 pfruck_contabo/models/checks_get_response.py create mode 100644 pfruck_contabo/models/checks_list_response.py create mode 100644 pfruck_contabo/models/checks_replay_request.py create mode 100644 pfruck_contabo/models/create_dns_zone_record_request.py create mode 100644 pfruck_contabo/models/create_dns_zone_request.py create mode 100644 pfruck_contabo/models/create_firewall_request.py create mode 100644 pfruck_contabo/models/create_firewall_response.py create mode 100644 pfruck_contabo/models/create_ptr_record_request.py create mode 100644 pfruck_contabo/models/dns_zone_record_response.py rename pfruck_contabo/models/{create_ticket_response_data.py => dns_zone_response.py} (85%) create mode 100644 pfruck_contabo/models/domain_audit_response.py create mode 100644 pfruck_contabo/models/domain_audit_response_data.py create mode 100644 pfruck_contabo/models/domain_auth_code_regenerate_response.py create mode 100644 pfruck_contabo/models/domain_auth_code_response.py create mode 100644 pfruck_contabo/models/domain_cancel.py create mode 100644 pfruck_contabo/models/domain_cancel_response.py create mode 100644 pfruck_contabo/models/domain_create_request.py create mode 100644 pfruck_contabo/models/domain_create_response.py create mode 100644 pfruck_contabo/models/domain_details.py create mode 100644 pfruck_contabo/models/domain_find_response.py create mode 100644 pfruck_contabo/models/domain_handles.py create mode 100644 pfruck_contabo/models/domain_patch_request.py create mode 100644 pfruck_contabo/models/domain_patch_response.py create mode 100644 pfruck_contabo/models/domain_response.py create mode 100644 pfruck_contabo/models/domains_list_response.py create mode 100644 pfruck_contabo/models/ext_check_collection_response.py create mode 100644 pfruck_contabo/models/ext_check_collection_template_response.py create mode 100644 pfruck_contabo/models/ext_check_collection_templates_get_response.py create mode 100644 pfruck_contabo/models/ext_check_collection_templates_list_response.py create mode 100644 pfruck_contabo/models/ext_check_collections_get_response.py create mode 100644 pfruck_contabo/models/ext_check_collections_list_response.py create mode 100644 pfruck_contabo/models/ext_check_response.py create mode 100644 pfruck_contabo/models/ext_checks_get_response.py create mode 100644 pfruck_contabo/models/ext_checks_list_response.py create mode 100644 pfruck_contabo/models/ext_remedies_get_response.py create mode 100644 pfruck_contabo/models/ext_remedies_list_response.py create mode 100644 pfruck_contabo/models/ext_remedy_response.py create mode 100644 pfruck_contabo/models/find_firewall_response.py create mode 100644 pfruck_contabo/models/firewall_audit_response.py create mode 100644 pfruck_contabo/models/firewall_response.py create mode 100644 pfruck_contabo/models/firewall_rule_request.py create mode 100644 pfruck_contabo/models/firewall_rule_response.py create mode 100644 pfruck_contabo/models/handle_address.py create mode 100644 pfruck_contabo/models/handle_audit_response.py create mode 100644 pfruck_contabo/models/handle_audit_response_data.py create mode 100644 pfruck_contabo/models/handle_birth_info.py create mode 100644 pfruck_contabo/models/handle_create_request.py create mode 100644 pfruck_contabo/models/handle_create_response.py create mode 100644 pfruck_contabo/models/handle_find_response.py create mode 100644 pfruck_contabo/models/handle_list_response.py create mode 100644 pfruck_contabo/models/handle_patch_request.py create mode 100644 pfruck_contabo/models/handle_patch_response.py rename pfruck_contabo/models/{create_ticket_request.py => handle_phone.py} (75%) create mode 100644 pfruck_contabo/models/handle_response.py create mode 100644 pfruck_contabo/models/instance_assignment_self_links1.py create mode 100644 pfruck_contabo/models/instance_details.py create mode 100644 pfruck_contabo/models/instance_status_representation.py create mode 100644 pfruck_contabo/models/ip_config1.py create mode 100644 pfruck_contabo/models/ip_config2.py create mode 100644 pfruck_contabo/models/ip_v42.py create mode 100644 pfruck_contabo/models/ip_v43.py create mode 100644 pfruck_contabo/models/list_dns_zone_records_response.py create mode 100644 pfruck_contabo/models/list_dns_zones_response.py create mode 100644 pfruck_contabo/models/list_firewall_audit_response.py create mode 100644 pfruck_contabo/models/list_firewall_response.py create mode 100644 pfruck_contabo/models/list_firewall_response_data.py create mode 100644 pfruck_contabo/models/list_preset_rules_response.py create mode 100644 pfruck_contabo/models/list_ptr_records_response.py create mode 100644 pfruck_contabo/models/nameserver.py create mode 100644 pfruck_contabo/models/patch_firewall_request.py create mode 100644 pfruck_contabo/models/patch_firewall_response.py create mode 100644 pfruck_contabo/models/preset_rules_response.py create mode 100644 pfruck_contabo/models/ptr_record_response.py create mode 100644 pfruck_contabo/models/put_firewall_request.py create mode 100644 pfruck_contabo/models/put_firewall_response.py create mode 100644 pfruck_contabo/models/record_audit_response.py create mode 100644 pfruck_contabo/models/record_audit_response_data.py create mode 100644 pfruck_contabo/models/remedies_audit_list_response.py create mode 100644 pfruck_contabo/models/remedies_audit_response.py create mode 100644 pfruck_contabo/models/remedies_create_request.py create mode 100644 pfruck_contabo/models/remedies_get_response.py create mode 100644 pfruck_contabo/models/remedies_list_response.py create mode 100644 pfruck_contabo/models/remedies_replay_request.py create mode 100644 pfruck_contabo/models/remedy_response.py create mode 100644 pfruck_contabo/models/remedy_template_response.py create mode 100644 pfruck_contabo/models/remedy_templates_get_response.py create mode 100644 pfruck_contabo/models/remedy_templates_list_response.py create mode 100644 pfruck_contabo/models/replay_response.py create mode 100644 pfruck_contabo/models/rules.py create mode 100644 pfruck_contabo/models/rules_request.py create mode 100644 pfruck_contabo/models/set_default_handle_response.py create mode 100644 pfruck_contabo/models/src_cidr.py create mode 100644 pfruck_contabo/models/unassign_instance_firewall_response.py create mode 100644 pfruck_contabo/models/update_dns_zone_record_request.py create mode 100644 pfruck_contabo/models/update_ptr_record_request.py create mode 100644 pfruck_contabo/models/zone_audit_response.py create mode 100644 pfruck_contabo/models/zone_audit_response_data.py create mode 100644 test/test_account_org_response.py create mode 100644 test/test_accounts_list_response.py create mode 100644 test/test_api_bulk_delete_dns_zone_records_response.py create mode 100644 test/test_api_dns_zone_record_response.py rename test/{test_create_ticket_response.py => test_api_dns_zone_response.py} (55%) create mode 100644 test/test_api_ptr_record_response.py create mode 100644 test/test_application_meta_data.py create mode 100644 test/test_assign_instance_firewall_response.py create mode 100644 test/test_audit_count_response.py create mode 100644 test/test_base_check_collection_create_request.py create mode 100644 test/test_base_check_create_request.py create mode 100644 test/test_base_remedy_create_request.py create mode 100644 test/test_bulk_delete_dns_zone_records_request.py rename test/{test_create_ticket_response_data.py => test_bulk_delete_result_response.py} (55%) rename test/{test_create_ticket_request.py => test_cancel_domain_request.py} (51%) create mode 100644 test/test_cancel_instance_request.py create mode 100644 test/test_cancel_object_storage_request.py create mode 100644 test/test_cancel_request.py create mode 100644 test/test_changed_auth_code.py create mode 100644 test/test_changes.py create mode 100644 test/test_check_collection_check_templates.py create mode 100644 test/test_check_collection_create_request.py create mode 100644 test/test_check_collection_response.py create mode 100644 test/test_check_collection_template_response.py create mode 100644 test/test_check_collection_templates_api.py create mode 100644 test/test_check_collection_templates_check_templates.py create mode 100644 test/test_check_collection_templates_get_response.py create mode 100644 test/test_check_collection_templates_list_response.py create mode 100644 test/test_check_collections_api.py create mode 100644 test/test_check_collections_audit_list_response.py create mode 100644 test/test_check_collections_audit_response.py create mode 100644 test/test_check_collections_get_response.py create mode 100644 test/test_check_collections_list_response.py create mode 100644 test/test_check_collections_replay_request.py create mode 100644 test/test_check_create_request.py create mode 100644 test/test_check_response.py create mode 100644 test/test_check_template_response.py create mode 100644 test/test_check_templates_get_response.py create mode 100644 test/test_check_templates_list_response.py create mode 100644 test/test_checks_api.py create mode 100644 test/test_checks_audit_list_response.py create mode 100644 test/test_checks_audit_response.py create mode 100644 test/test_checks_get_response.py create mode 100644 test/test_checks_list_response.py create mode 100644 test/test_checks_replay_request.py create mode 100644 test/test_create_dns_zone_record_request.py create mode 100644 test/test_create_dns_zone_request.py create mode 100644 test/test_create_firewall_request.py create mode 100644 test/test_create_firewall_response.py create mode 100644 test/test_create_ptr_record_request.py create mode 100644 test/test_dns_api.py create mode 100644 test/test_dns_audits_api.py create mode 100644 test/test_dns_zone_record_response.py create mode 100644 test/test_dns_zone_response.py create mode 100644 test/test_domain_audit_response.py create mode 100644 test/test_domain_audit_response_data.py create mode 100644 test/test_domain_auth_code_regenerate_response.py create mode 100644 test/test_domain_auth_code_response.py create mode 100644 test/test_domain_cancel.py create mode 100644 test/test_domain_cancel_response.py create mode 100644 test/test_domain_create_request.py create mode 100644 test/test_domain_create_response.py create mode 100644 test/test_domain_details.py create mode 100644 test/test_domain_find_response.py create mode 100644 test/test_domain_handles.py create mode 100644 test/test_domain_patch_request.py create mode 100644 test/test_domain_patch_response.py create mode 100644 test/test_domain_response.py create mode 100644 test/test_domains_api.py create mode 100644 test/test_domains_audits_api.py create mode 100644 test/test_domains_list_response.py create mode 100644 test/test_ext_check_collection_response.py create mode 100644 test/test_ext_check_collection_template_response.py create mode 100644 test/test_ext_check_collection_templates_get_response.py create mode 100644 test/test_ext_check_collection_templates_list_response.py create mode 100644 test/test_ext_check_collections_get_response.py create mode 100644 test/test_ext_check_collections_list_response.py create mode 100644 test/test_ext_check_response.py create mode 100644 test/test_ext_checks_get_response.py create mode 100644 test/test_ext_checks_list_response.py create mode 100644 test/test_ext_remedies_get_response.py create mode 100644 test/test_ext_remedies_list_response.py create mode 100644 test/test_ext_remedy_response.py create mode 100644 test/test_find_firewall_response.py create mode 100644 test/test_firewall_audit_response.py create mode 100644 test/test_firewall_response.py create mode 100644 test/test_firewall_rule_request.py create mode 100644 test/test_firewall_rule_response.py create mode 100644 test/test_firewalls_api.py create mode 100644 test/test_firewalls_audits_api.py create mode 100644 test/test_handle_address.py create mode 100644 test/test_handle_audit_response.py create mode 100644 test/test_handle_audit_response_data.py create mode 100644 test/test_handle_birth_info.py create mode 100644 test/test_handle_create_request.py create mode 100644 test/test_handle_create_response.py create mode 100644 test/test_handle_find_response.py create mode 100644 test/test_handle_list_response.py create mode 100644 test/test_handle_patch_request.py create mode 100644 test/test_handle_patch_response.py create mode 100644 test/test_handle_phone.py create mode 100644 test/test_handle_response.py create mode 100644 test/test_handles_api.py create mode 100644 test/test_handles_audits_api.py create mode 100644 test/test_instance_assignment_self_links1.py create mode 100644 test/test_instance_details.py create mode 100644 test/test_instance_status_representation.py delete mode 100644 test/test_internal_api.py create mode 100644 test/test_internal_check_audits_api.py create mode 100644 test/test_internal_check_collection_audits_api.py create mode 100644 test/test_internal_check_collection_replay_api.py create mode 100644 test/test_internal_check_collection_templates_api.py create mode 100644 test/test_internal_check_collections_api.py create mode 100644 test/test_internal_check_replay_api.py create mode 100644 test/test_internal_check_templates_api.py create mode 100644 test/test_internal_checks_api.py create mode 100644 test/test_internal_remedies_api.py create mode 100644 test/test_internal_remedy_audits_api.py create mode 100644 test/test_internal_remedy_replay_api.py create mode 100644 test/test_internal_remedy_templates_api.py create mode 100644 test/test_ip_config1.py create mode 100644 test/test_ip_config2.py create mode 100644 test/test_ip_v42.py create mode 100644 test/test_ip_v43.py create mode 100644 test/test_list_dns_zone_records_response.py create mode 100644 test/test_list_dns_zones_response.py create mode 100644 test/test_list_firewall_audit_response.py create mode 100644 test/test_list_firewall_response.py create mode 100644 test/test_list_firewall_response_data.py create mode 100644 test/test_list_preset_rules_response.py create mode 100644 test/test_list_ptr_records_response.py create mode 100644 test/test_nameserver.py create mode 100644 test/test_patch_firewall_request.py create mode 100644 test/test_patch_firewall_response.py create mode 100644 test/test_preset_rules_response.py create mode 100644 test/test_ptr_record_response.py create mode 100644 test/test_put_firewall_request.py create mode 100644 test/test_put_firewall_response.py create mode 100644 test/test_record_audit_response.py create mode 100644 test/test_record_audit_response_data.py create mode 100644 test/test_remedies_api.py create mode 100644 test/test_remedies_audit_list_response.py create mode 100644 test/test_remedies_audit_response.py create mode 100644 test/test_remedies_create_request.py create mode 100644 test/test_remedies_get_response.py create mode 100644 test/test_remedies_list_response.py create mode 100644 test/test_remedies_replay_request.py create mode 100644 test/test_remedy_response.py create mode 100644 test/test_remedy_template_response.py create mode 100644 test/test_remedy_templates_get_response.py create mode 100644 test/test_remedy_templates_list_response.py create mode 100644 test/test_replay_response.py create mode 100644 test/test_rules.py create mode 100644 test/test_rules_request.py create mode 100644 test/test_set_default_handle_response.py create mode 100644 test/test_src_cidr.py create mode 100644 test/test_unassign_instance_firewall_response.py create mode 100644 test/test_update_dns_zone_record_request.py create mode 100644 test/test_update_ptr_record_request.py create mode 100644 test/test_users_object_storage_credentials_api.py create mode 100644 test/test_zone_audit_response.py create mode 100644 test/test_zone_audit_response_data.py diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index ce06e842..d98e9a80 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -3,25 +3,70 @@ .gitlab-ci.yml .travis.yml README.md +docs/AccountOrgResponse.md +docs/AccountsListResponse.md docs/AddOnQuantityRequest.md docs/AddOnRequest.md docs/AddOnResponse.md docs/AdditionalIp.md +docs/ApiBulkDeleteDnsZoneRecordsResponse.md +docs/ApiDnsZoneRecordResponse.md +docs/ApiDnsZoneResponse.md docs/ApiPermissionsResponse.md +docs/ApiPtrRecordResponse.md docs/ApplicationConfig.md +docs/ApplicationMetaData.md docs/ApplicationRequirements.md docs/ApplicationResponse.md +docs/AssignInstanceFirewallResponse.md docs/AssignInstancePrivateNetworkResponse.md docs/AssignVipResponse.md docs/AssignedTagResponse.md docs/AssignmentAuditResponse.md docs/AssignmentResponse.md +docs/AuditCountResponse.md docs/AutoScalingTypeRequest.md docs/AutoScalingTypeResponse.md +docs/BaseCheckCollectionCreateRequest.md +docs/BaseCheckCreateRequest.md +docs/BaseRemedyCreateRequest.md +docs/BulkDeleteDnsZoneRecordsRequest.md +docs/BulkDeleteResultResponse.md +docs/CancelDomainRequest.md +docs/CancelInstanceRequest.md docs/CancelInstanceResponse.md docs/CancelInstanceResponseData.md +docs/CancelObjectStorageRequest.md docs/CancelObjectStorageResponse.md docs/CancelObjectStorageResponseData.md +docs/CancelRequest.md +docs/ChangedAuthCode.md +docs/Changes.md +docs/CheckCollectionCheckTemplates.md +docs/CheckCollectionCreateRequest.md +docs/CheckCollectionResponse.md +docs/CheckCollectionTemplateResponse.md +docs/CheckCollectionTemplatesApi.md +docs/CheckCollectionTemplatesCheckTemplates.md +docs/CheckCollectionTemplatesGetResponse.md +docs/CheckCollectionTemplatesListResponse.md +docs/CheckCollectionsApi.md +docs/CheckCollectionsAuditListResponse.md +docs/CheckCollectionsAuditResponse.md +docs/CheckCollectionsGetResponse.md +docs/CheckCollectionsListResponse.md +docs/CheckCollectionsReplayRequest.md +docs/CheckCreateRequest.md +docs/CheckResponse.md +docs/CheckTemplateResponse.md +docs/CheckTemplatesGetResponse.md +docs/CheckTemplatesListResponse.md +docs/ChecksApi.md +docs/ChecksAuditListResponse.md +docs/ChecksAuditResponse.md +docs/ChecksGetResponse.md +docs/ChecksListResponse.md +docs/ChecksReplayRequest.md docs/ClientResponse.md docs/ClientSecretResponse.md docs/CreateAssignmentResponse.md @@ -29,6 +74,10 @@ docs/CreateCustomImageFailResponse.md docs/CreateCustomImageRequest.md docs/CreateCustomImageResponse.md docs/CreateCustomImageResponseData.md +docs/CreateDnsZoneRecordRequest.md +docs/CreateDnsZoneRequest.md +docs/CreateFirewallRequest.md +docs/CreateFirewallResponse.md docs/CreateInstanceAddons.md docs/CreateInstanceRequest.md docs/CreateInstanceResponse.md @@ -38,6 +87,7 @@ docs/CreateObjectStorageResponse.md docs/CreateObjectStorageResponseData.md docs/CreatePrivateNetworkRequest.md docs/CreatePrivateNetworkResponse.md +docs/CreatePtrRecordRequest.md docs/CreateRoleRequest.md docs/CreateRoleResponse.md docs/CreateRoleResponseData.md @@ -48,20 +98,51 @@ docs/CreateSnapshotResponse.md docs/CreateTagRequest.md docs/CreateTagResponse.md docs/CreateTagResponseData.md -docs/CreateTicketRequest.md -docs/CreateTicketResponse.md -docs/CreateTicketResponseData.md docs/CreateUserRequest.md docs/CreateUserResponse.md docs/CreateUserResponseData.md docs/CredentialData.md docs/CustomImagesStatsResponse.md docs/CustomImagesStatsResponseData.md +docs/DNSApi.md +docs/DNSAuditsApi.md docs/DataCenterResponse.md +docs/DnsZoneRecordResponse.md +docs/DnsZoneResponse.md +docs/DomainAuditResponse.md +docs/DomainAuditResponseData.md +docs/DomainAuthCodeRegenerateResponse.md +docs/DomainAuthCodeResponse.md +docs/DomainCancel.md +docs/DomainCancelResponse.md +docs/DomainCreateRequest.md +docs/DomainCreateResponse.md +docs/DomainDetails.md +docs/DomainFindResponse.md +docs/DomainHandles.md +docs/DomainPatchRequest.md +docs/DomainPatchResponse.md +docs/DomainResponse.md +docs/DomainsApi.md +docs/DomainsAuditsApi.md +docs/DomainsListResponse.md +docs/ExtCheckCollectionResponse.md +docs/ExtCheckCollectionTemplateResponse.md +docs/ExtCheckCollectionTemplatesGetResponse.md +docs/ExtCheckCollectionTemplatesListResponse.md +docs/ExtCheckCollectionsGetResponse.md +docs/ExtCheckCollectionsListResponse.md +docs/ExtCheckResponse.md +docs/ExtChecksGetResponse.md +docs/ExtChecksListResponse.md +docs/ExtRemediesGetResponse.md +docs/ExtRemediesListResponse.md +docs/ExtRemedyResponse.md docs/ExtraStorageRequest.md docs/FindAssignmentResponse.md docs/FindClientResponse.md docs/FindCredentialResponse.md +docs/FindFirewallResponse.md docs/FindImageResponse.md docs/FindInstanceResponse.md docs/FindObjectStorageResponse.md @@ -74,8 +155,28 @@ docs/FindUserIsPasswordSetResponse.md docs/FindUserResponse.md docs/FindVipResponse.md docs/FindVncResponse.md +docs/FirewallAuditResponse.md +docs/FirewallResponse.md +docs/FirewallRuleRequest.md +docs/FirewallRuleResponse.md docs/FirewallingUpgradeRequest.md +docs/FirewallsApi.md +docs/FirewallsAuditsApi.md docs/GenerateClientSecretResponse.md +docs/HandleAddress.md +docs/HandleAuditResponse.md +docs/HandleAuditResponseData.md +docs/HandleBirthInfo.md +docs/HandleCreateRequest.md +docs/HandleCreateResponse.md +docs/HandleFindResponse.md +docs/HandleListResponse.md +docs/HandlePatchRequest.md +docs/HandlePatchResponse.md +docs/HandlePhone.md +docs/HandleResponse.md +docs/HandlesApi.md +docs/HandlesAuditsApi.md docs/ImageAuditResponse.md docs/ImageAuditResponseData.md docs/ImageResponse.md @@ -84,6 +185,8 @@ docs/ImagesAuditsApi.md docs/InstanceActionsApi.md docs/InstanceActionsAuditsApi.md docs/InstanceAssignmentSelfLinks.md +docs/InstanceAssignmentSelfLinks1.md +docs/InstanceDetails.md docs/InstanceRescueActionResponse.md docs/InstanceRescueActionResponseData.md docs/InstanceResetPasswordActionResponse.md @@ -96,6 +199,7 @@ docs/InstanceShutdownActionResponseData.md docs/InstanceStartActionResponse.md docs/InstanceStartActionResponseData.md docs/InstanceStatus.md +docs/InstanceStatusRepresentation.md docs/InstanceStopActionResponse.md docs/InstanceStopActionResponseData.md docs/Instances.md @@ -105,10 +209,25 @@ docs/InstancesApi.md docs/InstancesAuditResponse.md docs/InstancesAuditsApi.md docs/InstancesResetPasswordActionsRequest.md -docs/InternalApi.md +docs/InternalCheckAuditsApi.md +docs/InternalCheckCollectionAuditsApi.md +docs/InternalCheckCollectionReplayApi.md +docs/InternalCheckCollectionTemplatesApi.md +docs/InternalCheckCollectionsApi.md +docs/InternalCheckReplayApi.md +docs/InternalCheckTemplatesApi.md +docs/InternalChecksApi.md +docs/InternalRemediesApi.md +docs/InternalRemedyAuditsApi.md +docs/InternalRemedyReplayApi.md +docs/InternalRemedyTemplatesApi.md docs/IpConfig.md +docs/IpConfig1.md +docs/IpConfig2.md docs/IpV4.md docs/IpV41.md +docs/IpV42.md +docs/IpV43.md docs/IpV6.md docs/Links.md docs/ListApiPermissionResponse.md @@ -117,6 +236,11 @@ docs/ListAssignmentAuditsResponse.md docs/ListAssignmentResponse.md docs/ListCredentialResponse.md docs/ListDataCenterResponse.md +docs/ListDnsZoneRecordsResponse.md +docs/ListDnsZonesResponse.md +docs/ListFirewallAuditResponse.md +docs/ListFirewallResponse.md +docs/ListFirewallResponseData.md docs/ListImageResponse.md docs/ListImageResponseData.md docs/ListInstancesActionsAuditResponse.md @@ -125,9 +249,11 @@ docs/ListInstancesResponse.md docs/ListInstancesResponseData.md docs/ListObjectStorageAuditResponse.md docs/ListObjectStorageResponse.md +docs/ListPresetRulesResponse.md docs/ListPrivateNetworkAuditResponse.md docs/ListPrivateNetworkResponse.md docs/ListPrivateNetworkResponseData.md +docs/ListPtrRecordsResponse.md docs/ListRoleAuditResponse.md docs/ListRoleResponse.md docs/ListSecretAuditResponse.md @@ -142,6 +268,7 @@ docs/ListVipAuditResponse.md docs/ListVipResponse.md docs/ListVipResponseData.md docs/MinimumRequirements.md +docs/Nameserver.md docs/ObjectStorageAuditResponse.md docs/ObjectStorageResponse.md docs/ObjectStoragesApi.md @@ -150,6 +277,8 @@ docs/ObjectStoragesStatsResponse.md docs/ObjectStoragesStatsResponseData.md docs/OptimalRequirements.md docs/PaginationMeta.md +docs/PatchFirewallRequest.md +docs/PatchFirewallResponse.md docs/PatchInstanceRequest.md docs/PatchInstanceResponse.md docs/PatchInstanceResponseData.md @@ -159,29 +288,51 @@ docs/PatchPrivateNetworkResponse.md docs/PatchVncRequest.md docs/PermissionRequest.md docs/PermissionResponse.md +docs/PresetRulesResponse.md docs/PrivateIpConfig.md docs/PrivateNetworkAuditResponse.md docs/PrivateNetworkResponse.md docs/PrivateNetworksApi.md docs/PrivateNetworksAuditsApi.md +docs/PtrRecordResponse.md +docs/PutFirewallRequest.md +docs/PutFirewallResponse.md +docs/RecordAuditResponse.md +docs/RecordAuditResponseData.md docs/ReinstallInstanceRequest.md docs/ReinstallInstanceResponse.md docs/ReinstallInstanceResponseData.md +docs/RemediesApi.md +docs/RemediesAuditListResponse.md +docs/RemediesAuditResponse.md +docs/RemediesCreateRequest.md +docs/RemediesGetResponse.md +docs/RemediesListResponse.md +docs/RemediesReplayRequest.md +docs/RemedyResponse.md +docs/RemedyTemplateResponse.md +docs/RemedyTemplatesGetResponse.md +docs/RemedyTemplatesListResponse.md +docs/ReplayResponse.md docs/ResourcePermissionsResponse.md docs/RoleAuditResponse.md docs/RoleResponse.md docs/RolesApi.md docs/RolesAuditsApi.md docs/RollbackSnapshotResponse.md +docs/Rules.md +docs/RulesRequest.md docs/SecretAuditResponse.md docs/SecretResponse.md docs/SecretsApi.md docs/SecretsAuditsApi.md docs/SelfLinks.md +docs/SetDefaultHandleResponse.md docs/SnapshotResponse.md docs/SnapshotsApi.md docs/SnapshotsAuditResponse.md docs/SnapshotsAuditsApi.md +docs/SrcCidr.md docs/TagAssignmentSelfLinks.md docs/TagAssignmentsApi.md docs/TagAssignmentsAuditsApi.md @@ -189,10 +340,13 @@ docs/TagAuditResponse.md docs/TagResponse.md docs/TagsApi.md docs/TagsAuditsApi.md +docs/UnassignInstanceFirewallResponse.md docs/UnassignInstancePrivateNetworkResponse.md docs/UpdateCustomImageRequest.md docs/UpdateCustomImageResponse.md docs/UpdateCustomImageResponseData.md +docs/UpdateDnsZoneRecordRequest.md +docs/UpdatePtrRecordRequest.md docs/UpdateRoleRequest.md docs/UpdateRoleResponse.md docs/UpdateSecretRequest.md @@ -213,24 +367,50 @@ docs/UserIsPasswordSetResponse.md docs/UserResponse.md docs/UsersApi.md docs/UsersAuditsApi.md +docs/UsersObjectStorageCredentialsApi.md docs/VIPApi.md docs/VipAuditResponse.md docs/VipAuditsApi.md docs/VipResponse.md docs/VncResponse.md +docs/ZoneAuditResponse.md +docs/ZoneAuditResponseData.md pfruck_contabo/__init__.py pfruck_contabo/api/__init__.py +pfruck_contabo/api/check_collection_templates_api.py +pfruck_contabo/api/check_collections_api.py +pfruck_contabo/api/checks_api.py +pfruck_contabo/api/dns_api.py +pfruck_contabo/api/dns_audits_api.py +pfruck_contabo/api/domains_api.py +pfruck_contabo/api/domains_audits_api.py +pfruck_contabo/api/firewalls_api.py +pfruck_contabo/api/firewalls_audits_api.py +pfruck_contabo/api/handles_api.py +pfruck_contabo/api/handles_audits_api.py pfruck_contabo/api/images_api.py pfruck_contabo/api/images_audits_api.py pfruck_contabo/api/instance_actions_api.py pfruck_contabo/api/instance_actions_audits_api.py pfruck_contabo/api/instances_api.py pfruck_contabo/api/instances_audits_api.py -pfruck_contabo/api/internal_api.py +pfruck_contabo/api/internal_check_audits_api.py +pfruck_contabo/api/internal_check_collection_audits_api.py +pfruck_contabo/api/internal_check_collection_replay_api.py +pfruck_contabo/api/internal_check_collection_templates_api.py +pfruck_contabo/api/internal_check_collections_api.py +pfruck_contabo/api/internal_check_replay_api.py +pfruck_contabo/api/internal_check_templates_api.py +pfruck_contabo/api/internal_checks_api.py +pfruck_contabo/api/internal_remedies_api.py +pfruck_contabo/api/internal_remedy_audits_api.py +pfruck_contabo/api/internal_remedy_replay_api.py +pfruck_contabo/api/internal_remedy_templates_api.py pfruck_contabo/api/object_storages_api.py pfruck_contabo/api/object_storages_audits_api.py pfruck_contabo/api/private_networks_api.py pfruck_contabo/api/private_networks_audits_api.py +pfruck_contabo/api/remedies_api.py pfruck_contabo/api/roles_api.py pfruck_contabo/api/roles_audits_api.py pfruck_contabo/api/secrets_api.py @@ -243,6 +423,7 @@ pfruck_contabo/api/tags_api.py pfruck_contabo/api/tags_audits_api.py pfruck_contabo/api/users_api.py pfruck_contabo/api/users_audits_api.py +pfruck_contabo/api/users_object_storage_credentials_api.py pfruck_contabo/api/vip_api.py pfruck_contabo/api/vip_audits_api.py pfruck_contabo/api_client.py @@ -250,25 +431,67 @@ pfruck_contabo/api_response.py pfruck_contabo/configuration.py pfruck_contabo/exceptions.py pfruck_contabo/models/__init__.py +pfruck_contabo/models/account_org_response.py +pfruck_contabo/models/accounts_list_response.py pfruck_contabo/models/add_on_quantity_request.py pfruck_contabo/models/add_on_request.py pfruck_contabo/models/add_on_response.py pfruck_contabo/models/additional_ip.py +pfruck_contabo/models/api_bulk_delete_dns_zone_records_response.py +pfruck_contabo/models/api_dns_zone_record_response.py +pfruck_contabo/models/api_dns_zone_response.py pfruck_contabo/models/api_permissions_response.py +pfruck_contabo/models/api_ptr_record_response.py pfruck_contabo/models/application_config.py +pfruck_contabo/models/application_meta_data.py pfruck_contabo/models/application_requirements.py pfruck_contabo/models/application_response.py +pfruck_contabo/models/assign_instance_firewall_response.py pfruck_contabo/models/assign_instance_private_network_response.py pfruck_contabo/models/assign_vip_response.py pfruck_contabo/models/assigned_tag_response.py pfruck_contabo/models/assignment_audit_response.py pfruck_contabo/models/assignment_response.py +pfruck_contabo/models/audit_count_response.py pfruck_contabo/models/auto_scaling_type_request.py pfruck_contabo/models/auto_scaling_type_response.py +pfruck_contabo/models/base_check_collection_create_request.py +pfruck_contabo/models/base_check_create_request.py +pfruck_contabo/models/base_remedy_create_request.py +pfruck_contabo/models/bulk_delete_dns_zone_records_request.py +pfruck_contabo/models/bulk_delete_result_response.py +pfruck_contabo/models/cancel_domain_request.py +pfruck_contabo/models/cancel_instance_request.py pfruck_contabo/models/cancel_instance_response.py pfruck_contabo/models/cancel_instance_response_data.py +pfruck_contabo/models/cancel_object_storage_request.py pfruck_contabo/models/cancel_object_storage_response.py pfruck_contabo/models/cancel_object_storage_response_data.py +pfruck_contabo/models/cancel_request.py +pfruck_contabo/models/changed_auth_code.py +pfruck_contabo/models/changes.py +pfruck_contabo/models/check_collection_check_templates.py +pfruck_contabo/models/check_collection_create_request.py +pfruck_contabo/models/check_collection_response.py +pfruck_contabo/models/check_collection_template_response.py +pfruck_contabo/models/check_collection_templates_check_templates.py +pfruck_contabo/models/check_collection_templates_get_response.py +pfruck_contabo/models/check_collection_templates_list_response.py +pfruck_contabo/models/check_collections_audit_list_response.py +pfruck_contabo/models/check_collections_audit_response.py +pfruck_contabo/models/check_collections_get_response.py +pfruck_contabo/models/check_collections_list_response.py +pfruck_contabo/models/check_collections_replay_request.py +pfruck_contabo/models/check_create_request.py +pfruck_contabo/models/check_response.py +pfruck_contabo/models/check_template_response.py +pfruck_contabo/models/check_templates_get_response.py +pfruck_contabo/models/check_templates_list_response.py +pfruck_contabo/models/checks_audit_list_response.py +pfruck_contabo/models/checks_audit_response.py +pfruck_contabo/models/checks_get_response.py +pfruck_contabo/models/checks_list_response.py +pfruck_contabo/models/checks_replay_request.py pfruck_contabo/models/client_response.py pfruck_contabo/models/client_secret_response.py pfruck_contabo/models/create_assignment_response.py @@ -276,6 +499,10 @@ pfruck_contabo/models/create_custom_image_fail_response.py pfruck_contabo/models/create_custom_image_request.py pfruck_contabo/models/create_custom_image_response.py pfruck_contabo/models/create_custom_image_response_data.py +pfruck_contabo/models/create_dns_zone_record_request.py +pfruck_contabo/models/create_dns_zone_request.py +pfruck_contabo/models/create_firewall_request.py +pfruck_contabo/models/create_firewall_response.py pfruck_contabo/models/create_instance_addons.py pfruck_contabo/models/create_instance_request.py pfruck_contabo/models/create_instance_response.py @@ -285,6 +512,7 @@ pfruck_contabo/models/create_object_storage_response.py pfruck_contabo/models/create_object_storage_response_data.py pfruck_contabo/models/create_private_network_request.py pfruck_contabo/models/create_private_network_response.py +pfruck_contabo/models/create_ptr_record_request.py pfruck_contabo/models/create_role_request.py pfruck_contabo/models/create_role_response.py pfruck_contabo/models/create_role_response_data.py @@ -295,9 +523,6 @@ pfruck_contabo/models/create_snapshot_response.py pfruck_contabo/models/create_tag_request.py pfruck_contabo/models/create_tag_response.py pfruck_contabo/models/create_tag_response_data.py -pfruck_contabo/models/create_ticket_request.py -pfruck_contabo/models/create_ticket_response.py -pfruck_contabo/models/create_ticket_response_data.py pfruck_contabo/models/create_user_request.py pfruck_contabo/models/create_user_response.py pfruck_contabo/models/create_user_response_data.py @@ -305,10 +530,40 @@ pfruck_contabo/models/credential_data.py pfruck_contabo/models/custom_images_stats_response.py pfruck_contabo/models/custom_images_stats_response_data.py pfruck_contabo/models/data_center_response.py +pfruck_contabo/models/dns_zone_record_response.py +pfruck_contabo/models/dns_zone_response.py +pfruck_contabo/models/domain_audit_response.py +pfruck_contabo/models/domain_audit_response_data.py +pfruck_contabo/models/domain_auth_code_regenerate_response.py +pfruck_contabo/models/domain_auth_code_response.py +pfruck_contabo/models/domain_cancel.py +pfruck_contabo/models/domain_cancel_response.py +pfruck_contabo/models/domain_create_request.py +pfruck_contabo/models/domain_create_response.py +pfruck_contabo/models/domain_details.py +pfruck_contabo/models/domain_find_response.py +pfruck_contabo/models/domain_handles.py +pfruck_contabo/models/domain_patch_request.py +pfruck_contabo/models/domain_patch_response.py +pfruck_contabo/models/domain_response.py +pfruck_contabo/models/domains_list_response.py +pfruck_contabo/models/ext_check_collection_response.py +pfruck_contabo/models/ext_check_collection_template_response.py +pfruck_contabo/models/ext_check_collection_templates_get_response.py +pfruck_contabo/models/ext_check_collection_templates_list_response.py +pfruck_contabo/models/ext_check_collections_get_response.py +pfruck_contabo/models/ext_check_collections_list_response.py +pfruck_contabo/models/ext_check_response.py +pfruck_contabo/models/ext_checks_get_response.py +pfruck_contabo/models/ext_checks_list_response.py +pfruck_contabo/models/ext_remedies_get_response.py +pfruck_contabo/models/ext_remedies_list_response.py +pfruck_contabo/models/ext_remedy_response.py pfruck_contabo/models/extra_storage_request.py pfruck_contabo/models/find_assignment_response.py pfruck_contabo/models/find_client_response.py pfruck_contabo/models/find_credential_response.py +pfruck_contabo/models/find_firewall_response.py pfruck_contabo/models/find_image_response.py pfruck_contabo/models/find_instance_response.py pfruck_contabo/models/find_object_storage_response.py @@ -321,12 +576,30 @@ pfruck_contabo/models/find_user_is_password_set_response.py pfruck_contabo/models/find_user_response.py pfruck_contabo/models/find_vip_response.py pfruck_contabo/models/find_vnc_response.py +pfruck_contabo/models/firewall_audit_response.py +pfruck_contabo/models/firewall_response.py +pfruck_contabo/models/firewall_rule_request.py +pfruck_contabo/models/firewall_rule_response.py pfruck_contabo/models/firewalling_upgrade_request.py pfruck_contabo/models/generate_client_secret_response.py +pfruck_contabo/models/handle_address.py +pfruck_contabo/models/handle_audit_response.py +pfruck_contabo/models/handle_audit_response_data.py +pfruck_contabo/models/handle_birth_info.py +pfruck_contabo/models/handle_create_request.py +pfruck_contabo/models/handle_create_response.py +pfruck_contabo/models/handle_find_response.py +pfruck_contabo/models/handle_list_response.py +pfruck_contabo/models/handle_patch_request.py +pfruck_contabo/models/handle_patch_response.py +pfruck_contabo/models/handle_phone.py +pfruck_contabo/models/handle_response.py pfruck_contabo/models/image_audit_response.py pfruck_contabo/models/image_audit_response_data.py pfruck_contabo/models/image_response.py pfruck_contabo/models/instance_assignment_self_links.py +pfruck_contabo/models/instance_assignment_self_links1.py +pfruck_contabo/models/instance_details.py pfruck_contabo/models/instance_rescue_action_response.py pfruck_contabo/models/instance_rescue_action_response_data.py pfruck_contabo/models/instance_reset_password_action_response.py @@ -339,6 +612,7 @@ pfruck_contabo/models/instance_shutdown_action_response_data.py pfruck_contabo/models/instance_start_action_response.py pfruck_contabo/models/instance_start_action_response_data.py pfruck_contabo/models/instance_status.py +pfruck_contabo/models/instance_status_representation.py pfruck_contabo/models/instance_stop_action_response.py pfruck_contabo/models/instance_stop_action_response_data.py pfruck_contabo/models/instances.py @@ -347,8 +621,12 @@ pfruck_contabo/models/instances_actions_rescue_request.py pfruck_contabo/models/instances_audit_response.py pfruck_contabo/models/instances_reset_password_actions_request.py pfruck_contabo/models/ip_config.py +pfruck_contabo/models/ip_config1.py +pfruck_contabo/models/ip_config2.py pfruck_contabo/models/ip_v4.py pfruck_contabo/models/ip_v41.py +pfruck_contabo/models/ip_v42.py +pfruck_contabo/models/ip_v43.py pfruck_contabo/models/ip_v6.py pfruck_contabo/models/links.py pfruck_contabo/models/list_api_permission_response.py @@ -357,6 +635,11 @@ pfruck_contabo/models/list_assignment_audits_response.py pfruck_contabo/models/list_assignment_response.py pfruck_contabo/models/list_credential_response.py pfruck_contabo/models/list_data_center_response.py +pfruck_contabo/models/list_dns_zone_records_response.py +pfruck_contabo/models/list_dns_zones_response.py +pfruck_contabo/models/list_firewall_audit_response.py +pfruck_contabo/models/list_firewall_response.py +pfruck_contabo/models/list_firewall_response_data.py pfruck_contabo/models/list_image_response.py pfruck_contabo/models/list_image_response_data.py pfruck_contabo/models/list_instances_actions_audit_response.py @@ -365,9 +648,11 @@ pfruck_contabo/models/list_instances_response.py pfruck_contabo/models/list_instances_response_data.py pfruck_contabo/models/list_object_storage_audit_response.py pfruck_contabo/models/list_object_storage_response.py +pfruck_contabo/models/list_preset_rules_response.py pfruck_contabo/models/list_private_network_audit_response.py pfruck_contabo/models/list_private_network_response.py pfruck_contabo/models/list_private_network_response_data.py +pfruck_contabo/models/list_ptr_records_response.py pfruck_contabo/models/list_role_audit_response.py pfruck_contabo/models/list_role_response.py pfruck_contabo/models/list_secret_audit_response.py @@ -382,12 +667,15 @@ pfruck_contabo/models/list_vip_audit_response.py pfruck_contabo/models/list_vip_response.py pfruck_contabo/models/list_vip_response_data.py pfruck_contabo/models/minimum_requirements.py +pfruck_contabo/models/nameserver.py pfruck_contabo/models/object_storage_audit_response.py pfruck_contabo/models/object_storage_response.py pfruck_contabo/models/object_storages_stats_response.py pfruck_contabo/models/object_storages_stats_response_data.py pfruck_contabo/models/optimal_requirements.py pfruck_contabo/models/pagination_meta.py +pfruck_contabo/models/patch_firewall_request.py +pfruck_contabo/models/patch_firewall_response.py pfruck_contabo/models/patch_instance_request.py pfruck_contabo/models/patch_instance_response.py pfruck_contabo/models/patch_instance_response_data.py @@ -397,28 +685,52 @@ pfruck_contabo/models/patch_private_network_response.py pfruck_contabo/models/patch_vnc_request.py pfruck_contabo/models/permission_request.py pfruck_contabo/models/permission_response.py +pfruck_contabo/models/preset_rules_response.py pfruck_contabo/models/private_ip_config.py pfruck_contabo/models/private_network_audit_response.py pfruck_contabo/models/private_network_response.py +pfruck_contabo/models/ptr_record_response.py +pfruck_contabo/models/put_firewall_request.py +pfruck_contabo/models/put_firewall_response.py +pfruck_contabo/models/record_audit_response.py +pfruck_contabo/models/record_audit_response_data.py pfruck_contabo/models/reinstall_instance_request.py pfruck_contabo/models/reinstall_instance_response.py pfruck_contabo/models/reinstall_instance_response_data.py +pfruck_contabo/models/remedies_audit_list_response.py +pfruck_contabo/models/remedies_audit_response.py +pfruck_contabo/models/remedies_create_request.py +pfruck_contabo/models/remedies_get_response.py +pfruck_contabo/models/remedies_list_response.py +pfruck_contabo/models/remedies_replay_request.py +pfruck_contabo/models/remedy_response.py +pfruck_contabo/models/remedy_template_response.py +pfruck_contabo/models/remedy_templates_get_response.py +pfruck_contabo/models/remedy_templates_list_response.py +pfruck_contabo/models/replay_response.py pfruck_contabo/models/resource_permissions_response.py pfruck_contabo/models/role_audit_response.py pfruck_contabo/models/role_response.py pfruck_contabo/models/rollback_snapshot_response.py +pfruck_contabo/models/rules.py +pfruck_contabo/models/rules_request.py pfruck_contabo/models/secret_audit_response.py pfruck_contabo/models/secret_response.py pfruck_contabo/models/self_links.py +pfruck_contabo/models/set_default_handle_response.py pfruck_contabo/models/snapshot_response.py pfruck_contabo/models/snapshots_audit_response.py +pfruck_contabo/models/src_cidr.py pfruck_contabo/models/tag_assignment_self_links.py pfruck_contabo/models/tag_audit_response.py pfruck_contabo/models/tag_response.py +pfruck_contabo/models/unassign_instance_firewall_response.py pfruck_contabo/models/unassign_instance_private_network_response.py pfruck_contabo/models/update_custom_image_request.py pfruck_contabo/models/update_custom_image_response.py pfruck_contabo/models/update_custom_image_response_data.py +pfruck_contabo/models/update_dns_zone_record_request.py +pfruck_contabo/models/update_ptr_record_request.py pfruck_contabo/models/update_role_request.py pfruck_contabo/models/update_role_response.py pfruck_contabo/models/update_secret_request.py @@ -440,6 +752,8 @@ pfruck_contabo/models/user_response.py pfruck_contabo/models/vip_audit_response.py pfruck_contabo/models/vip_response.py pfruck_contabo/models/vnc_response.py +pfruck_contabo/models/zone_audit_response.py +pfruck_contabo/models/zone_audit_response_data.py pfruck_contabo/py.typed pfruck_contabo/rest.py pyproject.toml @@ -448,25 +762,70 @@ setup.cfg setup.py test-requirements.txt test/__init__.py +test/test_account_org_response.py +test/test_accounts_list_response.py test/test_add_on_quantity_request.py test/test_add_on_request.py test/test_add_on_response.py test/test_additional_ip.py +test/test_api_bulk_delete_dns_zone_records_response.py +test/test_api_dns_zone_record_response.py +test/test_api_dns_zone_response.py test/test_api_permissions_response.py +test/test_api_ptr_record_response.py test/test_application_config.py +test/test_application_meta_data.py test/test_application_requirements.py test/test_application_response.py +test/test_assign_instance_firewall_response.py test/test_assign_instance_private_network_response.py test/test_assign_vip_response.py test/test_assigned_tag_response.py test/test_assignment_audit_response.py test/test_assignment_response.py +test/test_audit_count_response.py test/test_auto_scaling_type_request.py test/test_auto_scaling_type_response.py +test/test_base_check_collection_create_request.py +test/test_base_check_create_request.py +test/test_base_remedy_create_request.py +test/test_bulk_delete_dns_zone_records_request.py +test/test_bulk_delete_result_response.py +test/test_cancel_domain_request.py +test/test_cancel_instance_request.py test/test_cancel_instance_response.py test/test_cancel_instance_response_data.py +test/test_cancel_object_storage_request.py test/test_cancel_object_storage_response.py test/test_cancel_object_storage_response_data.py +test/test_cancel_request.py +test/test_changed_auth_code.py +test/test_changes.py +test/test_check_collection_check_templates.py +test/test_check_collection_create_request.py +test/test_check_collection_response.py +test/test_check_collection_template_response.py +test/test_check_collection_templates_api.py +test/test_check_collection_templates_check_templates.py +test/test_check_collection_templates_get_response.py +test/test_check_collection_templates_list_response.py +test/test_check_collections_api.py +test/test_check_collections_audit_list_response.py +test/test_check_collections_audit_response.py +test/test_check_collections_get_response.py +test/test_check_collections_list_response.py +test/test_check_collections_replay_request.py +test/test_check_create_request.py +test/test_check_response.py +test/test_check_template_response.py +test/test_check_templates_get_response.py +test/test_check_templates_list_response.py +test/test_checks_api.py +test/test_checks_audit_list_response.py +test/test_checks_audit_response.py +test/test_checks_get_response.py +test/test_checks_list_response.py +test/test_checks_replay_request.py test/test_client_response.py test/test_client_secret_response.py test/test_create_assignment_response.py @@ -474,6 +833,10 @@ test/test_create_custom_image_fail_response.py test/test_create_custom_image_request.py test/test_create_custom_image_response.py test/test_create_custom_image_response_data.py +test/test_create_dns_zone_record_request.py +test/test_create_dns_zone_request.py +test/test_create_firewall_request.py +test/test_create_firewall_response.py test/test_create_instance_addons.py test/test_create_instance_request.py test/test_create_instance_response.py @@ -483,6 +846,7 @@ test/test_create_object_storage_response.py test/test_create_object_storage_response_data.py test/test_create_private_network_request.py test/test_create_private_network_response.py +test/test_create_ptr_record_request.py test/test_create_role_request.py test/test_create_role_response.py test/test_create_role_response_data.py @@ -493,9 +857,6 @@ test/test_create_snapshot_response.py test/test_create_tag_request.py test/test_create_tag_response.py test/test_create_tag_response_data.py -test/test_create_ticket_request.py -test/test_create_ticket_response.py -test/test_create_ticket_response_data.py test/test_create_user_request.py test/test_create_user_response.py test/test_create_user_response_data.py @@ -503,10 +864,44 @@ test/test_credential_data.py test/test_custom_images_stats_response.py test/test_custom_images_stats_response_data.py test/test_data_center_response.py +test/test_dns_api.py +test/test_dns_audits_api.py +test/test_dns_zone_record_response.py +test/test_dns_zone_response.py +test/test_domain_audit_response.py +test/test_domain_audit_response_data.py +test/test_domain_auth_code_regenerate_response.py +test/test_domain_auth_code_response.py +test/test_domain_cancel.py +test/test_domain_cancel_response.py +test/test_domain_create_request.py +test/test_domain_create_response.py +test/test_domain_details.py +test/test_domain_find_response.py +test/test_domain_handles.py +test/test_domain_patch_request.py +test/test_domain_patch_response.py +test/test_domain_response.py +test/test_domains_api.py +test/test_domains_audits_api.py +test/test_domains_list_response.py +test/test_ext_check_collection_response.py +test/test_ext_check_collection_template_response.py +test/test_ext_check_collection_templates_get_response.py +test/test_ext_check_collection_templates_list_response.py +test/test_ext_check_collections_get_response.py +test/test_ext_check_collections_list_response.py +test/test_ext_check_response.py +test/test_ext_checks_get_response.py +test/test_ext_checks_list_response.py +test/test_ext_remedies_get_response.py +test/test_ext_remedies_list_response.py +test/test_ext_remedy_response.py test/test_extra_storage_request.py test/test_find_assignment_response.py test/test_find_client_response.py test/test_find_credential_response.py +test/test_find_firewall_response.py test/test_find_image_response.py test/test_find_instance_response.py test/test_find_object_storage_response.py @@ -519,8 +914,28 @@ test/test_find_user_is_password_set_response.py test/test_find_user_response.py test/test_find_vip_response.py test/test_find_vnc_response.py +test/test_firewall_audit_response.py +test/test_firewall_response.py +test/test_firewall_rule_request.py +test/test_firewall_rule_response.py test/test_firewalling_upgrade_request.py +test/test_firewalls_api.py +test/test_firewalls_audits_api.py test/test_generate_client_secret_response.py +test/test_handle_address.py +test/test_handle_audit_response.py +test/test_handle_audit_response_data.py +test/test_handle_birth_info.py +test/test_handle_create_request.py +test/test_handle_create_response.py +test/test_handle_find_response.py +test/test_handle_list_response.py +test/test_handle_patch_request.py +test/test_handle_patch_response.py +test/test_handle_phone.py +test/test_handle_response.py +test/test_handles_api.py +test/test_handles_audits_api.py test/test_image_audit_response.py test/test_image_audit_response_data.py test/test_image_response.py @@ -529,6 +944,8 @@ test/test_images_audits_api.py test/test_instance_actions_api.py test/test_instance_actions_audits_api.py test/test_instance_assignment_self_links.py +test/test_instance_assignment_self_links1.py +test/test_instance_details.py test/test_instance_rescue_action_response.py test/test_instance_rescue_action_response_data.py test/test_instance_reset_password_action_response.py @@ -541,6 +958,7 @@ test/test_instance_shutdown_action_response_data.py test/test_instance_start_action_response.py test/test_instance_start_action_response_data.py test/test_instance_status.py +test/test_instance_status_representation.py test/test_instance_stop_action_response.py test/test_instance_stop_action_response_data.py test/test_instances.py @@ -550,10 +968,25 @@ test/test_instances_api.py test/test_instances_audit_response.py test/test_instances_audits_api.py test/test_instances_reset_password_actions_request.py -test/test_internal_api.py +test/test_internal_check_audits_api.py +test/test_internal_check_collection_audits_api.py +test/test_internal_check_collection_replay_api.py +test/test_internal_check_collection_templates_api.py +test/test_internal_check_collections_api.py +test/test_internal_check_replay_api.py +test/test_internal_check_templates_api.py +test/test_internal_checks_api.py +test/test_internal_remedies_api.py +test/test_internal_remedy_audits_api.py +test/test_internal_remedy_replay_api.py +test/test_internal_remedy_templates_api.py test/test_ip_config.py +test/test_ip_config1.py +test/test_ip_config2.py test/test_ip_v4.py test/test_ip_v41.py +test/test_ip_v42.py +test/test_ip_v43.py test/test_ip_v6.py test/test_links.py test/test_list_api_permission_response.py @@ -562,6 +995,11 @@ test/test_list_assignment_audits_response.py test/test_list_assignment_response.py test/test_list_credential_response.py test/test_list_data_center_response.py +test/test_list_dns_zone_records_response.py +test/test_list_dns_zones_response.py +test/test_list_firewall_audit_response.py +test/test_list_firewall_response.py +test/test_list_firewall_response_data.py test/test_list_image_response.py test/test_list_image_response_data.py test/test_list_instances_actions_audit_response.py @@ -570,9 +1008,11 @@ test/test_list_instances_response.py test/test_list_instances_response_data.py test/test_list_object_storage_audit_response.py test/test_list_object_storage_response.py +test/test_list_preset_rules_response.py test/test_list_private_network_audit_response.py test/test_list_private_network_response.py test/test_list_private_network_response_data.py +test/test_list_ptr_records_response.py test/test_list_role_audit_response.py test/test_list_role_response.py test/test_list_secret_audit_response.py @@ -587,6 +1027,7 @@ test/test_list_vip_audit_response.py test/test_list_vip_response.py test/test_list_vip_response_data.py test/test_minimum_requirements.py +test/test_nameserver.py test/test_object_storage_audit_response.py test/test_object_storage_response.py test/test_object_storages_api.py @@ -595,6 +1036,8 @@ test/test_object_storages_stats_response.py test/test_object_storages_stats_response_data.py test/test_optimal_requirements.py test/test_pagination_meta.py +test/test_patch_firewall_request.py +test/test_patch_firewall_response.py test/test_patch_instance_request.py test/test_patch_instance_response.py test/test_patch_instance_response_data.py @@ -604,29 +1047,51 @@ test/test_patch_private_network_response.py test/test_patch_vnc_request.py test/test_permission_request.py test/test_permission_response.py +test/test_preset_rules_response.py test/test_private_ip_config.py test/test_private_network_audit_response.py test/test_private_network_response.py test/test_private_networks_api.py test/test_private_networks_audits_api.py +test/test_ptr_record_response.py +test/test_put_firewall_request.py +test/test_put_firewall_response.py +test/test_record_audit_response.py +test/test_record_audit_response_data.py test/test_reinstall_instance_request.py test/test_reinstall_instance_response.py test/test_reinstall_instance_response_data.py +test/test_remedies_api.py +test/test_remedies_audit_list_response.py +test/test_remedies_audit_response.py +test/test_remedies_create_request.py +test/test_remedies_get_response.py +test/test_remedies_list_response.py +test/test_remedies_replay_request.py +test/test_remedy_response.py +test/test_remedy_template_response.py +test/test_remedy_templates_get_response.py +test/test_remedy_templates_list_response.py +test/test_replay_response.py test/test_resource_permissions_response.py test/test_role_audit_response.py test/test_role_response.py test/test_roles_api.py test/test_roles_audits_api.py test/test_rollback_snapshot_response.py +test/test_rules.py +test/test_rules_request.py test/test_secret_audit_response.py test/test_secret_response.py test/test_secrets_api.py test/test_secrets_audits_api.py test/test_self_links.py +test/test_set_default_handle_response.py test/test_snapshot_response.py test/test_snapshots_api.py test/test_snapshots_audit_response.py test/test_snapshots_audits_api.py +test/test_src_cidr.py test/test_tag_assignment_self_links.py test/test_tag_assignments_api.py test/test_tag_assignments_audits_api.py @@ -634,10 +1099,13 @@ test/test_tag_audit_response.py test/test_tag_response.py test/test_tags_api.py test/test_tags_audits_api.py +test/test_unassign_instance_firewall_response.py test/test_unassign_instance_private_network_response.py test/test_update_custom_image_request.py test/test_update_custom_image_response.py test/test_update_custom_image_response_data.py +test/test_update_dns_zone_record_request.py +test/test_update_ptr_record_request.py test/test_update_role_request.py test/test_update_role_response.py test/test_update_secret_request.py @@ -658,9 +1126,12 @@ test/test_user_is_password_set_response.py test/test_user_response.py test/test_users_api.py test/test_users_audits_api.py +test/test_users_object_storage_credentials_api.py test/test_vip_api.py test/test_vip_audit_response.py test/test_vip_audits_api.py test/test_vip_response.py test/test_vnc_response.py +test/test_zone_audit_response.py +test/test_zone_audit_response_data.py tox.ini diff --git a/README.md b/README.md index 04dd573b..250d8ef4 100644 --- a/README.md +++ b/README.md @@ -74,18 +74,18 @@ configuration = pfruck_contabo.Configuration( # Enter a context with an instance of the API client with pfruck_contabo.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = pfruck_contabo.ImagesApi(api_client) + api_instance = pfruck_contabo.CheckCollectionTemplatesApi(api_client) x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. - create_custom_image_request = pfruck_contabo.CreateCustomImageRequest() # CreateCustomImageRequest | + check_collection_template_id = 12345 # float | Check collection template's id x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) try: - # Provide a custom image - api_response = api_instance.create_custom_image(x_request_id, create_custom_image_request, x_trace_id=x_trace_id) - print("The response of ImagesApi->create_custom_image:\n") + # Get check + api_response = api_instance.get_ext_check_collection_template(x_request_id, check_collection_template_id, x_trace_id=x_trace_id) + print("The response of CheckCollectionTemplatesApi->get_ext_check_collection_template:\n") pprint(api_response) except ApiException as e: - print("Exception when calling ImagesApi->create_custom_image: %s\n" % e) + print("Exception when calling CheckCollectionTemplatesApi->get_ext_check_collection_template: %s\n" % e) ``` @@ -95,6 +95,62 @@ All URIs are relative to *https://api.contabo.com* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*CheckCollectionTemplatesApi* | [**get_ext_check_collection_template**](docs/CheckCollectionTemplatesApi.md#get_ext_check_collection_template) | **GET** /v1/troubleshooting/check-collection-templates/{checkCollectionTemplateId} | Get check +*CheckCollectionTemplatesApi* | [**list_ext_check_collection_templates**](docs/CheckCollectionTemplatesApi.md#list_ext_check_collection_templates) | **GET** /v1/troubleshooting/check-collection-templates | List check collection templates +*CheckCollectionsApi* | [**cancel_ext_check_collection**](docs/CheckCollectionsApi.md#cancel_ext_check_collection) | **PATCH** /v1/troubleshooting/check-collections/{checkCollectionId} | Cancel check collection +*CheckCollectionsApi* | [**get_ext_check_collection**](docs/CheckCollectionsApi.md#get_ext_check_collection) | **GET** /v1/troubleshooting/check-collections/{checkCollectionId} | Get check collection +*CheckCollectionsApi* | [**list_ext_check_collections**](docs/CheckCollectionsApi.md#list_ext_check_collections) | **GET** /v1/troubleshooting/check-collections | List check collections +*CheckCollectionsApi* | [**start_ext_check_collection**](docs/CheckCollectionsApi.md#start_ext_check_collection) | **POST** /v1/troubleshooting/check-collections | Start check collection +*ChecksApi* | [**cancel_ext_check**](docs/ChecksApi.md#cancel_ext_check) | **PATCH** /v1/troubleshooting/checks/{checkId} | Cancel check +*ChecksApi* | [**get_ext_check**](docs/ChecksApi.md#get_ext_check) | **GET** /v1/troubleshooting/checks/{checkId} | Get check +*ChecksApi* | [**list_ext_checks**](docs/ChecksApi.md#list_ext_checks) | **GET** /v1/troubleshooting/checks | List check +*ChecksApi* | [**start_ext_check**](docs/ChecksApi.md#start_ext_check) | **POST** /v1/troubleshooting/checks | Start check +*DNSApi* | [**bulk_delete_dns_zone_records**](docs/DNSApi.md#bulk_delete_dns_zone_records) | **DELETE** /v1/dns/zones/{zoneName}/records/bulk | Bulk delete DNS zone records +*DNSApi* | [**create_dns_zone**](docs/DNSApi.md#create_dns_zone) | **POST** /v1/dns/zones | Create DNS zone +*DNSApi* | [**create_dns_zone_record**](docs/DNSApi.md#create_dns_zone_record) | **POST** /v1/dns/zones/{zoneName}/records | Create DNS zone record +*DNSApi* | [**create_ptr_record**](docs/DNSApi.md#create_ptr_record) | **POST** /v1/dns/ptrs | Create a new PTR Record using ip address +*DNSApi* | [**delete_dns_zone**](docs/DNSApi.md#delete_dns_zone) | **DELETE** /v1/dns/zones/{zoneName} | Delete a DNS zone. +*DNSApi* | [**delete_dns_zone_record**](docs/DNSApi.md#delete_dns_zone_record) | **DELETE** /v1/dns/zones/{zoneName}/records/{recordId} | Delete a DNS zone record +*DNSApi* | [**delete_ptr_record**](docs/DNSApi.md#delete_ptr_record) | **DELETE** /v1/dns/ptrs/{ipAddress} | Delete a PTR Record using ip address +*DNSApi* | [**retrieve_dns_zone**](docs/DNSApi.md#retrieve_dns_zone) | **GET** /v1/dns/zones/{zoneName} | Retrieve a DNS Zone by zone name +*DNSApi* | [**retrieve_dns_zone_records_list**](docs/DNSApi.md#retrieve_dns_zone_records_list) | **GET** /v1/dns/zones/{zoneName}/records | List a DNS Zone's records +*DNSApi* | [**retrieve_dns_zones_list**](docs/DNSApi.md#retrieve_dns_zones_list) | **GET** /v1/dns/zones | List DNS zones +*DNSApi* | [**retrieve_ptr_record**](docs/DNSApi.md#retrieve_ptr_record) | **GET** /v1/dns/ptrs/{ipAddress} | Retrieve a PTR Record by ip address +*DNSApi* | [**retrieve_ptr_records_list**](docs/DNSApi.md#retrieve_ptr_records_list) | **GET** /v1/dns/ptrs | List PTR records +*DNSApi* | [**update_dns_zone_record**](docs/DNSApi.md#update_dns_zone_record) | **PATCH** /v1/dns/zones/{zoneName}/records/{recordId} | Update DNS zone record +*DNSApi* | [**update_ptr_record**](docs/DNSApi.md#update_ptr_record) | **PUT** /v1/dns/ptrs/{ipAddress} | Edit a PTR Record by ip address +*DNSAuditsApi* | [**retrieve_dns_audits_list**](docs/DNSAuditsApi.md#retrieve_dns_audits_list) | **GET** /v1/dns/zones/audits | List history about your DNS Zones (audit) +*DNSAuditsApi* | [**retrieve_record_audits_list**](docs/DNSAuditsApi.md#retrieve_record_audits_list) | **GET** /v1/dns/records/audits | List history about your DNS Records (audit) +*DomainsApi* | [**cancel_domain**](docs/DomainsApi.md#cancel_domain) | **POST** /v1/domains/{domain}/cancel | Cancel a specific domain +*DomainsApi* | [**confirm_domain_transfer_out**](docs/DomainsApi.md#confirm_domain_transfer_out) | **POST** /v1/domains/{domain}/transfer-out | Confirm transfer out for a domain +*DomainsApi* | [**confirm_domain_transfer_out_0**](docs/DomainsApi.md#confirm_domain_transfer_out_0) | **POST** /v1/domains/{domain}/transfer-out | Confirm transfer out for a domain +*DomainsApi* | [**get_auth_code**](docs/DomainsApi.md#get_auth_code) | **POST** /v1/domains/{domain}/generate-auth-code | Get auth code for a domain +*DomainsApi* | [**list_domains**](docs/DomainsApi.md#list_domains) | **GET** /v1/domains | List all domains +*DomainsApi* | [**order_domain**](docs/DomainsApi.md#order_domain) | **POST** /v1/domains | Create or transfer a domain +*DomainsApi* | [**retrieve_domain**](docs/DomainsApi.md#retrieve_domain) | **GET** /v1/domains/{domain} | List specific domain +*DomainsApi* | [**revoke_cancel_domain**](docs/DomainsApi.md#revoke_cancel_domain) | **POST** /v1/domains/{domain}/revoke-cancellation | Revoke cancellation for a specific domain +*DomainsApi* | [**revoke_domain_transfer_out**](docs/DomainsApi.md#revoke_domain_transfer_out) | **DELETE** /v1/domains/{domain}/transfer-out | Revoke transfer out for a domain +*DomainsApi* | [**revoke_domain_transfer_out_0**](docs/DomainsApi.md#revoke_domain_transfer_out_0) | **DELETE** /v1/domains/{domain}/transfer-out | Revoke transfer out for a domain +*DomainsApi* | [**update_domain**](docs/DomainsApi.md#update_domain) | **PATCH** /v1/domains/{domain} | Update a specific domain +*DomainsApi* | [**validate_domain_availability**](docs/DomainsApi.md#validate_domain_availability) | **POST** /v1/registries-domains/{domain}/check-availability | Check domain availablility +*DomainsAuditsApi* | [**retrieve_domains_audits_list**](docs/DomainsAuditsApi.md#retrieve_domains_audits_list) | **GET** /v1/domains/audits | List history about your Domains (audit) +*FirewallsApi* | [**assign_instance_firewall**](docs/FirewallsApi.md#assign_instance_firewall) | **POST** /v1/firewalls/{firewallId}/instances/{instanceId} | Add instance to a firewall +*FirewallsApi* | [**create_firewall**](docs/FirewallsApi.md#create_firewall) | **POST** /v1/firewalls | Create a new firewall definition +*FirewallsApi* | [**delete_firewall**](docs/FirewallsApi.md#delete_firewall) | **DELETE** /v1/firewalls/{firewallId} | Delete existing firewall by id +*FirewallsApi* | [**patch_firewall**](docs/FirewallsApi.md#patch_firewall) | **PATCH** /v1/firewalls/{firewallId} | Update a firewall by id +*FirewallsApi* | [**put_firewall**](docs/FirewallsApi.md#put_firewall) | **PUT** /v1/firewalls/{firewallId} | Update specific firewall rules +*FirewallsApi* | [**retrieve_firewall**](docs/FirewallsApi.md#retrieve_firewall) | **GET** /v1/firewalls/{firewallId} | Get specific firewall by its id +*FirewallsApi* | [**retrieve_firewall_list**](docs/FirewallsApi.md#retrieve_firewall_list) | **GET** /v1/firewalls | List all firewalls +*FirewallsApi* | [**retrieve_preset_rules**](docs/FirewallsApi.md#retrieve_preset_rules) | **GET** /v1/firewalls/preset-rules | Get all preset rules +*FirewallsApi* | [**unassign_instance_firewall**](docs/FirewallsApi.md#unassign_instance_firewall) | **DELETE** /v1/firewalls/{firewallId}/instances/{instanceId} | Remove instance from a firewall +*FirewallsAuditsApi* | [**retrieve_firewall_audits_list**](docs/FirewallsAuditsApi.md#retrieve_firewall_audits_list) | **GET** /v1/firewalls/audits | List history about your Firewalls (audit) +*HandlesApi* | [**create_handle**](docs/HandlesApi.md#create_handle) | **POST** /v1/domains/handles | Create specific handle +*HandlesApi* | [**list_handles**](docs/HandlesApi.md#list_handles) | **GET** /v1/domains/handles | List all handles +*HandlesApi* | [**remove_handle**](docs/HandlesApi.md#remove_handle) | **DELETE** /v1/domains/handles/{handleId} | Remove specific handle +*HandlesApi* | [**retrieve_handle**](docs/HandlesApi.md#retrieve_handle) | **GET** /v1/domains/handles/{handleId} | Get specific handle +*HandlesApi* | [**set_default_handle**](docs/HandlesApi.md#set_default_handle) | **PATCH** /v1/domains/handles/{handleId}/default | Set default handle +*HandlesApi* | [**update_handle**](docs/HandlesApi.md#update_handle) | **PUT** /v1/domains/handles/{handleId} | Update specific handle +*HandlesAuditsApi* | [**retrieve_handles_audits_list**](docs/HandlesAuditsApi.md#retrieve_handles_audits_list) | **GET** /v1/domains/handles/audits | List history about your handles (audit) *ImagesApi* | [**create_custom_image**](docs/ImagesApi.md#create_custom_image) | **POST** /v1/compute/images | Provide a custom image *ImagesApi* | [**delete_image**](docs/ImagesApi.md#delete_image) | **DELETE** /v1/compute/images/{imageId} | Delete an uploaded custom image by its id *ImagesApi* | [**retrieve_custom_images_stats**](docs/ImagesApi.md#retrieve_custom_images_stats) | **GET** /v1/compute/images/stats | List statistics regarding the customer's custom images @@ -117,8 +173,30 @@ Class | Method | HTTP request | Description *InstancesApi* | [**retrieve_instances_list**](docs/InstancesApi.md#retrieve_instances_list) | **GET** /v1/compute/instances | List instances *InstancesApi* | [**upgrade_instance**](docs/InstancesApi.md#upgrade_instance) | **POST** /v1/compute/instances/{instanceId}/upgrade | Upgrading instance capabilities *InstancesAuditsApi* | [**retrieve_instances_audits_list**](docs/InstancesAuditsApi.md#retrieve_instances_audits_list) | **GET** /v1/compute/instances/audits | List history about your instances (audit) -*InternalApi* | [**create_ticket**](docs/InternalApi.md#create_ticket) | **POST** /v1/create-ticket | Create a new support ticket -*InternalApi* | [**retrieve_user_is_password_set**](docs/InternalApi.md#retrieve_user_is_password_set) | **GET** /v1/users/is-password-set | Get user is password set status +*InternalCheckAuditsApi* | [**retrieve_checks_audits_list**](docs/InternalCheckAuditsApi.md#retrieve_checks_audits_list) | **GET** /internal/v1/troubleshooting/checks/audits | List history about your Data (audit) +*InternalCheckCollectionAuditsApi* | [**retrieve_check_collections_audits_list**](docs/InternalCheckCollectionAuditsApi.md#retrieve_check_collections_audits_list) | **GET** /internal/v1/troubleshooting/check-collections/audits | List history about your Data (audit) +*InternalCheckCollectionReplayApi* | [**replay_check_collection**](docs/InternalCheckCollectionReplayApi.md#replay_check_collection) | **POST** /internal/v1/troubleshooting/check-collections/replays | Replay changes for Check +*InternalCheckCollectionTemplatesApi* | [**get_check_collection_template**](docs/InternalCheckCollectionTemplatesApi.md#get_check_collection_template) | **GET** /internal/v1/troubleshooting/check-collection-templates/{orgId}/{checkCollectionTemplateId} | Get check +*InternalCheckCollectionTemplatesApi* | [**list_check_collection_templates**](docs/InternalCheckCollectionTemplatesApi.md#list_check_collection_templates) | **GET** /internal/v1/troubleshooting/check-collection-templates | List check collection templates +*InternalCheckCollectionsApi* | [**cancel_check_collection**](docs/InternalCheckCollectionsApi.md#cancel_check_collection) | **PATCH** /internal/v1/troubleshooting/check-collections/{orgId}/{checkCollectionId} | Cancel check collection +*InternalCheckCollectionsApi* | [**get_check_collection**](docs/InternalCheckCollectionsApi.md#get_check_collection) | **GET** /internal/v1/troubleshooting/check-collections/{orgId}/{checkCollectionId} | Get check collection +*InternalCheckCollectionsApi* | [**list_check_collections**](docs/InternalCheckCollectionsApi.md#list_check_collections) | **GET** /internal/v1/troubleshooting/check-collections | List check collections +*InternalCheckCollectionsApi* | [**start_check_collection**](docs/InternalCheckCollectionsApi.md#start_check_collection) | **POST** /internal/v1/troubleshooting/check-collections | Start check collection +*InternalCheckReplayApi* | [**replay_check**](docs/InternalCheckReplayApi.md#replay_check) | **POST** /internal/v1/troubleshooting/checks/replays | Replay changes for Check +*InternalCheckTemplatesApi* | [**get_check_template**](docs/InternalCheckTemplatesApi.md#get_check_template) | **GET** /internal/v1/troubleshooting/check-templates/{orgId}/{checkTemplateId} | Get check +*InternalCheckTemplatesApi* | [**list_check_templates**](docs/InternalCheckTemplatesApi.md#list_check_templates) | **GET** /internal/v1/troubleshooting/check-templates | List check templates +*InternalChecksApi* | [**cancel_check**](docs/InternalChecksApi.md#cancel_check) | **PATCH** /internal/v1/troubleshooting/checks/{orgId}/{checkId} | Cancel check +*InternalChecksApi* | [**get_check**](docs/InternalChecksApi.md#get_check) | **GET** /internal/v1/troubleshooting/checks/{orgId}/{checkId} | Get check +*InternalChecksApi* | [**list_checks**](docs/InternalChecksApi.md#list_checks) | **GET** /internal/v1/troubleshooting/checks | List check +*InternalChecksApi* | [**start_check**](docs/InternalChecksApi.md#start_check) | **POST** /internal/v1/troubleshooting/checks | Start check +*InternalRemediesApi* | [**cancel_remedy**](docs/InternalRemediesApi.md#cancel_remedy) | **PATCH** /internal/v1/troubleshooting/remedies/{orgId}/{remedyId} | Cancel remedy +*InternalRemediesApi* | [**get_remedy**](docs/InternalRemediesApi.md#get_remedy) | **GET** /internal/v1/troubleshooting/remedies/{orgId}/{remedyId} | Get remedy +*InternalRemediesApi* | [**list_remedies**](docs/InternalRemediesApi.md#list_remedies) | **GET** /internal/v1/troubleshooting/remedies | List remedy +*InternalRemediesApi* | [**start_remedy**](docs/InternalRemediesApi.md#start_remedy) | **POST** /internal/v1/troubleshooting/remedies | Start remedy +*InternalRemedyAuditsApi* | [**retrieve_remedies_audits_list**](docs/InternalRemedyAuditsApi.md#retrieve_remedies_audits_list) | **GET** /internal/v1/troubleshooting/remedies/audits | List history about your Data (audit) +*InternalRemedyReplayApi* | [**replay_remedy**](docs/InternalRemedyReplayApi.md#replay_remedy) | **POST** /internal/v1/troubleshooting/remedies/replays | Replay changes for Remedy +*InternalRemedyTemplatesApi* | [**get_remedy_template**](docs/InternalRemedyTemplatesApi.md#get_remedy_template) | **GET** /internal/v1/troubleshooting/remedy-templates/{orgId}/{remedyTemplateId} | Get remedy +*InternalRemedyTemplatesApi* | [**list_remedy_templates**](docs/InternalRemedyTemplatesApi.md#list_remedy_templates) | **GET** /internal/v1/troubleshooting/remedy-templates | List remedy templates *ObjectStoragesApi* | [**cancel_object_storage**](docs/ObjectStoragesApi.md#cancel_object_storage) | **PATCH** /v1/object-storages/{objectStorageId}/cancel | Cancels the specified object storage at the next possible date *ObjectStoragesApi* | [**create_object_storage**](docs/ObjectStoragesApi.md#create_object_storage) | **POST** /v1/object-storages | Create a new object storage *ObjectStoragesApi* | [**retrieve_data_center_list**](docs/ObjectStoragesApi.md#retrieve_data_center_list) | **GET** /v1/data-centers | List data centers @@ -136,6 +214,10 @@ Class | Method | HTTP request | Description *PrivateNetworksApi* | [**retrieve_private_network_list**](docs/PrivateNetworksApi.md#retrieve_private_network_list) | **GET** /v1/private-networks | List Private Networks *PrivateNetworksApi* | [**unassign_instance_private_network**](docs/PrivateNetworksApi.md#unassign_instance_private_network) | **DELETE** /v1/private-networks/{privateNetworkId}/instances/{instanceId} | Remove instance from a Private Network *PrivateNetworksAuditsApi* | [**retrieve_private_network_audits_list**](docs/PrivateNetworksAuditsApi.md#retrieve_private_network_audits_list) | **GET** /v1/private-networks/audits | List history about your Private Networks (audit) +*RemediesApi* | [**cancel_ext_remedy**](docs/RemediesApi.md#cancel_ext_remedy) | **PATCH** /v1/troubleshooting/remedies/{remedyId} | Cancel remedy +*RemediesApi* | [**get_ext_remedy**](docs/RemediesApi.md#get_ext_remedy) | **GET** /v1/troubleshooting/remedies/{remedyId} | Get remedy +*RemediesApi* | [**list_ext_remedies**](docs/RemediesApi.md#list_ext_remedies) | **GET** /v1/troubleshooting/remedies | List remedy +*RemediesApi* | [**start_ext_remedy**](docs/RemediesApi.md#start_ext_remedy) | **POST** /v1/troubleshooting/remedies | Start remedy *RolesApi* | [**create_role**](docs/RolesApi.md#create_role) | **POST** /v1/roles | Create a new role *RolesApi* | [**delete_role**](docs/RolesApi.md#delete_role) | **DELETE** /v1/roles/{roleId} | Delete existing role by id *RolesApi* | [**retrieve_api_permissions_list**](docs/RolesApi.md#retrieve_api_permissions_list) | **GET** /v1/roles/api-permissions | List of API permissions @@ -170,16 +252,17 @@ Class | Method | HTTP request | Description *UsersApi* | [**create_user**](docs/UsersApi.md#create_user) | **POST** /v1/users | Create a new user *UsersApi* | [**delete_user**](docs/UsersApi.md#delete_user) | **DELETE** /v1/users/{userId} | Delete existing user by id *UsersApi* | [**generate_client_secret**](docs/UsersApi.md#generate_client_secret) | **PUT** /v1/users/client/secret | Generate new client secret -*UsersApi* | [**get_object_storage_credentials**](docs/UsersApi.md#get_object_storage_credentials) | **GET** /v1/users/{userId}/object-storages/{objectStorageId}/credentials/{credentialId} | Get S3 compatible object storage credentials. -*UsersApi* | [**list_object_storage_credentials**](docs/UsersApi.md#list_object_storage_credentials) | **GET** /v1/users/{userId}/object-storages/credentials | Get list of S3 compatible object storage credentials for user. -*UsersApi* | [**regenerate_object_storage_credentials**](docs/UsersApi.md#regenerate_object_storage_credentials) | **PATCH** /v1/users/{userId}/object-storages/{objectStorageId}/credentials/{credentialId} | Regenerates secret key of specified user for the S3 compatible object storages. *UsersApi* | [**resend_email_verification**](docs/UsersApi.md#resend_email_verification) | **POST** /v1/users/{userId}/resend-email-verification | Resend email verification *UsersApi* | [**reset_password**](docs/UsersApi.md#reset_password) | **POST** /v1/users/{userId}/reset-password | Send reset password email *UsersApi* | [**retrieve_user**](docs/UsersApi.md#retrieve_user) | **GET** /v1/users/{userId} | Get specific user by id *UsersApi* | [**retrieve_user_client**](docs/UsersApi.md#retrieve_user_client) | **GET** /v1/users/client | Get client +*UsersApi* | [**retrieve_user_is_password_set**](docs/UsersApi.md#retrieve_user_is_password_set) | **GET** /v1/users/is-password-set | Get user is password set status *UsersApi* | [**retrieve_user_list**](docs/UsersApi.md#retrieve_user_list) | **GET** /v1/users | List users *UsersApi* | [**update_user**](docs/UsersApi.md#update_user) | **PATCH** /v1/users/{userId} | Update specific user by id *UsersAuditsApi* | [**retrieve_user_audits_list**](docs/UsersAuditsApi.md#retrieve_user_audits_list) | **GET** /v1/users/audits | List history about your users (audit) +*UsersObjectStorageCredentialsApi* | [**get_object_storage_credentials**](docs/UsersObjectStorageCredentialsApi.md#get_object_storage_credentials) | **GET** /v1/users/{userId}/object-storages/{objectStorageId}/credentials/{credentialId} | Get S3 compatible object storage credentials. +*UsersObjectStorageCredentialsApi* | [**list_object_storage_credentials**](docs/UsersObjectStorageCredentialsApi.md#list_object_storage_credentials) | **GET** /v1/users/{userId}/object-storages/credentials | Get list of S3 compatible object storage credentials for user. +*UsersObjectStorageCredentialsApi* | [**regenerate_object_storage_credentials**](docs/UsersObjectStorageCredentialsApi.md#regenerate_object_storage_credentials) | **PATCH** /v1/users/{userId}/object-storages/{objectStorageId}/credentials/{credentialId} | Regenerates secret key of specified user for the S3 compatible object storages. *VIPApi* | [**assign_ip**](docs/VIPApi.md#assign_ip) | **POST** /v1/vips/{ip}/{resourceType}/{resourceId} | Assign a VIP to an VPS/VDS/Bare Metal *VIPApi* | [**retrieve_vip**](docs/VIPApi.md#retrieve_vip) | **GET** /v1/vips/{ip} | Get specific VIP by ip *VIPApi* | [**retrieve_vip_list**](docs/VIPApi.md#retrieve_vip_list) | **GET** /v1/vips | List VIPs @@ -189,25 +272,67 @@ Class | Method | HTTP request | Description ## Documentation For Models + - [AccountOrgResponse](docs/AccountOrgResponse.md) + - [AccountsListResponse](docs/AccountsListResponse.md) - [AddOnQuantityRequest](docs/AddOnQuantityRequest.md) - [AddOnRequest](docs/AddOnRequest.md) - [AddOnResponse](docs/AddOnResponse.md) - [AdditionalIp](docs/AdditionalIp.md) + - [ApiBulkDeleteDnsZoneRecordsResponse](docs/ApiBulkDeleteDnsZoneRecordsResponse.md) + - [ApiDnsZoneRecordResponse](docs/ApiDnsZoneRecordResponse.md) + - [ApiDnsZoneResponse](docs/ApiDnsZoneResponse.md) - [ApiPermissionsResponse](docs/ApiPermissionsResponse.md) + - [ApiPtrRecordResponse](docs/ApiPtrRecordResponse.md) - [ApplicationConfig](docs/ApplicationConfig.md) + - [ApplicationMetaData](docs/ApplicationMetaData.md) - [ApplicationRequirements](docs/ApplicationRequirements.md) - [ApplicationResponse](docs/ApplicationResponse.md) + - [AssignInstanceFirewallResponse](docs/AssignInstanceFirewallResponse.md) - [AssignInstancePrivateNetworkResponse](docs/AssignInstancePrivateNetworkResponse.md) - [AssignVipResponse](docs/AssignVipResponse.md) - [AssignedTagResponse](docs/AssignedTagResponse.md) - [AssignmentAuditResponse](docs/AssignmentAuditResponse.md) - [AssignmentResponse](docs/AssignmentResponse.md) + - [AuditCountResponse](docs/AuditCountResponse.md) - [AutoScalingTypeRequest](docs/AutoScalingTypeRequest.md) - [AutoScalingTypeResponse](docs/AutoScalingTypeResponse.md) + - [BaseCheckCollectionCreateRequest](docs/BaseCheckCollectionCreateRequest.md) + - [BaseCheckCreateRequest](docs/BaseCheckCreateRequest.md) + - [BaseRemedyCreateRequest](docs/BaseRemedyCreateRequest.md) + - [BulkDeleteDnsZoneRecordsRequest](docs/BulkDeleteDnsZoneRecordsRequest.md) + - [BulkDeleteResultResponse](docs/BulkDeleteResultResponse.md) + - [CancelDomainRequest](docs/CancelDomainRequest.md) + - [CancelInstanceRequest](docs/CancelInstanceRequest.md) - [CancelInstanceResponse](docs/CancelInstanceResponse.md) - [CancelInstanceResponseData](docs/CancelInstanceResponseData.md) + - [CancelObjectStorageRequest](docs/CancelObjectStorageRequest.md) - [CancelObjectStorageResponse](docs/CancelObjectStorageResponse.md) - [CancelObjectStorageResponseData](docs/CancelObjectStorageResponseData.md) + - [CancelRequest](docs/CancelRequest.md) + - [ChangedAuthCode](docs/ChangedAuthCode.md) + - [Changes](docs/Changes.md) + - [CheckCollectionCheckTemplates](docs/CheckCollectionCheckTemplates.md) + - [CheckCollectionCreateRequest](docs/CheckCollectionCreateRequest.md) + - [CheckCollectionResponse](docs/CheckCollectionResponse.md) + - [CheckCollectionTemplateResponse](docs/CheckCollectionTemplateResponse.md) + - [CheckCollectionTemplatesCheckTemplates](docs/CheckCollectionTemplatesCheckTemplates.md) + - [CheckCollectionTemplatesGetResponse](docs/CheckCollectionTemplatesGetResponse.md) + - [CheckCollectionTemplatesListResponse](docs/CheckCollectionTemplatesListResponse.md) + - [CheckCollectionsAuditListResponse](docs/CheckCollectionsAuditListResponse.md) + - [CheckCollectionsAuditResponse](docs/CheckCollectionsAuditResponse.md) + - [CheckCollectionsGetResponse](docs/CheckCollectionsGetResponse.md) + - [CheckCollectionsListResponse](docs/CheckCollectionsListResponse.md) + - [CheckCollectionsReplayRequest](docs/CheckCollectionsReplayRequest.md) + - [CheckCreateRequest](docs/CheckCreateRequest.md) + - [CheckResponse](docs/CheckResponse.md) + - [CheckTemplateResponse](docs/CheckTemplateResponse.md) + - [CheckTemplatesGetResponse](docs/CheckTemplatesGetResponse.md) + - [CheckTemplatesListResponse](docs/CheckTemplatesListResponse.md) + - [ChecksAuditListResponse](docs/ChecksAuditListResponse.md) + - [ChecksAuditResponse](docs/ChecksAuditResponse.md) + - [ChecksGetResponse](docs/ChecksGetResponse.md) + - [ChecksListResponse](docs/ChecksListResponse.md) + - [ChecksReplayRequest](docs/ChecksReplayRequest.md) - [ClientResponse](docs/ClientResponse.md) - [ClientSecretResponse](docs/ClientSecretResponse.md) - [CreateAssignmentResponse](docs/CreateAssignmentResponse.md) @@ -215,6 +340,10 @@ Class | Method | HTTP request | Description - [CreateCustomImageRequest](docs/CreateCustomImageRequest.md) - [CreateCustomImageResponse](docs/CreateCustomImageResponse.md) - [CreateCustomImageResponseData](docs/CreateCustomImageResponseData.md) + - [CreateDnsZoneRecordRequest](docs/CreateDnsZoneRecordRequest.md) + - [CreateDnsZoneRequest](docs/CreateDnsZoneRequest.md) + - [CreateFirewallRequest](docs/CreateFirewallRequest.md) + - [CreateFirewallResponse](docs/CreateFirewallResponse.md) - [CreateInstanceAddons](docs/CreateInstanceAddons.md) - [CreateInstanceRequest](docs/CreateInstanceRequest.md) - [CreateInstanceResponse](docs/CreateInstanceResponse.md) @@ -224,6 +353,7 @@ Class | Method | HTTP request | Description - [CreateObjectStorageResponseData](docs/CreateObjectStorageResponseData.md) - [CreatePrivateNetworkRequest](docs/CreatePrivateNetworkRequest.md) - [CreatePrivateNetworkResponse](docs/CreatePrivateNetworkResponse.md) + - [CreatePtrRecordRequest](docs/CreatePtrRecordRequest.md) - [CreateRoleRequest](docs/CreateRoleRequest.md) - [CreateRoleResponse](docs/CreateRoleResponse.md) - [CreateRoleResponseData](docs/CreateRoleResponseData.md) @@ -234,9 +364,6 @@ Class | Method | HTTP request | Description - [CreateTagRequest](docs/CreateTagRequest.md) - [CreateTagResponse](docs/CreateTagResponse.md) - [CreateTagResponseData](docs/CreateTagResponseData.md) - - [CreateTicketRequest](docs/CreateTicketRequest.md) - - [CreateTicketResponse](docs/CreateTicketResponse.md) - - [CreateTicketResponseData](docs/CreateTicketResponseData.md) - [CreateUserRequest](docs/CreateUserRequest.md) - [CreateUserResponse](docs/CreateUserResponse.md) - [CreateUserResponseData](docs/CreateUserResponseData.md) @@ -244,10 +371,40 @@ Class | Method | HTTP request | Description - [CustomImagesStatsResponse](docs/CustomImagesStatsResponse.md) - [CustomImagesStatsResponseData](docs/CustomImagesStatsResponseData.md) - [DataCenterResponse](docs/DataCenterResponse.md) + - [DnsZoneRecordResponse](docs/DnsZoneRecordResponse.md) + - [DnsZoneResponse](docs/DnsZoneResponse.md) + - [DomainAuditResponse](docs/DomainAuditResponse.md) + - [DomainAuditResponseData](docs/DomainAuditResponseData.md) + - [DomainAuthCodeRegenerateResponse](docs/DomainAuthCodeRegenerateResponse.md) + - [DomainAuthCodeResponse](docs/DomainAuthCodeResponse.md) + - [DomainCancel](docs/DomainCancel.md) + - [DomainCancelResponse](docs/DomainCancelResponse.md) + - [DomainCreateRequest](docs/DomainCreateRequest.md) + - [DomainCreateResponse](docs/DomainCreateResponse.md) + - [DomainDetails](docs/DomainDetails.md) + - [DomainFindResponse](docs/DomainFindResponse.md) + - [DomainHandles](docs/DomainHandles.md) + - [DomainPatchRequest](docs/DomainPatchRequest.md) + - [DomainPatchResponse](docs/DomainPatchResponse.md) + - [DomainResponse](docs/DomainResponse.md) + - [DomainsListResponse](docs/DomainsListResponse.md) + - [ExtCheckCollectionResponse](docs/ExtCheckCollectionResponse.md) + - [ExtCheckCollectionTemplateResponse](docs/ExtCheckCollectionTemplateResponse.md) + - [ExtCheckCollectionTemplatesGetResponse](docs/ExtCheckCollectionTemplatesGetResponse.md) + - [ExtCheckCollectionTemplatesListResponse](docs/ExtCheckCollectionTemplatesListResponse.md) + - [ExtCheckCollectionsGetResponse](docs/ExtCheckCollectionsGetResponse.md) + - [ExtCheckCollectionsListResponse](docs/ExtCheckCollectionsListResponse.md) + - [ExtCheckResponse](docs/ExtCheckResponse.md) + - [ExtChecksGetResponse](docs/ExtChecksGetResponse.md) + - [ExtChecksListResponse](docs/ExtChecksListResponse.md) + - [ExtRemediesGetResponse](docs/ExtRemediesGetResponse.md) + - [ExtRemediesListResponse](docs/ExtRemediesListResponse.md) + - [ExtRemedyResponse](docs/ExtRemedyResponse.md) - [ExtraStorageRequest](docs/ExtraStorageRequest.md) - [FindAssignmentResponse](docs/FindAssignmentResponse.md) - [FindClientResponse](docs/FindClientResponse.md) - [FindCredentialResponse](docs/FindCredentialResponse.md) + - [FindFirewallResponse](docs/FindFirewallResponse.md) - [FindImageResponse](docs/FindImageResponse.md) - [FindInstanceResponse](docs/FindInstanceResponse.md) - [FindObjectStorageResponse](docs/FindObjectStorageResponse.md) @@ -260,12 +417,30 @@ Class | Method | HTTP request | Description - [FindUserResponse](docs/FindUserResponse.md) - [FindVipResponse](docs/FindVipResponse.md) - [FindVncResponse](docs/FindVncResponse.md) + - [FirewallAuditResponse](docs/FirewallAuditResponse.md) + - [FirewallResponse](docs/FirewallResponse.md) + - [FirewallRuleRequest](docs/FirewallRuleRequest.md) + - [FirewallRuleResponse](docs/FirewallRuleResponse.md) - [FirewallingUpgradeRequest](docs/FirewallingUpgradeRequest.md) - [GenerateClientSecretResponse](docs/GenerateClientSecretResponse.md) + - [HandleAddress](docs/HandleAddress.md) + - [HandleAuditResponse](docs/HandleAuditResponse.md) + - [HandleAuditResponseData](docs/HandleAuditResponseData.md) + - [HandleBirthInfo](docs/HandleBirthInfo.md) + - [HandleCreateRequest](docs/HandleCreateRequest.md) + - [HandleCreateResponse](docs/HandleCreateResponse.md) + - [HandleFindResponse](docs/HandleFindResponse.md) + - [HandleListResponse](docs/HandleListResponse.md) + - [HandlePatchRequest](docs/HandlePatchRequest.md) + - [HandlePatchResponse](docs/HandlePatchResponse.md) + - [HandlePhone](docs/HandlePhone.md) + - [HandleResponse](docs/HandleResponse.md) - [ImageAuditResponse](docs/ImageAuditResponse.md) - [ImageAuditResponseData](docs/ImageAuditResponseData.md) - [ImageResponse](docs/ImageResponse.md) - [InstanceAssignmentSelfLinks](docs/InstanceAssignmentSelfLinks.md) + - [InstanceAssignmentSelfLinks1](docs/InstanceAssignmentSelfLinks1.md) + - [InstanceDetails](docs/InstanceDetails.md) - [InstanceRescueActionResponse](docs/InstanceRescueActionResponse.md) - [InstanceRescueActionResponseData](docs/InstanceRescueActionResponseData.md) - [InstanceResetPasswordActionResponse](docs/InstanceResetPasswordActionResponse.md) @@ -278,6 +453,7 @@ Class | Method | HTTP request | Description - [InstanceStartActionResponse](docs/InstanceStartActionResponse.md) - [InstanceStartActionResponseData](docs/InstanceStartActionResponseData.md) - [InstanceStatus](docs/InstanceStatus.md) + - [InstanceStatusRepresentation](docs/InstanceStatusRepresentation.md) - [InstanceStopActionResponse](docs/InstanceStopActionResponse.md) - [InstanceStopActionResponseData](docs/InstanceStopActionResponseData.md) - [Instances](docs/Instances.md) @@ -286,8 +462,12 @@ Class | Method | HTTP request | Description - [InstancesAuditResponse](docs/InstancesAuditResponse.md) - [InstancesResetPasswordActionsRequest](docs/InstancesResetPasswordActionsRequest.md) - [IpConfig](docs/IpConfig.md) + - [IpConfig1](docs/IpConfig1.md) + - [IpConfig2](docs/IpConfig2.md) - [IpV4](docs/IpV4.md) - [IpV41](docs/IpV41.md) + - [IpV42](docs/IpV42.md) + - [IpV43](docs/IpV43.md) - [IpV6](docs/IpV6.md) - [Links](docs/Links.md) - [ListApiPermissionResponse](docs/ListApiPermissionResponse.md) @@ -296,6 +476,11 @@ Class | Method | HTTP request | Description - [ListAssignmentResponse](docs/ListAssignmentResponse.md) - [ListCredentialResponse](docs/ListCredentialResponse.md) - [ListDataCenterResponse](docs/ListDataCenterResponse.md) + - [ListDnsZoneRecordsResponse](docs/ListDnsZoneRecordsResponse.md) + - [ListDnsZonesResponse](docs/ListDnsZonesResponse.md) + - [ListFirewallAuditResponse](docs/ListFirewallAuditResponse.md) + - [ListFirewallResponse](docs/ListFirewallResponse.md) + - [ListFirewallResponseData](docs/ListFirewallResponseData.md) - [ListImageResponse](docs/ListImageResponse.md) - [ListImageResponseData](docs/ListImageResponseData.md) - [ListInstancesActionsAuditResponse](docs/ListInstancesActionsAuditResponse.md) @@ -304,9 +489,11 @@ Class | Method | HTTP request | Description - [ListInstancesResponseData](docs/ListInstancesResponseData.md) - [ListObjectStorageAuditResponse](docs/ListObjectStorageAuditResponse.md) - [ListObjectStorageResponse](docs/ListObjectStorageResponse.md) + - [ListPresetRulesResponse](docs/ListPresetRulesResponse.md) - [ListPrivateNetworkAuditResponse](docs/ListPrivateNetworkAuditResponse.md) - [ListPrivateNetworkResponse](docs/ListPrivateNetworkResponse.md) - [ListPrivateNetworkResponseData](docs/ListPrivateNetworkResponseData.md) + - [ListPtrRecordsResponse](docs/ListPtrRecordsResponse.md) - [ListRoleAuditResponse](docs/ListRoleAuditResponse.md) - [ListRoleResponse](docs/ListRoleResponse.md) - [ListSecretAuditResponse](docs/ListSecretAuditResponse.md) @@ -321,12 +508,15 @@ Class | Method | HTTP request | Description - [ListVipResponse](docs/ListVipResponse.md) - [ListVipResponseData](docs/ListVipResponseData.md) - [MinimumRequirements](docs/MinimumRequirements.md) + - [Nameserver](docs/Nameserver.md) - [ObjectStorageAuditResponse](docs/ObjectStorageAuditResponse.md) - [ObjectStorageResponse](docs/ObjectStorageResponse.md) - [ObjectStoragesStatsResponse](docs/ObjectStoragesStatsResponse.md) - [ObjectStoragesStatsResponseData](docs/ObjectStoragesStatsResponseData.md) - [OptimalRequirements](docs/OptimalRequirements.md) - [PaginationMeta](docs/PaginationMeta.md) + - [PatchFirewallRequest](docs/PatchFirewallRequest.md) + - [PatchFirewallResponse](docs/PatchFirewallResponse.md) - [PatchInstanceRequest](docs/PatchInstanceRequest.md) - [PatchInstanceResponse](docs/PatchInstanceResponse.md) - [PatchInstanceResponseData](docs/PatchInstanceResponseData.md) @@ -336,28 +526,52 @@ Class | Method | HTTP request | Description - [PatchVncRequest](docs/PatchVncRequest.md) - [PermissionRequest](docs/PermissionRequest.md) - [PermissionResponse](docs/PermissionResponse.md) + - [PresetRulesResponse](docs/PresetRulesResponse.md) - [PrivateIpConfig](docs/PrivateIpConfig.md) - [PrivateNetworkAuditResponse](docs/PrivateNetworkAuditResponse.md) - [PrivateNetworkResponse](docs/PrivateNetworkResponse.md) + - [PtrRecordResponse](docs/PtrRecordResponse.md) + - [PutFirewallRequest](docs/PutFirewallRequest.md) + - [PutFirewallResponse](docs/PutFirewallResponse.md) + - [RecordAuditResponse](docs/RecordAuditResponse.md) + - [RecordAuditResponseData](docs/RecordAuditResponseData.md) - [ReinstallInstanceRequest](docs/ReinstallInstanceRequest.md) - [ReinstallInstanceResponse](docs/ReinstallInstanceResponse.md) - [ReinstallInstanceResponseData](docs/ReinstallInstanceResponseData.md) + - [RemediesAuditListResponse](docs/RemediesAuditListResponse.md) + - [RemediesAuditResponse](docs/RemediesAuditResponse.md) + - [RemediesCreateRequest](docs/RemediesCreateRequest.md) + - [RemediesGetResponse](docs/RemediesGetResponse.md) + - [RemediesListResponse](docs/RemediesListResponse.md) + - [RemediesReplayRequest](docs/RemediesReplayRequest.md) + - [RemedyResponse](docs/RemedyResponse.md) + - [RemedyTemplateResponse](docs/RemedyTemplateResponse.md) + - [RemedyTemplatesGetResponse](docs/RemedyTemplatesGetResponse.md) + - [RemedyTemplatesListResponse](docs/RemedyTemplatesListResponse.md) + - [ReplayResponse](docs/ReplayResponse.md) - [ResourcePermissionsResponse](docs/ResourcePermissionsResponse.md) - [RoleAuditResponse](docs/RoleAuditResponse.md) - [RoleResponse](docs/RoleResponse.md) - [RollbackSnapshotResponse](docs/RollbackSnapshotResponse.md) + - [Rules](docs/Rules.md) + - [RulesRequest](docs/RulesRequest.md) - [SecretAuditResponse](docs/SecretAuditResponse.md) - [SecretResponse](docs/SecretResponse.md) - [SelfLinks](docs/SelfLinks.md) + - [SetDefaultHandleResponse](docs/SetDefaultHandleResponse.md) - [SnapshotResponse](docs/SnapshotResponse.md) - [SnapshotsAuditResponse](docs/SnapshotsAuditResponse.md) + - [SrcCidr](docs/SrcCidr.md) - [TagAssignmentSelfLinks](docs/TagAssignmentSelfLinks.md) - [TagAuditResponse](docs/TagAuditResponse.md) - [TagResponse](docs/TagResponse.md) + - [UnassignInstanceFirewallResponse](docs/UnassignInstanceFirewallResponse.md) - [UnassignInstancePrivateNetworkResponse](docs/UnassignInstancePrivateNetworkResponse.md) - [UpdateCustomImageRequest](docs/UpdateCustomImageRequest.md) - [UpdateCustomImageResponse](docs/UpdateCustomImageResponse.md) - [UpdateCustomImageResponseData](docs/UpdateCustomImageResponseData.md) + - [UpdateDnsZoneRecordRequest](docs/UpdateDnsZoneRecordRequest.md) + - [UpdatePtrRecordRequest](docs/UpdatePtrRecordRequest.md) - [UpdateRoleRequest](docs/UpdateRoleRequest.md) - [UpdateRoleResponse](docs/UpdateRoleResponse.md) - [UpdateSecretRequest](docs/UpdateSecretRequest.md) @@ -379,6 +593,8 @@ Class | Method | HTTP request | Description - [VipAuditResponse](docs/VipAuditResponse.md) - [VipResponse](docs/VipResponse.md) - [VncResponse](docs/VncResponse.md) + - [ZoneAuditResponse](docs/ZoneAuditResponse.md) + - [ZoneAuditResponseData](docs/ZoneAuditResponseData.md) diff --git a/docs/AccountOrgResponse.md b/docs/AccountOrgResponse.md new file mode 100644 index 00000000..79ec3cb4 --- /dev/null +++ b/docs/AccountOrgResponse.md @@ -0,0 +1,32 @@ +# AccountOrgResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_date** | **datetime** | Creation date | +**modified_date** | **datetime** | Modify date | +**org_id** | **str** | Org id | +**account_id** | **str** | Account id | + +## Example + +```python +from pfruck_contabo.models.account_org_response import AccountOrgResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AccountOrgResponse from a JSON string +account_org_response_instance = AccountOrgResponse.from_json(json) +# print the JSON string representation of the object +print(AccountOrgResponse.to_json()) + +# convert the object into a dict +account_org_response_dict = account_org_response_instance.to_dict() +# create an instance of AccountOrgResponse from a dict +account_org_response_from_dict = AccountOrgResponse.from_dict(account_org_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AccountsListResponse.md b/docs/AccountsListResponse.md new file mode 100644 index 00000000..9e88e310 --- /dev/null +++ b/docs/AccountsListResponse.md @@ -0,0 +1,31 @@ +# AccountsListResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**PaginationMeta**](PaginationMeta.md) | Data about pagination like how many results, pages, page size. | +**data** | [**List[AccountOrgResponse]**](AccountOrgResponse.md) | | +**links** | **object** | | + +## Example + +```python +from pfruck_contabo.models.accounts_list_response import AccountsListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AccountsListResponse from a JSON string +accounts_list_response_instance = AccountsListResponse.from_json(json) +# print the JSON string representation of the object +print(AccountsListResponse.to_json()) + +# convert the object into a dict +accounts_list_response_dict = accounts_list_response_instance.to_dict() +# create an instance of AccountsListResponse from a dict +accounts_list_response_from_dict = AccountsListResponse.from_dict(accounts_list_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdditionalIp.md b/docs/AdditionalIp.md index 89cfd34d..afeb1d7c 100644 --- a/docs/AdditionalIp.md +++ b/docs/AdditionalIp.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**v4** | [**IpV4**](IpV4.md) | | +**v4** | [**IpV43**](IpV43.md) | | ## Example diff --git a/docs/ApiBulkDeleteDnsZoneRecordsResponse.md b/docs/ApiBulkDeleteDnsZoneRecordsResponse.md new file mode 100644 index 00000000..93287e4f --- /dev/null +++ b/docs/ApiBulkDeleteDnsZoneRecordsResponse.md @@ -0,0 +1,30 @@ +# ApiBulkDeleteDnsZoneRecordsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[BulkDeleteResultResponse]**](BulkDeleteResultResponse.md) | | +**links** | [**SelfLinks**](SelfLinks.md) | | + +## Example + +```python +from pfruck_contabo.models.api_bulk_delete_dns_zone_records_response import ApiBulkDeleteDnsZoneRecordsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiBulkDeleteDnsZoneRecordsResponse from a JSON string +api_bulk_delete_dns_zone_records_response_instance = ApiBulkDeleteDnsZoneRecordsResponse.from_json(json) +# print the JSON string representation of the object +print(ApiBulkDeleteDnsZoneRecordsResponse.to_json()) + +# convert the object into a dict +api_bulk_delete_dns_zone_records_response_dict = api_bulk_delete_dns_zone_records_response_instance.to_dict() +# create an instance of ApiBulkDeleteDnsZoneRecordsResponse from a dict +api_bulk_delete_dns_zone_records_response_from_dict = ApiBulkDeleteDnsZoneRecordsResponse.from_dict(api_bulk_delete_dns_zone_records_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApiDnsZoneRecordResponse.md b/docs/ApiDnsZoneRecordResponse.md new file mode 100644 index 00000000..387c00d1 --- /dev/null +++ b/docs/ApiDnsZoneRecordResponse.md @@ -0,0 +1,30 @@ +# ApiDnsZoneRecordResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[DnsZoneRecordResponse]**](DnsZoneRecordResponse.md) | | +**links** | [**SelfLinks**](SelfLinks.md) | | + +## Example + +```python +from pfruck_contabo.models.api_dns_zone_record_response import ApiDnsZoneRecordResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiDnsZoneRecordResponse from a JSON string +api_dns_zone_record_response_instance = ApiDnsZoneRecordResponse.from_json(json) +# print the JSON string representation of the object +print(ApiDnsZoneRecordResponse.to_json()) + +# convert the object into a dict +api_dns_zone_record_response_dict = api_dns_zone_record_response_instance.to_dict() +# create an instance of ApiDnsZoneRecordResponse from a dict +api_dns_zone_record_response_from_dict = ApiDnsZoneRecordResponse.from_dict(api_dns_zone_record_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApiDnsZoneResponse.md b/docs/ApiDnsZoneResponse.md new file mode 100644 index 00000000..699ed92f --- /dev/null +++ b/docs/ApiDnsZoneResponse.md @@ -0,0 +1,30 @@ +# ApiDnsZoneResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[DnsZoneResponse]**](DnsZoneResponse.md) | | +**links** | [**SelfLinks**](SelfLinks.md) | | + +## Example + +```python +from pfruck_contabo.models.api_dns_zone_response import ApiDnsZoneResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiDnsZoneResponse from a JSON string +api_dns_zone_response_instance = ApiDnsZoneResponse.from_json(json) +# print the JSON string representation of the object +print(ApiDnsZoneResponse.to_json()) + +# convert the object into a dict +api_dns_zone_response_dict = api_dns_zone_response_instance.to_dict() +# create an instance of ApiDnsZoneResponse from a dict +api_dns_zone_response_from_dict = ApiDnsZoneResponse.from_dict(api_dns_zone_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApiPtrRecordResponse.md b/docs/ApiPtrRecordResponse.md new file mode 100644 index 00000000..53e55596 --- /dev/null +++ b/docs/ApiPtrRecordResponse.md @@ -0,0 +1,30 @@ +# ApiPtrRecordResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[PtrRecordResponse]**](PtrRecordResponse.md) | | +**links** | [**SelfLinks**](SelfLinks.md) | | + +## Example + +```python +from pfruck_contabo.models.api_ptr_record_response import ApiPtrRecordResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiPtrRecordResponse from a JSON string +api_ptr_record_response_instance = ApiPtrRecordResponse.from_json(json) +# print the JSON string representation of the object +print(ApiPtrRecordResponse.to_json()) + +# convert the object into a dict +api_ptr_record_response_dict = api_ptr_record_response_instance.to_dict() +# create an instance of ApiPtrRecordResponse from a dict +api_ptr_record_response_from_dict = ApiPtrRecordResponse.from_dict(api_ptr_record_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationConfig.md b/docs/ApplicationConfig.md index 0aedb335..89de53f5 100644 --- a/docs/ApplicationConfig.md +++ b/docs/ApplicationConfig.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes **image_id** | **str** | Image ID | **user_data_id** | **str** | User Data ID | **user_data** | **str** | [Cloud-Init](https://cloud-init.io/) Config in order to customize during start of compute instance. | +**meta_data** | [**ApplicationMetaData**](ApplicationMetaData.md) | Metadata of the application configuration | ## Example diff --git a/docs/ApplicationMetaData.md b/docs/ApplicationMetaData.md new file mode 100644 index 00000000..e8ef18bd --- /dev/null +++ b/docs/ApplicationMetaData.md @@ -0,0 +1,33 @@ +# ApplicationMetaData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**urls** | **List[str]** | | +**logo_url** | **str** | | +**initial_username** | **str** | | +**documentation_urls** | **List[str]** | | +**requires_password_for_install** | **bool** | | + +## Example + +```python +from pfruck_contabo.models.application_meta_data import ApplicationMetaData + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationMetaData from a JSON string +application_meta_data_instance = ApplicationMetaData.from_json(json) +# print the JSON string representation of the object +print(ApplicationMetaData.to_json()) + +# convert the object into a dict +application_meta_data_dict = application_meta_data_instance.to_dict() +# create an instance of ApplicationMetaData from a dict +application_meta_data_from_dict = ApplicationMetaData.from_dict(application_meta_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssignInstanceFirewallResponse.md b/docs/AssignInstanceFirewallResponse.md new file mode 100644 index 00000000..058fbfcd --- /dev/null +++ b/docs/AssignInstanceFirewallResponse.md @@ -0,0 +1,29 @@ +# AssignInstanceFirewallResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**InstanceAssignmentSelfLinks1**](InstanceAssignmentSelfLinks1.md) | Links for easy navigation. | + +## Example + +```python +from pfruck_contabo.models.assign_instance_firewall_response import AssignInstanceFirewallResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AssignInstanceFirewallResponse from a JSON string +assign_instance_firewall_response_instance = AssignInstanceFirewallResponse.from_json(json) +# print the JSON string representation of the object +print(AssignInstanceFirewallResponse.to_json()) + +# convert the object into a dict +assign_instance_firewall_response_dict = assign_instance_firewall_response_instance.to_dict() +# create an instance of AssignInstanceFirewallResponse from a dict +assign_instance_firewall_response_from_dict = AssignInstanceFirewallResponse.from_dict(assign_instance_firewall_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AuditCountResponse.md b/docs/AuditCountResponse.md new file mode 100644 index 00000000..a3451936 --- /dev/null +++ b/docs/AuditCountResponse.md @@ -0,0 +1,33 @@ +# AuditCountResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_date** | **datetime** | Creation date | +**modified_date** | **datetime** | Modify date | +**org_id** | **str** | Org id | +**account_id** | **str** | Account id | +**count** | **float** | Audit for replay quantity | + +## Example + +```python +from pfruck_contabo.models.audit_count_response import AuditCountResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AuditCountResponse from a JSON string +audit_count_response_instance = AuditCountResponse.from_json(json) +# print the JSON string representation of the object +print(AuditCountResponse.to_json()) + +# convert the object into a dict +audit_count_response_dict = audit_count_response_instance.to_dict() +# create an instance of AuditCountResponse from a dict +audit_count_response_from_dict = AuditCountResponse.from_dict(audit_count_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BaseCheckCollectionCreateRequest.md b/docs/BaseCheckCollectionCreateRequest.md new file mode 100644 index 00000000..9534592d --- /dev/null +++ b/docs/BaseCheckCollectionCreateRequest.md @@ -0,0 +1,31 @@ +# BaseCheckCollectionCreateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**object_type** | **str** | Object type to be handled | +**object_id** | **str** | ID of the object, to be handled | +**check_collection_template_id** | **float** | Check Template for this check collection | + +## Example + +```python +from pfruck_contabo.models.base_check_collection_create_request import BaseCheckCollectionCreateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseCheckCollectionCreateRequest from a JSON string +base_check_collection_create_request_instance = BaseCheckCollectionCreateRequest.from_json(json) +# print the JSON string representation of the object +print(BaseCheckCollectionCreateRequest.to_json()) + +# convert the object into a dict +base_check_collection_create_request_dict = base_check_collection_create_request_instance.to_dict() +# create an instance of BaseCheckCollectionCreateRequest from a dict +base_check_collection_create_request_from_dict = BaseCheckCollectionCreateRequest.from_dict(base_check_collection_create_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BaseCheckCreateRequest.md b/docs/BaseCheckCreateRequest.md new file mode 100644 index 00000000..95cd4b7b --- /dev/null +++ b/docs/BaseCheckCreateRequest.md @@ -0,0 +1,32 @@ +# BaseCheckCreateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**object_type** | **str** | Object type to be handled | +**object_id** | **str** | ID of the object, to be handled | +**check_template_id** | **float** | Check Template for this check | +**check_collection_id** | **float** | Check Collection for this check | [optional] + +## Example + +```python +from pfruck_contabo.models.base_check_create_request import BaseCheckCreateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseCheckCreateRequest from a JSON string +base_check_create_request_instance = BaseCheckCreateRequest.from_json(json) +# print the JSON string representation of the object +print(BaseCheckCreateRequest.to_json()) + +# convert the object into a dict +base_check_create_request_dict = base_check_create_request_instance.to_dict() +# create an instance of BaseCheckCreateRequest from a dict +base_check_create_request_from_dict = BaseCheckCreateRequest.from_dict(base_check_create_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BaseRemedyCreateRequest.md b/docs/BaseRemedyCreateRequest.md new file mode 100644 index 00000000..519a2126 --- /dev/null +++ b/docs/BaseRemedyCreateRequest.md @@ -0,0 +1,32 @@ +# BaseRemedyCreateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**object_type** | **str** | Object type to be handled | +**object_id** | **str** | ID of the object, to be handled | +**remedy_template_id** | **float** | Remedy Template for this remedy | +**remedy_collection_id** | **float** | Remedy Collection for this remedy | [optional] + +## Example + +```python +from pfruck_contabo.models.base_remedy_create_request import BaseRemedyCreateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseRemedyCreateRequest from a JSON string +base_remedy_create_request_instance = BaseRemedyCreateRequest.from_json(json) +# print the JSON string representation of the object +print(BaseRemedyCreateRequest.to_json()) + +# convert the object into a dict +base_remedy_create_request_dict = base_remedy_create_request_instance.to_dict() +# create an instance of BaseRemedyCreateRequest from a dict +base_remedy_create_request_from_dict = BaseRemedyCreateRequest.from_dict(base_remedy_create_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BulkDeleteDnsZoneRecordsRequest.md b/docs/BulkDeleteDnsZoneRecordsRequest.md new file mode 100644 index 00000000..d4ac72fc --- /dev/null +++ b/docs/BulkDeleteDnsZoneRecordsRequest.md @@ -0,0 +1,29 @@ +# BulkDeleteDnsZoneRecordsRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**record_ids** | **List[int]** | List of zone record ids to delete | + +## Example + +```python +from pfruck_contabo.models.bulk_delete_dns_zone_records_request import BulkDeleteDnsZoneRecordsRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of BulkDeleteDnsZoneRecordsRequest from a JSON string +bulk_delete_dns_zone_records_request_instance = BulkDeleteDnsZoneRecordsRequest.from_json(json) +# print the JSON string representation of the object +print(BulkDeleteDnsZoneRecordsRequest.to_json()) + +# convert the object into a dict +bulk_delete_dns_zone_records_request_dict = bulk_delete_dns_zone_records_request_instance.to_dict() +# create an instance of BulkDeleteDnsZoneRecordsRequest from a dict +bulk_delete_dns_zone_records_request_from_dict = BulkDeleteDnsZoneRecordsRequest.from_dict(bulk_delete_dns_zone_records_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateTicketResponseData.md b/docs/BulkDeleteResultResponse.md similarity index 50% rename from docs/CreateTicketResponseData.md rename to docs/BulkDeleteResultResponse.md index 780c6cd0..47611acc 100644 --- a/docs/CreateTicketResponseData.md +++ b/docs/BulkDeleteResultResponse.md @@ -1,4 +1,4 @@ -# CreateTicketResponseData +# BulkDeleteResultResponse ## Properties @@ -7,23 +7,24 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **tenant_id** | **str** | Your customer tenant id | **customer_id** | **str** | Your customer number | +**failed_ids** | **List[int]** | Failed zone record IDs | ## Example ```python -from pfruck_contabo.models.create_ticket_response_data import CreateTicketResponseData +from pfruck_contabo.models.bulk_delete_result_response import BulkDeleteResultResponse # TODO update the JSON string below json = "{}" -# create an instance of CreateTicketResponseData from a JSON string -create_ticket_response_data_instance = CreateTicketResponseData.from_json(json) +# create an instance of BulkDeleteResultResponse from a JSON string +bulk_delete_result_response_instance = BulkDeleteResultResponse.from_json(json) # print the JSON string representation of the object -print(CreateTicketResponseData.to_json()) +print(BulkDeleteResultResponse.to_json()) # convert the object into a dict -create_ticket_response_data_dict = create_ticket_response_data_instance.to_dict() -# create an instance of CreateTicketResponseData from a dict -create_ticket_response_data_from_dict = CreateTicketResponseData.from_dict(create_ticket_response_data_dict) +bulk_delete_result_response_dict = bulk_delete_result_response_instance.to_dict() +# create an instance of BulkDeleteResultResponse from a dict +bulk_delete_result_response_from_dict = BulkDeleteResultResponse.from_dict(bulk_delete_result_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CancelDomainRequest.md b/docs/CancelDomainRequest.md new file mode 100644 index 00000000..648df6e6 --- /dev/null +++ b/docs/CancelDomainRequest.md @@ -0,0 +1,31 @@ +# CancelDomainRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reason** | **str** | Reason for cancelling an domain | [optional] +**reason_text** | **str** | Reason Text when `Other` reason got selected while cancelling an domain | [optional] +**cancel_date** | **datetime** | Date of cancellation | [optional] + +## Example + +```python +from pfruck_contabo.models.cancel_domain_request import CancelDomainRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CancelDomainRequest from a JSON string +cancel_domain_request_instance = CancelDomainRequest.from_json(json) +# print the JSON string representation of the object +print(CancelDomainRequest.to_json()) + +# convert the object into a dict +cancel_domain_request_dict = cancel_domain_request_instance.to_dict() +# create an instance of CancelDomainRequest from a dict +cancel_domain_request_from_dict = CancelDomainRequest.from_dict(cancel_domain_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CancelInstanceRequest.md b/docs/CancelInstanceRequest.md new file mode 100644 index 00000000..e33bddc2 --- /dev/null +++ b/docs/CancelInstanceRequest.md @@ -0,0 +1,29 @@ +# CancelInstanceRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cancel_date** | **datetime** | Date of cancellation | [optional] + +## Example + +```python +from pfruck_contabo.models.cancel_instance_request import CancelInstanceRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CancelInstanceRequest from a JSON string +cancel_instance_request_instance = CancelInstanceRequest.from_json(json) +# print the JSON string representation of the object +print(CancelInstanceRequest.to_json()) + +# convert the object into a dict +cancel_instance_request_dict = cancel_instance_request_instance.to_dict() +# create an instance of CancelInstanceRequest from a dict +cancel_instance_request_from_dict = CancelInstanceRequest.from_dict(cancel_instance_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CancelObjectStorageRequest.md b/docs/CancelObjectStorageRequest.md new file mode 100644 index 00000000..35cf7a56 --- /dev/null +++ b/docs/CancelObjectStorageRequest.md @@ -0,0 +1,29 @@ +# CancelObjectStorageRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cancel_date** | **datetime** | Date of cancellation | [optional] + +## Example + +```python +from pfruck_contabo.models.cancel_object_storage_request import CancelObjectStorageRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CancelObjectStorageRequest from a JSON string +cancel_object_storage_request_instance = CancelObjectStorageRequest.from_json(json) +# print the JSON string representation of the object +print(CancelObjectStorageRequest.to_json()) + +# convert the object into a dict +cancel_object_storage_request_dict = cancel_object_storage_request_instance.to_dict() +# create an instance of CancelObjectStorageRequest from a dict +cancel_object_storage_request_from_dict = CancelObjectStorageRequest.from_dict(cancel_object_storage_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CancelRequest.md b/docs/CancelRequest.md new file mode 100644 index 00000000..3b9a841f --- /dev/null +++ b/docs/CancelRequest.md @@ -0,0 +1,29 @@ +# CancelRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **str** | Status can be only set to cancelled | [optional] + +## Example + +```python +from pfruck_contabo.models.cancel_request import CancelRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CancelRequest from a JSON string +cancel_request_instance = CancelRequest.from_json(json) +# print the JSON string representation of the object +print(CancelRequest.to_json()) + +# convert the object into a dict +cancel_request_dict = cancel_request_instance.to_dict() +# create an instance of CancelRequest from a dict +cancel_request_from_dict = CancelRequest.from_dict(cancel_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ChangedAuthCode.md b/docs/ChangedAuthCode.md new file mode 100644 index 00000000..ee103717 --- /dev/null +++ b/docs/ChangedAuthCode.md @@ -0,0 +1,30 @@ +# ChangedAuthCode + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**changed** | **bool** | Flag that indicates if the auth code got changed | [optional] +**var_date** | **datetime** | The date when auth code got changed | [optional] + +## Example + +```python +from pfruck_contabo.models.changed_auth_code import ChangedAuthCode + +# TODO update the JSON string below +json = "{}" +# create an instance of ChangedAuthCode from a JSON string +changed_auth_code_instance = ChangedAuthCode.from_json(json) +# print the JSON string representation of the object +print(ChangedAuthCode.to_json()) + +# convert the object into a dict +changed_auth_code_dict = changed_auth_code_instance.to_dict() +# create an instance of ChangedAuthCode from a dict +changed_auth_code_from_dict = ChangedAuthCode.from_dict(changed_auth_code_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Changes.md b/docs/Changes.md new file mode 100644 index 00000000..89c67a7e --- /dev/null +++ b/docs/Changes.md @@ -0,0 +1,30 @@ +# Changes + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**prev** | **object** | Previous values of changed properties | +**new** | **object** | New values of changed properties | + +## Example + +```python +from pfruck_contabo.models.changes import Changes + +# TODO update the JSON string below +json = "{}" +# create an instance of Changes from a JSON string +changes_instance = Changes.from_json(json) +# print the JSON string representation of the object +print(Changes.to_json()) + +# convert the object into a dict +changes_dict = changes_instance.to_dict() +# create an instance of Changes from a dict +changes_from_dict = Changes.from_dict(changes_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CheckCollectionCheckTemplates.md b/docs/CheckCollectionCheckTemplates.md new file mode 100644 index 00000000..c839ca54 --- /dev/null +++ b/docs/CheckCollectionCheckTemplates.md @@ -0,0 +1,33 @@ +# CheckCollectionCheckTemplates + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**check_id** | **float** | Id of the check | +**check_template_id** | **float** | Id of the check template | +**run_concurrent** | **bool** | Can this check template be run in parallel with other checks | +**ignore_errors** | **bool** | Will errors be ignored when running this check template | +**check_templates** | [**List[CheckCollectionCheckTemplates]**](CheckCollectionCheckTemplates.md) | Nested check templates | [optional] + +## Example + +```python +from pfruck_contabo.models.check_collection_check_templates import CheckCollectionCheckTemplates + +# TODO update the JSON string below +json = "{}" +# create an instance of CheckCollectionCheckTemplates from a JSON string +check_collection_check_templates_instance = CheckCollectionCheckTemplates.from_json(json) +# print the JSON string representation of the object +print(CheckCollectionCheckTemplates.to_json()) + +# convert the object into a dict +check_collection_check_templates_dict = check_collection_check_templates_instance.to_dict() +# create an instance of CheckCollectionCheckTemplates from a dict +check_collection_check_templates_from_dict = CheckCollectionCheckTemplates.from_dict(check_collection_check_templates_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CheckCollectionCreateRequest.md b/docs/CheckCollectionCreateRequest.md new file mode 100644 index 00000000..e89f0a33 --- /dev/null +++ b/docs/CheckCollectionCreateRequest.md @@ -0,0 +1,33 @@ +# CheckCollectionCreateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**object_type** | **str** | Object type to be handled | +**object_id** | **str** | ID of the object, to be handled | +**check_collection_template_id** | **float** | Check Template for this check collection | +**org_id** | **str** | Id of your organization, if unknown please contact us | +**account_id** | **str** | Account Id | + +## Example + +```python +from pfruck_contabo.models.check_collection_create_request import CheckCollectionCreateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CheckCollectionCreateRequest from a JSON string +check_collection_create_request_instance = CheckCollectionCreateRequest.from_json(json) +# print the JSON string representation of the object +print(CheckCollectionCreateRequest.to_json()) + +# convert the object into a dict +check_collection_create_request_dict = check_collection_create_request_instance.to_dict() +# create an instance of CheckCollectionCreateRequest from a dict +check_collection_create_request_from_dict = CheckCollectionCreateRequest.from_dict(check_collection_create_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CheckCollectionResponse.md b/docs/CheckCollectionResponse.md new file mode 100644 index 00000000..fdb1e251 --- /dev/null +++ b/docs/CheckCollectionResponse.md @@ -0,0 +1,40 @@ +# CheckCollectionResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**internal** | **bool** | Is internal (not shown to the customer) | +**status** | **str** | Status of the handle | +**object_type** | **str** | Object type to be handled | +**object_id** | **str** | ID of the object, to be handled | +**check_collection_id** | **float** | Check collection's id | +**check_collection_template_id** | **float** | Check Collection Template for this check collection | +**check_templates** | [**List[CheckCollectionCheckTemplates]**](CheckCollectionCheckTemplates.md) | Check templates which are part of this collection template | +**created_date** | **datetime** | Creation date | +**modified_date** | **datetime** | Modify date | +**org_id** | **str** | Org id | +**account_id** | **str** | Account id | +**checks** | [**List[CheckResponse]**](CheckResponse.md) | Checks performed in this check collection | + +## Example + +```python +from pfruck_contabo.models.check_collection_response import CheckCollectionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CheckCollectionResponse from a JSON string +check_collection_response_instance = CheckCollectionResponse.from_json(json) +# print the JSON string representation of the object +print(CheckCollectionResponse.to_json()) + +# convert the object into a dict +check_collection_response_dict = check_collection_response_instance.to_dict() +# create an instance of CheckCollectionResponse from a dict +check_collection_response_from_dict = CheckCollectionResponse.from_dict(check_collection_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CheckCollectionTemplateResponse.md b/docs/CheckCollectionTemplateResponse.md new file mode 100644 index 00000000..f37d63d0 --- /dev/null +++ b/docs/CheckCollectionTemplateResponse.md @@ -0,0 +1,38 @@ +# CheckCollectionTemplateResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**check_collection_template_id** | **float** | Check collection template's id | +**name** | **str** | Name of the check collection template | +**description** | **str** | Description for the check collection template | +**internal** | **bool** | Is check collection only internal (not shown to the customer) | +**object_type** | **str** | Object type for which the check collection template can be used | +**check_templates** | [**List[CheckCollectionTemplatesCheckTemplates]**](CheckCollectionTemplatesCheckTemplates.md) | Check templates which are part of this collection template | +**created_date** | **datetime** | Creation date | +**modified_date** | **datetime** | Modify date | +**org_id** | **str** | Org id | +**account_id** | **str** | Account id | + +## Example + +```python +from pfruck_contabo.models.check_collection_template_response import CheckCollectionTemplateResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CheckCollectionTemplateResponse from a JSON string +check_collection_template_response_instance = CheckCollectionTemplateResponse.from_json(json) +# print the JSON string representation of the object +print(CheckCollectionTemplateResponse.to_json()) + +# convert the object into a dict +check_collection_template_response_dict = check_collection_template_response_instance.to_dict() +# create an instance of CheckCollectionTemplateResponse from a dict +check_collection_template_response_from_dict = CheckCollectionTemplateResponse.from_dict(check_collection_template_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CheckCollectionTemplatesApi.md b/docs/CheckCollectionTemplatesApi.md new file mode 100644 index 00000000..a399ba47 --- /dev/null +++ b/docs/CheckCollectionTemplatesApi.md @@ -0,0 +1,190 @@ +# pfruck_contabo.CheckCollectionTemplatesApi + +All URIs are relative to *https://api.contabo.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_ext_check_collection_template**](CheckCollectionTemplatesApi.md#get_ext_check_collection_template) | **GET** /v1/troubleshooting/check-collection-templates/{checkCollectionTemplateId} | Get check +[**list_ext_check_collection_templates**](CheckCollectionTemplatesApi.md#list_ext_check_collection_templates) | **GET** /v1/troubleshooting/check-collection-templates | List check collection templates + + +# **get_ext_check_collection_template** +> ExtCheckCollectionTemplatesGetResponse get_ext_check_collection_template(x_request_id, check_collection_template_id, x_trace_id=x_trace_id) + +Get check + +Get a single check collection template by id + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.ext_check_collection_templates_get_response import ExtCheckCollectionTemplatesGetResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.CheckCollectionTemplatesApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + check_collection_template_id = 12345 # float | Check collection template's id + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Get check + api_response = api_instance.get_ext_check_collection_template(x_request_id, check_collection_template_id, x_trace_id=x_trace_id) + print("The response of CheckCollectionTemplatesApi->get_ext_check_collection_template:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CheckCollectionTemplatesApi->get_ext_check_collection_template: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **check_collection_template_id** | **float**| Check collection template's id | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**ExtCheckCollectionTemplatesGetResponse**](ExtCheckCollectionTemplatesGetResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Single check collection template | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_ext_check_collection_templates** +> ExtCheckCollectionTemplatesListResponse list_ext_check_collection_templates(x_request_id, x_trace_id=x_trace_id, internal=internal, object_type=object_type, page=page, size=size, order_by=order_by, creation_start_time=creation_start_time, creation_end_time=creation_end_time, modification_start_time=modification_start_time, modification_end_time=modification_end_time) + +List check collection templates + +List and filter all check collection templates + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.ext_check_collection_templates_list_response import ExtCheckCollectionTemplatesListResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.CheckCollectionTemplatesApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + internal = false # bool | Is check only internal (not shown to the customer) (optional) + object_type = 'vserver' # str | Object type for which the check template can be used (optional) + page = 1 # int | Number of page to be fetched. (optional) + size = 10 # int | Number of elements per page. (optional) + order_by = ['name:asc'] # List[str] | Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. (optional) + creation_start_time = '2021-06-03T06:27:12Z' # datetime | Start of search time range for created date (optional) + creation_end_time = '2021-06-03T10:27:12Z' # datetime | End of search time range for created date (optional) + modification_start_time = '2021-06-03T06:27:12Z' # datetime | Start of search time range for modified date (optional) + modification_end_time = '2021-06-03T10:27:12Z' # datetime | End of search time range for modified date (optional) + + try: + # List check collection templates + api_response = api_instance.list_ext_check_collection_templates(x_request_id, x_trace_id=x_trace_id, internal=internal, object_type=object_type, page=page, size=size, order_by=order_by, creation_start_time=creation_start_time, creation_end_time=creation_end_time, modification_start_time=modification_start_time, modification_end_time=modification_end_time) + print("The response of CheckCollectionTemplatesApi->list_ext_check_collection_templates:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CheckCollectionTemplatesApi->list_ext_check_collection_templates: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + **internal** | **bool**| Is check only internal (not shown to the customer) | [optional] + **object_type** | **str**| Object type for which the check template can be used | [optional] + **page** | **int**| Number of page to be fetched. | [optional] + **size** | **int**| Number of elements per page. | [optional] + **order_by** | [**List[str]**](str.md)| Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. | [optional] + **creation_start_time** | **datetime**| Start of search time range for created date | [optional] + **creation_end_time** | **datetime**| End of search time range for created date | [optional] + **modification_start_time** | **datetime**| Start of search time range for modified date | [optional] + **modification_end_time** | **datetime**| End of search time range for modified date | [optional] + +### Return type + +[**ExtCheckCollectionTemplatesListResponse**](ExtCheckCollectionTemplatesListResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Paginated list of check collection templates | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/CheckCollectionTemplatesCheckTemplates.md b/docs/CheckCollectionTemplatesCheckTemplates.md new file mode 100644 index 00000000..7748c0e5 --- /dev/null +++ b/docs/CheckCollectionTemplatesCheckTemplates.md @@ -0,0 +1,32 @@ +# CheckCollectionTemplatesCheckTemplates + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**check_template_id** | **float** | Id of the check template | +**run_concurrent** | **bool** | Can this check template be run in parallel with other checks | +**ignore_errors** | **bool** | Will errors be ignored when running this check template | +**check_templates** | [**List[CheckCollectionTemplatesCheckTemplates]**](CheckCollectionTemplatesCheckTemplates.md) | Nested check templates | [optional] + +## Example + +```python +from pfruck_contabo.models.check_collection_templates_check_templates import CheckCollectionTemplatesCheckTemplates + +# TODO update the JSON string below +json = "{}" +# create an instance of CheckCollectionTemplatesCheckTemplates from a JSON string +check_collection_templates_check_templates_instance = CheckCollectionTemplatesCheckTemplates.from_json(json) +# print the JSON string representation of the object +print(CheckCollectionTemplatesCheckTemplates.to_json()) + +# convert the object into a dict +check_collection_templates_check_templates_dict = check_collection_templates_check_templates_instance.to_dict() +# create an instance of CheckCollectionTemplatesCheckTemplates from a dict +check_collection_templates_check_templates_from_dict = CheckCollectionTemplatesCheckTemplates.from_dict(check_collection_templates_check_templates_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CheckCollectionTemplatesGetResponse.md b/docs/CheckCollectionTemplatesGetResponse.md new file mode 100644 index 00000000..4d5640cd --- /dev/null +++ b/docs/CheckCollectionTemplatesGetResponse.md @@ -0,0 +1,30 @@ +# CheckCollectionTemplatesGetResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[CheckCollectionTemplateResponse]**](CheckCollectionTemplateResponse.md) | | +**links** | [**SelfLinks**](SelfLinks.md) | | + +## Example + +```python +from pfruck_contabo.models.check_collection_templates_get_response import CheckCollectionTemplatesGetResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CheckCollectionTemplatesGetResponse from a JSON string +check_collection_templates_get_response_instance = CheckCollectionTemplatesGetResponse.from_json(json) +# print the JSON string representation of the object +print(CheckCollectionTemplatesGetResponse.to_json()) + +# convert the object into a dict +check_collection_templates_get_response_dict = check_collection_templates_get_response_instance.to_dict() +# create an instance of CheckCollectionTemplatesGetResponse from a dict +check_collection_templates_get_response_from_dict = CheckCollectionTemplatesGetResponse.from_dict(check_collection_templates_get_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CheckCollectionTemplatesListResponse.md b/docs/CheckCollectionTemplatesListResponse.md new file mode 100644 index 00000000..38ece20a --- /dev/null +++ b/docs/CheckCollectionTemplatesListResponse.md @@ -0,0 +1,31 @@ +# CheckCollectionTemplatesListResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**PaginationMeta**](PaginationMeta.md) | Data about pagination like how many results, pages, page size. | +**data** | [**List[CheckCollectionTemplateResponse]**](CheckCollectionTemplateResponse.md) | | +**links** | [**Links**](Links.md) | | + +## Example + +```python +from pfruck_contabo.models.check_collection_templates_list_response import CheckCollectionTemplatesListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CheckCollectionTemplatesListResponse from a JSON string +check_collection_templates_list_response_instance = CheckCollectionTemplatesListResponse.from_json(json) +# print the JSON string representation of the object +print(CheckCollectionTemplatesListResponse.to_json()) + +# convert the object into a dict +check_collection_templates_list_response_dict = check_collection_templates_list_response_instance.to_dict() +# create an instance of CheckCollectionTemplatesListResponse from a dict +check_collection_templates_list_response_from_dict = CheckCollectionTemplatesListResponse.from_dict(check_collection_templates_list_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CheckCollectionsApi.md b/docs/CheckCollectionsApi.md new file mode 100644 index 00000000..368c67a8 --- /dev/null +++ b/docs/CheckCollectionsApi.md @@ -0,0 +1,366 @@ +# pfruck_contabo.CheckCollectionsApi + +All URIs are relative to *https://api.contabo.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**cancel_ext_check_collection**](CheckCollectionsApi.md#cancel_ext_check_collection) | **PATCH** /v1/troubleshooting/check-collections/{checkCollectionId} | Cancel check collection +[**get_ext_check_collection**](CheckCollectionsApi.md#get_ext_check_collection) | **GET** /v1/troubleshooting/check-collections/{checkCollectionId} | Get check collection +[**list_ext_check_collections**](CheckCollectionsApi.md#list_ext_check_collections) | **GET** /v1/troubleshooting/check-collections | List check collections +[**start_ext_check_collection**](CheckCollectionsApi.md#start_ext_check_collection) | **POST** /v1/troubleshooting/check-collections | Start check collection + + +# **cancel_ext_check_collection** +> ExtCheckCollectionsGetResponse cancel_ext_check_collection(x_request_id, check_collection_id, cancel_request, x_trace_id=x_trace_id) + +Cancel check collection + +Cancel check collection + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.cancel_request import CancelRequest +from pfruck_contabo.models.ext_check_collections_get_response import ExtCheckCollectionsGetResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.CheckCollectionsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + check_collection_id = 12345 # float | Check collection's id + cancel_request = pfruck_contabo.CancelRequest() # CancelRequest | + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Cancel check collection + api_response = api_instance.cancel_ext_check_collection(x_request_id, check_collection_id, cancel_request, x_trace_id=x_trace_id) + print("The response of CheckCollectionsApi->cancel_ext_check_collection:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CheckCollectionsApi->cancel_ext_check_collection: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **check_collection_id** | **float**| Check collection's id | + **cancel_request** | [**CancelRequest**](CancelRequest.md)| | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**ExtCheckCollectionsGetResponse**](ExtCheckCollectionsGetResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Cancelled check collection | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_ext_check_collection** +> ExtCheckCollectionsGetResponse get_ext_check_collection(x_request_id, check_collection_id, x_trace_id=x_trace_id, exclude_check_statuses=exclude_check_statuses) + +Get check collection + +Get a single check collection by id + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.ext_check_collections_get_response import ExtCheckCollectionsGetResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.CheckCollectionsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + check_collection_id = 12345 # float | Check collection's id + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + exclude_check_statuses = ['[\"skipped\",\"cancelled\"]'] # List[str] | Check statuses to exclude (optional) + + try: + # Get check collection + api_response = api_instance.get_ext_check_collection(x_request_id, check_collection_id, x_trace_id=x_trace_id, exclude_check_statuses=exclude_check_statuses) + print("The response of CheckCollectionsApi->get_ext_check_collection:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CheckCollectionsApi->get_ext_check_collection: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **check_collection_id** | **float**| Check collection's id | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + **exclude_check_statuses** | [**List[str]**](str.md)| Check statuses to exclude | [optional] + +### Return type + +[**ExtCheckCollectionsGetResponse**](ExtCheckCollectionsGetResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Single check collection | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_ext_check_collections** +> ExtCheckCollectionsListResponse list_ext_check_collections(x_request_id, x_trace_id=x_trace_id, object_type=object_type, object_id=object_id, check_collection_template_id=check_collection_template_id, exclude_check_statuses=exclude_check_statuses, page=page, size=size, order_by=order_by, creation_start_time=creation_start_time, creation_end_time=creation_end_time, modification_start_time=modification_start_time, modification_end_time=modification_end_time) + +List check collections + +List and filter all check collections + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.ext_check_collections_list_response import ExtCheckCollectionsListResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.CheckCollectionsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + object_type = 'vserver' # str | Object type to be handled (optional) + object_id = '4711' # str | ID of the object, to be handled (optional) + check_collection_template_id = 12345 # float | Check Collection Template for this check collection (optional) + exclude_check_statuses = ['[\"skipped\",\"cancelled\"]'] # List[str] | Check statuses to exclude (optional) + page = 1 # int | Number of page to be fetched. (optional) + size = 10 # int | Number of elements per page. (optional) + order_by = ['name:asc'] # List[str] | Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. (optional) + creation_start_time = '2021-06-03T06:27:12Z' # datetime | Start of search time range for created date (optional) + creation_end_time = '2021-06-03T10:27:12Z' # datetime | End of search time range for created date (optional) + modification_start_time = '2021-06-03T06:27:12Z' # datetime | Start of search time range for modified date (optional) + modification_end_time = '2021-06-03T10:27:12Z' # datetime | End of search time range for modified date (optional) + + try: + # List check collections + api_response = api_instance.list_ext_check_collections(x_request_id, x_trace_id=x_trace_id, object_type=object_type, object_id=object_id, check_collection_template_id=check_collection_template_id, exclude_check_statuses=exclude_check_statuses, page=page, size=size, order_by=order_by, creation_start_time=creation_start_time, creation_end_time=creation_end_time, modification_start_time=modification_start_time, modification_end_time=modification_end_time) + print("The response of CheckCollectionsApi->list_ext_check_collections:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CheckCollectionsApi->list_ext_check_collections: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + **object_type** | **str**| Object type to be handled | [optional] + **object_id** | **str**| ID of the object, to be handled | [optional] + **check_collection_template_id** | **float**| Check Collection Template for this check collection | [optional] + **exclude_check_statuses** | [**List[str]**](str.md)| Check statuses to exclude | [optional] + **page** | **int**| Number of page to be fetched. | [optional] + **size** | **int**| Number of elements per page. | [optional] + **order_by** | [**List[str]**](str.md)| Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. | [optional] + **creation_start_time** | **datetime**| Start of search time range for created date | [optional] + **creation_end_time** | **datetime**| End of search time range for created date | [optional] + **modification_start_time** | **datetime**| Start of search time range for modified date | [optional] + **modification_end_time** | **datetime**| End of search time range for modified date | [optional] + +### Return type + +[**ExtCheckCollectionsListResponse**](ExtCheckCollectionsListResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Paginated list of check collections | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **start_ext_check_collection** +> ExtCheckCollectionsGetResponse start_ext_check_collection(x_request_id, base_check_collection_create_request, x_trace_id=x_trace_id) + +Start check collection + +Start a new check collection + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.base_check_collection_create_request import BaseCheckCollectionCreateRequest +from pfruck_contabo.models.ext_check_collections_get_response import ExtCheckCollectionsGetResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.CheckCollectionsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + base_check_collection_create_request = pfruck_contabo.BaseCheckCollectionCreateRequest() # BaseCheckCollectionCreateRequest | + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Start check collection + api_response = api_instance.start_ext_check_collection(x_request_id, base_check_collection_create_request, x_trace_id=x_trace_id) + print("The response of CheckCollectionsApi->start_ext_check_collection:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CheckCollectionsApi->start_ext_check_collection: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **base_check_collection_create_request** | [**BaseCheckCollectionCreateRequest**](BaseCheckCollectionCreateRequest.md)| | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**ExtCheckCollectionsGetResponse**](ExtCheckCollectionsGetResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Started check collection | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/CheckCollectionsAuditListResponse.md b/docs/CheckCollectionsAuditListResponse.md new file mode 100644 index 00000000..925b8d49 --- /dev/null +++ b/docs/CheckCollectionsAuditListResponse.md @@ -0,0 +1,31 @@ +# CheckCollectionsAuditListResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**PaginationMeta**](PaginationMeta.md) | Data about pagination like how many results, pages, page size. | +**data** | [**List[CheckCollectionsAuditResponse]**](CheckCollectionsAuditResponse.md) | | +**links** | [**Links**](Links.md) | | + +## Example + +```python +from pfruck_contabo.models.check_collections_audit_list_response import CheckCollectionsAuditListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CheckCollectionsAuditListResponse from a JSON string +check_collections_audit_list_response_instance = CheckCollectionsAuditListResponse.from_json(json) +# print the JSON string representation of the object +print(CheckCollectionsAuditListResponse.to_json()) + +# convert the object into a dict +check_collections_audit_list_response_dict = check_collections_audit_list_response_instance.to_dict() +# create an instance of CheckCollectionsAuditListResponse from a dict +check_collections_audit_list_response_from_dict = CheckCollectionsAuditListResponse.from_dict(check_collections_audit_list_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CheckCollectionsAuditResponse.md b/docs/CheckCollectionsAuditResponse.md new file mode 100644 index 00000000..4a5066ff --- /dev/null +++ b/docs/CheckCollectionsAuditResponse.md @@ -0,0 +1,42 @@ +# CheckCollectionsAuditResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_date** | **datetime** | Creation date | +**modified_date** | **datetime** | Modify date | +**org_id** | **str** | Org id | +**account_id** | **str** | Account id | +**audit_id** | **int** | The ID of the audit entry. | +**action** | **str** | Type of the action. | +**foreign_changed_by** | **str** | Id of a foreign user (given on the api request via header) who performed the change | +**foreign_username** | **str** | Name of the foreign user (given on the api request via header) which led to the change. | +**changed_by** | **str** | Id of user who performed the change | +**username** | **str** | Name of the user which led to the change. | +**request_id** | **str** | The requestId of the API call which led to the change. | +**trace_id** | **str** | The traceId of the API call which led to the change. | +**changes** | [**Changes**](Changes.md) | List of changed properties | +**check_collection_id** | **float** | Check collection's id | + +## Example + +```python +from pfruck_contabo.models.check_collections_audit_response import CheckCollectionsAuditResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CheckCollectionsAuditResponse from a JSON string +check_collections_audit_response_instance = CheckCollectionsAuditResponse.from_json(json) +# print the JSON string representation of the object +print(CheckCollectionsAuditResponse.to_json()) + +# convert the object into a dict +check_collections_audit_response_dict = check_collections_audit_response_instance.to_dict() +# create an instance of CheckCollectionsAuditResponse from a dict +check_collections_audit_response_from_dict = CheckCollectionsAuditResponse.from_dict(check_collections_audit_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CheckCollectionsGetResponse.md b/docs/CheckCollectionsGetResponse.md new file mode 100644 index 00000000..6807520a --- /dev/null +++ b/docs/CheckCollectionsGetResponse.md @@ -0,0 +1,30 @@ +# CheckCollectionsGetResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[CheckCollectionResponse]**](CheckCollectionResponse.md) | | +**links** | [**SelfLinks**](SelfLinks.md) | | + +## Example + +```python +from pfruck_contabo.models.check_collections_get_response import CheckCollectionsGetResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CheckCollectionsGetResponse from a JSON string +check_collections_get_response_instance = CheckCollectionsGetResponse.from_json(json) +# print the JSON string representation of the object +print(CheckCollectionsGetResponse.to_json()) + +# convert the object into a dict +check_collections_get_response_dict = check_collections_get_response_instance.to_dict() +# create an instance of CheckCollectionsGetResponse from a dict +check_collections_get_response_from_dict = CheckCollectionsGetResponse.from_dict(check_collections_get_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CheckCollectionsListResponse.md b/docs/CheckCollectionsListResponse.md new file mode 100644 index 00000000..d591ff3c --- /dev/null +++ b/docs/CheckCollectionsListResponse.md @@ -0,0 +1,31 @@ +# CheckCollectionsListResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**PaginationMeta**](PaginationMeta.md) | Data about pagination like how many results, pages, page size. | +**data** | [**List[CheckCollectionResponse]**](CheckCollectionResponse.md) | | +**links** | [**Links**](Links.md) | | + +## Example + +```python +from pfruck_contabo.models.check_collections_list_response import CheckCollectionsListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CheckCollectionsListResponse from a JSON string +check_collections_list_response_instance = CheckCollectionsListResponse.from_json(json) +# print the JSON string representation of the object +print(CheckCollectionsListResponse.to_json()) + +# convert the object into a dict +check_collections_list_response_dict = check_collections_list_response_instance.to_dict() +# create an instance of CheckCollectionsListResponse from a dict +check_collections_list_response_from_dict = CheckCollectionsListResponse.from_dict(check_collections_list_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CheckCollectionsReplayRequest.md b/docs/CheckCollectionsReplayRequest.md new file mode 100644 index 00000000..ea6fc0f1 --- /dev/null +++ b/docs/CheckCollectionsReplayRequest.md @@ -0,0 +1,34 @@ +# CheckCollectionsReplayRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**org_id** | **str** | Id of your organization, if unknown please contact us | +**account_id** | **str** | Account Id | +**creation_start_time** | **datetime** | Earliest creation date of changes to replay | [optional] +**creation_end_time** | **datetime** | Latest creation date of changes to replay | [optional] +**rate** | **float** | Message publishing frequency. How many messages per second get published. Default: 20 | [optional] +**check_collection_ids** | **List[float]** | Check collection's id | [optional] + +## Example + +```python +from pfruck_contabo.models.check_collections_replay_request import CheckCollectionsReplayRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CheckCollectionsReplayRequest from a JSON string +check_collections_replay_request_instance = CheckCollectionsReplayRequest.from_json(json) +# print the JSON string representation of the object +print(CheckCollectionsReplayRequest.to_json()) + +# convert the object into a dict +check_collections_replay_request_dict = check_collections_replay_request_instance.to_dict() +# create an instance of CheckCollectionsReplayRequest from a dict +check_collections_replay_request_from_dict = CheckCollectionsReplayRequest.from_dict(check_collections_replay_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CheckCreateRequest.md b/docs/CheckCreateRequest.md new file mode 100644 index 00000000..b77b4281 --- /dev/null +++ b/docs/CheckCreateRequest.md @@ -0,0 +1,34 @@ +# CheckCreateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**object_type** | **str** | Object type to be handled | +**object_id** | **str** | ID of the object, to be handled | +**check_template_id** | **float** | Check Template for this check | +**check_collection_id** | **float** | Check Collection for this check | [optional] +**org_id** | **str** | Id of your organization, if unknown please contact us | +**account_id** | **str** | Account Id | + +## Example + +```python +from pfruck_contabo.models.check_create_request import CheckCreateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CheckCreateRequest from a JSON string +check_create_request_instance = CheckCreateRequest.from_json(json) +# print the JSON string representation of the object +print(CheckCreateRequest.to_json()) + +# convert the object into a dict +check_create_request_dict = check_create_request_instance.to_dict() +# create an instance of CheckCreateRequest from a dict +check_create_request_from_dict = CheckCreateRequest.from_dict(check_create_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CheckResponse.md b/docs/CheckResponse.md new file mode 100644 index 00000000..6593e162 --- /dev/null +++ b/docs/CheckResponse.md @@ -0,0 +1,44 @@ +# CheckResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**internal** | **bool** | Is internal (not shown to the customer) | +**status** | **str** | Status of the handle | +**object_type** | **str** | Object type to be handled | +**object_id** | **str** | ID of the object, to be handled | +**check_id** | **float** | Check's id | +**check_collection_id** | **float** | ID of check collection if started in scope of a collection | +**check_template_id** | **float** | Check Template for this check | +**name** | **str** | Name of this check template | +**note** | **str** | Note to be shown to the customer | +**internal_note** | **str** | Note which is shown only internally to the agent | +**duration_ms** | **float** | Duration of the check in milliseconds | +**created_date** | **datetime** | Creation date | +**modified_date** | **datetime** | Modify date | +**org_id** | **str** | Org id | +**account_id** | **str** | Account id | +**log** | **str** | Detailed log of the check execution | + +## Example + +```python +from pfruck_contabo.models.check_response import CheckResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CheckResponse from a JSON string +check_response_instance = CheckResponse.from_json(json) +# print the JSON string representation of the object +print(CheckResponse.to_json()) + +# convert the object into a dict +check_response_dict = check_response_instance.to_dict() +# create an instance of CheckResponse from a dict +check_response_from_dict = CheckResponse.from_dict(check_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CheckTemplateResponse.md b/docs/CheckTemplateResponse.md new file mode 100644 index 00000000..2255c012 --- /dev/null +++ b/docs/CheckTemplateResponse.md @@ -0,0 +1,40 @@ +# CheckTemplateResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_date** | **datetime** | Creation date | +**modified_date** | **datetime** | Modify date | +**org_id** | **str** | Org id | +**account_id** | **str** | Account id | +**check_template_id** | **float** | Check template's id | +**name** | **str** | Name of the check template | +**description** | **str** | Description for the check template | +**internal** | **bool** | Is check only internal (not shown to the customer) | +**object_type** | **str** | Object type for which the check template can be used | +**collector_class** | **str** | Class used to collect the required information for the check | +**check_class** | **str** | Class used to perform the check | +**remedy_template_ids** | **List[str]** | Remedy Template IDs that are related to this remedy | + +## Example + +```python +from pfruck_contabo.models.check_template_response import CheckTemplateResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CheckTemplateResponse from a JSON string +check_template_response_instance = CheckTemplateResponse.from_json(json) +# print the JSON string representation of the object +print(CheckTemplateResponse.to_json()) + +# convert the object into a dict +check_template_response_dict = check_template_response_instance.to_dict() +# create an instance of CheckTemplateResponse from a dict +check_template_response_from_dict = CheckTemplateResponse.from_dict(check_template_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CheckTemplatesGetResponse.md b/docs/CheckTemplatesGetResponse.md new file mode 100644 index 00000000..aeef3730 --- /dev/null +++ b/docs/CheckTemplatesGetResponse.md @@ -0,0 +1,30 @@ +# CheckTemplatesGetResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[CheckTemplateResponse]**](CheckTemplateResponse.md) | | +**links** | [**SelfLinks**](SelfLinks.md) | | + +## Example + +```python +from pfruck_contabo.models.check_templates_get_response import CheckTemplatesGetResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CheckTemplatesGetResponse from a JSON string +check_templates_get_response_instance = CheckTemplatesGetResponse.from_json(json) +# print the JSON string representation of the object +print(CheckTemplatesGetResponse.to_json()) + +# convert the object into a dict +check_templates_get_response_dict = check_templates_get_response_instance.to_dict() +# create an instance of CheckTemplatesGetResponse from a dict +check_templates_get_response_from_dict = CheckTemplatesGetResponse.from_dict(check_templates_get_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CheckTemplatesListResponse.md b/docs/CheckTemplatesListResponse.md new file mode 100644 index 00000000..c31224a5 --- /dev/null +++ b/docs/CheckTemplatesListResponse.md @@ -0,0 +1,31 @@ +# CheckTemplatesListResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**PaginationMeta**](PaginationMeta.md) | Data about pagination like how many results, pages, page size. | +**data** | [**List[CheckTemplateResponse]**](CheckTemplateResponse.md) | | +**links** | [**Links**](Links.md) | | + +## Example + +```python +from pfruck_contabo.models.check_templates_list_response import CheckTemplatesListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CheckTemplatesListResponse from a JSON string +check_templates_list_response_instance = CheckTemplatesListResponse.from_json(json) +# print the JSON string representation of the object +print(CheckTemplatesListResponse.to_json()) + +# convert the object into a dict +check_templates_list_response_dict = check_templates_list_response_instance.to_dict() +# create an instance of CheckTemplatesListResponse from a dict +check_templates_list_response_from_dict = CheckTemplatesListResponse.from_dict(check_templates_list_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ChecksApi.md b/docs/ChecksApi.md new file mode 100644 index 00000000..9abc60e7 --- /dev/null +++ b/docs/ChecksApi.md @@ -0,0 +1,352 @@ +# pfruck_contabo.ChecksApi + +All URIs are relative to *https://api.contabo.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**cancel_ext_check**](ChecksApi.md#cancel_ext_check) | **PATCH** /v1/troubleshooting/checks/{checkId} | Cancel check +[**get_ext_check**](ChecksApi.md#get_ext_check) | **GET** /v1/troubleshooting/checks/{checkId} | Get check +[**list_ext_checks**](ChecksApi.md#list_ext_checks) | **GET** /v1/troubleshooting/checks | List check +[**start_ext_check**](ChecksApi.md#start_ext_check) | **POST** /v1/troubleshooting/checks | Start check + + +# **cancel_ext_check** +> ExtChecksGetResponse cancel_ext_check(x_request_id, check_id, cancel_request, x_trace_id=x_trace_id) + +Cancel check + +Cancel check + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.cancel_request import CancelRequest +from pfruck_contabo.models.ext_checks_get_response import ExtChecksGetResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.ChecksApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + check_id = 12345 # float | Check's id + cancel_request = pfruck_contabo.CancelRequest() # CancelRequest | + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Cancel check + api_response = api_instance.cancel_ext_check(x_request_id, check_id, cancel_request, x_trace_id=x_trace_id) + print("The response of ChecksApi->cancel_ext_check:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ChecksApi->cancel_ext_check: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **check_id** | **float**| Check's id | + **cancel_request** | [**CancelRequest**](CancelRequest.md)| | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**ExtChecksGetResponse**](ExtChecksGetResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Cancelled object | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_ext_check** +> ExtChecksGetResponse get_ext_check(x_request_id, check_id, x_trace_id=x_trace_id) + +Get check + +Get a single check by id + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.ext_checks_get_response import ExtChecksGetResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.ChecksApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + check_id = 12345 # float | Check's id + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Get check + api_response = api_instance.get_ext_check(x_request_id, check_id, x_trace_id=x_trace_id) + print("The response of ChecksApi->get_ext_check:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ChecksApi->get_ext_check: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **check_id** | **float**| Check's id | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**ExtChecksGetResponse**](ExtChecksGetResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Single check | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_ext_checks** +> ExtChecksListResponse list_ext_checks(x_request_id, x_trace_id=x_trace_id, object_type=object_type, object_id=object_id, status=status, check_collection_id=check_collection_id, check_template_id=check_template_id) + +List check + +List and filter all check + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.ext_checks_list_response import ExtChecksListResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.ChecksApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + object_type = 'vserver' # str | Object type to be handled (optional) + object_id = '4711' # str | ID of the object, to be handled (optional) + status = 'failed' # str | Status of the handle (optional) + check_collection_id = 12345 # float | ID of check collection if started in scope of a collection (optional) + check_template_id = 12345 # float | Check Template for this check (optional) + + try: + # List check + api_response = api_instance.list_ext_checks(x_request_id, x_trace_id=x_trace_id, object_type=object_type, object_id=object_id, status=status, check_collection_id=check_collection_id, check_template_id=check_template_id) + print("The response of ChecksApi->list_ext_checks:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ChecksApi->list_ext_checks: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + **object_type** | **str**| Object type to be handled | [optional] + **object_id** | **str**| ID of the object, to be handled | [optional] + **status** | **str**| Status of the handle | [optional] + **check_collection_id** | **float**| ID of check collection if started in scope of a collection | [optional] + **check_template_id** | **float**| Check Template for this check | [optional] + +### Return type + +[**ExtChecksListResponse**](ExtChecksListResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Paginated list of check | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **start_ext_check** +> ExtChecksGetResponse start_ext_check(x_request_id, base_check_create_request, x_trace_id=x_trace_id) + +Start check + +Start a new check + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.base_check_create_request import BaseCheckCreateRequest +from pfruck_contabo.models.ext_checks_get_response import ExtChecksGetResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.ChecksApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + base_check_create_request = pfruck_contabo.BaseCheckCreateRequest() # BaseCheckCreateRequest | + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Start check + api_response = api_instance.start_ext_check(x_request_id, base_check_create_request, x_trace_id=x_trace_id) + print("The response of ChecksApi->start_ext_check:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ChecksApi->start_ext_check: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **base_check_create_request** | [**BaseCheckCreateRequest**](BaseCheckCreateRequest.md)| | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**ExtChecksGetResponse**](ExtChecksGetResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Started object | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ChecksAuditListResponse.md b/docs/ChecksAuditListResponse.md new file mode 100644 index 00000000..a5919a25 --- /dev/null +++ b/docs/ChecksAuditListResponse.md @@ -0,0 +1,31 @@ +# ChecksAuditListResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**PaginationMeta**](PaginationMeta.md) | Data about pagination like how many results, pages, page size. | +**data** | [**List[ChecksAuditResponse]**](ChecksAuditResponse.md) | | +**links** | [**Links**](Links.md) | | + +## Example + +```python +from pfruck_contabo.models.checks_audit_list_response import ChecksAuditListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ChecksAuditListResponse from a JSON string +checks_audit_list_response_instance = ChecksAuditListResponse.from_json(json) +# print the JSON string representation of the object +print(ChecksAuditListResponse.to_json()) + +# convert the object into a dict +checks_audit_list_response_dict = checks_audit_list_response_instance.to_dict() +# create an instance of ChecksAuditListResponse from a dict +checks_audit_list_response_from_dict = ChecksAuditListResponse.from_dict(checks_audit_list_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ChecksAuditResponse.md b/docs/ChecksAuditResponse.md new file mode 100644 index 00000000..65484319 --- /dev/null +++ b/docs/ChecksAuditResponse.md @@ -0,0 +1,42 @@ +# ChecksAuditResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_date** | **datetime** | Creation date | +**modified_date** | **datetime** | Modify date | +**org_id** | **str** | Org id | +**account_id** | **str** | Account id | +**audit_id** | **int** | The ID of the audit entry. | +**action** | **str** | Type of the action. | +**foreign_changed_by** | **str** | Id of a foreign user (given on the api request via header) who performed the change | +**foreign_username** | **str** | Name of the foreign user (given on the api request via header) which led to the change. | +**changed_by** | **str** | Id of user who performed the change | +**username** | **str** | Name of the user which led to the change. | +**request_id** | **str** | The requestId of the API call which led to the change. | +**trace_id** | **str** | The traceId of the API call which led to the change. | +**changes** | [**Changes**](Changes.md) | List of changed properties | +**check_id** | **float** | Check's id | + +## Example + +```python +from pfruck_contabo.models.checks_audit_response import ChecksAuditResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ChecksAuditResponse from a JSON string +checks_audit_response_instance = ChecksAuditResponse.from_json(json) +# print the JSON string representation of the object +print(ChecksAuditResponse.to_json()) + +# convert the object into a dict +checks_audit_response_dict = checks_audit_response_instance.to_dict() +# create an instance of ChecksAuditResponse from a dict +checks_audit_response_from_dict = ChecksAuditResponse.from_dict(checks_audit_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ChecksGetResponse.md b/docs/ChecksGetResponse.md new file mode 100644 index 00000000..4efc6c92 --- /dev/null +++ b/docs/ChecksGetResponse.md @@ -0,0 +1,30 @@ +# ChecksGetResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[CheckResponse]**](CheckResponse.md) | | +**links** | [**SelfLinks**](SelfLinks.md) | | + +## Example + +```python +from pfruck_contabo.models.checks_get_response import ChecksGetResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ChecksGetResponse from a JSON string +checks_get_response_instance = ChecksGetResponse.from_json(json) +# print the JSON string representation of the object +print(ChecksGetResponse.to_json()) + +# convert the object into a dict +checks_get_response_dict = checks_get_response_instance.to_dict() +# create an instance of ChecksGetResponse from a dict +checks_get_response_from_dict = ChecksGetResponse.from_dict(checks_get_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ChecksListResponse.md b/docs/ChecksListResponse.md new file mode 100644 index 00000000..458f76cc --- /dev/null +++ b/docs/ChecksListResponse.md @@ -0,0 +1,31 @@ +# ChecksListResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**PaginationMeta**](PaginationMeta.md) | Data about pagination like how many results, pages, page size. | +**data** | [**List[CheckResponse]**](CheckResponse.md) | | +**links** | [**Links**](Links.md) | | + +## Example + +```python +from pfruck_contabo.models.checks_list_response import ChecksListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ChecksListResponse from a JSON string +checks_list_response_instance = ChecksListResponse.from_json(json) +# print the JSON string representation of the object +print(ChecksListResponse.to_json()) + +# convert the object into a dict +checks_list_response_dict = checks_list_response_instance.to_dict() +# create an instance of ChecksListResponse from a dict +checks_list_response_from_dict = ChecksListResponse.from_dict(checks_list_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ChecksReplayRequest.md b/docs/ChecksReplayRequest.md new file mode 100644 index 00000000..7a339afc --- /dev/null +++ b/docs/ChecksReplayRequest.md @@ -0,0 +1,34 @@ +# ChecksReplayRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**org_id** | **str** | Id of your organization, if unknown please contact us | +**account_id** | **str** | Account Id | +**creation_start_time** | **datetime** | Earliest creation date of changes to replay | [optional] +**creation_end_time** | **datetime** | Latest creation date of changes to replay | [optional] +**rate** | **float** | Message publishing frequency. How many messages per second get published. Default: 20 | [optional] +**check_ids** | **List[float]** | Check's id | [optional] + +## Example + +```python +from pfruck_contabo.models.checks_replay_request import ChecksReplayRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ChecksReplayRequest from a JSON string +checks_replay_request_instance = ChecksReplayRequest.from_json(json) +# print the JSON string representation of the object +print(ChecksReplayRequest.to_json()) + +# convert the object into a dict +checks_replay_request_dict = checks_replay_request_instance.to_dict() +# create an instance of ChecksReplayRequest from a dict +checks_replay_request_from_dict = ChecksReplayRequest.from_dict(checks_replay_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateDnsZoneRecordRequest.md b/docs/CreateDnsZoneRecordRequest.md new file mode 100644 index 00000000..8e90e9c1 --- /dev/null +++ b/docs/CreateDnsZoneRecordRequest.md @@ -0,0 +1,37 @@ +# CreateDnsZoneRecordRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name, if empty the zone name will be used | [optional] +**type** | **str** | DNS record type | +**ttl** | **float** | TTL | +**prio** | **float** | Prio | +**data** | **str** | Data | +**port** | **float** | Port | [optional] +**weight** | **float** | Weight | [optional] +**flag** | **float** | Flag | [optional] +**tag** | **str** | Tag | [optional] + +## Example + +```python +from pfruck_contabo.models.create_dns_zone_record_request import CreateDnsZoneRecordRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateDnsZoneRecordRequest from a JSON string +create_dns_zone_record_request_instance = CreateDnsZoneRecordRequest.from_json(json) +# print the JSON string representation of the object +print(CreateDnsZoneRecordRequest.to_json()) + +# convert the object into a dict +create_dns_zone_record_request_dict = create_dns_zone_record_request_instance.to_dict() +# create an instance of CreateDnsZoneRecordRequest from a dict +create_dns_zone_record_request_from_dict = CreateDnsZoneRecordRequest.from_dict(create_dns_zone_record_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateDnsZoneRequest.md b/docs/CreateDnsZoneRequest.md new file mode 100644 index 00000000..35f3114a --- /dev/null +++ b/docs/CreateDnsZoneRequest.md @@ -0,0 +1,29 @@ +# CreateDnsZoneRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**zone_name** | **str** | Zone name | + +## Example + +```python +from pfruck_contabo.models.create_dns_zone_request import CreateDnsZoneRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateDnsZoneRequest from a JSON string +create_dns_zone_request_instance = CreateDnsZoneRequest.from_json(json) +# print the JSON string representation of the object +print(CreateDnsZoneRequest.to_json()) + +# convert the object into a dict +create_dns_zone_request_dict = create_dns_zone_request_instance.to_dict() +# create an instance of CreateDnsZoneRequest from a dict +create_dns_zone_request_from_dict = CreateDnsZoneRequest.from_dict(create_dns_zone_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateFirewallRequest.md b/docs/CreateFirewallRequest.md new file mode 100644 index 00000000..edc8aeba --- /dev/null +++ b/docs/CreateFirewallRequest.md @@ -0,0 +1,32 @@ +# CreateFirewallRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | The name of the firewall. | +**description** | **str** | The description of the firewall. | [optional] +**status** | **str** | The status of the firewall determines whether the rules are active or not. | +**rules** | [**RulesRequest**](RulesRequest.md) | | [optional] + +## Example + +```python +from pfruck_contabo.models.create_firewall_request import CreateFirewallRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateFirewallRequest from a JSON string +create_firewall_request_instance = CreateFirewallRequest.from_json(json) +# print the JSON string representation of the object +print(CreateFirewallRequest.to_json()) + +# convert the object into a dict +create_firewall_request_dict = create_firewall_request_instance.to_dict() +# create an instance of CreateFirewallRequest from a dict +create_firewall_request_from_dict = CreateFirewallRequest.from_dict(create_firewall_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateFirewallResponse.md b/docs/CreateFirewallResponse.md new file mode 100644 index 00000000..8b2964db --- /dev/null +++ b/docs/CreateFirewallResponse.md @@ -0,0 +1,30 @@ +# CreateFirewallResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[FirewallResponse]**](FirewallResponse.md) | | +**links** | [**SelfLinks**](SelfLinks.md) | | + +## Example + +```python +from pfruck_contabo.models.create_firewall_response import CreateFirewallResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateFirewallResponse from a JSON string +create_firewall_response_instance = CreateFirewallResponse.from_json(json) +# print the JSON string representation of the object +print(CreateFirewallResponse.to_json()) + +# convert the object into a dict +create_firewall_response_dict = create_firewall_response_instance.to_dict() +# create an instance of CreateFirewallResponse from a dict +create_firewall_response_from_dict = CreateFirewallResponse.from_dict(create_firewall_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateInstanceAddons.md b/docs/CreateInstanceAddons.md index a9dc6fa1..62bc7cd8 100644 --- a/docs/CreateInstanceAddons.md +++ b/docs/CreateInstanceAddons.md @@ -5,10 +5,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**private_networking** | **object** | Set this attribute if you want to upgrade your instance with the Private Networking addon. Please provide an empty object for the time being as value. There will be more configuration possible in the future. | [optional] -**additional_ips** | **object** | Set this attribute if you want to upgrade your instance with the Additional IPs addon. Please provide an empty object for the time being as value. There will be more configuration possible in the future. | [optional] +**private_networking** | **Dict[str, object]** | Set this attribute if you want to upgrade your instance with the Private Networking addon. Please provide an empty object for the time being as value. There will be more configuration possible in the future. | [optional] +**additional_ips** | **Dict[str, object]** | Set this attribute if you want to upgrade your instance with the Additional IPs addon. Please provide an empty object for the time being as value. There will be more configuration possible in the future. | [optional] +**backup** | **Dict[str, object]** | Set this attribute if you want to upgrade your instance with the Automated backup addon. Please provide an empty object for the time being as value. There will be more configuration possible in the future. | [optional] **extra_storage** | [**ExtraStorageRequest**](ExtraStorageRequest.md) | Set this attribute if you want to upgrade your instance with the Extra Storage addon. | [optional] -**custom_image** | **object** | Set this attribute if you want to upgrade your instance with the Custom Images addon. Please provide an empty object for the time being as value. There will be more configuration possible in the future. | [optional] +**custom_image** | **Dict[str, object]** | Set this attribute if you want to upgrade your instance with the Custom Images addon. Please provide an empty object for the time being as value. There will be more configuration possible in the future. | [optional] **addons_ids** | [**List[AddOnRequest]**](AddOnRequest.md) | | [optional] ## Example diff --git a/docs/CreateInstanceRequest.md b/docs/CreateInstanceRequest.md index 70cb8687..33ea268c 100644 --- a/docs/CreateInstanceRequest.md +++ b/docs/CreateInstanceRequest.md @@ -6,14 +6,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **image_id** | **str** | ImageId to be used to setup the compute instance. Default is Ubuntu 22.04 | [optional] [default to 'afecbb85-e2fc-46f0-9684-b46b1faf00bb'] -**product_id** | **str** | Default is V45 | [optional] [default to 'V45'] +**product_id** | **str** | Default is V92 | [optional] [default to 'V92'] **region** | **str** | Instance Region where the compute instance should be located. Default is EU | [optional] [default to 'EU'] **ssh_keys** | **List[int]** | Array of `secretId`s of public SSH keys for logging into as `defaultUser` with administrator/root privileges. Applies to Linux/BSD systems. Please refer to Secrets Management API. | [optional] **root_password** | **int** | `secretId` of the password for the `defaultUser` with administrator/root privileges. For Linux/BSD please use SSH, for Windows RDP. Please refer to Secrets Management API. | [optional] **user_data** | **str** | [Cloud-Init](https://cloud-init.io/) Config in order to customize during start of compute instance. | [optional] **license** | **str** | Additional licence in order to enhance your chosen product, mainly needed for software licenses on your product (not needed for windows). | [optional] **period** | **int** | Initial contract period in months. Available periods are: 1, 3, 6 and 12 months. Default to 1 month | [default to 1] -**display_name** | **str** | The display name of the instance | [optional] +**display_name** | **str** | The display name of the instance. Pass an empty string to leave it unset. | [optional] **default_user** | **str** | Default user name created for login during (re-)installation with administrative privileges. Allowed values for Linux/BSD are `admin` (use sudo to apply administrative privileges like root) or `root`. Allowed values for Windows are `admin` (has administrative privileges like administrator) or `administrator`. | [optional] [default to 'admin'] **add_ons** | [**CreateInstanceAddons**](CreateInstanceAddons.md) | Set attributes in the addons object for the corresponding ones that need to be added to the instance | [optional] **application_id** | **str** | Application ID | [optional] diff --git a/docs/CreateInstanceResponseData.md b/docs/CreateInstanceResponseData.md index f88f96e9..f4845b71 100644 --- a/docs/CreateInstanceResponseData.md +++ b/docs/CreateInstanceResponseData.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes **region** | **str** | Instance Region where the compute instance should be located. | **add_ons** | [**List[AddOnResponse]**](AddOnResponse.md) | | **os_type** | **str** | Type of operating system (OS) | -**status** | [**InstanceStatus**](InstanceStatus.md) | | +**status** | [**InstanceStatus**](InstanceStatus.md) | Instance's status | **ssh_keys** | **List[int]** | Array of `secretId`s of public SSH keys for logging into as `defaultUser` with administrator/root privileges. Applies to Linux/BSD systems. Please refer to Secrets Management API. | ## Example diff --git a/docs/CreatePtrRecordRequest.md b/docs/CreatePtrRecordRequest.md new file mode 100644 index 00000000..fe1b9ba5 --- /dev/null +++ b/docs/CreatePtrRecordRequest.md @@ -0,0 +1,31 @@ +# CreatePtrRecordRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ptr** | **str** | PTR Record name | +**ip** | **str** | IP Address | +**ttl** | **int** | Time to live for the PTR record in seconds | + +## Example + +```python +from pfruck_contabo.models.create_ptr_record_request import CreatePtrRecordRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreatePtrRecordRequest from a JSON string +create_ptr_record_request_instance = CreatePtrRecordRequest.from_json(json) +# print the JSON string representation of the object +print(CreatePtrRecordRequest.to_json()) + +# convert the object into a dict +create_ptr_record_request_dict = create_ptr_record_request_instance.to_dict() +# create an instance of CreatePtrRecordRequest from a dict +create_ptr_record_request_from_dict = CreatePtrRecordRequest.from_dict(create_ptr_record_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateTagRequest.md b/docs/CreateTagRequest.md index acb54194..3147fefe 100644 --- a/docs/CreateTagRequest.md +++ b/docs/CreateTagRequest.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | The name of the tag. Tags may contain letters, numbers, colons, dashes, and underscores. There is a limit of 255 characters per tag. | **color** | **str** | The color of the tag. Color can be specified using hexadecimal value. Default color is #0A78C3 | [default to '#0A78C3'] +**description** | **str** | The description of the Tag name. | [optional] ## Example diff --git a/docs/CreateTicketRequest.md b/docs/CreateTicketRequest.md deleted file mode 100644 index 22eb7aad..00000000 --- a/docs/CreateTicketRequest.md +++ /dev/null @@ -1,31 +0,0 @@ -# CreateTicketRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**subject** | **str** | The ticket subject | -**note** | **str** | The ticket note | -**sender** | **str** | Customer email | - -## Example - -```python -from pfruck_contabo.models.create_ticket_request import CreateTicketRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateTicketRequest from a JSON string -create_ticket_request_instance = CreateTicketRequest.from_json(json) -# print the JSON string representation of the object -print(CreateTicketRequest.to_json()) - -# convert the object into a dict -create_ticket_request_dict = create_ticket_request_instance.to_dict() -# create an instance of CreateTicketRequest from a dict -create_ticket_request_from_dict = CreateTicketRequest.from_dict(create_ticket_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CreateTicketResponse.md b/docs/CreateTicketResponse.md deleted file mode 100644 index 4388e248..00000000 --- a/docs/CreateTicketResponse.md +++ /dev/null @@ -1,30 +0,0 @@ -# CreateTicketResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**List[CreateTicketResponseData]**](CreateTicketResponseData.md) | | -**links** | [**SelfLinks**](SelfLinks.md) | | - -## Example - -```python -from pfruck_contabo.models.create_ticket_response import CreateTicketResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateTicketResponse from a JSON string -create_ticket_response_instance = CreateTicketResponse.from_json(json) -# print the JSON string representation of the object -print(CreateTicketResponse.to_json()) - -# convert the object into a dict -create_ticket_response_dict = create_ticket_response_instance.to_dict() -# create an instance of CreateTicketResponse from a dict -create_ticket_response_from_dict = CreateTicketResponse.from_dict(create_ticket_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CreateUserRequest.md b/docs/CreateUserRequest.md index 2c099d9b..ed4d74ec 100644 --- a/docs/CreateUserRequest.md +++ b/docs/CreateUserRequest.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **email** | **str** | The email of the user to which activation and forgot password links are being sent to. There is a limit of 255 characters per email. | **enabled** | **bool** | If user is not enabled, he can't login and thus use services any longer. | **totp** | **bool** | Enable or disable two-factor authentication (2FA) via time based OTP. | -**locale** | **str** | The locale of the user. This can be `de-DE`, `de`, `en-US`, `en` | +**locale** | **str** | The locale of the user. This can be `de-DE`, `de`, `en-US`, `en`, `es-ES`, `es`, `pt-BR`, `pt`. | **roles** | **List[int]** | The roles as list of `roleId`s of the user. | [optional] ## Example diff --git a/docs/DNSApi.md b/docs/DNSApi.md new file mode 100644 index 00000000..9fe41295 --- /dev/null +++ b/docs/DNSApi.md @@ -0,0 +1,1203 @@ +# pfruck_contabo.DNSApi + +All URIs are relative to *https://api.contabo.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**bulk_delete_dns_zone_records**](DNSApi.md#bulk_delete_dns_zone_records) | **DELETE** /v1/dns/zones/{zoneName}/records/bulk | Bulk delete DNS zone records +[**create_dns_zone**](DNSApi.md#create_dns_zone) | **POST** /v1/dns/zones | Create DNS zone +[**create_dns_zone_record**](DNSApi.md#create_dns_zone_record) | **POST** /v1/dns/zones/{zoneName}/records | Create DNS zone record +[**create_ptr_record**](DNSApi.md#create_ptr_record) | **POST** /v1/dns/ptrs | Create a new PTR Record using ip address +[**delete_dns_zone**](DNSApi.md#delete_dns_zone) | **DELETE** /v1/dns/zones/{zoneName} | Delete a DNS zone. +[**delete_dns_zone_record**](DNSApi.md#delete_dns_zone_record) | **DELETE** /v1/dns/zones/{zoneName}/records/{recordId} | Delete a DNS zone record +[**delete_ptr_record**](DNSApi.md#delete_ptr_record) | **DELETE** /v1/dns/ptrs/{ipAddress} | Delete a PTR Record using ip address +[**retrieve_dns_zone**](DNSApi.md#retrieve_dns_zone) | **GET** /v1/dns/zones/{zoneName} | Retrieve a DNS Zone by zone name +[**retrieve_dns_zone_records_list**](DNSApi.md#retrieve_dns_zone_records_list) | **GET** /v1/dns/zones/{zoneName}/records | List a DNS Zone's records +[**retrieve_dns_zones_list**](DNSApi.md#retrieve_dns_zones_list) | **GET** /v1/dns/zones | List DNS zones +[**retrieve_ptr_record**](DNSApi.md#retrieve_ptr_record) | **GET** /v1/dns/ptrs/{ipAddress} | Retrieve a PTR Record by ip address +[**retrieve_ptr_records_list**](DNSApi.md#retrieve_ptr_records_list) | **GET** /v1/dns/ptrs | List PTR records +[**update_dns_zone_record**](DNSApi.md#update_dns_zone_record) | **PATCH** /v1/dns/zones/{zoneName}/records/{recordId} | Update DNS zone record +[**update_ptr_record**](DNSApi.md#update_ptr_record) | **PUT** /v1/dns/ptrs/{ipAddress} | Edit a PTR Record by ip address + + +# **bulk_delete_dns_zone_records** +> ApiBulkDeleteDnsZoneRecordsResponse bulk_delete_dns_zone_records(x_request_id, zone_name, bulk_delete_dns_zone_records_request, x_trace_id=x_trace_id) + +Bulk delete DNS zone records + +Delete multiple zone records from a DNS Zone + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.api_bulk_delete_dns_zone_records_response import ApiBulkDeleteDnsZoneRecordsResponse +from pfruck_contabo.models.bulk_delete_dns_zone_records_request import BulkDeleteDnsZoneRecordsRequest +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.DNSApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + zone_name = 'example.com' # str | Zone name + bulk_delete_dns_zone_records_request = pfruck_contabo.BulkDeleteDnsZoneRecordsRequest() # BulkDeleteDnsZoneRecordsRequest | + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Bulk delete DNS zone records + api_response = api_instance.bulk_delete_dns_zone_records(x_request_id, zone_name, bulk_delete_dns_zone_records_request, x_trace_id=x_trace_id) + print("The response of DNSApi->bulk_delete_dns_zone_records:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DNSApi->bulk_delete_dns_zone_records: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **zone_name** | **str**| Zone name | + **bulk_delete_dns_zone_records_request** | [**BulkDeleteDnsZoneRecordsRequest**](BulkDeleteDnsZoneRecordsRequest.md)| | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**ApiBulkDeleteDnsZoneRecordsResponse**](ApiBulkDeleteDnsZoneRecordsResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Detailed result for bulk deletion | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_dns_zone** +> ApiDnsZoneResponse create_dns_zone(x_request_id, create_dns_zone_request, x_trace_id=x_trace_id) + +Create DNS zone + +Creates a new DNS zone for a customer + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.api_dns_zone_response import ApiDnsZoneResponse +from pfruck_contabo.models.create_dns_zone_request import CreateDnsZoneRequest +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.DNSApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + create_dns_zone_request = pfruck_contabo.CreateDnsZoneRequest() # CreateDnsZoneRequest | + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Create DNS zone + api_response = api_instance.create_dns_zone(x_request_id, create_dns_zone_request, x_trace_id=x_trace_id) + print("The response of DNSApi->create_dns_zone:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DNSApi->create_dns_zone: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **create_dns_zone_request** | [**CreateDnsZoneRequest**](CreateDnsZoneRequest.md)| | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**ApiDnsZoneResponse**](ApiDnsZoneResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | The response will be a JSON object and contains standard DNS Zone attributes | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_dns_zone_record** +> ApiDnsZoneRecordResponse create_dns_zone_record(x_request_id, zone_name, create_dns_zone_record_request, x_trace_id=x_trace_id) + +Create DNS zone record + +Create resource record in a zone + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.api_dns_zone_record_response import ApiDnsZoneRecordResponse +from pfruck_contabo.models.create_dns_zone_record_request import CreateDnsZoneRecordRequest +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.DNSApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + zone_name = 'example.com' # str | Zone name + create_dns_zone_record_request = pfruck_contabo.CreateDnsZoneRecordRequest() # CreateDnsZoneRecordRequest | + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Create DNS zone record + api_response = api_instance.create_dns_zone_record(x_request_id, zone_name, create_dns_zone_record_request, x_trace_id=x_trace_id) + print("The response of DNSApi->create_dns_zone_record:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DNSApi->create_dns_zone_record: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **zone_name** | **str**| Zone name | + **create_dns_zone_record_request** | [**CreateDnsZoneRecordRequest**](CreateDnsZoneRecordRequest.md)| | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**ApiDnsZoneRecordResponse**](ApiDnsZoneRecordResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | The response will be a JSON object and contains standard record attributes | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_ptr_record** +> ApiPtrRecordResponse create_ptr_record(x_request_id, create_ptr_record_request, x_trace_id=x_trace_id) + +Create a new PTR Record using ip address + +Create a new PTR Record using ip address. Only IPv6 can be created + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.api_ptr_record_response import ApiPtrRecordResponse +from pfruck_contabo.models.create_ptr_record_request import CreatePtrRecordRequest +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.DNSApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + create_ptr_record_request = pfruck_contabo.CreatePtrRecordRequest() # CreatePtrRecordRequest | + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Create a new PTR Record using ip address + api_response = api_instance.create_ptr_record(x_request_id, create_ptr_record_request, x_trace_id=x_trace_id) + print("The response of DNSApi->create_ptr_record:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DNSApi->create_ptr_record: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **create_ptr_record_request** | [**CreatePtrRecordRequest**](CreatePtrRecordRequest.md)| | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**ApiPtrRecordResponse**](ApiPtrRecordResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | The response will be a JSON object and contains standard PTR Record attributes | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_dns_zone** +> delete_dns_zone(x_request_id, zone_name, x_trace_id=x_trace_id) + +Delete a DNS zone. + +Delete a DNS Zone using zone name. + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.DNSApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + zone_name = 'example.com' # str | Zone name + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Delete a DNS zone. + api_instance.delete_dns_zone(x_request_id, zone_name, x_trace_id=x_trace_id) + except Exception as e: + print("Exception when calling DNSApi->delete_dns_zone: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **zone_name** | **str**| Zone name | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Response body has no content | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_dns_zone_record** +> delete_dns_zone_record(x_request_id, record_id, zone_name, x_trace_id=x_trace_id) + +Delete a DNS zone record + +Delete a DNZ Zone's record + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.DNSApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + record_id = 12345 # int | The identifier of the DNS record + zone_name = 'example.com' # str | Zone name + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Delete a DNS zone record + api_instance.delete_dns_zone_record(x_request_id, record_id, zone_name, x_trace_id=x_trace_id) + except Exception as e: + print("Exception when calling DNSApi->delete_dns_zone_record: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **record_id** | **int**| The identifier of the DNS record | + **zone_name** | **str**| Zone name | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Response body has no content | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_ptr_record** +> delete_ptr_record(x_request_id, ip_address, x_trace_id=x_trace_id) + +Delete a PTR Record using ip address + +Delete a PTR Record using ip address. Only IPv6 can be deleted + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.DNSApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + ip_address = '11.10.2.3' # str | Ip Address + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Delete a PTR Record using ip address + api_instance.delete_ptr_record(x_request_id, ip_address, x_trace_id=x_trace_id) + except Exception as e: + print("Exception when calling DNSApi->delete_ptr_record: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **ip_address** | **str**| Ip Address | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Response body has no content | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **retrieve_dns_zone** +> retrieve_dns_zone(x_request_id, zone_name, x_trace_id=x_trace_id) + +Retrieve a DNS Zone by zone name + +Get all attributes for a specific DNS Zone + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.DNSApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + zone_name = 'example.com' # str | Zone name + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Retrieve a DNS Zone by zone name + api_instance.retrieve_dns_zone(x_request_id, zone_name, x_trace_id=x_trace_id) + except Exception as e: + print("Exception when calling DNSApi->retrieve_dns_zone: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **zone_name** | **str**| Zone name | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The response will be a JSON object and contains standard DNS Zone attributes | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **retrieve_dns_zone_records_list** +> ListDnsZoneRecordsResponse retrieve_dns_zone_records_list(x_request_id, zone_name, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, search=search) + +List a DNS Zone's records + +Get all the records of a DNS Zone + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.list_dns_zone_records_response import ListDnsZoneRecordsResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.DNSApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + zone_name = 'example.com' # str | Zone name + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + page = 1 # int | Number of page to be fetched. (optional) + size = 10 # int | Number of elements per page. (optional) + order_by = ['name:asc'] # List[str] | Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. (optional) + search = 'example.com' # str | Search DNS records by name, type or data (optional) + + try: + # List a DNS Zone's records + api_response = api_instance.retrieve_dns_zone_records_list(x_request_id, zone_name, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, search=search) + print("The response of DNSApi->retrieve_dns_zone_records_list:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DNSApi->retrieve_dns_zone_records_list: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **zone_name** | **str**| Zone name | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + **page** | **int**| Number of page to be fetched. | [optional] + **size** | **int**| Number of elements per page. | [optional] + **order_by** | [**List[str]**](str.md)| Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. | [optional] + **search** | **str**| Search DNS records by name, type or data | [optional] + +### Return type + +[**ListDnsZoneRecordsResponse**](ListDnsZoneRecordsResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The response will be a JSON object which will contain a paginated list of dns zone records. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **retrieve_dns_zones_list** +> ListDnsZonesResponse retrieve_dns_zones_list(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, customer_id=customer_id, tenant_id=tenant_id, zone_name=zone_name) + +List DNS zones + +Get a list of all zones + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.list_dns_zones_response import ListDnsZonesResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.DNSApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + page = 1 # int | Number of page to be fetched. (optional) + size = 10 # int | Number of elements per page. (optional) + order_by = ['name:asc'] # List[str] | Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. (optional) + customer_id = '54321' # str | Customer ID (optional) + tenant_id = 'DE' # str | Tenant ID (optional) + zone_name = 'example.com' # str | Seach by zone name (optional) + + try: + # List DNS zones + api_response = api_instance.retrieve_dns_zones_list(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, customer_id=customer_id, tenant_id=tenant_id, zone_name=zone_name) + print("The response of DNSApi->retrieve_dns_zones_list:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DNSApi->retrieve_dns_zones_list: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + **page** | **int**| Number of page to be fetched. | [optional] + **size** | **int**| Number of elements per page. | [optional] + **order_by** | [**List[str]**](str.md)| Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. | [optional] + **customer_id** | **str**| Customer ID | [optional] + **tenant_id** | **str**| Tenant ID | [optional] + **zone_name** | **str**| Seach by zone name | [optional] + +### Return type + +[**ListDnsZonesResponse**](ListDnsZonesResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The response will be a json object which will contain a paginated list of dns zones. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **retrieve_ptr_record** +> ApiPtrRecordResponse retrieve_ptr_record(x_request_id, ip_address, x_trace_id=x_trace_id) + +Retrieve a PTR Record by ip address + +Get all attributes for a specific PTR Record + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.api_ptr_record_response import ApiPtrRecordResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.DNSApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + ip_address = '11.10.2.3' # str | Ip Address + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Retrieve a PTR Record by ip address + api_response = api_instance.retrieve_ptr_record(x_request_id, ip_address, x_trace_id=x_trace_id) + print("The response of DNSApi->retrieve_ptr_record:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DNSApi->retrieve_ptr_record: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **ip_address** | **str**| Ip Address | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**ApiPtrRecordResponse**](ApiPtrRecordResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The response will be a JSON object and contains standard PTR Record attributes | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **retrieve_ptr_records_list** +> ListPtrRecordsResponse retrieve_ptr_records_list(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, customer_id=customer_id, tenant_id=tenant_id, ips=ips, search=search) + +List PTR records + +Get a list of all PTR records, either customer or a list of IPs is required + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.list_ptr_records_response import ListPtrRecordsResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.DNSApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + page = 1 # int | Number of page to be fetched. (optional) + size = 10 # int | Number of elements per page. (optional) + order_by = ['name:asc'] # List[str] | Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. (optional) + customer_id = '54321' # str | Customer ID (optional) + tenant_id = 'DE' # str | Tenant ID (optional) + ips = ['ips_example'] # List[str] | List of IPs, separated by commas (optional) + search = 'vmd1111.contabo.net' # str | Search PTR records by ip or data (optional) + + try: + # List PTR records + api_response = api_instance.retrieve_ptr_records_list(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, customer_id=customer_id, tenant_id=tenant_id, ips=ips, search=search) + print("The response of DNSApi->retrieve_ptr_records_list:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DNSApi->retrieve_ptr_records_list: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + **page** | **int**| Number of page to be fetched. | [optional] + **size** | **int**| Number of elements per page. | [optional] + **order_by** | [**List[str]**](str.md)| Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. | [optional] + **customer_id** | **str**| Customer ID | [optional] + **tenant_id** | **str**| Tenant ID | [optional] + **ips** | [**List[str]**](str.md)| List of IPs, separated by commas | [optional] + **search** | **str**| Search PTR records by ip or data | [optional] + +### Return type + +[**ListPtrRecordsResponse**](ListPtrRecordsResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The response will be a JSON object which will contain a paginated list of ptr records. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_dns_zone_record** +> ApiDnsZoneRecordResponse update_dns_zone_record(x_request_id, record_id, zone_name, update_dns_zone_record_request, x_trace_id=x_trace_id) + +Update DNS zone record + +Create resource record in a zone + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.api_dns_zone_record_response import ApiDnsZoneRecordResponse +from pfruck_contabo.models.update_dns_zone_record_request import UpdateDnsZoneRecordRequest +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.DNSApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + record_id = 12345 # int | The identifier of the DNS record + zone_name = 'example.com' # str | Zone name + update_dns_zone_record_request = pfruck_contabo.UpdateDnsZoneRecordRequest() # UpdateDnsZoneRecordRequest | + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Update DNS zone record + api_response = api_instance.update_dns_zone_record(x_request_id, record_id, zone_name, update_dns_zone_record_request, x_trace_id=x_trace_id) + print("The response of DNSApi->update_dns_zone_record:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DNSApi->update_dns_zone_record: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **record_id** | **int**| The identifier of the DNS record | + **zone_name** | **str**| Zone name | + **update_dns_zone_record_request** | [**UpdateDnsZoneRecordRequest**](UpdateDnsZoneRecordRequest.md)| | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**ApiDnsZoneRecordResponse**](ApiDnsZoneRecordResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The response will be a JSON object and contains standard record attributes | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_ptr_record** +> update_ptr_record(x_request_id, ip_address, update_ptr_record_request, x_trace_id=x_trace_id) + +Edit a PTR Record by ip address + +Edit attributes for a specific PTR Record + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.update_ptr_record_request import UpdatePtrRecordRequest +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.DNSApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + ip_address = '11.10.2.3' # str | Ip Address + update_ptr_record_request = pfruck_contabo.UpdatePtrRecordRequest() # UpdatePtrRecordRequest | + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Edit a PTR Record by ip address + api_instance.update_ptr_record(x_request_id, ip_address, update_ptr_record_request, x_trace_id=x_trace_id) + except Exception as e: + print("Exception when calling DNSApi->update_ptr_record: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **ip_address** | **str**| Ip Address | + **update_ptr_record_request** | [**UpdatePtrRecordRequest**](UpdatePtrRecordRequest.md)| | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Response body has no content | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/DNSAuditsApi.md b/docs/DNSAuditsApi.md new file mode 100644 index 00000000..e4645126 --- /dev/null +++ b/docs/DNSAuditsApi.md @@ -0,0 +1,202 @@ +# pfruck_contabo.DNSAuditsApi + +All URIs are relative to *https://api.contabo.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**retrieve_dns_audits_list**](DNSAuditsApi.md#retrieve_dns_audits_list) | **GET** /v1/dns/zones/audits | List history about your DNS Zones (audit) +[**retrieve_record_audits_list**](DNSAuditsApi.md#retrieve_record_audits_list) | **GET** /v1/dns/records/audits | List history about your DNS Records (audit) + + +# **retrieve_dns_audits_list** +> ZoneAuditResponse retrieve_dns_audits_list(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, name=name, request_id=request_id, changed_by=changed_by, start_date=start_date, end_date=end_date) + +List history about your DNS Zones (audit) + +List and filters the history about your DNS Zones . + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.zone_audit_response import ZoneAuditResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.DNSAuditsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + page = 1 # int | Number of page to be fetched. (optional) + size = 10 # int | Number of elements per page. (optional) + order_by = ['name:asc'] # List[str] | Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. (optional) + name = 'example.com' # str | Dns Zone name. (optional) + request_id = 'D5FD9FAF-58C0-4406-8F46-F449B8E4FEC3' # str | The requestId of the API call which led to the change. (optional) + changed_by = '23cbb6d6-cb11-4330-bdff-7bb791df2e23' # str | UserId of the user which led to the change. (optional) + start_date = 'Wed Jun 02 00:00:00 UTC 2021' # date | Start of search time range. (optional) + end_date = 'Wed Jun 02 00:00:00 UTC 2021' # date | End of search time range. (optional) + + try: + # List history about your DNS Zones (audit) + api_response = api_instance.retrieve_dns_audits_list(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, name=name, request_id=request_id, changed_by=changed_by, start_date=start_date, end_date=end_date) + print("The response of DNSAuditsApi->retrieve_dns_audits_list:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DNSAuditsApi->retrieve_dns_audits_list: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + **page** | **int**| Number of page to be fetched. | [optional] + **size** | **int**| Number of elements per page. | [optional] + **order_by** | [**List[str]**](str.md)| Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. | [optional] + **name** | **str**| Dns Zone name. | [optional] + **request_id** | **str**| The requestId of the API call which led to the change. | [optional] + **changed_by** | **str**| UserId of the user which led to the change. | [optional] + **start_date** | **date**| Start of search time range. | [optional] + **end_date** | **date**| End of search time range. | [optional] + +### Return type + +[**ZoneAuditResponse**](ZoneAuditResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The response will be a JSON object and contains a paginated list of DNS Zones audits. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **retrieve_record_audits_list** +> RecordAuditResponse retrieve_record_audits_list(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, record_id=record_id, request_id=request_id, changed_by=changed_by, start_date=start_date, end_date=end_date) + +List history about your DNS Records (audit) + +List and filter the history of changes made to your DNS Records. + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.record_audit_response import RecordAuditResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.DNSAuditsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + page = 1 # int | Number of page to be fetched. (optional) + size = 10 # int | Number of elements per page. (optional) + order_by = ['name:asc'] # List[str] | Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. (optional) + record_id = 12345 # int | The identifier of the Zone record (optional) + request_id = 'D5FD9FAF-58C0-4406-8F46-F449B8E4FEC3' # str | The requestId of the API call which led to the change. (optional) + changed_by = '23cbb6d6-cb11-4330-bdff-7bb791df2e23' # str | UserId of the user which led to the change. (optional) + start_date = 'Wed Jun 02 00:00:00 UTC 2021' # date | Start of search time range. (optional) + end_date = 'Wed Jun 02 00:00:00 UTC 2021' # date | End of search time range. (optional) + + try: + # List history about your DNS Records (audit) + api_response = api_instance.retrieve_record_audits_list(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, record_id=record_id, request_id=request_id, changed_by=changed_by, start_date=start_date, end_date=end_date) + print("The response of DNSAuditsApi->retrieve_record_audits_list:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DNSAuditsApi->retrieve_record_audits_list: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + **page** | **int**| Number of page to be fetched. | [optional] + **size** | **int**| Number of elements per page. | [optional] + **order_by** | [**List[str]**](str.md)| Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. | [optional] + **record_id** | **int**| The identifier of the Zone record | [optional] + **request_id** | **str**| The requestId of the API call which led to the change. | [optional] + **changed_by** | **str**| UserId of the user which led to the change. | [optional] + **start_date** | **date**| Start of search time range. | [optional] + **end_date** | **date**| End of search time range. | [optional] + +### Return type + +[**RecordAuditResponse**](RecordAuditResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The response will be a JSON object and contains a paginated list of DNS Records audits. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/DnsZoneRecordResponse.md b/docs/DnsZoneRecordResponse.md new file mode 100644 index 00000000..21e247ce --- /dev/null +++ b/docs/DnsZoneRecordResponse.md @@ -0,0 +1,40 @@ +# DnsZoneRecordResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_id** | **str** | Your customer tenant id | +**customer_id** | **str** | Your customer number | +**record_id** | **float** | RecordId | +**name** | **str** | Name, if empty the zone name will be used | +**type** | **str** | Type | +**ttl** | **float** | TTL | +**prio** | **float** | Prio | +**data** | **str** | Data | +**port** | **float** | Port | +**weight** | **float** | Weight | +**flag** | **float** | Flag | +**tag** | **str** | Tag | + +## Example + +```python +from pfruck_contabo.models.dns_zone_record_response import DnsZoneRecordResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of DnsZoneRecordResponse from a JSON string +dns_zone_record_response_instance = DnsZoneRecordResponse.from_json(json) +# print the JSON string representation of the object +print(DnsZoneRecordResponse.to_json()) + +# convert the object into a dict +dns_zone_record_response_dict = dns_zone_record_response_instance.to_dict() +# create an instance of DnsZoneRecordResponse from a dict +dns_zone_record_response_from_dict = DnsZoneRecordResponse.from_dict(dns_zone_record_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DnsZoneResponse.md b/docs/DnsZoneResponse.md new file mode 100644 index 00000000..4506a4b9 --- /dev/null +++ b/docs/DnsZoneResponse.md @@ -0,0 +1,31 @@ +# DnsZoneResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_id** | **str** | Your customer tenant id | +**customer_id** | **str** | Your customer number | +**zone_name** | **str** | Zone name | + +## Example + +```python +from pfruck_contabo.models.dns_zone_response import DnsZoneResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of DnsZoneResponse from a JSON string +dns_zone_response_instance = DnsZoneResponse.from_json(json) +# print the JSON string representation of the object +print(DnsZoneResponse.to_json()) + +# convert the object into a dict +dns_zone_response_dict = dns_zone_response_instance.to_dict() +# create an instance of DnsZoneResponse from a dict +dns_zone_response_from_dict = DnsZoneResponse.from_dict(dns_zone_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainAuditResponse.md b/docs/DomainAuditResponse.md new file mode 100644 index 00000000..ad3cb549 --- /dev/null +++ b/docs/DomainAuditResponse.md @@ -0,0 +1,31 @@ +# DomainAuditResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**PaginationMeta**](PaginationMeta.md) | Data about pagination like how many results, pages, page size. | +**data** | [**List[DomainAuditResponseData]**](DomainAuditResponseData.md) | | +**links** | [**Links**](Links.md) | | + +## Example + +```python +from pfruck_contabo.models.domain_audit_response import DomainAuditResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainAuditResponse from a JSON string +domain_audit_response_instance = DomainAuditResponse.from_json(json) +# print the JSON string representation of the object +print(DomainAuditResponse.to_json()) + +# convert the object into a dict +domain_audit_response_dict = domain_audit_response_instance.to_dict() +# create an instance of DomainAuditResponse from a dict +domain_audit_response_from_dict = DomainAuditResponse.from_dict(domain_audit_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainAuditResponseData.md b/docs/DomainAuditResponseData.md new file mode 100644 index 00000000..12841c18 --- /dev/null +++ b/docs/DomainAuditResponseData.md @@ -0,0 +1,39 @@ +# DomainAuditResponseData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | The ID of the audit entry. | +**action** | **str** | Type of the action. | +**timestamp** | **datetime** | When the change took place. | +**tenant_id** | **str** | Customer tenant id | +**customer_id** | **str** | Customer ID | +**changed_by** | **str** | Id of user who performed the change | +**username** | **str** | Name of the user which led to the change. | +**request_id** | **str** | The requestId of the API call which led to the change. | +**trace_id** | **str** | The traceId of the API call which led to the change. | +**domain** | **str** | The identifier of the domain | +**changes** | **object** | List of actual changes. | [optional] + +## Example + +```python +from pfruck_contabo.models.domain_audit_response_data import DomainAuditResponseData + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainAuditResponseData from a JSON string +domain_audit_response_data_instance = DomainAuditResponseData.from_json(json) +# print the JSON string representation of the object +print(DomainAuditResponseData.to_json()) + +# convert the object into a dict +domain_audit_response_data_dict = domain_audit_response_data_instance.to_dict() +# create an instance of DomainAuditResponseData from a dict +domain_audit_response_data_from_dict = DomainAuditResponseData.from_dict(domain_audit_response_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainAuthCodeRegenerateResponse.md b/docs/DomainAuthCodeRegenerateResponse.md new file mode 100644 index 00000000..068aea41 --- /dev/null +++ b/docs/DomainAuthCodeRegenerateResponse.md @@ -0,0 +1,30 @@ +# DomainAuthCodeRegenerateResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[DomainAuthCodeResponse]**](DomainAuthCodeResponse.md) | | +**links** | [**SelfLinks**](SelfLinks.md) | | + +## Example + +```python +from pfruck_contabo.models.domain_auth_code_regenerate_response import DomainAuthCodeRegenerateResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainAuthCodeRegenerateResponse from a JSON string +domain_auth_code_regenerate_response_instance = DomainAuthCodeRegenerateResponse.from_json(json) +# print the JSON string representation of the object +print(DomainAuthCodeRegenerateResponse.to_json()) + +# convert the object into a dict +domain_auth_code_regenerate_response_dict = domain_auth_code_regenerate_response_instance.to_dict() +# create an instance of DomainAuthCodeRegenerateResponse from a dict +domain_auth_code_regenerate_response_from_dict = DomainAuthCodeRegenerateResponse.from_dict(domain_auth_code_regenerate_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainAuthCodeResponse.md b/docs/DomainAuthCodeResponse.md new file mode 100644 index 00000000..6d6d19b8 --- /dev/null +++ b/docs/DomainAuthCodeResponse.md @@ -0,0 +1,43 @@ +# DomainAuthCodeResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_id** | **str** | Your customer tenant id | +**customer_id** | **str** | Your customer number | +**domain** | **str** | Domain name | +**domain_details** | [**DomainDetails**](DomainDetails.md) | Domain Details | +**status** | **str** | Domain Status | +**nameservers** | **List[str]** | Nameservers | +**handles** | [**DomainHandles**](DomainHandles.md) | The handles of the domain | +**registration_date** | **datetime** | The registration date of domain | +**renewal_date** | **datetime** | The renewal date of domain | +**termination_date** | **datetime** | The termination date of domain | +**cancel_date** | **datetime** | The cancel date of domain | +**dnssec_keys** | **List[str]** | DNSSEC keys | +**transfer_out_confirmation** | **bool** | Transfer out confirmation | +**auth_code** | **str** | Your auth code of the domain | +**auth_code_changed** | [**ChangedAuthCode**](ChangedAuthCode.md) | Details if the auth code has been changed | + +## Example + +```python +from pfruck_contabo.models.domain_auth_code_response import DomainAuthCodeResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainAuthCodeResponse from a JSON string +domain_auth_code_response_instance = DomainAuthCodeResponse.from_json(json) +# print the JSON string representation of the object +print(DomainAuthCodeResponse.to_json()) + +# convert the object into a dict +domain_auth_code_response_dict = domain_auth_code_response_instance.to_dict() +# create an instance of DomainAuthCodeResponse from a dict +domain_auth_code_response_from_dict = DomainAuthCodeResponse.from_dict(domain_auth_code_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainCancel.md b/docs/DomainCancel.md new file mode 100644 index 00000000..02122fee --- /dev/null +++ b/docs/DomainCancel.md @@ -0,0 +1,34 @@ +# DomainCancel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_id** | **str** | Your customer tenant id | +**customer_id** | **str** | Your customer number | +**domain** | **str** | Domain name | +**sld** | **str** | Domain SLD | +**tld** | **str** | Domain TLD | +**cancel_date** | **datetime** | The cancel date of domain | + +## Example + +```python +from pfruck_contabo.models.domain_cancel import DomainCancel + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainCancel from a JSON string +domain_cancel_instance = DomainCancel.from_json(json) +# print the JSON string representation of the object +print(DomainCancel.to_json()) + +# convert the object into a dict +domain_cancel_dict = domain_cancel_instance.to_dict() +# create an instance of DomainCancel from a dict +domain_cancel_from_dict = DomainCancel.from_dict(domain_cancel_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainCancelResponse.md b/docs/DomainCancelResponse.md new file mode 100644 index 00000000..f6c7493d --- /dev/null +++ b/docs/DomainCancelResponse.md @@ -0,0 +1,30 @@ +# DomainCancelResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[DomainCancel]**](DomainCancel.md) | | +**links** | [**SelfLinks**](SelfLinks.md) | | + +## Example + +```python +from pfruck_contabo.models.domain_cancel_response import DomainCancelResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainCancelResponse from a JSON string +domain_cancel_response_instance = DomainCancelResponse.from_json(json) +# print the JSON string representation of the object +print(DomainCancelResponse.to_json()) + +# convert the object into a dict +domain_cancel_response_dict = domain_cancel_response_instance.to_dict() +# create an instance of DomainCancelResponse from a dict +domain_cancel_response_from_dict = DomainCancelResponse.from_dict(domain_cancel_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainCreateRequest.md b/docs/DomainCreateRequest.md new file mode 100644 index 00000000..c708adc3 --- /dev/null +++ b/docs/DomainCreateRequest.md @@ -0,0 +1,34 @@ +# DomainCreateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain** | **str** | Domain name | +**auth_code** | **str** | The domain auth code | [optional] +**handles** | [**DomainHandles**](DomainHandles.md) | The handles of the domain | +**nameservers** | [**List[Nameserver]**](Nameserver.md) | Nameservers | +**resource_type** | **str** | The identifier of the resource type | [optional] +**resource_id** | **str** | The identifier of the resource id | [optional] + +## Example + +```python +from pfruck_contabo.models.domain_create_request import DomainCreateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainCreateRequest from a JSON string +domain_create_request_instance = DomainCreateRequest.from_json(json) +# print the JSON string representation of the object +print(DomainCreateRequest.to_json()) + +# convert the object into a dict +domain_create_request_dict = domain_create_request_instance.to_dict() +# create an instance of DomainCreateRequest from a dict +domain_create_request_from_dict = DomainCreateRequest.from_dict(domain_create_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainCreateResponse.md b/docs/DomainCreateResponse.md new file mode 100644 index 00000000..cf96704a --- /dev/null +++ b/docs/DomainCreateResponse.md @@ -0,0 +1,30 @@ +# DomainCreateResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[DomainResponse]**](DomainResponse.md) | | +**links** | [**SelfLinks**](SelfLinks.md) | | + +## Example + +```python +from pfruck_contabo.models.domain_create_response import DomainCreateResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainCreateResponse from a JSON string +domain_create_response_instance = DomainCreateResponse.from_json(json) +# print the JSON string representation of the object +print(DomainCreateResponse.to_json()) + +# convert the object into a dict +domain_create_response_dict = domain_create_response_instance.to_dict() +# create an instance of DomainCreateResponse from a dict +domain_create_response_from_dict = DomainCreateResponse.from_dict(domain_create_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainDetails.md b/docs/DomainDetails.md new file mode 100644 index 00000000..02092bbf --- /dev/null +++ b/docs/DomainDetails.md @@ -0,0 +1,31 @@ +# DomainDetails + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sld** | **str** | Domain SLD | +**tld** | **str** | Domain TLD | +**domain_puny** | **str** | Domain Puny | + +## Example + +```python +from pfruck_contabo.models.domain_details import DomainDetails + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainDetails from a JSON string +domain_details_instance = DomainDetails.from_json(json) +# print the JSON string representation of the object +print(DomainDetails.to_json()) + +# convert the object into a dict +domain_details_dict = domain_details_instance.to_dict() +# create an instance of DomainDetails from a dict +domain_details_from_dict = DomainDetails.from_dict(domain_details_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainFindResponse.md b/docs/DomainFindResponse.md new file mode 100644 index 00000000..168a52f2 --- /dev/null +++ b/docs/DomainFindResponse.md @@ -0,0 +1,30 @@ +# DomainFindResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[DomainResponse]**](DomainResponse.md) | | +**links** | [**SelfLinks**](SelfLinks.md) | | + +## Example + +```python +from pfruck_contabo.models.domain_find_response import DomainFindResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainFindResponse from a JSON string +domain_find_response_instance = DomainFindResponse.from_json(json) +# print the JSON string representation of the object +print(DomainFindResponse.to_json()) + +# convert the object into a dict +domain_find_response_dict = domain_find_response_instance.to_dict() +# create an instance of DomainFindResponse from a dict +domain_find_response_from_dict = DomainFindResponse.from_dict(domain_find_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainHandles.md b/docs/DomainHandles.md new file mode 100644 index 00000000..19a48d22 --- /dev/null +++ b/docs/DomainHandles.md @@ -0,0 +1,32 @@ +# DomainHandles + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**owner** | **str** | Domain's owner handle | +**admin** | **str** | Domain's admin handle | +**tech** | **str** | Domain's tech handle | +**zone** | **str** | Domain's zone handle | + +## Example + +```python +from pfruck_contabo.models.domain_handles import DomainHandles + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainHandles from a JSON string +domain_handles_instance = DomainHandles.from_json(json) +# print the JSON string representation of the object +print(DomainHandles.to_json()) + +# convert the object into a dict +domain_handles_dict = domain_handles_instance.to_dict() +# create an instance of DomainHandles from a dict +domain_handles_from_dict = DomainHandles.from_dict(domain_handles_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainPatchRequest.md b/docs/DomainPatchRequest.md new file mode 100644 index 00000000..acc1e8cf --- /dev/null +++ b/docs/DomainPatchRequest.md @@ -0,0 +1,30 @@ +# DomainPatchRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**nameservers** | [**List[Nameserver]**](Nameserver.md) | Nameservers | [optional] +**handles** | [**DomainHandles**](DomainHandles.md) | The handles of the domain | [optional] + +## Example + +```python +from pfruck_contabo.models.domain_patch_request import DomainPatchRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainPatchRequest from a JSON string +domain_patch_request_instance = DomainPatchRequest.from_json(json) +# print the JSON string representation of the object +print(DomainPatchRequest.to_json()) + +# convert the object into a dict +domain_patch_request_dict = domain_patch_request_instance.to_dict() +# create an instance of DomainPatchRequest from a dict +domain_patch_request_from_dict = DomainPatchRequest.from_dict(domain_patch_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainPatchResponse.md b/docs/DomainPatchResponse.md new file mode 100644 index 00000000..1533ca93 --- /dev/null +++ b/docs/DomainPatchResponse.md @@ -0,0 +1,30 @@ +# DomainPatchResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[DomainResponse]**](DomainResponse.md) | | +**links** | [**SelfLinks**](SelfLinks.md) | | + +## Example + +```python +from pfruck_contabo.models.domain_patch_response import DomainPatchResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainPatchResponse from a JSON string +domain_patch_response_instance = DomainPatchResponse.from_json(json) +# print the JSON string representation of the object +print(DomainPatchResponse.to_json()) + +# convert the object into a dict +domain_patch_response_dict = domain_patch_response_instance.to_dict() +# create an instance of DomainPatchResponse from a dict +domain_patch_response_from_dict = DomainPatchResponse.from_dict(domain_patch_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainResponse.md b/docs/DomainResponse.md new file mode 100644 index 00000000..15fa9ff6 --- /dev/null +++ b/docs/DomainResponse.md @@ -0,0 +1,41 @@ +# DomainResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_id** | **str** | Your customer tenant id | +**customer_id** | **str** | Your customer number | +**domain** | **str** | Domain name | +**domain_details** | [**DomainDetails**](DomainDetails.md) | Domain Details | +**status** | **str** | Domain Status | +**nameservers** | **List[str]** | Nameservers | +**handles** | [**DomainHandles**](DomainHandles.md) | The handles of the domain | +**registration_date** | **datetime** | The registration date of domain | +**renewal_date** | **datetime** | The renewal date of domain | +**termination_date** | **datetime** | The termination date of domain | +**cancel_date** | **datetime** | The cancel date of domain | +**dnssec_keys** | **List[str]** | DNSSEC keys | +**transfer_out_confirmation** | **bool** | Transfer out confirmation | + +## Example + +```python +from pfruck_contabo.models.domain_response import DomainResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainResponse from a JSON string +domain_response_instance = DomainResponse.from_json(json) +# print the JSON string representation of the object +print(DomainResponse.to_json()) + +# convert the object into a dict +domain_response_dict = domain_response_instance.to_dict() +# create an instance of DomainResponse from a dict +domain_response_from_dict = DomainResponse.from_dict(domain_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainsApi.md b/docs/DomainsApi.md new file mode 100644 index 00000000..b180bded --- /dev/null +++ b/docs/DomainsApi.md @@ -0,0 +1,1004 @@ +# pfruck_contabo.DomainsApi + +All URIs are relative to *https://api.contabo.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**cancel_domain**](DomainsApi.md#cancel_domain) | **POST** /v1/domains/{domain}/cancel | Cancel a specific domain +[**confirm_domain_transfer_out**](DomainsApi.md#confirm_domain_transfer_out) | **POST** /v1/domains/{domain}/transfer-out | Confirm transfer out for a domain +[**confirm_domain_transfer_out_0**](DomainsApi.md#confirm_domain_transfer_out_0) | **POST** /v1/domains/{domain}/transfer-out | Confirm transfer out for a domain +[**get_auth_code**](DomainsApi.md#get_auth_code) | **POST** /v1/domains/{domain}/generate-auth-code | Get auth code for a domain +[**list_domains**](DomainsApi.md#list_domains) | **GET** /v1/domains | List all domains +[**order_domain**](DomainsApi.md#order_domain) | **POST** /v1/domains | Create or transfer a domain +[**retrieve_domain**](DomainsApi.md#retrieve_domain) | **GET** /v1/domains/{domain} | List specific domain +[**revoke_cancel_domain**](DomainsApi.md#revoke_cancel_domain) | **POST** /v1/domains/{domain}/revoke-cancellation | Revoke cancellation for a specific domain +[**revoke_domain_transfer_out**](DomainsApi.md#revoke_domain_transfer_out) | **DELETE** /v1/domains/{domain}/transfer-out | Revoke transfer out for a domain +[**revoke_domain_transfer_out_0**](DomainsApi.md#revoke_domain_transfer_out_0) | **DELETE** /v1/domains/{domain}/transfer-out | Revoke transfer out for a domain +[**update_domain**](DomainsApi.md#update_domain) | **PATCH** /v1/domains/{domain} | Update a specific domain +[**validate_domain_availability**](DomainsApi.md#validate_domain_availability) | **POST** /v1/registries-domains/{domain}/check-availability | Check domain availablility + + +# **cancel_domain** +> DomainCancelResponse cancel_domain(x_request_id, domain, cancel_domain_request, x_trace_id=x_trace_id) + +Cancel a specific domain + +Cancel a specific domain + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.cancel_domain_request import CancelDomainRequest +from pfruck_contabo.models.domain_cancel_response import DomainCancelResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.DomainsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + domain = 'testDomain.de' # str | Domain Name + cancel_domain_request = pfruck_contabo.CancelDomainRequest() # CancelDomainRequest | + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Cancel a specific domain + api_response = api_instance.cancel_domain(x_request_id, domain, cancel_domain_request, x_trace_id=x_trace_id) + print("The response of DomainsApi->cancel_domain:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DomainsApi->cancel_domain: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **domain** | **str**| Domain Name | + **cancel_domain_request** | [**CancelDomainRequest**](CancelDomainRequest.md)| | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**DomainCancelResponse**](DomainCancelResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Response body has no content | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **confirm_domain_transfer_out** +> confirm_domain_transfer_out(x_request_id, domain, x_trace_id=x_trace_id) + +Confirm transfer out for a domain + +Confirm transfer out for a domain + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.DomainsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + domain = 'testDomain.de' # str | Domain Name + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Confirm transfer out for a domain + api_instance.confirm_domain_transfer_out(x_request_id, domain, x_trace_id=x_trace_id) + except Exception as e: + print("Exception when calling DomainsApi->confirm_domain_transfer_out: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **domain** | **str**| Domain Name | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Response body has no content | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **confirm_domain_transfer_out_0** +> confirm_domain_transfer_out_0(x_request_id, domain, x_trace_id=x_trace_id) + +Confirm transfer out for a domain + +Confirm transfer out for a domain + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.DomainsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + domain = 'testDomain.de' # str | Domain Name + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Confirm transfer out for a domain + api_instance.confirm_domain_transfer_out_0(x_request_id, domain, x_trace_id=x_trace_id) + except Exception as e: + print("Exception when calling DomainsApi->confirm_domain_transfer_out_0: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **domain** | **str**| Domain Name | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Response body has no content | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_auth_code** +> DomainAuthCodeRegenerateResponse get_auth_code(x_request_id, domain, x_trace_id=x_trace_id) + +Get auth code for a domain + +Get auth code for a domain by id + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.domain_auth_code_regenerate_response import DomainAuthCodeRegenerateResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.DomainsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + domain = 'testDomain.de' # str | Domain Name + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Get auth code for a domain + api_response = api_instance.get_auth_code(x_request_id, domain, x_trace_id=x_trace_id) + print("The response of DomainsApi->get_auth_code:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DomainsApi->get_auth_code: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **domain** | **str**| Domain Name | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**DomainAuthCodeRegenerateResponse**](DomainAuthCodeRegenerateResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The response will be a JSON object and contains auth code of domain requested | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_domains** +> DomainsListResponse list_domains(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, sld=sld, tld=tld, status=status) + +List all domains + +List and filter all your domains + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.domains_list_response import DomainsListResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.DomainsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + page = 1 # int | Number of page to be fetched. (optional) + size = 10 # int | Number of elements per page. (optional) + order_by = ['name:asc'] # List[str] | Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. (optional) + sld = 'testDomain' # str | Filter as substring match for domain sld. (optional) + tld = 'de' # str | Filter as substring match for domain tld. (optional) + status = 'ready' # str | Filter domains by status (optional) + + try: + # List all domains + api_response = api_instance.list_domains(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, sld=sld, tld=tld, status=status) + print("The response of DomainsApi->list_domains:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DomainsApi->list_domains: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + **page** | **int**| Number of page to be fetched. | [optional] + **size** | **int**| Number of elements per page. | [optional] + **order_by** | [**List[str]**](str.md)| Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. | [optional] + **sld** | **str**| Filter as substring match for domain sld. | [optional] + **tld** | **str**| Filter as substring match for domain tld. | [optional] + **status** | **str**| Filter domains by status | [optional] + +### Return type + +[**DomainsListResponse**](DomainsListResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The response will be a JSON object and contains standard domains attributes | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **order_domain** +> DomainCreateResponse order_domain(x_request_id, domain_create_request, x_trace_id=x_trace_id) + +Create or transfer a domain + +Create or transfer a domain + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.domain_create_request import DomainCreateRequest +from pfruck_contabo.models.domain_create_response import DomainCreateResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.DomainsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + domain_create_request = pfruck_contabo.DomainCreateRequest() # DomainCreateRequest | + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Create or transfer a domain + api_response = api_instance.order_domain(x_request_id, domain_create_request, x_trace_id=x_trace_id) + print("The response of DomainsApi->order_domain:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DomainsApi->order_domain: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **domain_create_request** | [**DomainCreateRequest**](DomainCreateRequest.md)| | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**DomainCreateResponse**](DomainCreateResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | The response will be a JSON object and contains standard domain attributes | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **retrieve_domain** +> DomainFindResponse retrieve_domain(x_request_id, domain, x_trace_id=x_trace_id) + +List specific domain + +List specific domain + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.domain_find_response import DomainFindResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.DomainsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + domain = 'testDomain.de' # str | Domain Name + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # List specific domain + api_response = api_instance.retrieve_domain(x_request_id, domain, x_trace_id=x_trace_id) + print("The response of DomainsApi->retrieve_domain:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DomainsApi->retrieve_domain: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **domain** | **str**| Domain Name | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**DomainFindResponse**](DomainFindResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The response will be a JSON object and contains standard domains attributes | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **revoke_cancel_domain** +> revoke_cancel_domain(x_request_id, domain, x_trace_id=x_trace_id) + +Revoke cancellation for a specific domain + +Revoke cancellation for a specific domain + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.DomainsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + domain = 'testDomain.de' # str | Domain Name + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Revoke cancellation for a specific domain + api_instance.revoke_cancel_domain(x_request_id, domain, x_trace_id=x_trace_id) + except Exception as e: + print("Exception when calling DomainsApi->revoke_cancel_domain: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **domain** | **str**| Domain Name | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Response body has no content | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **revoke_domain_transfer_out** +> revoke_domain_transfer_out(x_request_id, domain, x_trace_id=x_trace_id) + +Revoke transfer out for a domain + +Revoke transfer out for a domain + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.DomainsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + domain = 'testDomain.de' # str | Domain Name + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Revoke transfer out for a domain + api_instance.revoke_domain_transfer_out(x_request_id, domain, x_trace_id=x_trace_id) + except Exception as e: + print("Exception when calling DomainsApi->revoke_domain_transfer_out: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **domain** | **str**| Domain Name | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Response body has no content | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **revoke_domain_transfer_out_0** +> revoke_domain_transfer_out_0(x_request_id, domain, x_trace_id=x_trace_id) + +Revoke transfer out for a domain + +Revoke transfer out for a domain + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.DomainsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + domain = 'testDomain.de' # str | Domain Name + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Revoke transfer out for a domain + api_instance.revoke_domain_transfer_out_0(x_request_id, domain, x_trace_id=x_trace_id) + except Exception as e: + print("Exception when calling DomainsApi->revoke_domain_transfer_out_0: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **domain** | **str**| Domain Name | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Response body has no content | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_domain** +> DomainPatchResponse update_domain(x_request_id, domain, domain_patch_request, x_trace_id=x_trace_id) + +Update a specific domain + +Update nameservers and handles for a specific domain + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.domain_patch_request import DomainPatchRequest +from pfruck_contabo.models.domain_patch_response import DomainPatchResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.DomainsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + domain = 'testDomain.de' # str | Domain Name + domain_patch_request = pfruck_contabo.DomainPatchRequest() # DomainPatchRequest | + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Update a specific domain + api_response = api_instance.update_domain(x_request_id, domain, domain_patch_request, x_trace_id=x_trace_id) + print("The response of DomainsApi->update_domain:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DomainsApi->update_domain: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **domain** | **str**| Domain Name | + **domain_patch_request** | [**DomainPatchRequest**](DomainPatchRequest.md)| | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**DomainPatchResponse**](DomainPatchResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The response will be a JSON object and contains standard domains attributes | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **validate_domain_availability** +> validate_domain_availability(x_request_id, domain, x_trace_id=x_trace_id) + +Check domain availablility + +Check if a specific domain is available or not + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.DomainsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + domain = 'testDomain.de' # str | Domain Name + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Check domain availablility + api_instance.validate_domain_availability(x_request_id, domain, x_trace_id=x_trace_id) + except Exception as e: + print("Exception when calling DomainsApi->validate_domain_availability: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **domain** | **str**| Domain Name | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | The response signifies that the domain is available | - | +**404** | The response signifies that the domain is not available | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/DomainsAuditsApi.md b/docs/DomainsAuditsApi.md new file mode 100644 index 00000000..5c6fe47a --- /dev/null +++ b/docs/DomainsAuditsApi.md @@ -0,0 +1,105 @@ +# pfruck_contabo.DomainsAuditsApi + +All URIs are relative to *https://api.contabo.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**retrieve_domains_audits_list**](DomainsAuditsApi.md#retrieve_domains_audits_list) | **GET** /v1/domains/audits | List history about your Domains (audit) + + +# **retrieve_domains_audits_list** +> DomainAuditResponse retrieve_domains_audits_list(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, domain=domain, request_id=request_id, changed_by=changed_by, start_date=start_date, end_date=end_date) + +List history about your Domains (audit) + +List and filters the history about your Domains. + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.domain_audit_response import DomainAuditResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.DomainsAuditsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + page = 1 # int | Number of page to be fetched. (optional) + size = 10 # int | Number of elements per page. (optional) + order_by = ['name:asc'] # List[str] | Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. (optional) + domain = 'testDom.com' # str | The domain name. (optional) + request_id = 'D5FD9FAF-58C0-4406-8F46-F449B8E4FEC3' # str | The requestId of the API call which led to the change. (optional) + changed_by = '23cbb6d6-cb11-4330-bdff-7bb791df2e23' # str | UserId of the user which led to the change. (optional) + start_date = 'Wed Jun 02 00:00:00 UTC 2021' # date | Start of search time range. (optional) + end_date = 'Wed Jun 02 00:00:00 UTC 2021' # date | End of search time range. (optional) + + try: + # List history about your Domains (audit) + api_response = api_instance.retrieve_domains_audits_list(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, domain=domain, request_id=request_id, changed_by=changed_by, start_date=start_date, end_date=end_date) + print("The response of DomainsAuditsApi->retrieve_domains_audits_list:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DomainsAuditsApi->retrieve_domains_audits_list: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + **page** | **int**| Number of page to be fetched. | [optional] + **size** | **int**| Number of elements per page. | [optional] + **order_by** | [**List[str]**](str.md)| Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. | [optional] + **domain** | **str**| The domain name. | [optional] + **request_id** | **str**| The requestId of the API call which led to the change. | [optional] + **changed_by** | **str**| UserId of the user which led to the change. | [optional] + **start_date** | **date**| Start of search time range. | [optional] + **end_date** | **date**| End of search time range. | [optional] + +### Return type + +[**DomainAuditResponse**](DomainAuditResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The response will be a JSON object and contains a paginated list of Domains audits. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/DomainsListResponse.md b/docs/DomainsListResponse.md new file mode 100644 index 00000000..31e44a9f --- /dev/null +++ b/docs/DomainsListResponse.md @@ -0,0 +1,31 @@ +# DomainsListResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**PaginationMeta**](PaginationMeta.md) | Data about pagination like how many results, pages, page size. | +**data** | [**List[DomainResponse]**](DomainResponse.md) | | +**links** | [**Links**](Links.md) | | + +## Example + +```python +from pfruck_contabo.models.domains_list_response import DomainsListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainsListResponse from a JSON string +domains_list_response_instance = DomainsListResponse.from_json(json) +# print the JSON string representation of the object +print(DomainsListResponse.to_json()) + +# convert the object into a dict +domains_list_response_dict = domains_list_response_instance.to_dict() +# create an instance of DomainsListResponse from a dict +domains_list_response_from_dict = DomainsListResponse.from_dict(domains_list_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExtCheckCollectionResponse.md b/docs/ExtCheckCollectionResponse.md new file mode 100644 index 00000000..1cbf3aea --- /dev/null +++ b/docs/ExtCheckCollectionResponse.md @@ -0,0 +1,40 @@ +# ExtCheckCollectionResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**internal** | **bool** | Is internal (not shown to the customer) | +**status** | **str** | Status of the handle | +**object_type** | **str** | Object type to be handled | +**object_id** | **str** | ID of the object, to be handled | +**check_collection_id** | **float** | Check collection's id | +**check_collection_template_id** | **float** | Check Collection Template for this check collection | +**check_templates** | [**List[CheckCollectionCheckTemplates]**](CheckCollectionCheckTemplates.md) | Check templates which are part of this collection template | +**created_date** | **datetime** | Creation date | +**modified_date** | **datetime** | Modify date | +**tenant_id** | **str** | Tenant id | +**customer_id** | **str** | Customer id | +**checks** | [**List[ExtCheckResponse]**](ExtCheckResponse.md) | Checks performed in this check collection | + +## Example + +```python +from pfruck_contabo.models.ext_check_collection_response import ExtCheckCollectionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ExtCheckCollectionResponse from a JSON string +ext_check_collection_response_instance = ExtCheckCollectionResponse.from_json(json) +# print the JSON string representation of the object +print(ExtCheckCollectionResponse.to_json()) + +# convert the object into a dict +ext_check_collection_response_dict = ext_check_collection_response_instance.to_dict() +# create an instance of ExtCheckCollectionResponse from a dict +ext_check_collection_response_from_dict = ExtCheckCollectionResponse.from_dict(ext_check_collection_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExtCheckCollectionTemplateResponse.md b/docs/ExtCheckCollectionTemplateResponse.md new file mode 100644 index 00000000..c028dfca --- /dev/null +++ b/docs/ExtCheckCollectionTemplateResponse.md @@ -0,0 +1,38 @@ +# ExtCheckCollectionTemplateResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**check_collection_template_id** | **float** | Check collection template's id | +**name** | **str** | Name of the check collection template | +**description** | **str** | Description for the check collection template | +**internal** | **bool** | Is check collection only internal (not shown to the customer) | +**object_type** | **str** | Object type for which the check collection template can be used | +**check_templates** | [**List[CheckCollectionTemplatesCheckTemplates]**](CheckCollectionTemplatesCheckTemplates.md) | Check templates which are part of this collection template | +**created_date** | **datetime** | Creation date | +**modified_date** | **datetime** | Modify date | +**tenant_id** | **str** | Tenant id | +**customer_id** | **str** | Customer id | + +## Example + +```python +from pfruck_contabo.models.ext_check_collection_template_response import ExtCheckCollectionTemplateResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ExtCheckCollectionTemplateResponse from a JSON string +ext_check_collection_template_response_instance = ExtCheckCollectionTemplateResponse.from_json(json) +# print the JSON string representation of the object +print(ExtCheckCollectionTemplateResponse.to_json()) + +# convert the object into a dict +ext_check_collection_template_response_dict = ext_check_collection_template_response_instance.to_dict() +# create an instance of ExtCheckCollectionTemplateResponse from a dict +ext_check_collection_template_response_from_dict = ExtCheckCollectionTemplateResponse.from_dict(ext_check_collection_template_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExtCheckCollectionTemplatesGetResponse.md b/docs/ExtCheckCollectionTemplatesGetResponse.md new file mode 100644 index 00000000..92ccc900 --- /dev/null +++ b/docs/ExtCheckCollectionTemplatesGetResponse.md @@ -0,0 +1,30 @@ +# ExtCheckCollectionTemplatesGetResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[ExtCheckCollectionTemplateResponse]**](ExtCheckCollectionTemplateResponse.md) | | +**links** | [**SelfLinks**](SelfLinks.md) | | + +## Example + +```python +from pfruck_contabo.models.ext_check_collection_templates_get_response import ExtCheckCollectionTemplatesGetResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ExtCheckCollectionTemplatesGetResponse from a JSON string +ext_check_collection_templates_get_response_instance = ExtCheckCollectionTemplatesGetResponse.from_json(json) +# print the JSON string representation of the object +print(ExtCheckCollectionTemplatesGetResponse.to_json()) + +# convert the object into a dict +ext_check_collection_templates_get_response_dict = ext_check_collection_templates_get_response_instance.to_dict() +# create an instance of ExtCheckCollectionTemplatesGetResponse from a dict +ext_check_collection_templates_get_response_from_dict = ExtCheckCollectionTemplatesGetResponse.from_dict(ext_check_collection_templates_get_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExtCheckCollectionTemplatesListResponse.md b/docs/ExtCheckCollectionTemplatesListResponse.md new file mode 100644 index 00000000..1587ce22 --- /dev/null +++ b/docs/ExtCheckCollectionTemplatesListResponse.md @@ -0,0 +1,31 @@ +# ExtCheckCollectionTemplatesListResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**PaginationMeta**](PaginationMeta.md) | Data about pagination like how many results, pages, page size. | +**data** | [**List[ExtCheckCollectionTemplateResponse]**](ExtCheckCollectionTemplateResponse.md) | | +**links** | [**Links**](Links.md) | | + +## Example + +```python +from pfruck_contabo.models.ext_check_collection_templates_list_response import ExtCheckCollectionTemplatesListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ExtCheckCollectionTemplatesListResponse from a JSON string +ext_check_collection_templates_list_response_instance = ExtCheckCollectionTemplatesListResponse.from_json(json) +# print the JSON string representation of the object +print(ExtCheckCollectionTemplatesListResponse.to_json()) + +# convert the object into a dict +ext_check_collection_templates_list_response_dict = ext_check_collection_templates_list_response_instance.to_dict() +# create an instance of ExtCheckCollectionTemplatesListResponse from a dict +ext_check_collection_templates_list_response_from_dict = ExtCheckCollectionTemplatesListResponse.from_dict(ext_check_collection_templates_list_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExtCheckCollectionsGetResponse.md b/docs/ExtCheckCollectionsGetResponse.md new file mode 100644 index 00000000..d12e78c9 --- /dev/null +++ b/docs/ExtCheckCollectionsGetResponse.md @@ -0,0 +1,30 @@ +# ExtCheckCollectionsGetResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[ExtCheckCollectionResponse]**](ExtCheckCollectionResponse.md) | | +**links** | [**SelfLinks**](SelfLinks.md) | | + +## Example + +```python +from pfruck_contabo.models.ext_check_collections_get_response import ExtCheckCollectionsGetResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ExtCheckCollectionsGetResponse from a JSON string +ext_check_collections_get_response_instance = ExtCheckCollectionsGetResponse.from_json(json) +# print the JSON string representation of the object +print(ExtCheckCollectionsGetResponse.to_json()) + +# convert the object into a dict +ext_check_collections_get_response_dict = ext_check_collections_get_response_instance.to_dict() +# create an instance of ExtCheckCollectionsGetResponse from a dict +ext_check_collections_get_response_from_dict = ExtCheckCollectionsGetResponse.from_dict(ext_check_collections_get_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExtCheckCollectionsListResponse.md b/docs/ExtCheckCollectionsListResponse.md new file mode 100644 index 00000000..51cf897f --- /dev/null +++ b/docs/ExtCheckCollectionsListResponse.md @@ -0,0 +1,31 @@ +# ExtCheckCollectionsListResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**PaginationMeta**](PaginationMeta.md) | Data about pagination like how many results, pages, page size. | +**data** | [**List[ExtCheckCollectionResponse]**](ExtCheckCollectionResponse.md) | | +**links** | [**Links**](Links.md) | | + +## Example + +```python +from pfruck_contabo.models.ext_check_collections_list_response import ExtCheckCollectionsListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ExtCheckCollectionsListResponse from a JSON string +ext_check_collections_list_response_instance = ExtCheckCollectionsListResponse.from_json(json) +# print the JSON string representation of the object +print(ExtCheckCollectionsListResponse.to_json()) + +# convert the object into a dict +ext_check_collections_list_response_dict = ext_check_collections_list_response_instance.to_dict() +# create an instance of ExtCheckCollectionsListResponse from a dict +ext_check_collections_list_response_from_dict = ExtCheckCollectionsListResponse.from_dict(ext_check_collections_list_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExtCheckResponse.md b/docs/ExtCheckResponse.md new file mode 100644 index 00000000..7117f1ac --- /dev/null +++ b/docs/ExtCheckResponse.md @@ -0,0 +1,43 @@ +# ExtCheckResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**internal** | **bool** | Is internal (not shown to the customer) | +**status** | **str** | Status of the handle | +**object_type** | **str** | Object type to be handled | +**object_id** | **str** | ID of the object, to be handled | +**check_id** | **float** | Check's id | +**check_collection_id** | **float** | ID of check collection if started in scope of a collection | +**check_template_id** | **float** | Check Template for this check | +**name** | **str** | Name of this check template | +**note** | **str** | Note to be shown to the customer | +**internal_note** | **str** | Note which is shown only internally to the agent | +**duration_ms** | **float** | Duration of the check in milliseconds | +**created_date** | **datetime** | Creation date | +**modified_date** | **datetime** | Modify date | +**tenant_id** | **str** | Tenant id | +**customer_id** | **str** | Customer id | + +## Example + +```python +from pfruck_contabo.models.ext_check_response import ExtCheckResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ExtCheckResponse from a JSON string +ext_check_response_instance = ExtCheckResponse.from_json(json) +# print the JSON string representation of the object +print(ExtCheckResponse.to_json()) + +# convert the object into a dict +ext_check_response_dict = ext_check_response_instance.to_dict() +# create an instance of ExtCheckResponse from a dict +ext_check_response_from_dict = ExtCheckResponse.from_dict(ext_check_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExtChecksGetResponse.md b/docs/ExtChecksGetResponse.md new file mode 100644 index 00000000..732f4985 --- /dev/null +++ b/docs/ExtChecksGetResponse.md @@ -0,0 +1,30 @@ +# ExtChecksGetResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[ExtCheckResponse]**](ExtCheckResponse.md) | | +**links** | [**SelfLinks**](SelfLinks.md) | | + +## Example + +```python +from pfruck_contabo.models.ext_checks_get_response import ExtChecksGetResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ExtChecksGetResponse from a JSON string +ext_checks_get_response_instance = ExtChecksGetResponse.from_json(json) +# print the JSON string representation of the object +print(ExtChecksGetResponse.to_json()) + +# convert the object into a dict +ext_checks_get_response_dict = ext_checks_get_response_instance.to_dict() +# create an instance of ExtChecksGetResponse from a dict +ext_checks_get_response_from_dict = ExtChecksGetResponse.from_dict(ext_checks_get_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExtChecksListResponse.md b/docs/ExtChecksListResponse.md new file mode 100644 index 00000000..51cc1137 --- /dev/null +++ b/docs/ExtChecksListResponse.md @@ -0,0 +1,31 @@ +# ExtChecksListResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**PaginationMeta**](PaginationMeta.md) | Data about pagination like how many results, pages, page size. | +**data** | [**List[ExtCheckResponse]**](ExtCheckResponse.md) | | +**links** | [**Links**](Links.md) | | + +## Example + +```python +from pfruck_contabo.models.ext_checks_list_response import ExtChecksListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ExtChecksListResponse from a JSON string +ext_checks_list_response_instance = ExtChecksListResponse.from_json(json) +# print the JSON string representation of the object +print(ExtChecksListResponse.to_json()) + +# convert the object into a dict +ext_checks_list_response_dict = ext_checks_list_response_instance.to_dict() +# create an instance of ExtChecksListResponse from a dict +ext_checks_list_response_from_dict = ExtChecksListResponse.from_dict(ext_checks_list_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExtRemediesGetResponse.md b/docs/ExtRemediesGetResponse.md new file mode 100644 index 00000000..bd9c1cab --- /dev/null +++ b/docs/ExtRemediesGetResponse.md @@ -0,0 +1,30 @@ +# ExtRemediesGetResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[ExtRemedyResponse]**](ExtRemedyResponse.md) | | +**links** | [**SelfLinks**](SelfLinks.md) | | + +## Example + +```python +from pfruck_contabo.models.ext_remedies_get_response import ExtRemediesGetResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ExtRemediesGetResponse from a JSON string +ext_remedies_get_response_instance = ExtRemediesGetResponse.from_json(json) +# print the JSON string representation of the object +print(ExtRemediesGetResponse.to_json()) + +# convert the object into a dict +ext_remedies_get_response_dict = ext_remedies_get_response_instance.to_dict() +# create an instance of ExtRemediesGetResponse from a dict +ext_remedies_get_response_from_dict = ExtRemediesGetResponse.from_dict(ext_remedies_get_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExtRemediesListResponse.md b/docs/ExtRemediesListResponse.md new file mode 100644 index 00000000..f8eeafa4 --- /dev/null +++ b/docs/ExtRemediesListResponse.md @@ -0,0 +1,31 @@ +# ExtRemediesListResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**PaginationMeta**](PaginationMeta.md) | Data about pagination like how many results, pages, page size. | +**data** | [**List[ExtRemedyResponse]**](ExtRemedyResponse.md) | | +**links** | [**Links**](Links.md) | | + +## Example + +```python +from pfruck_contabo.models.ext_remedies_list_response import ExtRemediesListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ExtRemediesListResponse from a JSON string +ext_remedies_list_response_instance = ExtRemediesListResponse.from_json(json) +# print the JSON string representation of the object +print(ExtRemediesListResponse.to_json()) + +# convert the object into a dict +ext_remedies_list_response_dict = ext_remedies_list_response_instance.to_dict() +# create an instance of ExtRemediesListResponse from a dict +ext_remedies_list_response_from_dict = ExtRemediesListResponse.from_dict(ext_remedies_list_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExtRemedyResponse.md b/docs/ExtRemedyResponse.md new file mode 100644 index 00000000..01b7851d --- /dev/null +++ b/docs/ExtRemedyResponse.md @@ -0,0 +1,42 @@ +# ExtRemedyResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**internal** | **bool** | Is internal (not shown to the customer) | +**status** | **str** | Status of the handle | +**object_type** | **str** | Object type to be handled | +**object_id** | **str** | ID of the object, to be handled | +**remedy_id** | **float** | Remedy's id | +**remedy_collection_id** | **float** | ID of remedy collection if started in scope of a collection | +**remedy_template_id** | **float** | Remedy Template for this remedy | +**name** | **str** | Name of this remedy template | +**note** | **str** | Note to be shown to the customer | +**duration_ms** | **float** | Duration of the remedy in milliseconds | +**created_date** | **datetime** | Creation date | +**modified_date** | **datetime** | Modify date | +**tenant_id** | **str** | Tenant id | +**customer_id** | **str** | Customer id | + +## Example + +```python +from pfruck_contabo.models.ext_remedy_response import ExtRemedyResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ExtRemedyResponse from a JSON string +ext_remedy_response_instance = ExtRemedyResponse.from_json(json) +# print the JSON string representation of the object +print(ExtRemedyResponse.to_json()) + +# convert the object into a dict +ext_remedy_response_dict = ext_remedy_response_instance.to_dict() +# create an instance of ExtRemedyResponse from a dict +ext_remedy_response_from_dict = ExtRemedyResponse.from_dict(ext_remedy_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FindFirewallResponse.md b/docs/FindFirewallResponse.md new file mode 100644 index 00000000..03539d6a --- /dev/null +++ b/docs/FindFirewallResponse.md @@ -0,0 +1,30 @@ +# FindFirewallResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[FirewallResponse]**](FirewallResponse.md) | | +**links** | [**SelfLinks**](SelfLinks.md) | | + +## Example + +```python +from pfruck_contabo.models.find_firewall_response import FindFirewallResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of FindFirewallResponse from a JSON string +find_firewall_response_instance = FindFirewallResponse.from_json(json) +# print the JSON string representation of the object +print(FindFirewallResponse.to_json()) + +# convert the object into a dict +find_firewall_response_dict = find_firewall_response_instance.to_dict() +# create an instance of FindFirewallResponse from a dict +find_firewall_response_from_dict = FindFirewallResponse.from_dict(find_firewall_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FirewallAuditResponse.md b/docs/FirewallAuditResponse.md new file mode 100644 index 00000000..909939b8 --- /dev/null +++ b/docs/FirewallAuditResponse.md @@ -0,0 +1,39 @@ +# FirewallAuditResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | The identifier of the audit entry. | +**firewall_id** | **str** | The identifier of the Firewall | +**action** | **str** | Type of the action. | +**timestamp** | **datetime** | When the change took place. | +**tenant_id** | **str** | Customer tenant id | +**customer_id** | **str** | Customer number | +**changed_by** | **str** | User id | +**username** | **str** | User name which did the change. | +**request_id** | **str** | The requestId of the API call which led to the change. | +**trace_id** | **str** | The traceId of the API call which led to the change. | +**changes** | **object** | List of actual changes. | [optional] + +## Example + +```python +from pfruck_contabo.models.firewall_audit_response import FirewallAuditResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of FirewallAuditResponse from a JSON string +firewall_audit_response_instance = FirewallAuditResponse.from_json(json) +# print the JSON string representation of the object +print(FirewallAuditResponse.to_json()) + +# convert the object into a dict +firewall_audit_response_dict = firewall_audit_response_instance.to_dict() +# create an instance of FirewallAuditResponse from a dict +firewall_audit_response_from_dict = FirewallAuditResponse.from_dict(firewall_audit_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FirewallResponse.md b/docs/FirewallResponse.md new file mode 100644 index 00000000..bff3fa34 --- /dev/null +++ b/docs/FirewallResponse.md @@ -0,0 +1,39 @@ +# FirewallResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_id** | **str** | Your customer tenant id | +**customer_id** | **str** | Your customer number | +**firewall_id** | **str** | Your firewall id. | +**name** | **str** | The name of the firewall. | +**description** | **str** | The description of the firewall. | +**status** | **str** | Inactive status means no rules of this firewall are set for all assigned instances. | +**instance_status** | [**List[InstanceStatusRepresentation]**](InstanceStatusRepresentation.md) | | +**instances** | [**List[InstanceDetails]**](InstanceDetails.md) | | +**rules** | [**Rules**](Rules.md) | | +**created_date** | **datetime** | The creation date time for the firewall | +**updated_date** | **datetime** | The update date time for the firewall | + +## Example + +```python +from pfruck_contabo.models.firewall_response import FirewallResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of FirewallResponse from a JSON string +firewall_response_instance = FirewallResponse.from_json(json) +# print the JSON string representation of the object +print(FirewallResponse.to_json()) + +# convert the object into a dict +firewall_response_dict = firewall_response_instance.to_dict() +# create an instance of FirewallResponse from a dict +firewall_response_from_dict = FirewallResponse.from_dict(firewall_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FirewallRuleRequest.md b/docs/FirewallRuleRequest.md new file mode 100644 index 00000000..5b5f0940 --- /dev/null +++ b/docs/FirewallRuleRequest.md @@ -0,0 +1,34 @@ +# FirewallRuleRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**protocol** | **str** | Protocol for incoming traffic to be allowed. ‘tcp‘, ´udp´, ´icmp´ or ´´ empty value are allowed. Empty means any traffic. | +**dest_ports** | **List[str]** | Ports to specify allowed traffic. Not available for protocol `ICMP`. Port ranges can specified like in example. | +**src_cidr** | [**SrcCidr**](SrcCidr.md) | Source CIDR configuration. Use \"AnyIPv4\" to allow all IPv4 sources (0.0.0.0/0) or \"AnyIPv6\" to allow all IPv6 sources (::/0). Both can be combined to allow all IP sources. Regular CIDR notation is also supported. | +**action** | **str** | Currently only `accept` is supported. | +**status** | **str** | Status of the inbound rule. An inactive rule is removed from all assigned instances. | +**display_name** | **str** | Display name for the firewall rule. | [optional] + +## Example + +```python +from pfruck_contabo.models.firewall_rule_request import FirewallRuleRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of FirewallRuleRequest from a JSON string +firewall_rule_request_instance = FirewallRuleRequest.from_json(json) +# print the JSON string representation of the object +print(FirewallRuleRequest.to_json()) + +# convert the object into a dict +firewall_rule_request_dict = firewall_rule_request_instance.to_dict() +# create an instance of FirewallRuleRequest from a dict +firewall_rule_request_from_dict = FirewallRuleRequest.from_dict(firewall_rule_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FirewallRuleResponse.md b/docs/FirewallRuleResponse.md new file mode 100644 index 00000000..525db77d --- /dev/null +++ b/docs/FirewallRuleResponse.md @@ -0,0 +1,34 @@ +# FirewallRuleResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**protocol** | **str** | Protocol for incoming traffic to be allowed. ‘tcp‘, ´udp´, ´icmp´ or ´´ empty value are allowed. Empty means any traffic. | +**dest_ports** | **List[str]** | Ports to specify allowed traffic. Not available for protocol `ICMP`. Port ranges can specified like in example. | +**src_cidr** | [**SrcCidr**](SrcCidr.md) | | +**action** | **str** | Currently only `accept` is supported. | +**status** | **str** | Status of the inbound rule. An inactive rule is removed from all assigned instances. | +**display_name** | **str** | Display name for the firewall rule. | + +## Example + +```python +from pfruck_contabo.models.firewall_rule_response import FirewallRuleResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of FirewallRuleResponse from a JSON string +firewall_rule_response_instance = FirewallRuleResponse.from_json(json) +# print the JSON string representation of the object +print(FirewallRuleResponse.to_json()) + +# convert the object into a dict +firewall_rule_response_dict = firewall_rule_response_instance.to_dict() +# create an instance of FirewallRuleResponse from a dict +firewall_rule_response_from_dict = FirewallRuleResponse.from_dict(firewall_rule_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FirewallsApi.md b/docs/FirewallsApi.md new file mode 100644 index 00000000..4b83a70c --- /dev/null +++ b/docs/FirewallsApi.md @@ -0,0 +1,785 @@ +# pfruck_contabo.FirewallsApi + +All URIs are relative to *https://api.contabo.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**assign_instance_firewall**](FirewallsApi.md#assign_instance_firewall) | **POST** /v1/firewalls/{firewallId}/instances/{instanceId} | Add instance to a firewall +[**create_firewall**](FirewallsApi.md#create_firewall) | **POST** /v1/firewalls | Create a new firewall definition +[**delete_firewall**](FirewallsApi.md#delete_firewall) | **DELETE** /v1/firewalls/{firewallId} | Delete existing firewall by id +[**patch_firewall**](FirewallsApi.md#patch_firewall) | **PATCH** /v1/firewalls/{firewallId} | Update a firewall by id +[**put_firewall**](FirewallsApi.md#put_firewall) | **PUT** /v1/firewalls/{firewallId} | Update specific firewall rules +[**retrieve_firewall**](FirewallsApi.md#retrieve_firewall) | **GET** /v1/firewalls/{firewallId} | Get specific firewall by its id +[**retrieve_firewall_list**](FirewallsApi.md#retrieve_firewall_list) | **GET** /v1/firewalls | List all firewalls +[**retrieve_preset_rules**](FirewallsApi.md#retrieve_preset_rules) | **GET** /v1/firewalls/preset-rules | Get all preset rules +[**unassign_instance_firewall**](FirewallsApi.md#unassign_instance_firewall) | **DELETE** /v1/firewalls/{firewallId}/instances/{instanceId} | Remove instance from a firewall + + +# **assign_instance_firewall** +> AssignInstanceFirewallResponse assign_instance_firewall(x_request_id, firewall_id, instance_id, x_trace_id=x_trace_id) + +Add instance to a firewall + +Add a specific instance to a firewall + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.assign_instance_firewall_response import AssignInstanceFirewallResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.FirewallsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + firewall_id = 'b943b25a-c8b5-4570-9135-4bbaa7615b81' # str | The identifier of the firewall + instance_id = 100 # int | The identifier of the instance + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Add instance to a firewall + api_response = api_instance.assign_instance_firewall(x_request_id, firewall_id, instance_id, x_trace_id=x_trace_id) + print("The response of FirewallsApi->assign_instance_firewall:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FirewallsApi->assign_instance_firewall: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **firewall_id** | **str**| The identifier of the firewall | + **instance_id** | **int**| The identifier of the instance | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**AssignInstanceFirewallResponse**](AssignInstanceFirewallResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | The instance will be added to the firewall | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_firewall** +> CreateFirewallResponse create_firewall(x_request_id, create_firewall_request, x_trace_id=x_trace_id) + +Create a new firewall definition + +Create a new firewall definition by specifying its name and a set of rules. The status of the firewall determines whether the rules are active or not. + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.create_firewall_request import CreateFirewallRequest +from pfruck_contabo.models.create_firewall_response import CreateFirewallResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.FirewallsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + create_firewall_request = pfruck_contabo.CreateFirewallRequest() # CreateFirewallRequest | + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Create a new firewall definition + api_response = api_instance.create_firewall(x_request_id, create_firewall_request, x_trace_id=x_trace_id) + print("The response of FirewallsApi->create_firewall:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FirewallsApi->create_firewall: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **create_firewall_request** | [**CreateFirewallRequest**](CreateFirewallRequest.md)| | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**CreateFirewallResponse**](CreateFirewallResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | The response will be a JSON object and contains standard firewall attributes. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_firewall** +> delete_firewall(x_request_id, firewall_id, x_trace_id=x_trace_id) + +Delete existing firewall by id + +Delete existing firewall by id. A firewall cannot be deleted if there are instances attached to it. + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.FirewallsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + firewall_id = 'b943b25a-c8b5-4570-9135-4bbaa7615b81' # str | The identifier of the firewall + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Delete existing firewall by id + api_instance.delete_firewall(x_request_id, firewall_id, x_trace_id=x_trace_id) + except Exception as e: + print("Exception when calling FirewallsApi->delete_firewall: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **firewall_id** | **str**| The identifier of the firewall | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Response body has no content | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **patch_firewall** +> PatchFirewallResponse patch_firewall(x_request_id, firewall_id, patch_firewall_request, x_trace_id=x_trace_id) + +Update a firewall by id + +Update a firewall by id in your account. + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.patch_firewall_request import PatchFirewallRequest +from pfruck_contabo.models.patch_firewall_response import PatchFirewallResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.FirewallsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + firewall_id = 'b943b25a-c8b5-4570-9135-4bbaa7615b81' # str | The identifier of the firewall + patch_firewall_request = pfruck_contabo.PatchFirewallRequest() # PatchFirewallRequest | + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Update a firewall by id + api_response = api_instance.patch_firewall(x_request_id, firewall_id, patch_firewall_request, x_trace_id=x_trace_id) + print("The response of FirewallsApi->patch_firewall:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FirewallsApi->patch_firewall: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **firewall_id** | **str**| The identifier of the firewall | + **patch_firewall_request** | [**PatchFirewallRequest**](PatchFirewallRequest.md)| | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**PatchFirewallResponse**](PatchFirewallResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The response will be a JSON object and contains standard firewall attributes. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **put_firewall** +> PutFirewallResponse put_firewall(x_request_id, firewall_id, put_firewall_request, x_trace_id=x_trace_id) + +Update specific firewall rules + +Set rules for a specific firewall. Currently only inbound rules are allowed to be configured. + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.put_firewall_request import PutFirewallRequest +from pfruck_contabo.models.put_firewall_response import PutFirewallResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.FirewallsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + firewall_id = 'b943b25a-c8b5-4570-9135-4bbaa7615b81' # str | The identifier of the firewall + put_firewall_request = pfruck_contabo.PutFirewallRequest() # PutFirewallRequest | + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Update specific firewall rules + api_response = api_instance.put_firewall(x_request_id, firewall_id, put_firewall_request, x_trace_id=x_trace_id) + print("The response of FirewallsApi->put_firewall:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FirewallsApi->put_firewall: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **firewall_id** | **str**| The identifier of the firewall | + **put_firewall_request** | [**PutFirewallRequest**](PutFirewallRequest.md)| | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**PutFirewallResponse**](PutFirewallResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The response will be a JSON object which will contain a details of a firewall. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **retrieve_firewall** +> FindFirewallResponse retrieve_firewall(x_request_id, firewall_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, name=name, instance_ids=instance_ids) + +Get specific firewall by its id + +Get data for a specific firewall on your account. + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.find_firewall_response import FindFirewallResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.FirewallsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + firewall_id = 'b943b25a-c8b5-4570-9135-4bbaa7615b81' # str | The identifier of the firewall + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + page = 1 # int | Number of page to be fetched. (optional) + size = 10 # int | Number of elements per page. (optional) + order_by = ['name:asc'] # List[str] | Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. (optional) + name = 'My Firewall' # str | The name of the firewall (optional) + instance_ids = '12345,67890' # str | Comma separated instance IDs. (optional) + + try: + # Get specific firewall by its id + api_response = api_instance.retrieve_firewall(x_request_id, firewall_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, name=name, instance_ids=instance_ids) + print("The response of FirewallsApi->retrieve_firewall:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FirewallsApi->retrieve_firewall: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **firewall_id** | **str**| The identifier of the firewall | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + **page** | **int**| Number of page to be fetched. | [optional] + **size** | **int**| Number of elements per page. | [optional] + **order_by** | [**List[str]**](str.md)| Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. | [optional] + **name** | **str**| The name of the firewall | [optional] + **instance_ids** | **str**| Comma separated instance IDs. | [optional] + +### Return type + +[**FindFirewallResponse**](FindFirewallResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The response will be a JSON object which will contain a paginated list of Firewalls. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **retrieve_firewall_list** +> ListFirewallResponse retrieve_firewall_list(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, name=name, instance_ids=instance_ids) + +List all firewalls + +List and filter all firewalls on your account + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.list_firewall_response import ListFirewallResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.FirewallsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + page = 1 # int | Number of page to be fetched. (optional) + size = 10 # int | Number of elements per page. (optional) + order_by = ['name:asc'] # List[str] | Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. (optional) + name = 'My Firewall' # str | The name of the firewall (optional) + instance_ids = '12345,67890' # str | Comma separated instance IDs. (optional) + + try: + # List all firewalls + api_response = api_instance.retrieve_firewall_list(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, name=name, instance_ids=instance_ids) + print("The response of FirewallsApi->retrieve_firewall_list:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FirewallsApi->retrieve_firewall_list: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + **page** | **int**| Number of page to be fetched. | [optional] + **size** | **int**| Number of elements per page. | [optional] + **order_by** | [**List[str]**](str.md)| Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. | [optional] + **name** | **str**| The name of the firewall | [optional] + **instance_ids** | **str**| Comma separated instance IDs. | [optional] + +### Return type + +[**ListFirewallResponse**](ListFirewallResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The response will be a JSON object which will contain a paginated list of Firewalls. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **retrieve_preset_rules** +> ListPresetRulesResponse retrieve_preset_rules(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, name=name) + +Get all preset rules + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.list_preset_rules_response import ListPresetRulesResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.FirewallsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + page = 1 # int | Number of page to be fetched. (optional) + size = 10 # int | Number of elements per page. (optional) + order_by = ['name:asc'] # List[str] | Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. (optional) + name = 'SSH' # str | The name of preset rule (optional) + + try: + # Get all preset rules + api_response = api_instance.retrieve_preset_rules(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, name=name) + print("The response of FirewallsApi->retrieve_preset_rules:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FirewallsApi->retrieve_preset_rules: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + **page** | **int**| Number of page to be fetched. | [optional] + **size** | **int**| Number of elements per page. | [optional] + **order_by** | [**List[str]**](str.md)| Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. | [optional] + **name** | **str**| The name of preset rule | [optional] + +### Return type + +[**ListPresetRulesResponse**](ListPresetRulesResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The response will be a JSON object which will contain a list of preset rules. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **unassign_instance_firewall** +> UnassignInstanceFirewallResponse unassign_instance_firewall(x_request_id, firewall_id, instance_id, x_trace_id=x_trace_id) + +Remove instance from a firewall + +Remove a specific instance from a firewall + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.unassign_instance_firewall_response import UnassignInstanceFirewallResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.FirewallsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + firewall_id = 'b943b25a-c8b5-4570-9135-4bbaa7615b81' # str | The identifier of the firewall + instance_id = 100 # int | The identifier of the instance + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Remove instance from a firewall + api_response = api_instance.unassign_instance_firewall(x_request_id, firewall_id, instance_id, x_trace_id=x_trace_id) + print("The response of FirewallsApi->unassign_instance_firewall:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FirewallsApi->unassign_instance_firewall: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **firewall_id** | **str**| The identifier of the firewall | + **instance_id** | **int**| The identifier of the instance | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**UnassignInstanceFirewallResponse**](UnassignInstanceFirewallResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The instance will be removed from the firewall | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/FirewallsAuditsApi.md b/docs/FirewallsAuditsApi.md new file mode 100644 index 00000000..8571ff6b --- /dev/null +++ b/docs/FirewallsAuditsApi.md @@ -0,0 +1,105 @@ +# pfruck_contabo.FirewallsAuditsApi + +All URIs are relative to *https://api.contabo.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**retrieve_firewall_audits_list**](FirewallsAuditsApi.md#retrieve_firewall_audits_list) | **GET** /v1/firewalls/audits | List history about your Firewalls (audit) + + +# **retrieve_firewall_audits_list** +> ListFirewallAuditResponse retrieve_firewall_audits_list(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, firewall_id=firewall_id, request_id=request_id, changed_by=changed_by, start_date=start_date, end_date=end_date) + +List history about your Firewalls (audit) + +List and filters the history about your Firewalls. + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.list_firewall_audit_response import ListFirewallAuditResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.FirewallsAuditsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + page = 1 # int | Number of page to be fetched. (optional) + size = 10 # int | Number of elements per page. (optional) + order_by = ['name:asc'] # List[str] | Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. (optional) + firewall_id = '1b943b25a-c8b5-4570-9135-4bbaa7615b812345' # str | The identifier of the Firewall. (optional) + request_id = 'D5FD9FAF-58C0-4406-8F46-F449B8E4FEC3' # str | The requestId of the API call which led to the change. (optional) + changed_by = '23cbb6d6-cb11-4330-bdff-7bb791df2e23' # str | User name which did the change. (optional) + start_date = 'Fri Jan 01 00:00:00 UTC 2021' # date | Start of search time range. (optional) + end_date = 'Fri Jan 01 00:00:00 UTC 2021' # date | End of search time range. (optional) + + try: + # List history about your Firewalls (audit) + api_response = api_instance.retrieve_firewall_audits_list(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, firewall_id=firewall_id, request_id=request_id, changed_by=changed_by, start_date=start_date, end_date=end_date) + print("The response of FirewallsAuditsApi->retrieve_firewall_audits_list:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FirewallsAuditsApi->retrieve_firewall_audits_list: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + **page** | **int**| Number of page to be fetched. | [optional] + **size** | **int**| Number of elements per page. | [optional] + **order_by** | [**List[str]**](str.md)| Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. | [optional] + **firewall_id** | **str**| The identifier of the Firewall. | [optional] + **request_id** | **str**| The requestId of the API call which led to the change. | [optional] + **changed_by** | **str**| User name which did the change. | [optional] + **start_date** | **date**| Start of search time range. | [optional] + **end_date** | **date**| End of search time range. | [optional] + +### Return type + +[**ListFirewallAuditResponse**](ListFirewallAuditResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The response will be a JSON object and contains a paginated list of Firewalls audits. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/HandleAddress.md b/docs/HandleAddress.md new file mode 100644 index 00000000..e018c775 --- /dev/null +++ b/docs/HandleAddress.md @@ -0,0 +1,35 @@ +# HandleAddress + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**street** | **str** | Street | +**street_number** | **str** | Street Number | +**city** | **str** | City | +**country** | **str** | Country | +**zip_code** | **str** | ZipCode | +**siret** | **str** | Siret | [optional] +**region** | **str** | Region | [optional] + +## Example + +```python +from pfruck_contabo.models.handle_address import HandleAddress + +# TODO update the JSON string below +json = "{}" +# create an instance of HandleAddress from a JSON string +handle_address_instance = HandleAddress.from_json(json) +# print the JSON string representation of the object +print(HandleAddress.to_json()) + +# convert the object into a dict +handle_address_dict = handle_address_instance.to_dict() +# create an instance of HandleAddress from a dict +handle_address_from_dict = HandleAddress.from_dict(handle_address_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/HandleAuditResponse.md b/docs/HandleAuditResponse.md new file mode 100644 index 00000000..eb677510 --- /dev/null +++ b/docs/HandleAuditResponse.md @@ -0,0 +1,31 @@ +# HandleAuditResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**PaginationMeta**](PaginationMeta.md) | Data about pagination like how many results, pages, page size. | +**data** | [**List[HandleAuditResponseData]**](HandleAuditResponseData.md) | | +**links** | [**Links**](Links.md) | | + +## Example + +```python +from pfruck_contabo.models.handle_audit_response import HandleAuditResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of HandleAuditResponse from a JSON string +handle_audit_response_instance = HandleAuditResponse.from_json(json) +# print the JSON string representation of the object +print(HandleAuditResponse.to_json()) + +# convert the object into a dict +handle_audit_response_dict = handle_audit_response_instance.to_dict() +# create an instance of HandleAuditResponse from a dict +handle_audit_response_from_dict = HandleAuditResponse.from_dict(handle_audit_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/HandleAuditResponseData.md b/docs/HandleAuditResponseData.md new file mode 100644 index 00000000..ca74e53c --- /dev/null +++ b/docs/HandleAuditResponseData.md @@ -0,0 +1,39 @@ +# HandleAuditResponseData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | The ID of the audit entry. | +**action** | **str** | Type of the action. | +**timestamp** | **datetime** | When the change took place. | +**tenant_id** | **str** | Customer tenant id | +**customer_id** | **str** | Customer ID | +**changed_by** | **str** | Id of user who performed the change | +**username** | **str** | Name of the user which led to the change. | +**request_id** | **str** | The requestId of the API call which led to the change. | +**trace_id** | **str** | The traceId of the API call which led to the change. | +**handle_id** | **str** | The identifier of the handle | +**changes** | **object** | List of actual changes. | [optional] + +## Example + +```python +from pfruck_contabo.models.handle_audit_response_data import HandleAuditResponseData + +# TODO update the JSON string below +json = "{}" +# create an instance of HandleAuditResponseData from a JSON string +handle_audit_response_data_instance = HandleAuditResponseData.from_json(json) +# print the JSON string representation of the object +print(HandleAuditResponseData.to_json()) + +# convert the object into a dict +handle_audit_response_data_dict = handle_audit_response_data_instance.to_dict() +# create an instance of HandleAuditResponseData from a dict +handle_audit_response_data_from_dict = HandleAuditResponseData.from_dict(handle_audit_response_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/HandleBirthInfo.md b/docs/HandleBirthInfo.md new file mode 100644 index 00000000..ad11af2a --- /dev/null +++ b/docs/HandleBirthInfo.md @@ -0,0 +1,32 @@ +# HandleBirthInfo + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_date** | **datetime** | Date | [optional] +**city** | **str** | City | [optional] +**zip_code** | **str** | Zipcode | [optional] +**country** | **str** | Country | [optional] + +## Example + +```python +from pfruck_contabo.models.handle_birth_info import HandleBirthInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of HandleBirthInfo from a JSON string +handle_birth_info_instance = HandleBirthInfo.from_json(json) +# print the JSON string representation of the object +print(HandleBirthInfo.to_json()) + +# convert the object into a dict +handle_birth_info_dict = handle_birth_info_instance.to_dict() +# create an instance of HandleBirthInfo from a dict +handle_birth_info_from_dict = HandleBirthInfo.from_dict(handle_birth_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/HandleCreateRequest.md b/docs/HandleCreateRequest.md new file mode 100644 index 00000000..53a8cf3c --- /dev/null +++ b/docs/HandleCreateRequest.md @@ -0,0 +1,38 @@ +# HandleCreateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**handle_type** | **str** | The type of the handle | +**first_name** | **str** | Handle first name | +**last_name** | **str** | Handle last name | +**organization** | **str** | The organization of the handle | [optional] +**email** | **str** | Handle email | +**gender** | **str** | Handle gender | +**birth_info** | [**HandleBirthInfo**](HandleBirthInfo.md) | The birth info of the handle | [optional] +**address** | [**HandleAddress**](HandleAddress.md) | Address details for handle | +**phone** | [**HandlePhone**](HandlePhone.md) | Handle phone | +**fax** | [**HandlePhone**](HandlePhone.md) | Handle fax | [optional] + +## Example + +```python +from pfruck_contabo.models.handle_create_request import HandleCreateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of HandleCreateRequest from a JSON string +handle_create_request_instance = HandleCreateRequest.from_json(json) +# print the JSON string representation of the object +print(HandleCreateRequest.to_json()) + +# convert the object into a dict +handle_create_request_dict = handle_create_request_instance.to_dict() +# create an instance of HandleCreateRequest from a dict +handle_create_request_from_dict = HandleCreateRequest.from_dict(handle_create_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/HandleCreateResponse.md b/docs/HandleCreateResponse.md new file mode 100644 index 00000000..c44922b7 --- /dev/null +++ b/docs/HandleCreateResponse.md @@ -0,0 +1,30 @@ +# HandleCreateResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[HandleResponse]**](HandleResponse.md) | | +**links** | [**SelfLinks**](SelfLinks.md) | | + +## Example + +```python +from pfruck_contabo.models.handle_create_response import HandleCreateResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of HandleCreateResponse from a JSON string +handle_create_response_instance = HandleCreateResponse.from_json(json) +# print the JSON string representation of the object +print(HandleCreateResponse.to_json()) + +# convert the object into a dict +handle_create_response_dict = handle_create_response_instance.to_dict() +# create an instance of HandleCreateResponse from a dict +handle_create_response_from_dict = HandleCreateResponse.from_dict(handle_create_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/HandleFindResponse.md b/docs/HandleFindResponse.md new file mode 100644 index 00000000..3f0688fb --- /dev/null +++ b/docs/HandleFindResponse.md @@ -0,0 +1,30 @@ +# HandleFindResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[HandleResponse]**](HandleResponse.md) | | +**links** | [**SelfLinks**](SelfLinks.md) | | + +## Example + +```python +from pfruck_contabo.models.handle_find_response import HandleFindResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of HandleFindResponse from a JSON string +handle_find_response_instance = HandleFindResponse.from_json(json) +# print the JSON string representation of the object +print(HandleFindResponse.to_json()) + +# convert the object into a dict +handle_find_response_dict = handle_find_response_instance.to_dict() +# create an instance of HandleFindResponse from a dict +handle_find_response_from_dict = HandleFindResponse.from_dict(handle_find_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/HandleListResponse.md b/docs/HandleListResponse.md new file mode 100644 index 00000000..58f86c06 --- /dev/null +++ b/docs/HandleListResponse.md @@ -0,0 +1,31 @@ +# HandleListResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**PaginationMeta**](PaginationMeta.md) | Data about pagination like how many results, pages, page size. | +**data** | [**List[HandleResponse]**](HandleResponse.md) | | +**links** | [**Links**](Links.md) | | + +## Example + +```python +from pfruck_contabo.models.handle_list_response import HandleListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of HandleListResponse from a JSON string +handle_list_response_instance = HandleListResponse.from_json(json) +# print the JSON string representation of the object +print(HandleListResponse.to_json()) + +# convert the object into a dict +handle_list_response_dict = handle_list_response_instance.to_dict() +# create an instance of HandleListResponse from a dict +handle_list_response_from_dict = HandleListResponse.from_dict(handle_list_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/HandlePatchRequest.md b/docs/HandlePatchRequest.md new file mode 100644 index 00000000..77ab3c8b --- /dev/null +++ b/docs/HandlePatchRequest.md @@ -0,0 +1,34 @@ +# HandlePatchRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Handle email | +**gender** | **str** | Handle gender | +**birth_info** | [**HandleBirthInfo**](HandleBirthInfo.md) | The birth info of the handle | [optional] +**address** | [**HandleAddress**](HandleAddress.md) | Address details for handle | +**phone** | [**HandlePhone**](HandlePhone.md) | Handle phone | +**fax** | [**HandlePhone**](HandlePhone.md) | Handle fax | [optional] + +## Example + +```python +from pfruck_contabo.models.handle_patch_request import HandlePatchRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of HandlePatchRequest from a JSON string +handle_patch_request_instance = HandlePatchRequest.from_json(json) +# print the JSON string representation of the object +print(HandlePatchRequest.to_json()) + +# convert the object into a dict +handle_patch_request_dict = handle_patch_request_instance.to_dict() +# create an instance of HandlePatchRequest from a dict +handle_patch_request_from_dict = HandlePatchRequest.from_dict(handle_patch_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/HandlePatchResponse.md b/docs/HandlePatchResponse.md new file mode 100644 index 00000000..6bb74d56 --- /dev/null +++ b/docs/HandlePatchResponse.md @@ -0,0 +1,30 @@ +# HandlePatchResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[HandleResponse]**](HandleResponse.md) | | +**links** | [**SelfLinks**](SelfLinks.md) | | + +## Example + +```python +from pfruck_contabo.models.handle_patch_response import HandlePatchResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of HandlePatchResponse from a JSON string +handle_patch_response_instance = HandlePatchResponse.from_json(json) +# print the JSON string representation of the object +print(HandlePatchResponse.to_json()) + +# convert the object into a dict +handle_patch_response_dict = handle_patch_response_instance.to_dict() +# create an instance of HandlePatchResponse from a dict +handle_patch_response_from_dict = HandlePatchResponse.from_dict(handle_patch_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/HandlePhone.md b/docs/HandlePhone.md new file mode 100644 index 00000000..c4eb8ab3 --- /dev/null +++ b/docs/HandlePhone.md @@ -0,0 +1,30 @@ +# HandlePhone + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**prefix** | **str** | prefix | +**number** | **str** | number | + +## Example + +```python +from pfruck_contabo.models.handle_phone import HandlePhone + +# TODO update the JSON string below +json = "{}" +# create an instance of HandlePhone from a JSON string +handle_phone_instance = HandlePhone.from_json(json) +# print the JSON string representation of the object +print(HandlePhone.to_json()) + +# convert the object into a dict +handle_phone_dict = handle_phone_instance.to_dict() +# create an instance of HandlePhone from a dict +handle_phone_from_dict = HandlePhone.from_dict(handle_phone_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/HandleResponse.md b/docs/HandleResponse.md new file mode 100644 index 00000000..fa49d12a --- /dev/null +++ b/docs/HandleResponse.md @@ -0,0 +1,42 @@ +# HandleResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_id** | **str** | Your customer tenant id | +**customer_id** | **str** | Your customer number | +**handle_id** | **str** | Handle ID | +**handle_type** | **str** | Handle Type | +**is_default** | **bool** | Flag if the handle is default or not | +**first_name** | **str** | Handle first name | +**last_name** | **str** | Handle last name | +**organization** | **str** | The organization of the handle | [optional] +**email** | **str** | Handle email | +**gender** | **str** | Handle gender | +**birth_info** | [**HandleBirthInfo**](HandleBirthInfo.md) | The birth info of the handle | [optional] +**address** | [**HandleAddress**](HandleAddress.md) | Address details for handle | +**phone** | [**HandlePhone**](HandlePhone.md) | Handle phone | +**fax** | [**HandlePhone**](HandlePhone.md) | Handle fax | [optional] + +## Example + +```python +from pfruck_contabo.models.handle_response import HandleResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of HandleResponse from a JSON string +handle_response_instance = HandleResponse.from_json(json) +# print the JSON string representation of the object +print(HandleResponse.to_json()) + +# convert the object into a dict +handle_response_dict = handle_response_instance.to_dict() +# create an instance of HandleResponse from a dict +handle_response_from_dict = HandleResponse.from_dict(handle_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/HandlesApi.md b/docs/HandlesApi.md new file mode 100644 index 00000000..6acd3ae7 --- /dev/null +++ b/docs/HandlesApi.md @@ -0,0 +1,525 @@ +# pfruck_contabo.HandlesApi + +All URIs are relative to *https://api.contabo.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_handle**](HandlesApi.md#create_handle) | **POST** /v1/domains/handles | Create specific handle +[**list_handles**](HandlesApi.md#list_handles) | **GET** /v1/domains/handles | List all handles +[**remove_handle**](HandlesApi.md#remove_handle) | **DELETE** /v1/domains/handles/{handleId} | Remove specific handle +[**retrieve_handle**](HandlesApi.md#retrieve_handle) | **GET** /v1/domains/handles/{handleId} | Get specific handle +[**set_default_handle**](HandlesApi.md#set_default_handle) | **PATCH** /v1/domains/handles/{handleId}/default | Set default handle +[**update_handle**](HandlesApi.md#update_handle) | **PUT** /v1/domains/handles/{handleId} | Update specific handle + + +# **create_handle** +> HandleCreateResponse create_handle(x_request_id, handle_create_request, x_trace_id=x_trace_id) + +Create specific handle + +Create specific handle + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.handle_create_request import HandleCreateRequest +from pfruck_contabo.models.handle_create_response import HandleCreateResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.HandlesApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + handle_create_request = pfruck_contabo.HandleCreateRequest() # HandleCreateRequest | + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Create specific handle + api_response = api_instance.create_handle(x_request_id, handle_create_request, x_trace_id=x_trace_id) + print("The response of HandlesApi->create_handle:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HandlesApi->create_handle: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **handle_create_request** | [**HandleCreateRequest**](HandleCreateRequest.md)| | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**HandleCreateResponse**](HandleCreateResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | The response will be a JSON object and contains standard handle attributes | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_handles** +> HandleListResponse list_handles(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, name=name, show_defaults=show_defaults, search=search, countries=countries, handle_type=handle_type, first_name=first_name, last_name=last_name) + +List all handles + +List and filter all your handles + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.handle_list_response import HandleListResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.HandlesApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + page = 1 # int | Number of page to be fetched. (optional) + size = 10 # int | Number of elements per page. (optional) + order_by = ['name:asc'] # List[str] | Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. (optional) + name = 'MyHandle' # str | Filter as substring match for handle name. (optional) + show_defaults = true # bool | Filter handles to show or not the public handles (optional) + search = 'hello' # str | full text search on handles on handleid, organization name, handlename (optional) + countries = 'DE,US' # str | list of country codes to filter handles that are available in these countries (comma separated) (optional) + handle_type = 'person' # str | Filter handles by type, e.g. person, organization. (optional) + first_name = 'FirstName' # str | Filter handles by first name. (optional) + last_name = 'LastName' # str | Filter handles by last name. (optional) + + try: + # List all handles + api_response = api_instance.list_handles(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, name=name, show_defaults=show_defaults, search=search, countries=countries, handle_type=handle_type, first_name=first_name, last_name=last_name) + print("The response of HandlesApi->list_handles:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HandlesApi->list_handles: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + **page** | **int**| Number of page to be fetched. | [optional] + **size** | **int**| Number of elements per page. | [optional] + **order_by** | [**List[str]**](str.md)| Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. | [optional] + **name** | **str**| Filter as substring match for handle name. | [optional] + **show_defaults** | **bool**| Filter handles to show or not the public handles | [optional] + **search** | **str**| full text search on handles on handleid, organization name, handlename | [optional] + **countries** | **str**| list of country codes to filter handles that are available in these countries (comma separated) | [optional] + **handle_type** | **str**| Filter handles by type, e.g. person, organization. | [optional] + **first_name** | **str**| Filter handles by first name. | [optional] + **last_name** | **str**| Filter handles by last name. | [optional] + +### Return type + +[**HandleListResponse**](HandleListResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The response will be a JSON object and contains standard handles attributes | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **remove_handle** +> remove_handle(x_request_id, handle_id, x_trace_id=x_trace_id) + +Remove specific handle + +Remove specific handle + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.HandlesApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + handle_id = 'CA123O1' # str | The identifier of the handle + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Remove specific handle + api_instance.remove_handle(x_request_id, handle_id, x_trace_id=x_trace_id) + except Exception as e: + print("Exception when calling HandlesApi->remove_handle: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **handle_id** | **str**| The identifier of the handle | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Response body has no content | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **retrieve_handle** +> HandleFindResponse retrieve_handle(x_request_id, handle_id, x_trace_id=x_trace_id) + +Get specific handle + +Get specific handle + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.handle_find_response import HandleFindResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.HandlesApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + handle_id = 'CA123O1' # str | The identifier of the handle + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Get specific handle + api_response = api_instance.retrieve_handle(x_request_id, handle_id, x_trace_id=x_trace_id) + print("The response of HandlesApi->retrieve_handle:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HandlesApi->retrieve_handle: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **handle_id** | **str**| The identifier of the handle | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**HandleFindResponse**](HandleFindResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The response will be a JSON object and contains standard handle attributes | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **set_default_handle** +> SetDefaultHandleResponse set_default_handle(x_request_id, handle_id, x_trace_id=x_trace_id) + +Set default handle + +Set default handle + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.set_default_handle_response import SetDefaultHandleResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.HandlesApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + handle_id = 'CA123O1' # str | The identifier of the handle + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Set default handle + api_response = api_instance.set_default_handle(x_request_id, handle_id, x_trace_id=x_trace_id) + print("The response of HandlesApi->set_default_handle:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HandlesApi->set_default_handle: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **handle_id** | **str**| The identifier of the handle | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**SetDefaultHandleResponse**](SetDefaultHandleResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The response will be a JSON object which will contain a details of a handle. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_handle** +> HandlePatchResponse update_handle(x_request_id, handle_id, handle_patch_request, x_trace_id=x_trace_id) + +Update specific handle + +Update specific handle + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.handle_patch_request import HandlePatchRequest +from pfruck_contabo.models.handle_patch_response import HandlePatchResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.HandlesApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + handle_id = 'CA123O1' # str | The identifier of the handle + handle_patch_request = pfruck_contabo.HandlePatchRequest() # HandlePatchRequest | + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Update specific handle + api_response = api_instance.update_handle(x_request_id, handle_id, handle_patch_request, x_trace_id=x_trace_id) + print("The response of HandlesApi->update_handle:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HandlesApi->update_handle: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **handle_id** | **str**| The identifier of the handle | + **handle_patch_request** | [**HandlePatchRequest**](HandlePatchRequest.md)| | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**HandlePatchResponse**](HandlePatchResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Updated | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/HandlesAuditsApi.md b/docs/HandlesAuditsApi.md new file mode 100644 index 00000000..3c00874c --- /dev/null +++ b/docs/HandlesAuditsApi.md @@ -0,0 +1,105 @@ +# pfruck_contabo.HandlesAuditsApi + +All URIs are relative to *https://api.contabo.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**retrieve_handles_audits_list**](HandlesAuditsApi.md#retrieve_handles_audits_list) | **GET** /v1/domains/handles/audits | List history about your handles (audit) + + +# **retrieve_handles_audits_list** +> HandleAuditResponse retrieve_handles_audits_list(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, handle_id=handle_id, request_id=request_id, changed_by=changed_by, start_date=start_date, end_date=end_date) + +List history about your handles (audit) + +List and filters the history about your handles. + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.handle_audit_response import HandleAuditResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.HandlesAuditsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + page = 1 # int | Number of page to be fetched. (optional) + size = 10 # int | Number of elements per page. (optional) + order_by = ['name:asc'] # List[str] | Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. (optional) + handle_id = 'CA123O1' # str | The identifier of the handle. (optional) + request_id = 'D5FD9FAF-58C0-4406-8F46-F449B8E4FEC3' # str | The requestId of the API call which led to the change. (optional) + changed_by = '23cbb6d6-cb11-4330-bdff-7bb791df2e23' # str | UserId of the user which led to the change. (optional) + start_date = 'Wed Jun 02 00:00:00 UTC 2021' # date | Start of search time range. (optional) + end_date = 'Wed Jun 02 00:00:00 UTC 2021' # date | End of search time range. (optional) + + try: + # List history about your handles (audit) + api_response = api_instance.retrieve_handles_audits_list(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, handle_id=handle_id, request_id=request_id, changed_by=changed_by, start_date=start_date, end_date=end_date) + print("The response of HandlesAuditsApi->retrieve_handles_audits_list:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HandlesAuditsApi->retrieve_handles_audits_list: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + **page** | **int**| Number of page to be fetched. | [optional] + **size** | **int**| Number of elements per page. | [optional] + **order_by** | [**List[str]**](str.md)| Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. | [optional] + **handle_id** | **str**| The identifier of the handle. | [optional] + **request_id** | **str**| The requestId of the API call which led to the change. | [optional] + **changed_by** | **str**| UserId of the user which led to the change. | [optional] + **start_date** | **date**| Start of search time range. | [optional] + **end_date** | **date**| End of search time range. | [optional] + +### Return type + +[**HandleAuditResponse**](HandleAuditResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The response will be a JSON object and contains a paginated list of handles audits. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ImagesApi.md b/docs/ImagesApi.md index 88a69a8c..3c19ec71 100644 --- a/docs/ImagesApi.md +++ b/docs/ImagesApi.md @@ -338,7 +338,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **retrieve_image_list** -> ListImageResponse retrieve_image_list(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, name=name, standard_image=standard_image) +> ListImageResponse retrieve_image_list(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, name=name, standard_image=standard_image, search=search) List available standard and custom images @@ -381,10 +381,11 @@ with pfruck_contabo.ApiClient(configuration) as api_client: order_by = ['name:asc'] # List[str] | Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. (optional) name = 'Ubuntu' # str | The name of the image (optional) standard_image = true # bool | Flag indicating that image is either a standard (true) or a custom image (false) (optional) + search = 'windows or Debian' # str | full text search on image name or image os type (optional) try: # List available standard and custom images - api_response = api_instance.retrieve_image_list(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, name=name, standard_image=standard_image) + api_response = api_instance.retrieve_image_list(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, name=name, standard_image=standard_image, search=search) print("The response of ImagesApi->retrieve_image_list:\n") pprint(api_response) except Exception as e: @@ -405,6 +406,7 @@ Name | Type | Description | Notes **order_by** | [**List[str]**](str.md)| Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. | [optional] **name** | **str**| The name of the image | [optional] **standard_image** | **bool**| Flag indicating that image is either a standard (true) or a custom image (false) | [optional] + **search** | **str**| full text search on image name or image os type | [optional] ### Return type diff --git a/docs/ImagesAuditsApi.md b/docs/ImagesAuditsApi.md index 351afa8e..44b22ea5 100644 --- a/docs/ImagesAuditsApi.md +++ b/docs/ImagesAuditsApi.md @@ -52,8 +52,8 @@ with pfruck_contabo.ApiClient(configuration) as api_client: image_id = 'e443eab5-647a-4bc3-b4f9-16f5a281224d' # str | The identifier of the image. (optional) request_id = 'D5FD9FAF-58C0-4406-8F46-F449B8E4FEC3' # str | The requestId of the API call which led to the change. (optional) changed_by = '23cbb6d6-cb11-4330-bdff-7bb791df2e23' # str | UserId of the user which led to the change. (optional) - start_date = '2021-06-02' # date | Start of search time range. (optional) - end_date = '2021-06-02' # date | End of search time range. (optional) + start_date = 'Wed Jun 02 00:00:00 UTC 2021' # date | Start of search time range. (optional) + end_date = 'Wed Jun 02 00:00:00 UTC 2021' # date | End of search time range. (optional) try: # List history about your custom images (audit) diff --git a/docs/InstanceActionsAuditsApi.md b/docs/InstanceActionsAuditsApi.md index 8d1a0a5a..b3b0b4ea 100644 --- a/docs/InstanceActionsAuditsApi.md +++ b/docs/InstanceActionsAuditsApi.md @@ -52,8 +52,8 @@ with pfruck_contabo.ApiClient(configuration) as api_client: instance_id = 12345 # int | The identifier of the instancesActions. (optional) request_id = 'D5FD9FAF-58C0-4406-8F46-F449B8E4FEC3' # str | The requestId of the API call which led to the change. (optional) changed_by = '23cbb6d6-cb11-4330-bdff-7bb791df2e23' # str | changedBy of the user which led to the change. (optional) - start_date = '2021-06-02' # date | Start of search time range. (optional) - end_date = '2021-06-02' # date | End of search time range. (optional) + start_date = 'Wed Jun 02 00:00:00 UTC 2021' # date | Start of search time range. (optional) + end_date = 'Wed Jun 02 00:00:00 UTC 2021' # date | End of search time range. (optional) try: # List history about your actions (audit) triggered via the API diff --git a/docs/InstanceAssignmentSelfLinks1.md b/docs/InstanceAssignmentSelfLinks1.md new file mode 100644 index 00000000..34b91dce --- /dev/null +++ b/docs/InstanceAssignmentSelfLinks1.md @@ -0,0 +1,31 @@ +# InstanceAssignmentSelfLinks1 + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_self** | **str** | Link to current resource. | +**firewall** | **str** | Link to related firewall. | +**instance** | **str** | Link to assigned instance. | + +## Example + +```python +from pfruck_contabo.models.instance_assignment_self_links1 import InstanceAssignmentSelfLinks1 + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceAssignmentSelfLinks1 from a JSON string +instance_assignment_self_links1_instance = InstanceAssignmentSelfLinks1.from_json(json) +# print the JSON string representation of the object +print(InstanceAssignmentSelfLinks1.to_json()) + +# convert the object into a dict +instance_assignment_self_links1_dict = instance_assignment_self_links1_instance.to_dict() +# create an instance of InstanceAssignmentSelfLinks1 from a dict +instance_assignment_self_links1_from_dict = InstanceAssignmentSelfLinks1.from_dict(instance_assignment_self_links1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstanceDetails.md b/docs/InstanceDetails.md new file mode 100644 index 00000000..f0138322 --- /dev/null +++ b/docs/InstanceDetails.md @@ -0,0 +1,37 @@ +# InstanceDetails + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**instance_id** | **int** | Instance id which is assigned to firewall | +**display_name** | **str** | Instance display name | +**name** | **str** | Instance name | +**product_id** | **str** | Product id | +**ip_config** | [**IpConfig1**](IpConfig1.md) | | +**region_slug** | **str** | Slug of the region where the instance is located. | +**region_name** | **str** | Name of the region where the instance is located. | +**data_center_slug** | **str** | Slug of the data center where the instance is located. | +**data_center_name** | **str** | Name of the data center where the instance is located. | + +## Example + +```python +from pfruck_contabo.models.instance_details import InstanceDetails + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceDetails from a JSON string +instance_details_instance = InstanceDetails.from_json(json) +# print the JSON string representation of the object +print(InstanceDetails.to_json()) + +# convert the object into a dict +instance_details_dict = instance_details_instance.to_dict() +# create an instance of InstanceDetails from a dict +instance_details_from_dict = InstanceDetails.from_dict(instance_details_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstanceResponse.md b/docs/InstanceResponse.md index f79947b8..c73ab9ae 100644 --- a/docs/InstanceResponse.md +++ b/docs/InstanceResponse.md @@ -16,7 +16,7 @@ Name | Type | Description | Notes **region_name** | **str** | The name of the region where the instance is located. | **product_id** | **str** | Product ID | **image_id** | **str** | Image's id | -**ip_config** | [**IpConfig**](IpConfig.md) | | +**ip_config** | [**IpConfig2**](IpConfig2.md) | | **mac_address** | **str** | MAC Address | **ram_mb** | **float** | Image RAM size in MB | **cpu_cores** | **int** | CPU core count | @@ -25,7 +25,7 @@ Name | Type | Description | Notes **ssh_keys** | **List[int]** | Array of `secretId`s of public SSH keys for logging into as `defaultUser` with administrator/root privileges. Applies to Linux/BSD systems. Please refer to Secrets Management API. | **created_date** | **datetime** | The creation date for the instance | **cancel_date** | **date** | The date on which the instance will be cancelled | -**status** | [**InstanceStatus**](InstanceStatus.md) | | +**status** | [**InstanceStatus**](InstanceStatus.md) | Instance's status | **v_host_id** | **int** | ID of host system | **v_host_number** | **int** | Number of host system | **v_host_name** | **str** | Name of host system | @@ -34,6 +34,7 @@ Name | Type | Description | Notes **product_type** | **str** | Instance's category depending on Product Id | **product_name** | **str** | Instance's Product Name | **default_user** | **str** | Default user name created for login during (re-)installation with administrative privileges. Allowed values for Linux/BSD are `admin` (use sudo to apply administrative privileges like root) or `root`. Allowed values for Windows are `admin` (has administrative privileges like administrator) or `administrator`. | [optional] +**application_id** | **str** | Application ID | ## Example diff --git a/docs/InstanceStatus.md b/docs/InstanceStatus.md index d3854711..2957fbfd 100644 --- a/docs/InstanceStatus.md +++ b/docs/InstanceStatus.md @@ -1,5 +1,6 @@ # InstanceStatus +Instance's status ## Properties diff --git a/docs/InstanceStatusRepresentation.md b/docs/InstanceStatusRepresentation.md new file mode 100644 index 00000000..efbf4d30 --- /dev/null +++ b/docs/InstanceStatusRepresentation.md @@ -0,0 +1,31 @@ +# InstanceStatusRepresentation + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**instance_id** | **int** | Instance id which is assigned to the firewall. | +**status** | **str** | Instance status in firewall can be:<br/> `ok` - instance was successfully assigned <br/> `processing` - creating firewall rules <br/> `deleting` - deleting firewall rules <br/> `error_processing` - error occurred while creating firewall rules <br/> `error_deleting` - error occurred while deleting firewall rules | +**error_message** | **str** | More detailed error message in case of error status. | [optional] + +## Example + +```python +from pfruck_contabo.models.instance_status_representation import InstanceStatusRepresentation + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceStatusRepresentation from a JSON string +instance_status_representation_instance = InstanceStatusRepresentation.from_json(json) +# print the JSON string representation of the object +print(InstanceStatusRepresentation.to_json()) + +# convert the object into a dict +instance_status_representation_dict = instance_status_representation_instance.to_dict() +# create an instance of InstanceStatusRepresentation from a dict +instance_status_representation_from_dict = InstanceStatusRepresentation.from_dict(instance_status_representation_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstancesApi.md b/docs/InstancesApi.md index 57139e4e..a50e997b 100644 --- a/docs/InstancesApi.md +++ b/docs/InstancesApi.md @@ -14,7 +14,7 @@ Method | HTTP request | Description # **cancel_instance** -> CancelInstanceResponse cancel_instance(x_request_id, instance_id, body, x_trace_id=x_trace_id) +> CancelInstanceResponse cancel_instance(x_request_id, instance_id, cancel_instance_request, x_trace_id=x_trace_id) Cancel specific instance by id @@ -26,6 +26,7 @@ Your are free to cancel a previously created instance at any time. ```python import pfruck_contabo +from pfruck_contabo.models.cancel_instance_request import CancelInstanceRequest from pfruck_contabo.models.cancel_instance_response import CancelInstanceResponse from pfruck_contabo.rest import ApiException from pprint import pprint @@ -52,12 +53,12 @@ with pfruck_contabo.ApiClient(configuration) as api_client: api_instance = pfruck_contabo.InstancesApi(api_client) x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. instance_id = 12345 # int | The identifier of the instance - body = None # object | + cancel_instance_request = pfruck_contabo.CancelInstanceRequest() # CancelInstanceRequest | x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) try: # Cancel specific instance by id - api_response = api_instance.cancel_instance(x_request_id, instance_id, body, x_trace_id=x_trace_id) + api_response = api_instance.cancel_instance(x_request_id, instance_id, cancel_instance_request, x_trace_id=x_trace_id) print("The response of InstancesApi->cancel_instance:\n") pprint(api_response) except Exception as e: @@ -73,7 +74,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | **instance_id** | **int**| The identifier of the instance | - **body** | **object**| | + **cancel_instance_request** | [**CancelInstanceRequest**](CancelInstanceRequest.md)| | **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] ### Return type @@ -102,7 +103,7 @@ Name | Type | Description | Notes Create a new instance -Create a new instance for your account with the provided parameters.
ProductIdProductDisk Size
V45VPS 1 SSD400 GB SSD
V47VPS 1 Storage800 GB SSD
V46VPS 1 NVMe100 GB NVMe
V48VPS 2 SSD400 GB SSD
V50VPS 2 Storage800 GB SSD
V49VPS 2 NVMe200 GB NVMe
V51VPS 3 SSD1200 GB SSD
V53VPS 3 Storage2400 GB SSD
V52VPS 3 NVMe300 GB NVMe
V54VPS 4 SSD1600 GB SSD
V56VPS 4 Storage3200 GB SSD
V55VPS 4 NVMe400 GB NVMe
V57VPS 5 SSD2000 GB SSD
V59VPS 5 Storage4000 GB SSD
V58VPS 5 NVMe500 GB NVMe
V60VPS 6 SSD2400 GB SSD
V62VPS 6 Storage4800 GB SSD
V61VPS 6 NVMe600 GB NVMe
V8VDS S180 GB NVMe
V9VDS M240 GB NVMe
V10VDS L360 GB NVMe
V11VDS XL480 GB NVMe
V16VDS XXL720 GB NVMe
+Create a new instance for your account with the provided parameters.
ProductIdProductDisk Size
V91VPS 10 NVMe75 GB NVMe
V92VPS 10 SSD150 GB SSD
V93VPS 10 Storage300 GB SSD
V94VPS 20 NVMe100 GB NVMe
V95VPS 20 SSD200 GB SSD
V96VPS 20 Storage400 GB SSD
V97VPS 30 NVMe200 GB NVMe
V98VPS 30 SSD400 GB SSD
V99VPS 30 Storage1000 GB NVMe
V100VPS 40 NVMe250 GB NVMe
V101VPS 40 SSD500 GB SSD
V102VPS 40 Storage1200 GB NVMe
V103VPS 50 NVMe300 GB NVMe
V104VPS 50 SSD600 GB SSD
V105VPS 50 Storage1400 GB SSD
V106VPS 60 NVMe350 GB NVMe
V107VPS 60 SSD700 GB SSD
V8VDS S180 GB NVMe
V9VDS M240 GB NVMe
V10VDS L360 GB NVMe
V11VDS XL480 GB NVMe
V16VDS XXL720 GB NVMe
### Example @@ -433,7 +434,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **retrieve_instances_list** -> ListInstancesResponse retrieve_instances_list(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, name=name, display_name=display_name, data_center=data_center, region=region, instance_id=instance_id, instance_ids=instance_ids, status=status, add_on_ids=add_on_ids, product_types=product_types, ip_config=ip_config, search=search) +> ListInstancesResponse retrieve_instances_list(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, name=name, display_name=display_name, data_center=data_center, region=region, instance_id=instance_id, instance_ids=instance_ids, status=status, product_ids=product_ids, add_on_ids=add_on_ids, product_types=product_types, ip_config=ip_config, search=search, customer_id=customer_id, tenant_id=tenant_id) List instances @@ -481,14 +482,17 @@ with pfruck_contabo.ApiClient(configuration) as api_client: instance_id = 100 # int | The identifier of the instance (deprecated) (optional) instance_ids = '100, 101, 102' # str | Comma separated instances identifiers (optional) status = 'provisioning,installing' # str | The status of the instance (optional) + product_ids = 'V68,V77' # str | Identifiers of the instance products (optional) add_on_ids = '1044,827' # str | Identifiers of Addons the instances have (optional) product_types = 'ssd, hdd, nvme' # str | Comma separated instance's category depending on Product Id (optional) ip_config = true # bool | Filter instances that have an ip config (optional) search = 'vmd12345' # str | Full text search when listing the instances. Can be searched by `name`, `displayName`, `ipAddress` (optional) + customer_id = '22223' # str | Filter by customer ID (optional) + tenant_id = 'DE' # str | Filter by tenant ID (optional) try: # List instances - api_response = api_instance.retrieve_instances_list(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, name=name, display_name=display_name, data_center=data_center, region=region, instance_id=instance_id, instance_ids=instance_ids, status=status, add_on_ids=add_on_ids, product_types=product_types, ip_config=ip_config, search=search) + api_response = api_instance.retrieve_instances_list(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, name=name, display_name=display_name, data_center=data_center, region=region, instance_id=instance_id, instance_ids=instance_ids, status=status, product_ids=product_ids, add_on_ids=add_on_ids, product_types=product_types, ip_config=ip_config, search=search, customer_id=customer_id, tenant_id=tenant_id) print("The response of InstancesApi->retrieve_instances_list:\n") pprint(api_response) except Exception as e: @@ -514,10 +518,13 @@ Name | Type | Description | Notes **instance_id** | **int**| The identifier of the instance (deprecated) | [optional] **instance_ids** | **str**| Comma separated instances identifiers | [optional] **status** | **str**| The status of the instance | [optional] + **product_ids** | **str**| Identifiers of the instance products | [optional] **add_on_ids** | **str**| Identifiers of Addons the instances have | [optional] **product_types** | **str**| Comma separated instance's category depending on Product Id | [optional] **ip_config** | **bool**| Filter instances that have an ip config | [optional] **search** | **str**| Full text search when listing the instances. Can be searched by `name`, `displayName`, `ipAddress` | [optional] + **customer_id** | **str**| Filter by customer ID | [optional] + **tenant_id** | **str**| Filter by tenant ID | [optional] ### Return type diff --git a/docs/InstancesAuditsApi.md b/docs/InstancesAuditsApi.md index da4368d5..caf6ab59 100644 --- a/docs/InstancesAuditsApi.md +++ b/docs/InstancesAuditsApi.md @@ -52,8 +52,8 @@ with pfruck_contabo.ApiClient(configuration) as api_client: instance_id = 12345 # int | The identifier of the instances. (optional) request_id = 'D5FD9FAF-58C0-4406-8F46-F449B8E4FEC3' # str | The requestId of the API call which led to the change. (optional) changed_by = '23cbb6d6-cb11-4330-bdff-7bb791df2e23' # str | changedBy of the user which led to the change. (optional) - start_date = '2021-06-02' # date | Start of search time range. (optional) - end_date = '2021-06-02' # date | End of search time range. (optional) + start_date = 'Wed Jun 02 00:00:00 UTC 2021' # date | Start of search time range. (optional) + end_date = 'Wed Jun 02 00:00:00 UTC 2021' # date | End of search time range. (optional) try: # List history about your instances (audit) diff --git a/docs/InternalApi.md b/docs/InternalApi.md deleted file mode 100644 index 0ebeede9..00000000 --- a/docs/InternalApi.md +++ /dev/null @@ -1,175 +0,0 @@ -# pfruck_contabo.InternalApi - -All URIs are relative to *https://api.contabo.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_ticket**](InternalApi.md#create_ticket) | **POST** /v1/create-ticket | Create a new support ticket -[**retrieve_user_is_password_set**](InternalApi.md#retrieve_user_is_password_set) | **GET** /v1/users/is-password-set | Get user is password set status - - -# **create_ticket** -> CreateTicketResponse create_ticket(x_request_id, create_ticket_request, x_trace_id=x_trace_id) - -Create a new support ticket - -Create a new support ticket. - -### Example - -* Bearer (JWT) Authentication (bearer): - -```python -import pfruck_contabo -from pfruck_contabo.models.create_ticket_request import CreateTicketRequest -from pfruck_contabo.models.create_ticket_response import CreateTicketResponse -from pfruck_contabo.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.contabo.com -# See configuration.py for a list of all supported configuration parameters. -configuration = pfruck_contabo.Configuration( - host = "https://api.contabo.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (JWT): bearer -configuration = pfruck_contabo.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with pfruck_contabo.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = pfruck_contabo.InternalApi(api_client) - x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. - create_ticket_request = pfruck_contabo.CreateTicketRequest() # CreateTicketRequest | - x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) - - try: - # Create a new support ticket - api_response = api_instance.create_ticket(x_request_id, create_ticket_request, x_trace_id=x_trace_id) - print("The response of InternalApi->create_ticket:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling InternalApi->create_ticket: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | - **create_ticket_request** | [**CreateTicketRequest**](CreateTicketRequest.md)| | - **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] - -### Return type - -[**CreateTicketResponse**](CreateTicketResponse.md) - -### Authorization - -[bearer](../README.md#bearer) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | The response will be a JSON object and contains standard support ticket attributes. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **retrieve_user_is_password_set** -> FindUserIsPasswordSetResponse retrieve_user_is_password_set(x_request_id, x_trace_id=x_trace_id, user_id=user_id) - -Get user is password set status - -Get info about idm user if the password is set. - -### Example - -* Bearer (JWT) Authentication (bearer): - -```python -import pfruck_contabo -from pfruck_contabo.models.find_user_is_password_set_response import FindUserIsPasswordSetResponse -from pfruck_contabo.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.contabo.com -# See configuration.py for a list of all supported configuration parameters. -configuration = pfruck_contabo.Configuration( - host = "https://api.contabo.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (JWT): bearer -configuration = pfruck_contabo.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with pfruck_contabo.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = pfruck_contabo.InternalApi(api_client) - x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. - x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) - user_id = '6cdf5968-f9fe-4192-97c2-f349e813c5e8' # str | The user ID for checking if password is set for him (optional) - - try: - # Get user is password set status - api_response = api_instance.retrieve_user_is_password_set(x_request_id, x_trace_id=x_trace_id, user_id=user_id) - print("The response of InternalApi->retrieve_user_is_password_set:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling InternalApi->retrieve_user_is_password_set: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | - **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] - **user_id** | **str**| The user ID for checking if password is set for him | [optional] - -### Return type - -[**FindUserIsPasswordSetResponse**](FindUserIsPasswordSetResponse.md) - -### Authorization - -[bearer](../README.md#bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The response will be a JSON object and contains standard user attributes. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/InternalCheckAuditsApi.md b/docs/InternalCheckAuditsApi.md new file mode 100644 index 00000000..0c07434a --- /dev/null +++ b/docs/InternalCheckAuditsApi.md @@ -0,0 +1,111 @@ +# pfruck_contabo.InternalCheckAuditsApi + +All URIs are relative to *https://api.contabo.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**retrieve_checks_audits_list**](InternalCheckAuditsApi.md#retrieve_checks_audits_list) | **GET** /internal/v1/troubleshooting/checks/audits | List history about your Data (audit) + + +# **retrieve_checks_audits_list** +> ChecksAuditListResponse retrieve_checks_audits_list(x_request_id, org_ids, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, creation_start_time=creation_start_time, creation_end_time=creation_end_time, account_id=account_id, request_id=request_id, foreign_changed_by=foreign_changed_by, changed_by=changed_by, check_id=check_id) + +List history about your Data (audit) + +List and filters the history about your Data. + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.checks_audit_list_response import ChecksAuditListResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.InternalCheckAuditsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + org_ids = ['org_ids_example'] # List[str] | Org IDs + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + page = 1 # int | Number of page to be fetched. (optional) + size = 10 # int | Number of elements per page. (optional) + order_by = ['name:asc'] # List[str] | Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. (optional) + creation_start_time = '2021-06-03T06:27:12Z' # datetime | Start of search time range for created date (optional) + creation_end_time = '2021-06-03T10:27:12Z' # datetime | End of search time range for created date (optional) + account_id = 'DE-123' # str | Filter by account ID (optional) + request_id = 'D5FD9FAF-58C0-4406-8F46-F449B8E4FEC3' # str | The requestId of the API call which led to the change. (optional) + foreign_changed_by = '23cbb6d6-cb11-4330-bdff-7bb791df2e23' # str | Foreign uerId of the user which led to the change. (optional) + changed_by = '23cbb6d6-cb11-4330-bdff-7bb791df2e23' # str | UserId of the user which led to the change. (optional) + check_id = 12345 # float | Check's id (optional) + + try: + # List history about your Data (audit) + api_response = api_instance.retrieve_checks_audits_list(x_request_id, org_ids, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, creation_start_time=creation_start_time, creation_end_time=creation_end_time, account_id=account_id, request_id=request_id, foreign_changed_by=foreign_changed_by, changed_by=changed_by, check_id=check_id) + print("The response of InternalCheckAuditsApi->retrieve_checks_audits_list:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InternalCheckAuditsApi->retrieve_checks_audits_list: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **org_ids** | [**List[str]**](str.md)| Org IDs | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + **page** | **int**| Number of page to be fetched. | [optional] + **size** | **int**| Number of elements per page. | [optional] + **order_by** | [**List[str]**](str.md)| Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. | [optional] + **creation_start_time** | **datetime**| Start of search time range for created date | [optional] + **creation_end_time** | **datetime**| End of search time range for created date | [optional] + **account_id** | **str**| Filter by account ID | [optional] + **request_id** | **str**| The requestId of the API call which led to the change. | [optional] + **foreign_changed_by** | **str**| Foreign uerId of the user which led to the change. | [optional] + **changed_by** | **str**| UserId of the user which led to the change. | [optional] + **check_id** | **float**| Check's id | [optional] + +### Return type + +[**ChecksAuditListResponse**](ChecksAuditListResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The response will be a JSON object and contains a paginated list of Data audits. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/InternalCheckCollectionAuditsApi.md b/docs/InternalCheckCollectionAuditsApi.md new file mode 100644 index 00000000..5c625195 --- /dev/null +++ b/docs/InternalCheckCollectionAuditsApi.md @@ -0,0 +1,111 @@ +# pfruck_contabo.InternalCheckCollectionAuditsApi + +All URIs are relative to *https://api.contabo.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**retrieve_check_collections_audits_list**](InternalCheckCollectionAuditsApi.md#retrieve_check_collections_audits_list) | **GET** /internal/v1/troubleshooting/check-collections/audits | List history about your Data (audit) + + +# **retrieve_check_collections_audits_list** +> CheckCollectionsAuditListResponse retrieve_check_collections_audits_list(x_request_id, org_ids, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, creation_start_time=creation_start_time, creation_end_time=creation_end_time, account_id=account_id, request_id=request_id, foreign_changed_by=foreign_changed_by, changed_by=changed_by, check_collection_id=check_collection_id) + +List history about your Data (audit) + +List and filters the history about your Data. + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.check_collections_audit_list_response import CheckCollectionsAuditListResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.InternalCheckCollectionAuditsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + org_ids = ['org_ids_example'] # List[str] | Org IDs + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + page = 1 # int | Number of page to be fetched. (optional) + size = 10 # int | Number of elements per page. (optional) + order_by = ['name:asc'] # List[str] | Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. (optional) + creation_start_time = '2021-06-03T06:27:12Z' # datetime | Start of search time range for created date (optional) + creation_end_time = '2021-06-03T10:27:12Z' # datetime | End of search time range for created date (optional) + account_id = 'DE-123' # str | Filter by account ID (optional) + request_id = 'D5FD9FAF-58C0-4406-8F46-F449B8E4FEC3' # str | The requestId of the API call which led to the change. (optional) + foreign_changed_by = '23cbb6d6-cb11-4330-bdff-7bb791df2e23' # str | Foreign uerId of the user which led to the change. (optional) + changed_by = '23cbb6d6-cb11-4330-bdff-7bb791df2e23' # str | UserId of the user which led to the change. (optional) + check_collection_id = 12345 # float | Check collection's id (optional) + + try: + # List history about your Data (audit) + api_response = api_instance.retrieve_check_collections_audits_list(x_request_id, org_ids, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, creation_start_time=creation_start_time, creation_end_time=creation_end_time, account_id=account_id, request_id=request_id, foreign_changed_by=foreign_changed_by, changed_by=changed_by, check_collection_id=check_collection_id) + print("The response of InternalCheckCollectionAuditsApi->retrieve_check_collections_audits_list:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InternalCheckCollectionAuditsApi->retrieve_check_collections_audits_list: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **org_ids** | [**List[str]**](str.md)| Org IDs | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + **page** | **int**| Number of page to be fetched. | [optional] + **size** | **int**| Number of elements per page. | [optional] + **order_by** | [**List[str]**](str.md)| Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. | [optional] + **creation_start_time** | **datetime**| Start of search time range for created date | [optional] + **creation_end_time** | **datetime**| End of search time range for created date | [optional] + **account_id** | **str**| Filter by account ID | [optional] + **request_id** | **str**| The requestId of the API call which led to the change. | [optional] + **foreign_changed_by** | **str**| Foreign uerId of the user which led to the change. | [optional] + **changed_by** | **str**| UserId of the user which led to the change. | [optional] + **check_collection_id** | **float**| Check collection's id | [optional] + +### Return type + +[**CheckCollectionsAuditListResponse**](CheckCollectionsAuditListResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The response will be a JSON object and contains a paginated list of Data audits. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/InternalCheckCollectionReplayApi.md b/docs/InternalCheckCollectionReplayApi.md new file mode 100644 index 00000000..b33888c3 --- /dev/null +++ b/docs/InternalCheckCollectionReplayApi.md @@ -0,0 +1,92 @@ +# pfruck_contabo.InternalCheckCollectionReplayApi + +All URIs are relative to *https://api.contabo.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**replay_check_collection**](InternalCheckCollectionReplayApi.md#replay_check_collection) | **POST** /internal/v1/troubleshooting/check-collections/replays | Replay changes for Check + + +# **replay_check_collection** +> ReplayResponse replay_check_collection(x_request_id, check_collections_replay_request, x_trace_id=x_trace_id) + +Replay changes for Check + +Replay changes for Check + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.check_collections_replay_request import CheckCollectionsReplayRequest +from pfruck_contabo.models.replay_response import ReplayResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.InternalCheckCollectionReplayApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + check_collections_replay_request = pfruck_contabo.CheckCollectionsReplayRequest() # CheckCollectionsReplayRequest | + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Replay changes for Check + api_response = api_instance.replay_check_collection(x_request_id, check_collections_replay_request, x_trace_id=x_trace_id) + print("The response of InternalCheckCollectionReplayApi->replay_check_collection:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InternalCheckCollectionReplayApi->replay_check_collection: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **check_collections_replay_request** | [**CheckCollectionsReplayRequest**](CheckCollectionsReplayRequest.md)| | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**ReplayResponse**](ReplayResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**202** | Audit count sent to publish | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/InternalCheckCollectionTemplatesApi.md b/docs/InternalCheckCollectionTemplatesApi.md new file mode 100644 index 00000000..d77bbe2a --- /dev/null +++ b/docs/InternalCheckCollectionTemplatesApi.md @@ -0,0 +1,196 @@ +# pfruck_contabo.InternalCheckCollectionTemplatesApi + +All URIs are relative to *https://api.contabo.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_check_collection_template**](InternalCheckCollectionTemplatesApi.md#get_check_collection_template) | **GET** /internal/v1/troubleshooting/check-collection-templates/{orgId}/{checkCollectionTemplateId} | Get check +[**list_check_collection_templates**](InternalCheckCollectionTemplatesApi.md#list_check_collection_templates) | **GET** /internal/v1/troubleshooting/check-collection-templates | List check collection templates + + +# **get_check_collection_template** +> CheckCollectionTemplatesGetResponse get_check_collection_template(x_request_id, check_collection_template_id, org_id, x_trace_id=x_trace_id) + +Get check + +Get a single check collection template by id + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.check_collection_templates_get_response import CheckCollectionTemplatesGetResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.InternalCheckCollectionTemplatesApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + check_collection_template_id = 12345 # float | Check collection template's id + org_id = 'cntb' # str | Org ID + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Get check + api_response = api_instance.get_check_collection_template(x_request_id, check_collection_template_id, org_id, x_trace_id=x_trace_id) + print("The response of InternalCheckCollectionTemplatesApi->get_check_collection_template:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InternalCheckCollectionTemplatesApi->get_check_collection_template: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **check_collection_template_id** | **float**| Check collection template's id | + **org_id** | **str**| Org ID | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**CheckCollectionTemplatesGetResponse**](CheckCollectionTemplatesGetResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Single check collection template | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_check_collection_templates** +> CheckCollectionTemplatesListResponse list_check_collection_templates(x_request_id, org_ids, x_trace_id=x_trace_id, internal=internal, object_type=object_type, page=page, size=size, order_by=order_by, creation_start_time=creation_start_time, creation_end_time=creation_end_time, modification_start_time=modification_start_time, modification_end_time=modification_end_time, account_id=account_id) + +List check collection templates + +List and filter all check collection templates + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.check_collection_templates_list_response import CheckCollectionTemplatesListResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.InternalCheckCollectionTemplatesApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + org_ids = ['org_ids_example'] # List[str] | Org IDs + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + internal = false # bool | Is check only internal (not shown to the customer) (optional) + object_type = 'vserver' # str | Object type for which the check template can be used (optional) + page = 1 # int | Number of page to be fetched. (optional) + size = 10 # int | Number of elements per page. (optional) + order_by = ['name:asc'] # List[str] | Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. (optional) + creation_start_time = '2021-06-03T06:27:12Z' # datetime | Start of search time range for created date (optional) + creation_end_time = '2021-06-03T10:27:12Z' # datetime | End of search time range for created date (optional) + modification_start_time = '2021-06-03T06:27:12Z' # datetime | Start of search time range for modified date (optional) + modification_end_time = '2021-06-03T10:27:12Z' # datetime | End of search time range for modified date (optional) + account_id = 'DE-123' # str | Filter by account ID (optional) + + try: + # List check collection templates + api_response = api_instance.list_check_collection_templates(x_request_id, org_ids, x_trace_id=x_trace_id, internal=internal, object_type=object_type, page=page, size=size, order_by=order_by, creation_start_time=creation_start_time, creation_end_time=creation_end_time, modification_start_time=modification_start_time, modification_end_time=modification_end_time, account_id=account_id) + print("The response of InternalCheckCollectionTemplatesApi->list_check_collection_templates:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InternalCheckCollectionTemplatesApi->list_check_collection_templates: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **org_ids** | [**List[str]**](str.md)| Org IDs | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + **internal** | **bool**| Is check only internal (not shown to the customer) | [optional] + **object_type** | **str**| Object type for which the check template can be used | [optional] + **page** | **int**| Number of page to be fetched. | [optional] + **size** | **int**| Number of elements per page. | [optional] + **order_by** | [**List[str]**](str.md)| Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. | [optional] + **creation_start_time** | **datetime**| Start of search time range for created date | [optional] + **creation_end_time** | **datetime**| End of search time range for created date | [optional] + **modification_start_time** | **datetime**| Start of search time range for modified date | [optional] + **modification_end_time** | **datetime**| End of search time range for modified date | [optional] + **account_id** | **str**| Filter by account ID | [optional] + +### Return type + +[**CheckCollectionTemplatesListResponse**](CheckCollectionTemplatesListResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Paginated list of check collection templates | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/InternalCheckCollectionsApi.md b/docs/InternalCheckCollectionsApi.md new file mode 100644 index 00000000..91ebb7ee --- /dev/null +++ b/docs/InternalCheckCollectionsApi.md @@ -0,0 +1,374 @@ +# pfruck_contabo.InternalCheckCollectionsApi + +All URIs are relative to *https://api.contabo.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**cancel_check_collection**](InternalCheckCollectionsApi.md#cancel_check_collection) | **PATCH** /internal/v1/troubleshooting/check-collections/{orgId}/{checkCollectionId} | Cancel check collection +[**get_check_collection**](InternalCheckCollectionsApi.md#get_check_collection) | **GET** /internal/v1/troubleshooting/check-collections/{orgId}/{checkCollectionId} | Get check collection +[**list_check_collections**](InternalCheckCollectionsApi.md#list_check_collections) | **GET** /internal/v1/troubleshooting/check-collections | List check collections +[**start_check_collection**](InternalCheckCollectionsApi.md#start_check_collection) | **POST** /internal/v1/troubleshooting/check-collections | Start check collection + + +# **cancel_check_collection** +> CheckCollectionsGetResponse cancel_check_collection(x_request_id, check_collection_id, org_id, cancel_request, x_trace_id=x_trace_id) + +Cancel check collection + +Cancel check collection + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.cancel_request import CancelRequest +from pfruck_contabo.models.check_collections_get_response import CheckCollectionsGetResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.InternalCheckCollectionsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + check_collection_id = 12345 # float | Check collection's id + org_id = 'cntb' # str | Org ID + cancel_request = pfruck_contabo.CancelRequest() # CancelRequest | + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Cancel check collection + api_response = api_instance.cancel_check_collection(x_request_id, check_collection_id, org_id, cancel_request, x_trace_id=x_trace_id) + print("The response of InternalCheckCollectionsApi->cancel_check_collection:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InternalCheckCollectionsApi->cancel_check_collection: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **check_collection_id** | **float**| Check collection's id | + **org_id** | **str**| Org ID | + **cancel_request** | [**CancelRequest**](CancelRequest.md)| | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**CheckCollectionsGetResponse**](CheckCollectionsGetResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Cancelled check collection | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_check_collection** +> CheckCollectionsGetResponse get_check_collection(x_request_id, check_collection_id, org_id, x_trace_id=x_trace_id, exclude_check_statuses=exclude_check_statuses) + +Get check collection + +Get a single check collection by id + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.check_collections_get_response import CheckCollectionsGetResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.InternalCheckCollectionsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + check_collection_id = 12345 # float | Check collection's id + org_id = 'cntb' # str | Org ID + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + exclude_check_statuses = ['[\"skipped\",\"cancelled\"]'] # List[str] | Check statuses to exclude (optional) + + try: + # Get check collection + api_response = api_instance.get_check_collection(x_request_id, check_collection_id, org_id, x_trace_id=x_trace_id, exclude_check_statuses=exclude_check_statuses) + print("The response of InternalCheckCollectionsApi->get_check_collection:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InternalCheckCollectionsApi->get_check_collection: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **check_collection_id** | **float**| Check collection's id | + **org_id** | **str**| Org ID | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + **exclude_check_statuses** | [**List[str]**](str.md)| Check statuses to exclude | [optional] + +### Return type + +[**CheckCollectionsGetResponse**](CheckCollectionsGetResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Single check collection | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_check_collections** +> CheckCollectionsListResponse list_check_collections(x_request_id, org_ids, x_trace_id=x_trace_id, object_type=object_type, object_id=object_id, check_collection_template_id=check_collection_template_id, exclude_check_statuses=exclude_check_statuses, page=page, size=size, order_by=order_by, creation_start_time=creation_start_time, creation_end_time=creation_end_time, modification_start_time=modification_start_time, modification_end_time=modification_end_time, account_id=account_id) + +List check collections + +List and filter all check collections + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.check_collections_list_response import CheckCollectionsListResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.InternalCheckCollectionsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + org_ids = ['org_ids_example'] # List[str] | Org IDs + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + object_type = 'vserver' # str | Object type to be handled (optional) + object_id = '4711' # str | ID of the object, to be handled (optional) + check_collection_template_id = 12345 # float | Check Collection Template for this check collection (optional) + exclude_check_statuses = ['[\"skipped\",\"cancelled\"]'] # List[str] | Check statuses to exclude (optional) + page = 1 # int | Number of page to be fetched. (optional) + size = 10 # int | Number of elements per page. (optional) + order_by = ['name:asc'] # List[str] | Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. (optional) + creation_start_time = '2021-06-03T06:27:12Z' # datetime | Start of search time range for created date (optional) + creation_end_time = '2021-06-03T10:27:12Z' # datetime | End of search time range for created date (optional) + modification_start_time = '2021-06-03T06:27:12Z' # datetime | Start of search time range for modified date (optional) + modification_end_time = '2021-06-03T10:27:12Z' # datetime | End of search time range for modified date (optional) + account_id = 'DE-123' # str | Filter by account ID (optional) + + try: + # List check collections + api_response = api_instance.list_check_collections(x_request_id, org_ids, x_trace_id=x_trace_id, object_type=object_type, object_id=object_id, check_collection_template_id=check_collection_template_id, exclude_check_statuses=exclude_check_statuses, page=page, size=size, order_by=order_by, creation_start_time=creation_start_time, creation_end_time=creation_end_time, modification_start_time=modification_start_time, modification_end_time=modification_end_time, account_id=account_id) + print("The response of InternalCheckCollectionsApi->list_check_collections:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InternalCheckCollectionsApi->list_check_collections: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **org_ids** | [**List[str]**](str.md)| Org IDs | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + **object_type** | **str**| Object type to be handled | [optional] + **object_id** | **str**| ID of the object, to be handled | [optional] + **check_collection_template_id** | **float**| Check Collection Template for this check collection | [optional] + **exclude_check_statuses** | [**List[str]**](str.md)| Check statuses to exclude | [optional] + **page** | **int**| Number of page to be fetched. | [optional] + **size** | **int**| Number of elements per page. | [optional] + **order_by** | [**List[str]**](str.md)| Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. | [optional] + **creation_start_time** | **datetime**| Start of search time range for created date | [optional] + **creation_end_time** | **datetime**| End of search time range for created date | [optional] + **modification_start_time** | **datetime**| Start of search time range for modified date | [optional] + **modification_end_time** | **datetime**| End of search time range for modified date | [optional] + **account_id** | **str**| Filter by account ID | [optional] + +### Return type + +[**CheckCollectionsListResponse**](CheckCollectionsListResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Paginated list of check collections | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **start_check_collection** +> CheckCollectionsGetResponse start_check_collection(x_request_id, check_collection_create_request, x_trace_id=x_trace_id) + +Start check collection + +Start a new check collection + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.check_collection_create_request import CheckCollectionCreateRequest +from pfruck_contabo.models.check_collections_get_response import CheckCollectionsGetResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.InternalCheckCollectionsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + check_collection_create_request = pfruck_contabo.CheckCollectionCreateRequest() # CheckCollectionCreateRequest | + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Start check collection + api_response = api_instance.start_check_collection(x_request_id, check_collection_create_request, x_trace_id=x_trace_id) + print("The response of InternalCheckCollectionsApi->start_check_collection:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InternalCheckCollectionsApi->start_check_collection: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **check_collection_create_request** | [**CheckCollectionCreateRequest**](CheckCollectionCreateRequest.md)| | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**CheckCollectionsGetResponse**](CheckCollectionsGetResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Start check collection | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/InternalCheckReplayApi.md b/docs/InternalCheckReplayApi.md new file mode 100644 index 00000000..0b926dcc --- /dev/null +++ b/docs/InternalCheckReplayApi.md @@ -0,0 +1,92 @@ +# pfruck_contabo.InternalCheckReplayApi + +All URIs are relative to *https://api.contabo.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**replay_check**](InternalCheckReplayApi.md#replay_check) | **POST** /internal/v1/troubleshooting/checks/replays | Replay changes for Check + + +# **replay_check** +> ReplayResponse replay_check(x_request_id, checks_replay_request, x_trace_id=x_trace_id) + +Replay changes for Check + +Replay changes for Check + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.checks_replay_request import ChecksReplayRequest +from pfruck_contabo.models.replay_response import ReplayResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.InternalCheckReplayApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + checks_replay_request = pfruck_contabo.ChecksReplayRequest() # ChecksReplayRequest | + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Replay changes for Check + api_response = api_instance.replay_check(x_request_id, checks_replay_request, x_trace_id=x_trace_id) + print("The response of InternalCheckReplayApi->replay_check:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InternalCheckReplayApi->replay_check: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **checks_replay_request** | [**ChecksReplayRequest**](ChecksReplayRequest.md)| | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**ReplayResponse**](ReplayResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**202** | Audit count sent to publish | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/InternalCheckTemplatesApi.md b/docs/InternalCheckTemplatesApi.md new file mode 100644 index 00000000..56216b8e --- /dev/null +++ b/docs/InternalCheckTemplatesApi.md @@ -0,0 +1,200 @@ +# pfruck_contabo.InternalCheckTemplatesApi + +All URIs are relative to *https://api.contabo.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_check_template**](InternalCheckTemplatesApi.md#get_check_template) | **GET** /internal/v1/troubleshooting/check-templates/{orgId}/{checkTemplateId} | Get check +[**list_check_templates**](InternalCheckTemplatesApi.md#list_check_templates) | **GET** /internal/v1/troubleshooting/check-templates | List check templates + + +# **get_check_template** +> CheckTemplatesGetResponse get_check_template(x_request_id, org_id, check_template_id, x_trace_id=x_trace_id) + +Get check + +Get a single check template by id + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.check_templates_get_response import CheckTemplatesGetResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.InternalCheckTemplatesApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + org_id = 'cntb' # str | Org ID + check_template_id = 12345 # float | Check template's id + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Get check + api_response = api_instance.get_check_template(x_request_id, org_id, check_template_id, x_trace_id=x_trace_id) + print("The response of InternalCheckTemplatesApi->get_check_template:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InternalCheckTemplatesApi->get_check_template: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **org_id** | **str**| Org ID | + **check_template_id** | **float**| Check template's id | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**CheckTemplatesGetResponse**](CheckTemplatesGetResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Single check template | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_check_templates** +> CheckTemplatesListResponse list_check_templates(x_request_id, org_ids, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, creation_start_time=creation_start_time, creation_end_time=creation_end_time, modification_start_time=modification_start_time, modification_end_time=modification_end_time, account_id=account_id, internal=internal, object_type=object_type, collector_class=collector_class, check_class=check_class) + +List check templates + +List and filter all check templates + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.check_templates_list_response import CheckTemplatesListResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.InternalCheckTemplatesApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + org_ids = ['org_ids_example'] # List[str] | Org IDs + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + page = 1 # int | Number of page to be fetched. (optional) + size = 10 # int | Number of elements per page. (optional) + order_by = ['name:asc'] # List[str] | Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. (optional) + creation_start_time = '2021-06-03T06:27:12Z' # datetime | Start of search time range for created date (optional) + creation_end_time = '2021-06-03T10:27:12Z' # datetime | End of search time range for created date (optional) + modification_start_time = '2021-06-03T06:27:12Z' # datetime | Start of search time range for modified date (optional) + modification_end_time = '2021-06-03T10:27:12Z' # datetime | End of search time range for modified date (optional) + account_id = 'DE-123' # str | Filter by account ID (optional) + internal = false # bool | Is check only internal (not shown to the customer) (optional) + object_type = 'vserver' # str | Object type for which the check template can be used (optional) + collector_class = 'InstanceCollector.ts' # str | Class used to collect the required information for the check (optional) + check_class = 'PingCheck.ts' # str | Class used to perform the check (optional) + + try: + # List check templates + api_response = api_instance.list_check_templates(x_request_id, org_ids, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, creation_start_time=creation_start_time, creation_end_time=creation_end_time, modification_start_time=modification_start_time, modification_end_time=modification_end_time, account_id=account_id, internal=internal, object_type=object_type, collector_class=collector_class, check_class=check_class) + print("The response of InternalCheckTemplatesApi->list_check_templates:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InternalCheckTemplatesApi->list_check_templates: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **org_ids** | [**List[str]**](str.md)| Org IDs | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + **page** | **int**| Number of page to be fetched. | [optional] + **size** | **int**| Number of elements per page. | [optional] + **order_by** | [**List[str]**](str.md)| Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. | [optional] + **creation_start_time** | **datetime**| Start of search time range for created date | [optional] + **creation_end_time** | **datetime**| End of search time range for created date | [optional] + **modification_start_time** | **datetime**| Start of search time range for modified date | [optional] + **modification_end_time** | **datetime**| End of search time range for modified date | [optional] + **account_id** | **str**| Filter by account ID | [optional] + **internal** | **bool**| Is check only internal (not shown to the customer) | [optional] + **object_type** | **str**| Object type for which the check template can be used | [optional] + **collector_class** | **str**| Class used to collect the required information for the check | [optional] + **check_class** | **str**| Class used to perform the check | [optional] + +### Return type + +[**CheckTemplatesListResponse**](CheckTemplatesListResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Paginated list of check templates | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/InternalChecksApi.md b/docs/InternalChecksApi.md new file mode 100644 index 00000000..86b75f0c --- /dev/null +++ b/docs/InternalChecksApi.md @@ -0,0 +1,374 @@ +# pfruck_contabo.InternalChecksApi + +All URIs are relative to *https://api.contabo.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**cancel_check**](InternalChecksApi.md#cancel_check) | **PATCH** /internal/v1/troubleshooting/checks/{orgId}/{checkId} | Cancel check +[**get_check**](InternalChecksApi.md#get_check) | **GET** /internal/v1/troubleshooting/checks/{orgId}/{checkId} | Get check +[**list_checks**](InternalChecksApi.md#list_checks) | **GET** /internal/v1/troubleshooting/checks | List check +[**start_check**](InternalChecksApi.md#start_check) | **POST** /internal/v1/troubleshooting/checks | Start check + + +# **cancel_check** +> ChecksGetResponse cancel_check(x_request_id, check_id, org_id, cancel_request, x_trace_id=x_trace_id) + +Cancel check + +Cancel check + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.cancel_request import CancelRequest +from pfruck_contabo.models.checks_get_response import ChecksGetResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.InternalChecksApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + check_id = 12345 # float | Check's id + org_id = 'cntb' # str | Org ID + cancel_request = pfruck_contabo.CancelRequest() # CancelRequest | + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Cancel check + api_response = api_instance.cancel_check(x_request_id, check_id, org_id, cancel_request, x_trace_id=x_trace_id) + print("The response of InternalChecksApi->cancel_check:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InternalChecksApi->cancel_check: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **check_id** | **float**| Check's id | + **org_id** | **str**| Org ID | + **cancel_request** | [**CancelRequest**](CancelRequest.md)| | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**ChecksGetResponse**](ChecksGetResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Cancelled object | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_check** +> ChecksGetResponse get_check(x_request_id, check_id, org_id, x_trace_id=x_trace_id) + +Get check + +Get a single check by id + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.checks_get_response import ChecksGetResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.InternalChecksApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + check_id = 12345 # float | Check's id + org_id = 'cntb' # str | Org ID + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Get check + api_response = api_instance.get_check(x_request_id, check_id, org_id, x_trace_id=x_trace_id) + print("The response of InternalChecksApi->get_check:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InternalChecksApi->get_check: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **check_id** | **float**| Check's id | + **org_id** | **str**| Org ID | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**ChecksGetResponse**](ChecksGetResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Single check | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_checks** +> ChecksListResponse list_checks(x_request_id, org_ids, x_trace_id=x_trace_id, object_type=object_type, object_id=object_id, status=status, check_collection_id=check_collection_id, check_template_id=check_template_id, page=page, size=size, order_by=order_by, creation_start_time=creation_start_time, creation_end_time=creation_end_time, modification_start_time=modification_start_time, modification_end_time=modification_end_time, account_id=account_id) + +List check + +List and filter all checks + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.checks_list_response import ChecksListResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.InternalChecksApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + org_ids = ['org_ids_example'] # List[str] | Org IDs + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + object_type = 'vserver' # str | Object type to be handled (optional) + object_id = '4711' # str | ID of the object, to be handled (optional) + status = 'failed' # str | Status of the handle (optional) + check_collection_id = 12345 # float | ID of check collection if started in scope of a collection (optional) + check_template_id = 12345 # float | Check Template for this check (optional) + page = 1 # int | Number of page to be fetched. (optional) + size = 10 # int | Number of elements per page. (optional) + order_by = ['name:asc'] # List[str] | Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. (optional) + creation_start_time = '2021-06-03T06:27:12Z' # datetime | Start of search time range for created date (optional) + creation_end_time = '2021-06-03T10:27:12Z' # datetime | End of search time range for created date (optional) + modification_start_time = '2021-06-03T06:27:12Z' # datetime | Start of search time range for modified date (optional) + modification_end_time = '2021-06-03T10:27:12Z' # datetime | End of search time range for modified date (optional) + account_id = 'DE-123' # str | Filter by account ID (optional) + + try: + # List check + api_response = api_instance.list_checks(x_request_id, org_ids, x_trace_id=x_trace_id, object_type=object_type, object_id=object_id, status=status, check_collection_id=check_collection_id, check_template_id=check_template_id, page=page, size=size, order_by=order_by, creation_start_time=creation_start_time, creation_end_time=creation_end_time, modification_start_time=modification_start_time, modification_end_time=modification_end_time, account_id=account_id) + print("The response of InternalChecksApi->list_checks:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InternalChecksApi->list_checks: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **org_ids** | [**List[str]**](str.md)| Org IDs | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + **object_type** | **str**| Object type to be handled | [optional] + **object_id** | **str**| ID of the object, to be handled | [optional] + **status** | **str**| Status of the handle | [optional] + **check_collection_id** | **float**| ID of check collection if started in scope of a collection | [optional] + **check_template_id** | **float**| Check Template for this check | [optional] + **page** | **int**| Number of page to be fetched. | [optional] + **size** | **int**| Number of elements per page. | [optional] + **order_by** | [**List[str]**](str.md)| Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. | [optional] + **creation_start_time** | **datetime**| Start of search time range for created date | [optional] + **creation_end_time** | **datetime**| End of search time range for created date | [optional] + **modification_start_time** | **datetime**| Start of search time range for modified date | [optional] + **modification_end_time** | **datetime**| End of search time range for modified date | [optional] + **account_id** | **str**| Filter by account ID | [optional] + +### Return type + +[**ChecksListResponse**](ChecksListResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Paginated list of checks | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **start_check** +> ChecksGetResponse start_check(x_request_id, check_create_request, x_trace_id=x_trace_id) + +Start check + +Start a new check + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.check_create_request import CheckCreateRequest +from pfruck_contabo.models.checks_get_response import ChecksGetResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.InternalChecksApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + check_create_request = pfruck_contabo.CheckCreateRequest() # CheckCreateRequest | + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Start check + api_response = api_instance.start_check(x_request_id, check_create_request, x_trace_id=x_trace_id) + print("The response of InternalChecksApi->start_check:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InternalChecksApi->start_check: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **check_create_request** | [**CheckCreateRequest**](CheckCreateRequest.md)| | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**ChecksGetResponse**](ChecksGetResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Started object | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/InternalRemediesApi.md b/docs/InternalRemediesApi.md new file mode 100644 index 00000000..3411970e --- /dev/null +++ b/docs/InternalRemediesApi.md @@ -0,0 +1,374 @@ +# pfruck_contabo.InternalRemediesApi + +All URIs are relative to *https://api.contabo.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**cancel_remedy**](InternalRemediesApi.md#cancel_remedy) | **PATCH** /internal/v1/troubleshooting/remedies/{orgId}/{remedyId} | Cancel remedy +[**get_remedy**](InternalRemediesApi.md#get_remedy) | **GET** /internal/v1/troubleshooting/remedies/{orgId}/{remedyId} | Get remedy +[**list_remedies**](InternalRemediesApi.md#list_remedies) | **GET** /internal/v1/troubleshooting/remedies | List remedy +[**start_remedy**](InternalRemediesApi.md#start_remedy) | **POST** /internal/v1/troubleshooting/remedies | Start remedy + + +# **cancel_remedy** +> RemediesGetResponse cancel_remedy(x_request_id, remedy_id, org_id, cancel_request, x_trace_id=x_trace_id) + +Cancel remedy + +Cancel remedy + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.cancel_request import CancelRequest +from pfruck_contabo.models.remedies_get_response import RemediesGetResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.InternalRemediesApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + remedy_id = 12345 # float | Remedy's id + org_id = 'cntb' # str | Org ID + cancel_request = pfruck_contabo.CancelRequest() # CancelRequest | + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Cancel remedy + api_response = api_instance.cancel_remedy(x_request_id, remedy_id, org_id, cancel_request, x_trace_id=x_trace_id) + print("The response of InternalRemediesApi->cancel_remedy:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InternalRemediesApi->cancel_remedy: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **remedy_id** | **float**| Remedy's id | + **org_id** | **str**| Org ID | + **cancel_request** | [**CancelRequest**](CancelRequest.md)| | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**RemediesGetResponse**](RemediesGetResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Cancelled object | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_remedy** +> RemediesGetResponse get_remedy(x_request_id, remedy_id, org_id, x_trace_id=x_trace_id) + +Get remedy + +Get a single remedy by id + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.remedies_get_response import RemediesGetResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.InternalRemediesApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + remedy_id = 12345 # float | Remedy's id + org_id = 'cntb' # str | Org ID + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Get remedy + api_response = api_instance.get_remedy(x_request_id, remedy_id, org_id, x_trace_id=x_trace_id) + print("The response of InternalRemediesApi->get_remedy:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InternalRemediesApi->get_remedy: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **remedy_id** | **float**| Remedy's id | + **org_id** | **str**| Org ID | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**RemediesGetResponse**](RemediesGetResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Single remedy | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_remedies** +> RemediesListResponse list_remedies(x_request_id, org_ids, x_trace_id=x_trace_id, object_type=object_type, object_id=object_id, status=status, remedy_collection_id=remedy_collection_id, remedy_template_id=remedy_template_id, page=page, size=size, order_by=order_by, creation_start_time=creation_start_time, creation_end_time=creation_end_time, modification_start_time=modification_start_time, modification_end_time=modification_end_time, account_id=account_id) + +List remedy + +List and filter all remedies + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.remedies_list_response import RemediesListResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.InternalRemediesApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + org_ids = ['org_ids_example'] # List[str] | Org IDs + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + object_type = 'vserver' # str | Object type to be handled (optional) + object_id = '4711' # str | ID of the object, to be handled (optional) + status = 'failed' # str | Status of the handle (optional) + remedy_collection_id = 12345 # float | ID of remedy collection if started in scope of a collection (optional) + remedy_template_id = 12345 # float | Remedy Template for this check (optional) + page = 1 # int | Number of page to be fetched. (optional) + size = 10 # int | Number of elements per page. (optional) + order_by = ['name:asc'] # List[str] | Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. (optional) + creation_start_time = '2021-06-03T06:27:12Z' # datetime | Start of search time range for created date (optional) + creation_end_time = '2021-06-03T10:27:12Z' # datetime | End of search time range for created date (optional) + modification_start_time = '2021-06-03T06:27:12Z' # datetime | Start of search time range for modified date (optional) + modification_end_time = '2021-06-03T10:27:12Z' # datetime | End of search time range for modified date (optional) + account_id = 'DE-123' # str | Filter by account ID (optional) + + try: + # List remedy + api_response = api_instance.list_remedies(x_request_id, org_ids, x_trace_id=x_trace_id, object_type=object_type, object_id=object_id, status=status, remedy_collection_id=remedy_collection_id, remedy_template_id=remedy_template_id, page=page, size=size, order_by=order_by, creation_start_time=creation_start_time, creation_end_time=creation_end_time, modification_start_time=modification_start_time, modification_end_time=modification_end_time, account_id=account_id) + print("The response of InternalRemediesApi->list_remedies:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InternalRemediesApi->list_remedies: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **org_ids** | [**List[str]**](str.md)| Org IDs | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + **object_type** | **str**| Object type to be handled | [optional] + **object_id** | **str**| ID of the object, to be handled | [optional] + **status** | **str**| Status of the handle | [optional] + **remedy_collection_id** | **float**| ID of remedy collection if started in scope of a collection | [optional] + **remedy_template_id** | **float**| Remedy Template for this check | [optional] + **page** | **int**| Number of page to be fetched. | [optional] + **size** | **int**| Number of elements per page. | [optional] + **order_by** | [**List[str]**](str.md)| Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. | [optional] + **creation_start_time** | **datetime**| Start of search time range for created date | [optional] + **creation_end_time** | **datetime**| End of search time range for created date | [optional] + **modification_start_time** | **datetime**| Start of search time range for modified date | [optional] + **modification_end_time** | **datetime**| End of search time range for modified date | [optional] + **account_id** | **str**| Filter by account ID | [optional] + +### Return type + +[**RemediesListResponse**](RemediesListResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Paginated list of remedies | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **start_remedy** +> RemediesGetResponse start_remedy(x_request_id, remedies_create_request, x_trace_id=x_trace_id) + +Start remedy + +Start a new remedy + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.remedies_create_request import RemediesCreateRequest +from pfruck_contabo.models.remedies_get_response import RemediesGetResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.InternalRemediesApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + remedies_create_request = pfruck_contabo.RemediesCreateRequest() # RemediesCreateRequest | + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Start remedy + api_response = api_instance.start_remedy(x_request_id, remedies_create_request, x_trace_id=x_trace_id) + print("The response of InternalRemediesApi->start_remedy:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InternalRemediesApi->start_remedy: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **remedies_create_request** | [**RemediesCreateRequest**](RemediesCreateRequest.md)| | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**RemediesGetResponse**](RemediesGetResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Started object | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/InternalRemedyAuditsApi.md b/docs/InternalRemedyAuditsApi.md new file mode 100644 index 00000000..c5f114a3 --- /dev/null +++ b/docs/InternalRemedyAuditsApi.md @@ -0,0 +1,111 @@ +# pfruck_contabo.InternalRemedyAuditsApi + +All URIs are relative to *https://api.contabo.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**retrieve_remedies_audits_list**](InternalRemedyAuditsApi.md#retrieve_remedies_audits_list) | **GET** /internal/v1/troubleshooting/remedies/audits | List history about your Data (audit) + + +# **retrieve_remedies_audits_list** +> RemediesAuditListResponse retrieve_remedies_audits_list(x_request_id, org_ids, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, creation_start_time=creation_start_time, creation_end_time=creation_end_time, account_id=account_id, request_id=request_id, foreign_changed_by=foreign_changed_by, changed_by=changed_by, remedy_id=remedy_id) + +List history about your Data (audit) + +List and filters the history about your Data. + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.remedies_audit_list_response import RemediesAuditListResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.InternalRemedyAuditsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + org_ids = ['org_ids_example'] # List[str] | Org IDs + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + page = 1 # int | Number of page to be fetched. (optional) + size = 10 # int | Number of elements per page. (optional) + order_by = ['name:asc'] # List[str] | Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. (optional) + creation_start_time = '2021-06-03T06:27:12Z' # datetime | Start of search time range for created date (optional) + creation_end_time = '2021-06-03T10:27:12Z' # datetime | End of search time range for created date (optional) + account_id = 'DE-123' # str | Filter by account ID (optional) + request_id = 'D5FD9FAF-58C0-4406-8F46-F449B8E4FEC3' # str | The requestId of the API call which led to the change. (optional) + foreign_changed_by = '23cbb6d6-cb11-4330-bdff-7bb791df2e23' # str | Foreign uerId of the user which led to the change. (optional) + changed_by = '23cbb6d6-cb11-4330-bdff-7bb791df2e23' # str | UserId of the user which led to the change. (optional) + remedy_id = 12345 # float | Remedy's id (optional) + + try: + # List history about your Data (audit) + api_response = api_instance.retrieve_remedies_audits_list(x_request_id, org_ids, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, creation_start_time=creation_start_time, creation_end_time=creation_end_time, account_id=account_id, request_id=request_id, foreign_changed_by=foreign_changed_by, changed_by=changed_by, remedy_id=remedy_id) + print("The response of InternalRemedyAuditsApi->retrieve_remedies_audits_list:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InternalRemedyAuditsApi->retrieve_remedies_audits_list: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **org_ids** | [**List[str]**](str.md)| Org IDs | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + **page** | **int**| Number of page to be fetched. | [optional] + **size** | **int**| Number of elements per page. | [optional] + **order_by** | [**List[str]**](str.md)| Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. | [optional] + **creation_start_time** | **datetime**| Start of search time range for created date | [optional] + **creation_end_time** | **datetime**| End of search time range for created date | [optional] + **account_id** | **str**| Filter by account ID | [optional] + **request_id** | **str**| The requestId of the API call which led to the change. | [optional] + **foreign_changed_by** | **str**| Foreign uerId of the user which led to the change. | [optional] + **changed_by** | **str**| UserId of the user which led to the change. | [optional] + **remedy_id** | **float**| Remedy's id | [optional] + +### Return type + +[**RemediesAuditListResponse**](RemediesAuditListResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The response will be a JSON object and contains a paginated list of Data audits. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/InternalRemedyReplayApi.md b/docs/InternalRemedyReplayApi.md new file mode 100644 index 00000000..803be7cc --- /dev/null +++ b/docs/InternalRemedyReplayApi.md @@ -0,0 +1,92 @@ +# pfruck_contabo.InternalRemedyReplayApi + +All URIs are relative to *https://api.contabo.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**replay_remedy**](InternalRemedyReplayApi.md#replay_remedy) | **POST** /internal/v1/troubleshooting/remedies/replays | Replay changes for Remedy + + +# **replay_remedy** +> ReplayResponse replay_remedy(x_request_id, remedies_replay_request, x_trace_id=x_trace_id) + +Replay changes for Remedy + +Replay changes for Remedy + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.remedies_replay_request import RemediesReplayRequest +from pfruck_contabo.models.replay_response import ReplayResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.InternalRemedyReplayApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + remedies_replay_request = pfruck_contabo.RemediesReplayRequest() # RemediesReplayRequest | + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Replay changes for Remedy + api_response = api_instance.replay_remedy(x_request_id, remedies_replay_request, x_trace_id=x_trace_id) + print("The response of InternalRemedyReplayApi->replay_remedy:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InternalRemedyReplayApi->replay_remedy: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **remedies_replay_request** | [**RemediesReplayRequest**](RemediesReplayRequest.md)| | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**ReplayResponse**](ReplayResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**202** | Audit count sent to publish | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/InternalRemedyTemplatesApi.md b/docs/InternalRemedyTemplatesApi.md new file mode 100644 index 00000000..0c77689d --- /dev/null +++ b/docs/InternalRemedyTemplatesApi.md @@ -0,0 +1,200 @@ +# pfruck_contabo.InternalRemedyTemplatesApi + +All URIs are relative to *https://api.contabo.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_remedy_template**](InternalRemedyTemplatesApi.md#get_remedy_template) | **GET** /internal/v1/troubleshooting/remedy-templates/{orgId}/{remedyTemplateId} | Get remedy +[**list_remedy_templates**](InternalRemedyTemplatesApi.md#list_remedy_templates) | **GET** /internal/v1/troubleshooting/remedy-templates | List remedy templates + + +# **get_remedy_template** +> RemedyTemplatesGetResponse get_remedy_template(x_request_id, org_id, remedy_template_id, x_trace_id=x_trace_id) + +Get remedy + +Get a single remedy template by id + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.remedy_templates_get_response import RemedyTemplatesGetResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.InternalRemedyTemplatesApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + org_id = 'cntb' # str | Org ID + remedy_template_id = 12345 # float | Remedy template's id + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Get remedy + api_response = api_instance.get_remedy_template(x_request_id, org_id, remedy_template_id, x_trace_id=x_trace_id) + print("The response of InternalRemedyTemplatesApi->get_remedy_template:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InternalRemedyTemplatesApi->get_remedy_template: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **org_id** | **str**| Org ID | + **remedy_template_id** | **float**| Remedy template's id | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**RemedyTemplatesGetResponse**](RemedyTemplatesGetResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Single remedy template | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_remedy_templates** +> RemedyTemplatesListResponse list_remedy_templates(x_request_id, org_ids, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, creation_start_time=creation_start_time, creation_end_time=creation_end_time, modification_start_time=modification_start_time, modification_end_time=modification_end_time, account_id=account_id, internal=internal, object_type=object_type, collector_class=collector_class, remedy_class=remedy_class) + +List remedy templates + +List and filter all remedy templates + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.remedy_templates_list_response import RemedyTemplatesListResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.InternalRemedyTemplatesApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + org_ids = ['org_ids_example'] # List[str] | Org IDs + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + page = 1 # int | Number of page to be fetched. (optional) + size = 10 # int | Number of elements per page. (optional) + order_by = ['name:asc'] # List[str] | Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. (optional) + creation_start_time = '2021-06-03T06:27:12Z' # datetime | Start of search time range for created date (optional) + creation_end_time = '2021-06-03T10:27:12Z' # datetime | End of search time range for created date (optional) + modification_start_time = '2021-06-03T06:27:12Z' # datetime | Start of search time range for modified date (optional) + modification_end_time = '2021-06-03T10:27:12Z' # datetime | End of search time range for modified date (optional) + account_id = 'DE-123' # str | Filter by account ID (optional) + internal = false # bool | Is remedy only internal (not shown to the customer) (optional) + object_type = 'vserver' # str | Object type for which the remedy template can be used (optional) + collector_class = 'InstanceCollector.ts' # str | Class used to collect the required information for the remedy (optional) + remedy_class = 'PingRemedy.ts' # str | Class used to perform the remedy (optional) + + try: + # List remedy templates + api_response = api_instance.list_remedy_templates(x_request_id, org_ids, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, creation_start_time=creation_start_time, creation_end_time=creation_end_time, modification_start_time=modification_start_time, modification_end_time=modification_end_time, account_id=account_id, internal=internal, object_type=object_type, collector_class=collector_class, remedy_class=remedy_class) + print("The response of InternalRemedyTemplatesApi->list_remedy_templates:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InternalRemedyTemplatesApi->list_remedy_templates: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **org_ids** | [**List[str]**](str.md)| Org IDs | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + **page** | **int**| Number of page to be fetched. | [optional] + **size** | **int**| Number of elements per page. | [optional] + **order_by** | [**List[str]**](str.md)| Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. | [optional] + **creation_start_time** | **datetime**| Start of search time range for created date | [optional] + **creation_end_time** | **datetime**| End of search time range for created date | [optional] + **modification_start_time** | **datetime**| Start of search time range for modified date | [optional] + **modification_end_time** | **datetime**| End of search time range for modified date | [optional] + **account_id** | **str**| Filter by account ID | [optional] + **internal** | **bool**| Is remedy only internal (not shown to the customer) | [optional] + **object_type** | **str**| Object type for which the remedy template can be used | [optional] + **collector_class** | **str**| Class used to collect the required information for the remedy | [optional] + **remedy_class** | **str**| Class used to perform the remedy | [optional] + +### Return type + +[**RemedyTemplatesListResponse**](RemedyTemplatesListResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Paginated list of remedy templates | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/IpConfig.md b/docs/IpConfig.md index cb9df035..5c9c39f3 100644 --- a/docs/IpConfig.md +++ b/docs/IpConfig.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**v4** | [**IpV4**](IpV4.md) | | +**v4** | [**IpV41**](IpV41.md) | | **v6** | [**IpV6**](IpV6.md) | | ## Example diff --git a/docs/IpConfig1.md b/docs/IpConfig1.md new file mode 100644 index 00000000..381a3085 --- /dev/null +++ b/docs/IpConfig1.md @@ -0,0 +1,30 @@ +# IpConfig1 + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**v4** | [**IpV42**](IpV42.md) | | +**v6** | [**IpV6**](IpV6.md) | | + +## Example + +```python +from pfruck_contabo.models.ip_config1 import IpConfig1 + +# TODO update the JSON string below +json = "{}" +# create an instance of IpConfig1 from a JSON string +ip_config1_instance = IpConfig1.from_json(json) +# print the JSON string representation of the object +print(IpConfig1.to_json()) + +# convert the object into a dict +ip_config1_dict = ip_config1_instance.to_dict() +# create an instance of IpConfig1 from a dict +ip_config1_from_dict = IpConfig1.from_dict(ip_config1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IpConfig2.md b/docs/IpConfig2.md new file mode 100644 index 00000000..6f09d7f3 --- /dev/null +++ b/docs/IpConfig2.md @@ -0,0 +1,30 @@ +# IpConfig2 + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**v4** | [**IpV43**](IpV43.md) | | +**v6** | [**IpV6**](IpV6.md) | | + +## Example + +```python +from pfruck_contabo.models.ip_config2 import IpConfig2 + +# TODO update the JSON string below +json = "{}" +# create an instance of IpConfig2 from a JSON string +ip_config2_instance = IpConfig2.from_json(json) +# print the JSON string representation of the object +print(IpConfig2.to_json()) + +# convert the object into a dict +ip_config2_dict = ip_config2_instance.to_dict() +# create an instance of IpConfig2 from a dict +ip_config2_from_dict = IpConfig2.from_dict(ip_config2_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IpV4.md b/docs/IpV4.md index 0c6406c7..0a7b097f 100644 --- a/docs/IpV4.md +++ b/docs/IpV4.md @@ -5,9 +5,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ip** | **str** | IP Address | -**netmask_cidr** | **int** | Netmask CIDR | +**ip** | **str** | IP address | **gateway** | **str** | Gateway | +**netmask_cidr** | **int** | Netmask CIDR | +**broadcast** | **str** | Broadcast address | +**net** | **str** | Net address | ## Example diff --git a/docs/IpV41.md b/docs/IpV41.md index 080d5e08..a503e3d8 100644 --- a/docs/IpV41.md +++ b/docs/IpV41.md @@ -5,11 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ip** | **str** | IP address | -**gateway** | **str** | Gateway | +**ip** | **str** | IP Address | **netmask_cidr** | **int** | Netmask CIDR | -**broadcast** | **str** | Broadcast address | -**net** | **str** | Net address | +**gateway** | **str** | Gateway | ## Example diff --git a/docs/IpV42.md b/docs/IpV42.md new file mode 100644 index 00000000..ed228b01 --- /dev/null +++ b/docs/IpV42.md @@ -0,0 +1,31 @@ +# IpV42 + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ip** | **str** | IP Address | +**netmask_cidr** | **int** | Netmask CIDR | +**gateway** | **str** | Gateway | + +## Example + +```python +from pfruck_contabo.models.ip_v42 import IpV42 + +# TODO update the JSON string below +json = "{}" +# create an instance of IpV42 from a JSON string +ip_v42_instance = IpV42.from_json(json) +# print the JSON string representation of the object +print(IpV42.to_json()) + +# convert the object into a dict +ip_v42_dict = ip_v42_instance.to_dict() +# create an instance of IpV42 from a dict +ip_v42_from_dict = IpV42.from_dict(ip_v42_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IpV43.md b/docs/IpV43.md new file mode 100644 index 00000000..323f06c7 --- /dev/null +++ b/docs/IpV43.md @@ -0,0 +1,31 @@ +# IpV43 + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ip** | **str** | IP Address | +**netmask_cidr** | **int** | Netmask CIDR | +**gateway** | **str** | Gateway | + +## Example + +```python +from pfruck_contabo.models.ip_v43 import IpV43 + +# TODO update the JSON string below +json = "{}" +# create an instance of IpV43 from a JSON string +ip_v43_instance = IpV43.from_json(json) +# print the JSON string representation of the object +print(IpV43.to_json()) + +# convert the object into a dict +ip_v43_dict = ip_v43_instance.to_dict() +# create an instance of IpV43 from a dict +ip_v43_from_dict = IpV43.from_dict(ip_v43_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListDnsZoneRecordsResponse.md b/docs/ListDnsZoneRecordsResponse.md new file mode 100644 index 00000000..20e994da --- /dev/null +++ b/docs/ListDnsZoneRecordsResponse.md @@ -0,0 +1,31 @@ +# ListDnsZoneRecordsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**PaginationMeta**](PaginationMeta.md) | Data about pagination like how many results, pages, page size. | +**data** | [**List[DnsZoneRecordResponse]**](DnsZoneRecordResponse.md) | | +**links** | [**Links**](Links.md) | | + +## Example + +```python +from pfruck_contabo.models.list_dns_zone_records_response import ListDnsZoneRecordsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ListDnsZoneRecordsResponse from a JSON string +list_dns_zone_records_response_instance = ListDnsZoneRecordsResponse.from_json(json) +# print the JSON string representation of the object +print(ListDnsZoneRecordsResponse.to_json()) + +# convert the object into a dict +list_dns_zone_records_response_dict = list_dns_zone_records_response_instance.to_dict() +# create an instance of ListDnsZoneRecordsResponse from a dict +list_dns_zone_records_response_from_dict = ListDnsZoneRecordsResponse.from_dict(list_dns_zone_records_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListDnsZonesResponse.md b/docs/ListDnsZonesResponse.md new file mode 100644 index 00000000..7a723871 --- /dev/null +++ b/docs/ListDnsZonesResponse.md @@ -0,0 +1,31 @@ +# ListDnsZonesResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**PaginationMeta**](PaginationMeta.md) | Data about pagination like how many results, pages, page size. | +**data** | [**List[DnsZoneResponse]**](DnsZoneResponse.md) | | +**links** | [**Links**](Links.md) | | + +## Example + +```python +from pfruck_contabo.models.list_dns_zones_response import ListDnsZonesResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ListDnsZonesResponse from a JSON string +list_dns_zones_response_instance = ListDnsZonesResponse.from_json(json) +# print the JSON string representation of the object +print(ListDnsZonesResponse.to_json()) + +# convert the object into a dict +list_dns_zones_response_dict = list_dns_zones_response_instance.to_dict() +# create an instance of ListDnsZonesResponse from a dict +list_dns_zones_response_from_dict = ListDnsZonesResponse.from_dict(list_dns_zones_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListFirewallAuditResponse.md b/docs/ListFirewallAuditResponse.md new file mode 100644 index 00000000..e113331b --- /dev/null +++ b/docs/ListFirewallAuditResponse.md @@ -0,0 +1,31 @@ +# ListFirewallAuditResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**PaginationMeta**](PaginationMeta.md) | Data about pagination like how many results, pages, page size. | +**data** | [**List[FirewallAuditResponse]**](FirewallAuditResponse.md) | | +**links** | [**Links**](Links.md) | | + +## Example + +```python +from pfruck_contabo.models.list_firewall_audit_response import ListFirewallAuditResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ListFirewallAuditResponse from a JSON string +list_firewall_audit_response_instance = ListFirewallAuditResponse.from_json(json) +# print the JSON string representation of the object +print(ListFirewallAuditResponse.to_json()) + +# convert the object into a dict +list_firewall_audit_response_dict = list_firewall_audit_response_instance.to_dict() +# create an instance of ListFirewallAuditResponse from a dict +list_firewall_audit_response_from_dict = ListFirewallAuditResponse.from_dict(list_firewall_audit_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListFirewallResponse.md b/docs/ListFirewallResponse.md new file mode 100644 index 00000000..b1e6aa03 --- /dev/null +++ b/docs/ListFirewallResponse.md @@ -0,0 +1,31 @@ +# ListFirewallResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**PaginationMeta**](PaginationMeta.md) | Data about pagination like how many results, pages, page size. | +**data** | [**List[ListFirewallResponseData]**](ListFirewallResponseData.md) | | +**links** | [**Links**](Links.md) | | + +## Example + +```python +from pfruck_contabo.models.list_firewall_response import ListFirewallResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ListFirewallResponse from a JSON string +list_firewall_response_instance = ListFirewallResponse.from_json(json) +# print the JSON string representation of the object +print(ListFirewallResponse.to_json()) + +# convert the object into a dict +list_firewall_response_dict = list_firewall_response_instance.to_dict() +# create an instance of ListFirewallResponse from a dict +list_firewall_response_from_dict = ListFirewallResponse.from_dict(list_firewall_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListFirewallResponseData.md b/docs/ListFirewallResponseData.md new file mode 100644 index 00000000..168c652b --- /dev/null +++ b/docs/ListFirewallResponseData.md @@ -0,0 +1,39 @@ +# ListFirewallResponseData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_id** | **str** | Your customer tenant id | +**customer_id** | **str** | Your customer number | +**firewall_id** | **str** | Your firewall id. | +**name** | **str** | The name of the firewall. | +**description** | **str** | The description of the firewall. | +**status** | **str** | Inactive status means no rules of this firewall are set for all assigned instances. | +**instance_status** | [**List[InstanceStatusRepresentation]**](InstanceStatusRepresentation.md) | | +**instances** | [**List[InstanceDetails]**](InstanceDetails.md) | | +**rules** | [**Rules**](Rules.md) | | +**created_date** | **datetime** | The creation date time for the firewall | +**updated_date** | **datetime** | The update date time for the firewall | + +## Example + +```python +from pfruck_contabo.models.list_firewall_response_data import ListFirewallResponseData + +# TODO update the JSON string below +json = "{}" +# create an instance of ListFirewallResponseData from a JSON string +list_firewall_response_data_instance = ListFirewallResponseData.from_json(json) +# print the JSON string representation of the object +print(ListFirewallResponseData.to_json()) + +# convert the object into a dict +list_firewall_response_data_dict = list_firewall_response_data_instance.to_dict() +# create an instance of ListFirewallResponseData from a dict +list_firewall_response_data_from_dict = ListFirewallResponseData.from_dict(list_firewall_response_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListInstancesResponseData.md b/docs/ListInstancesResponseData.md index 388980e2..5c6db1bb 100644 --- a/docs/ListInstancesResponseData.md +++ b/docs/ListInstancesResponseData.md @@ -16,7 +16,7 @@ Name | Type | Description | Notes **region_name** | **str** | The name of the region where the instance is located. | **product_id** | **str** | Product ID | **image_id** | **str** | Image's id | -**ip_config** | [**IpConfig**](IpConfig.md) | | +**ip_config** | [**IpConfig2**](IpConfig2.md) | | **mac_address** | **str** | MAC Address | **ram_mb** | **float** | Image RAM size in MB | **cpu_cores** | **int** | CPU core count | @@ -25,7 +25,7 @@ Name | Type | Description | Notes **ssh_keys** | **List[int]** | Array of `secretId`s of public SSH keys for logging into as `defaultUser` with administrator/root privileges. Applies to Linux/BSD systems. Please refer to Secrets Management API. | **created_date** | **datetime** | The creation date for the instance | **cancel_date** | **date** | The date on which the instance will be cancelled | -**status** | [**InstanceStatus**](InstanceStatus.md) | | +**status** | [**InstanceStatus**](InstanceStatus.md) | Instance's status | **v_host_id** | **int** | ID of host system | **v_host_number** | **int** | Number of host system | **v_host_name** | **str** | Name of host system | @@ -34,6 +34,7 @@ Name | Type | Description | Notes **product_type** | **str** | Instance's category depending on Product Id | **product_name** | **str** | Instance's Product Name | **default_user** | **str** | Default user name created for login during (re-)installation with administrative privileges. Allowed values for Linux/BSD are `admin` (use sudo to apply administrative privileges like root) or `root`. Allowed values for Windows are `admin` (has administrative privileges like administrator) or `administrator`. | [optional] +**application_id** | **str** | Application ID | ## Example diff --git a/docs/ListPresetRulesResponse.md b/docs/ListPresetRulesResponse.md new file mode 100644 index 00000000..a4900a6c --- /dev/null +++ b/docs/ListPresetRulesResponse.md @@ -0,0 +1,30 @@ +# ListPresetRulesResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[PresetRulesResponse]**](PresetRulesResponse.md) | | +**links** | [**SelfLinks**](SelfLinks.md) | | + +## Example + +```python +from pfruck_contabo.models.list_preset_rules_response import ListPresetRulesResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ListPresetRulesResponse from a JSON string +list_preset_rules_response_instance = ListPresetRulesResponse.from_json(json) +# print the JSON string representation of the object +print(ListPresetRulesResponse.to_json()) + +# convert the object into a dict +list_preset_rules_response_dict = list_preset_rules_response_instance.to_dict() +# create an instance of ListPresetRulesResponse from a dict +list_preset_rules_response_from_dict = ListPresetRulesResponse.from_dict(list_preset_rules_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListPtrRecordsResponse.md b/docs/ListPtrRecordsResponse.md new file mode 100644 index 00000000..5ce1b8d0 --- /dev/null +++ b/docs/ListPtrRecordsResponse.md @@ -0,0 +1,31 @@ +# ListPtrRecordsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**PaginationMeta**](PaginationMeta.md) | Data about pagination like how many results, pages, page size. | +**data** | [**List[PtrRecordResponse]**](PtrRecordResponse.md) | | +**links** | [**Links**](Links.md) | | + +## Example + +```python +from pfruck_contabo.models.list_ptr_records_response import ListPtrRecordsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ListPtrRecordsResponse from a JSON string +list_ptr_records_response_instance = ListPtrRecordsResponse.from_json(json) +# print the JSON string representation of the object +print(ListPtrRecordsResponse.to_json()) + +# convert the object into a dict +list_ptr_records_response_dict = list_ptr_records_response_instance.to_dict() +# create an instance of ListPtrRecordsResponse from a dict +list_ptr_records_response_from_dict = ListPtrRecordsResponse.from_dict(list_ptr_records_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListVipResponseData.md b/docs/ListVipResponseData.md index b078e0f9..531c82b3 100644 --- a/docs/ListVipResponseData.md +++ b/docs/ListVipResponseData.md @@ -16,7 +16,7 @@ Name | Type | Description | Notes **resource_display_name** | **str** | Resource display name. | **ip_version** | **str** | Version of Ip. | **type** | **str** | The VIP type. | [optional] -**v4** | [**IpV41**](IpV41.md) | | [optional] +**v4** | [**IpV4**](IpV4.md) | | [optional] ## Example diff --git a/docs/MinimumRequirements.md b/docs/MinimumRequirements.md index 75b3ead6..eb50255a 100644 --- a/docs/MinimumRequirements.md +++ b/docs/MinimumRequirements.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes **cpu_cores** | **float** | CPU Cores Requirement | [optional] **ram_mb** | **float** | Memory Requirement in MB | [optional] **disk_mb** | **float** | Storage Requirement in MB | [optional] +**valid_product_ids** | **List[str]** | Valid Product IDs for this application | [optional] ## Example diff --git a/docs/Nameserver.md b/docs/Nameserver.md new file mode 100644 index 00000000..3fd00d55 --- /dev/null +++ b/docs/Nameserver.md @@ -0,0 +1,31 @@ +# Nameserver + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hostname** | **List[str]** | Nameservers | +**ip_v4** | **List[str]** | IPv4 of nameserver | [optional] +**ip_v6** | **List[str]** | IPv6 of nameserver | [optional] + +## Example + +```python +from pfruck_contabo.models.nameserver import Nameserver + +# TODO update the JSON string below +json = "{}" +# create an instance of Nameserver from a JSON string +nameserver_instance = Nameserver.from_json(json) +# print the JSON string representation of the object +print(Nameserver.to_json()) + +# convert the object into a dict +nameserver_dict = nameserver_instance.to_dict() +# create an instance of Nameserver from a dict +nameserver_from_dict = Nameserver.from_dict(nameserver_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ObjectStoragesApi.md b/docs/ObjectStoragesApi.md index 8bb0cee2..fe12817b 100644 --- a/docs/ObjectStoragesApi.md +++ b/docs/ObjectStoragesApi.md @@ -15,7 +15,7 @@ Method | HTTP request | Description # **cancel_object_storage** -> CancelObjectStorageResponse cancel_object_storage(x_request_id, object_storage_id, body, x_trace_id=x_trace_id) +> CancelObjectStorageResponse cancel_object_storage(x_request_id, object_storage_id, cancel_object_storage_request, x_trace_id=x_trace_id) Cancels the specified object storage at the next possible date @@ -27,6 +27,7 @@ Cancels the specified object storage at the next possible date. Please be aware ```python import pfruck_contabo +from pfruck_contabo.models.cancel_object_storage_request import CancelObjectStorageRequest from pfruck_contabo.models.cancel_object_storage_response import CancelObjectStorageResponse from pfruck_contabo.rest import ApiException from pprint import pprint @@ -53,12 +54,12 @@ with pfruck_contabo.ApiClient(configuration) as api_client: api_instance = pfruck_contabo.ObjectStoragesApi(api_client) x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. object_storage_id = '4a6f95be-2ac0-4e3c-8eed-0dc67afed640' # str | The identifier of the object storage. - body = None # object | + cancel_object_storage_request = pfruck_contabo.CancelObjectStorageRequest() # CancelObjectStorageRequest | x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) try: # Cancels the specified object storage at the next possible date - api_response = api_instance.cancel_object_storage(x_request_id, object_storage_id, body, x_trace_id=x_trace_id) + api_response = api_instance.cancel_object_storage(x_request_id, object_storage_id, cancel_object_storage_request, x_trace_id=x_trace_id) print("The response of ObjectStoragesApi->cancel_object_storage:\n") pprint(api_response) except Exception as e: @@ -74,7 +75,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | **object_storage_id** | **str**| The identifier of the object storage. | - **body** | **object**| | + **cancel_object_storage_request** | [**CancelObjectStorageRequest**](CancelObjectStorageRequest.md)| | **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] ### Return type diff --git a/docs/OptimalRequirements.md b/docs/OptimalRequirements.md index a1c3f02a..b9f90d6a 100644 --- a/docs/OptimalRequirements.md +++ b/docs/OptimalRequirements.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes **cpu_cores** | **float** | CPU Cores Requirement | [optional] **ram_mb** | **float** | Memory Requirement in MB | [optional] **disk_mb** | **float** | Storage Requirement in MB | [optional] +**valid_product_ids** | **List[str]** | Valid Product IDs for this application | [optional] ## Example diff --git a/docs/PatchFirewallRequest.md b/docs/PatchFirewallRequest.md new file mode 100644 index 00000000..e81ed8de --- /dev/null +++ b/docs/PatchFirewallRequest.md @@ -0,0 +1,31 @@ +# PatchFirewallRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | The name of the firewall | [optional] +**status** | **str** | Active status of the firewall enables all rules, thus filtering traffic. Inactive status does not filter any traffic. | [optional] +**description** | **str** | The description of the firewall. | [optional] + +## Example + +```python +from pfruck_contabo.models.patch_firewall_request import PatchFirewallRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of PatchFirewallRequest from a JSON string +patch_firewall_request_instance = PatchFirewallRequest.from_json(json) +# print the JSON string representation of the object +print(PatchFirewallRequest.to_json()) + +# convert the object into a dict +patch_firewall_request_dict = patch_firewall_request_instance.to_dict() +# create an instance of PatchFirewallRequest from a dict +patch_firewall_request_from_dict = PatchFirewallRequest.from_dict(patch_firewall_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PatchFirewallResponse.md b/docs/PatchFirewallResponse.md new file mode 100644 index 00000000..ff7231c2 --- /dev/null +++ b/docs/PatchFirewallResponse.md @@ -0,0 +1,30 @@ +# PatchFirewallResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[FirewallResponse]**](FirewallResponse.md) | | +**links** | [**SelfLinks**](SelfLinks.md) | | + +## Example + +```python +from pfruck_contabo.models.patch_firewall_response import PatchFirewallResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of PatchFirewallResponse from a JSON string +patch_firewall_response_instance = PatchFirewallResponse.from_json(json) +# print the JSON string representation of the object +print(PatchFirewallResponse.to_json()) + +# convert the object into a dict +patch_firewall_response_dict = patch_firewall_response_instance.to_dict() +# create an instance of PatchFirewallResponse from a dict +patch_firewall_response_from_dict = PatchFirewallResponse.from_dict(patch_firewall_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PatchInstanceRequest.md b/docs/PatchInstanceRequest.md index c07fe4fb..0511dc09 100644 --- a/docs/PatchInstanceRequest.md +++ b/docs/PatchInstanceRequest.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**display_name** | **str** | The display name of the instance | [optional] +**display_name** | **str** | The display name of the instance. Pass an empty string to clear it. | [optional] ## Example diff --git a/docs/PresetRulesResponse.md b/docs/PresetRulesResponse.md new file mode 100644 index 00000000..767ace92 --- /dev/null +++ b/docs/PresetRulesResponse.md @@ -0,0 +1,30 @@ +# PresetRulesResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of the preset rule | +**macro** | **object** | Inbound rules options | + +## Example + +```python +from pfruck_contabo.models.preset_rules_response import PresetRulesResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of PresetRulesResponse from a JSON string +preset_rules_response_instance = PresetRulesResponse.from_json(json) +# print the JSON string representation of the object +print(PresetRulesResponse.to_json()) + +# convert the object into a dict +preset_rules_response_dict = preset_rules_response_instance.to_dict() +# create an instance of PresetRulesResponse from a dict +preset_rules_response_from_dict = PresetRulesResponse.from_dict(preset_rules_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PrivateIpConfig.md b/docs/PrivateIpConfig.md index 76dc4e45..6bc7eeed 100644 --- a/docs/PrivateIpConfig.md +++ b/docs/PrivateIpConfig.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**v4** | [**List[IpV4]**](IpV4.md) | | +**v4** | [**List[IpV41]**](IpV41.md) | | ## Example diff --git a/docs/PtrRecordResponse.md b/docs/PtrRecordResponse.md new file mode 100644 index 00000000..a943b001 --- /dev/null +++ b/docs/PtrRecordResponse.md @@ -0,0 +1,33 @@ +# PtrRecordResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_id** | **str** | Your customer tenant id | +**customer_id** | **str** | Your customer number | +**ip** | **str** | IP Address | +**ttl** | **int** | Time to live for the PTR record in seconds | +**ptr** | **str** | PTR | + +## Example + +```python +from pfruck_contabo.models.ptr_record_response import PtrRecordResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of PtrRecordResponse from a JSON string +ptr_record_response_instance = PtrRecordResponse.from_json(json) +# print the JSON string representation of the object +print(PtrRecordResponse.to_json()) + +# convert the object into a dict +ptr_record_response_dict = ptr_record_response_instance.to_dict() +# create an instance of PtrRecordResponse from a dict +ptr_record_response_from_dict = PtrRecordResponse.from_dict(ptr_record_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PutFirewallRequest.md b/docs/PutFirewallRequest.md new file mode 100644 index 00000000..4d9e357d --- /dev/null +++ b/docs/PutFirewallRequest.md @@ -0,0 +1,29 @@ +# PutFirewallRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rules** | [**RulesRequest**](RulesRequest.md) | | [optional] + +## Example + +```python +from pfruck_contabo.models.put_firewall_request import PutFirewallRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of PutFirewallRequest from a JSON string +put_firewall_request_instance = PutFirewallRequest.from_json(json) +# print the JSON string representation of the object +print(PutFirewallRequest.to_json()) + +# convert the object into a dict +put_firewall_request_dict = put_firewall_request_instance.to_dict() +# create an instance of PutFirewallRequest from a dict +put_firewall_request_from_dict = PutFirewallRequest.from_dict(put_firewall_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PutFirewallResponse.md b/docs/PutFirewallResponse.md new file mode 100644 index 00000000..78109472 --- /dev/null +++ b/docs/PutFirewallResponse.md @@ -0,0 +1,30 @@ +# PutFirewallResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[FirewallResponse]**](FirewallResponse.md) | | +**links** | [**SelfLinks**](SelfLinks.md) | | + +## Example + +```python +from pfruck_contabo.models.put_firewall_response import PutFirewallResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of PutFirewallResponse from a JSON string +put_firewall_response_instance = PutFirewallResponse.from_json(json) +# print the JSON string representation of the object +print(PutFirewallResponse.to_json()) + +# convert the object into a dict +put_firewall_response_dict = put_firewall_response_instance.to_dict() +# create an instance of PutFirewallResponse from a dict +put_firewall_response_from_dict = PutFirewallResponse.from_dict(put_firewall_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RecordAuditResponse.md b/docs/RecordAuditResponse.md new file mode 100644 index 00000000..941db586 --- /dev/null +++ b/docs/RecordAuditResponse.md @@ -0,0 +1,31 @@ +# RecordAuditResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**PaginationMeta**](PaginationMeta.md) | Data about pagination like how many results, pages, page size. | +**data** | [**List[RecordAuditResponseData]**](RecordAuditResponseData.md) | | +**links** | [**Links**](Links.md) | | + +## Example + +```python +from pfruck_contabo.models.record_audit_response import RecordAuditResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of RecordAuditResponse from a JSON string +record_audit_response_instance = RecordAuditResponse.from_json(json) +# print the JSON string representation of the object +print(RecordAuditResponse.to_json()) + +# convert the object into a dict +record_audit_response_dict = record_audit_response_instance.to_dict() +# create an instance of RecordAuditResponse from a dict +record_audit_response_from_dict = RecordAuditResponse.from_dict(record_audit_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RecordAuditResponseData.md b/docs/RecordAuditResponseData.md new file mode 100644 index 00000000..95e802e1 --- /dev/null +++ b/docs/RecordAuditResponseData.md @@ -0,0 +1,40 @@ +# RecordAuditResponseData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | The ID of the audit entry. | +**action** | **str** | Type of the action. | +**timestamp** | **datetime** | When the change took place. | +**tenant_id** | **str** | Customer tenant id | +**customer_id** | **str** | Customer ID | +**changed_by** | **str** | Id of user who performed the change | +**username** | **str** | Name of the user which led to the change. | +**request_id** | **str** | The requestId of the API call which led to the change. | +**trace_id** | **str** | The traceId of the API call which led to the change. | +**record_id** | **int** | The identifier of the Zone recordd | +**zone_name** | **str** | DNS Zone name | +**changes** | **object** | List of actual changes. | [optional] + +## Example + +```python +from pfruck_contabo.models.record_audit_response_data import RecordAuditResponseData + +# TODO update the JSON string below +json = "{}" +# create an instance of RecordAuditResponseData from a JSON string +record_audit_response_data_instance = RecordAuditResponseData.from_json(json) +# print the JSON string representation of the object +print(RecordAuditResponseData.to_json()) + +# convert the object into a dict +record_audit_response_data_dict = record_audit_response_data_instance.to_dict() +# create an instance of RecordAuditResponseData from a dict +record_audit_response_data_from_dict = RecordAuditResponseData.from_dict(record_audit_response_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ReinstallInstanceRequest.md b/docs/ReinstallInstanceRequest.md index 7dd93560..d5fd1216 100644 --- a/docs/ReinstallInstanceRequest.md +++ b/docs/ReinstallInstanceRequest.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **ssh_keys** | **List[int]** | Array of `secretId`s of public SSH keys for logging into as `defaultUser` with administrator/root privileges. Applies to Linux/BSD systems. Please refer to Secrets Management API. | [optional] **root_password** | **int** | `secretId` of the password for the `defaultUser` with administrator/root privileges. For Linux/BSD please use SSH, for Windows RDP. Please refer to Secrets Management API. | [optional] **user_data** | **str** | [Cloud-Init](https://cloud-init.io/) Config in order to customize during start of compute instance. | [optional] -**default_user** | **str** | Default user name created for login during (re-)installation with administrative privileges. Allowed values for Linux/BSD are `admin` (use sudo to apply administrative privileges like root) or `root`. Allowed values for Windows are `admin` (has administrative privileges like administrator) or `administrator`. | [optional] [default to 'admin'] +**default_user** | **str** | Default user name created for login during (re-)installation with administrative privileges. Allowed values for Linux/BSD are `admin` (use sudo to apply administrative privileges like root) or `root`. Allowed values for Windows are `admin` (has administrative privileges like administrator) or `administrator`. | [optional] **application_id** | **str** | Application ID | [optional] ## Example diff --git a/docs/RemediesApi.md b/docs/RemediesApi.md new file mode 100644 index 00000000..150c75cb --- /dev/null +++ b/docs/RemediesApi.md @@ -0,0 +1,352 @@ +# pfruck_contabo.RemediesApi + +All URIs are relative to *https://api.contabo.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**cancel_ext_remedy**](RemediesApi.md#cancel_ext_remedy) | **PATCH** /v1/troubleshooting/remedies/{remedyId} | Cancel remedy +[**get_ext_remedy**](RemediesApi.md#get_ext_remedy) | **GET** /v1/troubleshooting/remedies/{remedyId} | Get remedy +[**list_ext_remedies**](RemediesApi.md#list_ext_remedies) | **GET** /v1/troubleshooting/remedies | List remedy +[**start_ext_remedy**](RemediesApi.md#start_ext_remedy) | **POST** /v1/troubleshooting/remedies | Start remedy + + +# **cancel_ext_remedy** +> ExtRemediesGetResponse cancel_ext_remedy(x_request_id, remedy_id, cancel_request, x_trace_id=x_trace_id) + +Cancel remedy + +Cancel remedy + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.cancel_request import CancelRequest +from pfruck_contabo.models.ext_remedies_get_response import ExtRemediesGetResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.RemediesApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + remedy_id = 12345 # float | Remedy's id + cancel_request = pfruck_contabo.CancelRequest() # CancelRequest | + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Cancel remedy + api_response = api_instance.cancel_ext_remedy(x_request_id, remedy_id, cancel_request, x_trace_id=x_trace_id) + print("The response of RemediesApi->cancel_ext_remedy:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RemediesApi->cancel_ext_remedy: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **remedy_id** | **float**| Remedy's id | + **cancel_request** | [**CancelRequest**](CancelRequest.md)| | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**ExtRemediesGetResponse**](ExtRemediesGetResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Cancelled object | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_ext_remedy** +> ExtRemediesGetResponse get_ext_remedy(x_request_id, remedy_id, x_trace_id=x_trace_id) + +Get remedy + +Get a single remedy by id + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.ext_remedies_get_response import ExtRemediesGetResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.RemediesApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + remedy_id = 12345 # float | Remedy's id + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Get remedy + api_response = api_instance.get_ext_remedy(x_request_id, remedy_id, x_trace_id=x_trace_id) + print("The response of RemediesApi->get_ext_remedy:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RemediesApi->get_ext_remedy: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **remedy_id** | **float**| Remedy's id | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**ExtRemediesGetResponse**](ExtRemediesGetResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Single remedy | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_ext_remedies** +> ExtRemediesListResponse list_ext_remedies(x_request_id, x_trace_id=x_trace_id, object_type=object_type, object_id=object_id, status=status, remedy_collection_id=remedy_collection_id, remedy_template_id=remedy_template_id) + +List remedy + +List and filter all remedy + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.ext_remedies_list_response import ExtRemediesListResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.RemediesApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + object_type = 'vserver' # str | Object type to be handled (optional) + object_id = '4711' # str | ID of the object, to be handled (optional) + status = 'failed' # str | Status of the handle (optional) + remedy_collection_id = 12345 # float | ID of remedy collection if started in scope of a collection (optional) + remedy_template_id = 12345 # float | Remedy Template for this check (optional) + + try: + # List remedy + api_response = api_instance.list_ext_remedies(x_request_id, x_trace_id=x_trace_id, object_type=object_type, object_id=object_id, status=status, remedy_collection_id=remedy_collection_id, remedy_template_id=remedy_template_id) + print("The response of RemediesApi->list_ext_remedies:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RemediesApi->list_ext_remedies: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + **object_type** | **str**| Object type to be handled | [optional] + **object_id** | **str**| ID of the object, to be handled | [optional] + **status** | **str**| Status of the handle | [optional] + **remedy_collection_id** | **float**| ID of remedy collection if started in scope of a collection | [optional] + **remedy_template_id** | **float**| Remedy Template for this check | [optional] + +### Return type + +[**ExtRemediesListResponse**](ExtRemediesListResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Paginated list of remedy | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **start_ext_remedy** +> ExtRemediesGetResponse start_ext_remedy(x_request_id, base_remedy_create_request, x_trace_id=x_trace_id) + +Start remedy + +Start a new remedy + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.base_remedy_create_request import BaseRemedyCreateRequest +from pfruck_contabo.models.ext_remedies_get_response import ExtRemediesGetResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.RemediesApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + base_remedy_create_request = pfruck_contabo.BaseRemedyCreateRequest() # BaseRemedyCreateRequest | + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Start remedy + api_response = api_instance.start_ext_remedy(x_request_id, base_remedy_create_request, x_trace_id=x_trace_id) + print("The response of RemediesApi->start_ext_remedy:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RemediesApi->start_ext_remedy: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **base_remedy_create_request** | [**BaseRemedyCreateRequest**](BaseRemedyCreateRequest.md)| | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**ExtRemediesGetResponse**](ExtRemediesGetResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Started object | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/RemediesAuditListResponse.md b/docs/RemediesAuditListResponse.md new file mode 100644 index 00000000..a3788760 --- /dev/null +++ b/docs/RemediesAuditListResponse.md @@ -0,0 +1,31 @@ +# RemediesAuditListResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**PaginationMeta**](PaginationMeta.md) | Data about pagination like how many results, pages, page size. | +**data** | [**List[RemediesAuditResponse]**](RemediesAuditResponse.md) | | +**links** | [**Links**](Links.md) | | + +## Example + +```python +from pfruck_contabo.models.remedies_audit_list_response import RemediesAuditListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of RemediesAuditListResponse from a JSON string +remedies_audit_list_response_instance = RemediesAuditListResponse.from_json(json) +# print the JSON string representation of the object +print(RemediesAuditListResponse.to_json()) + +# convert the object into a dict +remedies_audit_list_response_dict = remedies_audit_list_response_instance.to_dict() +# create an instance of RemediesAuditListResponse from a dict +remedies_audit_list_response_from_dict = RemediesAuditListResponse.from_dict(remedies_audit_list_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RemediesAuditResponse.md b/docs/RemediesAuditResponse.md new file mode 100644 index 00000000..957f90c3 --- /dev/null +++ b/docs/RemediesAuditResponse.md @@ -0,0 +1,42 @@ +# RemediesAuditResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_date** | **datetime** | Creation date | +**modified_date** | **datetime** | Modify date | +**org_id** | **str** | Org id | +**account_id** | **str** | Account id | +**audit_id** | **int** | The ID of the audit entry. | +**action** | **str** | Type of the action. | +**foreign_changed_by** | **str** | Id of a foreign user (given on the api request via header) who performed the change | +**foreign_username** | **str** | Name of the foreign user (given on the api request via header) which led to the change. | +**changed_by** | **str** | Id of user who performed the change | +**username** | **str** | Name of the user which led to the change. | +**request_id** | **str** | The requestId of the API call which led to the change. | +**trace_id** | **str** | The traceId of the API call which led to the change. | +**changes** | [**Changes**](Changes.md) | List of changed properties | +**remedy_id** | **float** | Remedy's id | + +## Example + +```python +from pfruck_contabo.models.remedies_audit_response import RemediesAuditResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of RemediesAuditResponse from a JSON string +remedies_audit_response_instance = RemediesAuditResponse.from_json(json) +# print the JSON string representation of the object +print(RemediesAuditResponse.to_json()) + +# convert the object into a dict +remedies_audit_response_dict = remedies_audit_response_instance.to_dict() +# create an instance of RemediesAuditResponse from a dict +remedies_audit_response_from_dict = RemediesAuditResponse.from_dict(remedies_audit_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RemediesCreateRequest.md b/docs/RemediesCreateRequest.md new file mode 100644 index 00000000..67168f97 --- /dev/null +++ b/docs/RemediesCreateRequest.md @@ -0,0 +1,34 @@ +# RemediesCreateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**object_type** | **str** | Object type to be handled | +**object_id** | **str** | ID of the object, to be handled | +**remedy_template_id** | **float** | Remedy Template for this remedy | +**remedy_collection_id** | **float** | Remedy Collection for this remedy | [optional] +**org_id** | **str** | Id of your organization, if unknown please contact us | +**account_id** | **str** | Account Id | + +## Example + +```python +from pfruck_contabo.models.remedies_create_request import RemediesCreateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of RemediesCreateRequest from a JSON string +remedies_create_request_instance = RemediesCreateRequest.from_json(json) +# print the JSON string representation of the object +print(RemediesCreateRequest.to_json()) + +# convert the object into a dict +remedies_create_request_dict = remedies_create_request_instance.to_dict() +# create an instance of RemediesCreateRequest from a dict +remedies_create_request_from_dict = RemediesCreateRequest.from_dict(remedies_create_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RemediesGetResponse.md b/docs/RemediesGetResponse.md new file mode 100644 index 00000000..5f1dea60 --- /dev/null +++ b/docs/RemediesGetResponse.md @@ -0,0 +1,30 @@ +# RemediesGetResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[RemedyResponse]**](RemedyResponse.md) | | +**links** | [**SelfLinks**](SelfLinks.md) | | + +## Example + +```python +from pfruck_contabo.models.remedies_get_response import RemediesGetResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of RemediesGetResponse from a JSON string +remedies_get_response_instance = RemediesGetResponse.from_json(json) +# print the JSON string representation of the object +print(RemediesGetResponse.to_json()) + +# convert the object into a dict +remedies_get_response_dict = remedies_get_response_instance.to_dict() +# create an instance of RemediesGetResponse from a dict +remedies_get_response_from_dict = RemediesGetResponse.from_dict(remedies_get_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RemediesListResponse.md b/docs/RemediesListResponse.md new file mode 100644 index 00000000..aad162df --- /dev/null +++ b/docs/RemediesListResponse.md @@ -0,0 +1,31 @@ +# RemediesListResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**PaginationMeta**](PaginationMeta.md) | Data about pagination like how many results, pages, page size. | +**data** | [**List[RemedyResponse]**](RemedyResponse.md) | | +**links** | [**Links**](Links.md) | | + +## Example + +```python +from pfruck_contabo.models.remedies_list_response import RemediesListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of RemediesListResponse from a JSON string +remedies_list_response_instance = RemediesListResponse.from_json(json) +# print the JSON string representation of the object +print(RemediesListResponse.to_json()) + +# convert the object into a dict +remedies_list_response_dict = remedies_list_response_instance.to_dict() +# create an instance of RemediesListResponse from a dict +remedies_list_response_from_dict = RemediesListResponse.from_dict(remedies_list_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RemediesReplayRequest.md b/docs/RemediesReplayRequest.md new file mode 100644 index 00000000..98ccb7fd --- /dev/null +++ b/docs/RemediesReplayRequest.md @@ -0,0 +1,34 @@ +# RemediesReplayRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**org_id** | **str** | Id of your organization, if unknown please contact us | +**account_id** | **str** | Account Id | +**creation_start_time** | **datetime** | Earliest creation date of changes to replay | [optional] +**creation_end_time** | **datetime** | Latest creation date of changes to replay | [optional] +**rate** | **float** | Message publishing frequency. How many messages per second get published. Default: 20 | [optional] +**remedy_ids** | **List[float]** | Remedy's id | [optional] + +## Example + +```python +from pfruck_contabo.models.remedies_replay_request import RemediesReplayRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of RemediesReplayRequest from a JSON string +remedies_replay_request_instance = RemediesReplayRequest.from_json(json) +# print the JSON string representation of the object +print(RemediesReplayRequest.to_json()) + +# convert the object into a dict +remedies_replay_request_dict = remedies_replay_request_instance.to_dict() +# create an instance of RemediesReplayRequest from a dict +remedies_replay_request_from_dict = RemediesReplayRequest.from_dict(remedies_replay_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RemedyResponse.md b/docs/RemedyResponse.md new file mode 100644 index 00000000..ddab7767 --- /dev/null +++ b/docs/RemedyResponse.md @@ -0,0 +1,44 @@ +# RemedyResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**internal** | **bool** | Is internal (not shown to the customer) | +**status** | **str** | Status of the handle | +**object_type** | **str** | Object type to be handled | +**object_id** | **str** | ID of the object, to be handled | +**remedy_id** | **float** | Remedy's id | +**remedy_collection_id** | **float** | ID of remedy collection if started in scope of a collection | +**remedy_template_id** | **float** | Remedy Template for this remedy | +**name** | **str** | Name of this remedy template | +**note** | **str** | Note to be shown to the customer | +**duration_ms** | **float** | Duration of the remedy in milliseconds | +**created_date** | **datetime** | Creation date | +**modified_date** | **datetime** | Modify date | +**org_id** | **str** | Org id | +**account_id** | **str** | Account id | +**internal_note** | **str** | Note which is shown only internally to the agent | +**log** | **str** | Detailed log of the check execution | + +## Example + +```python +from pfruck_contabo.models.remedy_response import RemedyResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of RemedyResponse from a JSON string +remedy_response_instance = RemedyResponse.from_json(json) +# print the JSON string representation of the object +print(RemedyResponse.to_json()) + +# convert the object into a dict +remedy_response_dict = remedy_response_instance.to_dict() +# create an instance of RemedyResponse from a dict +remedy_response_from_dict = RemedyResponse.from_dict(remedy_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RemedyTemplateResponse.md b/docs/RemedyTemplateResponse.md new file mode 100644 index 00000000..2a10fb50 --- /dev/null +++ b/docs/RemedyTemplateResponse.md @@ -0,0 +1,41 @@ +# RemedyTemplateResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_date** | **datetime** | Creation date | +**modified_date** | **datetime** | Modify date | +**org_id** | **str** | Org id | +**account_id** | **str** | Account id | +**remedy_template_id** | **float** | Remedy template's id | +**name** | **str** | Name of the remedy template | +**description** | **str** | Description for the remedy template | +**internal** | **bool** | Is remedy only internal (not shown to the customer) | +**object_type** | **str** | Object type for which the remedy template can be used | +**collector_class** | **str** | Class used to collect the required information for the remedy | +**remedy_class** | **str** | Class used to perform the remedy | +**requirements** | **object** | Requirements for remedy (reboot, reinstall, ...) | +**check_template_ids** | **List[str]** | Check Template IDs that are related to this remedy | + +## Example + +```python +from pfruck_contabo.models.remedy_template_response import RemedyTemplateResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of RemedyTemplateResponse from a JSON string +remedy_template_response_instance = RemedyTemplateResponse.from_json(json) +# print the JSON string representation of the object +print(RemedyTemplateResponse.to_json()) + +# convert the object into a dict +remedy_template_response_dict = remedy_template_response_instance.to_dict() +# create an instance of RemedyTemplateResponse from a dict +remedy_template_response_from_dict = RemedyTemplateResponse.from_dict(remedy_template_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RemedyTemplatesGetResponse.md b/docs/RemedyTemplatesGetResponse.md new file mode 100644 index 00000000..4990518f --- /dev/null +++ b/docs/RemedyTemplatesGetResponse.md @@ -0,0 +1,30 @@ +# RemedyTemplatesGetResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[RemedyTemplateResponse]**](RemedyTemplateResponse.md) | | +**links** | [**SelfLinks**](SelfLinks.md) | | + +## Example + +```python +from pfruck_contabo.models.remedy_templates_get_response import RemedyTemplatesGetResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of RemedyTemplatesGetResponse from a JSON string +remedy_templates_get_response_instance = RemedyTemplatesGetResponse.from_json(json) +# print the JSON string representation of the object +print(RemedyTemplatesGetResponse.to_json()) + +# convert the object into a dict +remedy_templates_get_response_dict = remedy_templates_get_response_instance.to_dict() +# create an instance of RemedyTemplatesGetResponse from a dict +remedy_templates_get_response_from_dict = RemedyTemplatesGetResponse.from_dict(remedy_templates_get_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RemedyTemplatesListResponse.md b/docs/RemedyTemplatesListResponse.md new file mode 100644 index 00000000..068b9d44 --- /dev/null +++ b/docs/RemedyTemplatesListResponse.md @@ -0,0 +1,31 @@ +# RemedyTemplatesListResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**PaginationMeta**](PaginationMeta.md) | Data about pagination like how many results, pages, page size. | +**data** | [**List[RemedyTemplateResponse]**](RemedyTemplateResponse.md) | | +**links** | [**Links**](Links.md) | | + +## Example + +```python +from pfruck_contabo.models.remedy_templates_list_response import RemedyTemplatesListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of RemedyTemplatesListResponse from a JSON string +remedy_templates_list_response_instance = RemedyTemplatesListResponse.from_json(json) +# print the JSON string representation of the object +print(RemedyTemplatesListResponse.to_json()) + +# convert the object into a dict +remedy_templates_list_response_dict = remedy_templates_list_response_instance.to_dict() +# create an instance of RemedyTemplatesListResponse from a dict +remedy_templates_list_response_from_dict = RemedyTemplatesListResponse.from_dict(remedy_templates_list_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ReplayResponse.md b/docs/ReplayResponse.md new file mode 100644 index 00000000..ba89e60c --- /dev/null +++ b/docs/ReplayResponse.md @@ -0,0 +1,29 @@ +# ReplayResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[AuditCountResponse]**](AuditCountResponse.md) | | + +## Example + +```python +from pfruck_contabo.models.replay_response import ReplayResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ReplayResponse from a JSON string +replay_response_instance = ReplayResponse.from_json(json) +# print the JSON string representation of the object +print(ReplayResponse.to_json()) + +# convert the object into a dict +replay_response_dict = replay_response_instance.to_dict() +# create an instance of ReplayResponse from a dict +replay_response_from_dict = ReplayResponse.from_dict(replay_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Rules.md b/docs/Rules.md new file mode 100644 index 00000000..32804860 --- /dev/null +++ b/docs/Rules.md @@ -0,0 +1,29 @@ +# Rules + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**inbound** | [**List[FirewallRuleResponse]**](FirewallRuleResponse.md) | | + +## Example + +```python +from pfruck_contabo.models.rules import Rules + +# TODO update the JSON string below +json = "{}" +# create an instance of Rules from a JSON string +rules_instance = Rules.from_json(json) +# print the JSON string representation of the object +print(Rules.to_json()) + +# convert the object into a dict +rules_dict = rules_instance.to_dict() +# create an instance of Rules from a dict +rules_from_dict = Rules.from_dict(rules_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RulesRequest.md b/docs/RulesRequest.md new file mode 100644 index 00000000..6525e1f8 --- /dev/null +++ b/docs/RulesRequest.md @@ -0,0 +1,29 @@ +# RulesRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**inbound** | [**List[FirewallRuleRequest]**](FirewallRuleRequest.md) | | + +## Example + +```python +from pfruck_contabo.models.rules_request import RulesRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of RulesRequest from a JSON string +rules_request_instance = RulesRequest.from_json(json) +# print the JSON string representation of the object +print(RulesRequest.to_json()) + +# convert the object into a dict +rules_request_dict = rules_request_instance.to_dict() +# create an instance of RulesRequest from a dict +rules_request_from_dict = RulesRequest.from_dict(rules_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SetDefaultHandleResponse.md b/docs/SetDefaultHandleResponse.md new file mode 100644 index 00000000..8038f560 --- /dev/null +++ b/docs/SetDefaultHandleResponse.md @@ -0,0 +1,30 @@ +# SetDefaultHandleResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[HandleResponse]**](HandleResponse.md) | | +**links** | [**SelfLinks**](SelfLinks.md) | | + +## Example + +```python +from pfruck_contabo.models.set_default_handle_response import SetDefaultHandleResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of SetDefaultHandleResponse from a JSON string +set_default_handle_response_instance = SetDefaultHandleResponse.from_json(json) +# print the JSON string representation of the object +print(SetDefaultHandleResponse.to_json()) + +# convert the object into a dict +set_default_handle_response_dict = set_default_handle_response_instance.to_dict() +# create an instance of SetDefaultHandleResponse from a dict +set_default_handle_response_from_dict = SetDefaultHandleResponse.from_dict(set_default_handle_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SnapshotsAuditsApi.md b/docs/SnapshotsAuditsApi.md index 3a04a3f2..ba86339f 100644 --- a/docs/SnapshotsAuditsApi.md +++ b/docs/SnapshotsAuditsApi.md @@ -53,8 +53,8 @@ with pfruck_contabo.ApiClient(configuration) as api_client: snapshot_id = 'snap1628603855' # str | The identifier of the snapshot (optional) request_id = 'D5FD9FAF-58C0-4406-8F46-F449B8E4FEC3' # str | The requestId of the API call which led to the change (optional) changed_by = '23cbb6d6-cb11-4330-bdff-7bb791df2e23' # str | changedBy of the user which led to the change (optional) - start_date = '2021-06-02' # date | Start of search time range. (optional) - end_date = '2021-06-02' # date | End of search time range. (optional) + start_date = 'Wed Jun 02 00:00:00 UTC 2021' # date | Start of search time range. (optional) + end_date = 'Wed Jun 02 00:00:00 UTC 2021' # date | End of search time range. (optional) try: # List history about your snapshots (audit) triggered via the API diff --git a/docs/SrcCidr.md b/docs/SrcCidr.md new file mode 100644 index 00000000..744c5bb7 --- /dev/null +++ b/docs/SrcCidr.md @@ -0,0 +1,30 @@ +# SrcCidr + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ipv4** | **List[str]** | IPv4 addresses in CIDR notation or \"AnyIPv4\" to allow all IPv4 sources (translates to 0.0.0.0/0) | [optional] +**ipv6** | **List[str]** | IPv6 addresses in CIDR notation or \"AnyIPv6\" to allow all IPv6 sources (translates to ::/0) | [optional] + +## Example + +```python +from pfruck_contabo.models.src_cidr import SrcCidr + +# TODO update the JSON string below +json = "{}" +# create an instance of SrcCidr from a JSON string +src_cidr_instance = SrcCidr.from_json(json) +# print the JSON string representation of the object +print(SrcCidr.to_json()) + +# convert the object into a dict +src_cidr_dict = src_cidr_instance.to_dict() +# create an instance of SrcCidr from a dict +src_cidr_from_dict = SrcCidr.from_dict(src_cidr_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TagAssignmentsAuditsApi.md b/docs/TagAssignmentsAuditsApi.md index 39859250..7ccd2c05 100644 --- a/docs/TagAssignmentsAuditsApi.md +++ b/docs/TagAssignmentsAuditsApi.md @@ -53,8 +53,8 @@ with pfruck_contabo.ApiClient(configuration) as api_client: resource_id = 'a1b2c3' # str | The identifier of the resource. (optional) request_id = 'D5FD9FAF-58C0-4406-8F46-F449B8E4FEC3' # str | The requestId of the API call which led to the change. (optional) changed_by = '23cbb6d6-cb11-4330-bdff-7bb791df2e23' # str | UserId of the user which led to the change. (optional) - start_date = '2021-01-01' # date | Start of search time range. (optional) - end_date = '2021-01-01' # date | End of search time range. (optional) + start_date = 'Fri Jan 01 00:00:00 UTC 2021' # date | Start of search time range. (optional) + end_date = 'Fri Jan 01 00:00:00 UTC 2021' # date | End of search time range. (optional) try: # List history about your assignments (audit) diff --git a/docs/TagResponse.md b/docs/TagResponse.md index ae35e6eb..064a529b 100644 --- a/docs/TagResponse.md +++ b/docs/TagResponse.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **tag_id** | **int** | Tag's id | **name** | **str** | Tag's name | **color** | **str** | Tag's color | +**description** | **str** | The description of the Tag | ## Example diff --git a/docs/TagsAuditsApi.md b/docs/TagsAuditsApi.md index 87737bcc..e3ba9f49 100644 --- a/docs/TagsAuditsApi.md +++ b/docs/TagsAuditsApi.md @@ -52,8 +52,8 @@ with pfruck_contabo.ApiClient(configuration) as api_client: tag_id = 12345 # int | The identifier of the tag. (optional) request_id = 'D5FD9FAF-58C0-4406-8F46-F449B8E4FEC3' # str | The requestId of the API call which led to the change. (optional) changed_by = '23cbb6d6-cb11-4330-bdff-7bb791df2e23' # str | UserId of the user which led to the change. (optional) - start_date = '2021-01-01' # date | Start of search time range. (optional) - end_date = '2021-01-01' # date | End of search time range. (optional) + start_date = 'Fri Jan 01 00:00:00 UTC 2021' # date | Start of search time range. (optional) + end_date = 'Fri Jan 01 00:00:00 UTC 2021' # date | End of search time range. (optional) try: # List history about your assignments (audit) diff --git a/docs/UnassignInstanceFirewallResponse.md b/docs/UnassignInstanceFirewallResponse.md new file mode 100644 index 00000000..afb73a29 --- /dev/null +++ b/docs/UnassignInstanceFirewallResponse.md @@ -0,0 +1,29 @@ +# UnassignInstanceFirewallResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**InstanceAssignmentSelfLinks1**](InstanceAssignmentSelfLinks1.md) | Links for easy navigation. | + +## Example + +```python +from pfruck_contabo.models.unassign_instance_firewall_response import UnassignInstanceFirewallResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of UnassignInstanceFirewallResponse from a JSON string +unassign_instance_firewall_response_instance = UnassignInstanceFirewallResponse.from_json(json) +# print the JSON string representation of the object +print(UnassignInstanceFirewallResponse.to_json()) + +# convert the object into a dict +unassign_instance_firewall_response_dict = unassign_instance_firewall_response_instance.to_dict() +# create an instance of UnassignInstanceFirewallResponse from a dict +unassign_instance_firewall_response_from_dict = UnassignInstanceFirewallResponse.from_dict(unassign_instance_firewall_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateDnsZoneRecordRequest.md b/docs/UpdateDnsZoneRecordRequest.md new file mode 100644 index 00000000..69df72c5 --- /dev/null +++ b/docs/UpdateDnsZoneRecordRequest.md @@ -0,0 +1,36 @@ +# UpdateDnsZoneRecordRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ttl** | **float** | TTL | +**prio** | **float** | Prio | +**type** | **str** | DNS record type | +**data** | **str** | Data | +**port** | **float** | Port | [optional] +**weight** | **float** | Weight | [optional] +**flag** | **float** | Flag | [optional] +**tag** | **str** | Tag | [optional] + +## Example + +```python +from pfruck_contabo.models.update_dns_zone_record_request import UpdateDnsZoneRecordRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateDnsZoneRecordRequest from a JSON string +update_dns_zone_record_request_instance = UpdateDnsZoneRecordRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateDnsZoneRecordRequest.to_json()) + +# convert the object into a dict +update_dns_zone_record_request_dict = update_dns_zone_record_request_instance.to_dict() +# create an instance of UpdateDnsZoneRecordRequest from a dict +update_dns_zone_record_request_from_dict = UpdateDnsZoneRecordRequest.from_dict(update_dns_zone_record_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdatePtrRecordRequest.md b/docs/UpdatePtrRecordRequest.md new file mode 100644 index 00000000..01c7f6d5 --- /dev/null +++ b/docs/UpdatePtrRecordRequest.md @@ -0,0 +1,29 @@ +# UpdatePtrRecordRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ptr** | **str** | PTR Record name | + +## Example + +```python +from pfruck_contabo.models.update_ptr_record_request import UpdatePtrRecordRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdatePtrRecordRequest from a JSON string +update_ptr_record_request_instance = UpdatePtrRecordRequest.from_json(json) +# print the JSON string representation of the object +print(UpdatePtrRecordRequest.to_json()) + +# convert the object into a dict +update_ptr_record_request_dict = update_ptr_record_request_instance.to_dict() +# create an instance of UpdatePtrRecordRequest from a dict +update_ptr_record_request_from_dict = UpdatePtrRecordRequest.from_dict(update_ptr_record_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateTagRequest.md b/docs/UpdateTagRequest.md index c8287fd1..8a546fc6 100644 --- a/docs/UpdateTagRequest.md +++ b/docs/UpdateTagRequest.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | The name of the tag. Tags may contain letters, numbers, colons, dashes, and underscores. There is a limit of 255 characters per tag. | [optional] **color** | **str** | The color of the tag. Color can be specified using hexadecimal value. Default color is #0A78C3 | [optional] +**description** | **str** | The description of the Tag name. | [optional] ## Example diff --git a/docs/UpdateUserRequest.md b/docs/UpdateUserRequest.md index dfa50a77..c1381e07 100644 --- a/docs/UpdateUserRequest.md +++ b/docs/UpdateUserRequest.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **email** | **str** | The email of the user to which activation and forgot password links are being sent to. There is a limit of 255 characters per email. | [optional] **enabled** | **bool** | If user is not enabled, he can't login and thus use services any longer. | [optional] **totp** | **bool** | Enable or disable two-factor authentication (2FA) via time based OTP. | [optional] -**locale** | **str** | The locale of the user. This can be `de-DE`, `de`, `en-US`, `en` | [optional] +**locale** | **str** | The locale of the user. This can be `de-DE`, `de`, `en-US`, `en`, `es-ES`, `es`, `pt-BR`, `pt`. | [optional] **roles** | **List[int]** | The roles as list of `roleId`s of the user. | [optional] ## Example diff --git a/docs/UpgradeInstanceRequest.md b/docs/UpgradeInstanceRequest.md index d75bba58..1d5692dd 100644 --- a/docs/UpgradeInstanceRequest.md +++ b/docs/UpgradeInstanceRequest.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **private_networking** | **object** | Set this attribute if you want to upgrade your instance with the Private Networking addon. Please provide an empty object for the time being as value. There will be more configuration possible in the future. | [optional] +**backup** | **object** | Set this attribute if you want to upgrade your instance with the Automated Backup addon. Please provide an empty object for the time being as value. There will be more configuration possible in the future. | [optional] ## Example diff --git a/docs/UserResponse.md b/docs/UserResponse.md index f6b17002..7412f673 100644 --- a/docs/UserResponse.md +++ b/docs/UserResponse.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes **email_verified** | **bool** | User email verification status. | **enabled** | **bool** | If uses is not enabled, he can't login and thus use services any longer. | **totp** | **bool** | Enable or disable two-factor authentication (2FA) via time based OTP. | -**locale** | **str** | The locale of the user. This can be `de-DE`, `de`, `en-US`, `en` | +**locale** | **str** | The locale of the user. This can be `de-DE`, `de`, `en-US`, `en`, `es-ES`, `es`, `pt-BR`, `pt`. | **roles** | [**List[RoleResponse]**](RoleResponse.md) | The roles as list of `roleId`s of the user. | **owner** | **bool** | If user is owner he will have permissions to all API endpoints and resources. Enabling this will superseed all role definitions and `accessAllResources`. | diff --git a/docs/UsersApi.md b/docs/UsersApi.md index d15c4e74..a4364b77 100644 --- a/docs/UsersApi.md +++ b/docs/UsersApi.md @@ -7,13 +7,11 @@ Method | HTTP request | Description [**create_user**](UsersApi.md#create_user) | **POST** /v1/users | Create a new user [**delete_user**](UsersApi.md#delete_user) | **DELETE** /v1/users/{userId} | Delete existing user by id [**generate_client_secret**](UsersApi.md#generate_client_secret) | **PUT** /v1/users/client/secret | Generate new client secret -[**get_object_storage_credentials**](UsersApi.md#get_object_storage_credentials) | **GET** /v1/users/{userId}/object-storages/{objectStorageId}/credentials/{credentialId} | Get S3 compatible object storage credentials. -[**list_object_storage_credentials**](UsersApi.md#list_object_storage_credentials) | **GET** /v1/users/{userId}/object-storages/credentials | Get list of S3 compatible object storage credentials for user. -[**regenerate_object_storage_credentials**](UsersApi.md#regenerate_object_storage_credentials) | **PATCH** /v1/users/{userId}/object-storages/{objectStorageId}/credentials/{credentialId} | Regenerates secret key of specified user for the S3 compatible object storages. [**resend_email_verification**](UsersApi.md#resend_email_verification) | **POST** /v1/users/{userId}/resend-email-verification | Resend email verification [**reset_password**](UsersApi.md#reset_password) | **POST** /v1/users/{userId}/reset-password | Send reset password email [**retrieve_user**](UsersApi.md#retrieve_user) | **GET** /v1/users/{userId} | Get specific user by id [**retrieve_user_client**](UsersApi.md#retrieve_user_client) | **GET** /v1/users/client | Get client +[**retrieve_user_is_password_set**](UsersApi.md#retrieve_user_is_password_set) | **GET** /v1/users/is-password-set | Get user is password set status [**retrieve_user_list**](UsersApi.md#retrieve_user_list) | **GET** /v1/users | List users [**update_user**](UsersApi.md#update_user) | **PATCH** /v1/users/{userId} | Update specific user by id @@ -260,192 +258,12 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_object_storage_credentials** -> FindCredentialResponse get_object_storage_credentials(x_request_id, user_id, object_storage_id, credential_id, x_trace_id=x_trace_id) - -Get S3 compatible object storage credentials. - -Get S3 compatible object storage credentials for accessing it via S3 compatible tools like `aws` cli. - -### Example - -* Bearer (JWT) Authentication (bearer): - -```python -import pfruck_contabo -from pfruck_contabo.models.find_credential_response import FindCredentialResponse -from pfruck_contabo.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.contabo.com -# See configuration.py for a list of all supported configuration parameters. -configuration = pfruck_contabo.Configuration( - host = "https://api.contabo.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (JWT): bearer -configuration = pfruck_contabo.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with pfruck_contabo.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = pfruck_contabo.UsersApi(api_client) - x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. - user_id = '6cdf5968-f9fe-4192-97c2-f349e813c5e8' # str | The identifier of the user. - object_storage_id = 'd8417276-d2d9-43a9-a0a8-9a6fa6060246' # str | The identifier of the S3 object storage - credential_id = 12345 # int | The ID of the object storage credential - x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) - - try: - # Get S3 compatible object storage credentials. - api_response = api_instance.get_object_storage_credentials(x_request_id, user_id, object_storage_id, credential_id, x_trace_id=x_trace_id) - print("The response of UsersApi->get_object_storage_credentials:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling UsersApi->get_object_storage_credentials: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | - **user_id** | **str**| The identifier of the user. | - **object_storage_id** | **str**| The identifier of the S3 object storage | - **credential_id** | **int**| The ID of the object storage credential | - **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] - -### Return type - -[**FindCredentialResponse**](FindCredentialResponse.md) - -### Authorization - -[bearer](../README.md#bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The response will be a JSON object and contains S3 credentials. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_object_storage_credentials** -> ListCredentialResponse list_object_storage_credentials(x_request_id, user_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, object_storage_id=object_storage_id, region_name=region_name, display_name=display_name) - -Get list of S3 compatible object storage credentials for user. - -Get list of S3 compatible object storage credentials for accessing it via S3 compatible tools like `aws` cli. - -### Example - -* Bearer (JWT) Authentication (bearer): - -```python -import pfruck_contabo -from pfruck_contabo.models.list_credential_response import ListCredentialResponse -from pfruck_contabo.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.contabo.com -# See configuration.py for a list of all supported configuration parameters. -configuration = pfruck_contabo.Configuration( - host = "https://api.contabo.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (JWT): bearer -configuration = pfruck_contabo.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with pfruck_contabo.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = pfruck_contabo.UsersApi(api_client) - x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. - user_id = '6cdf5968-f9fe-4192-97c2-f349e813c5e8' # str | The identifier of the user. - x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) - page = 1 # int | Number of page to be fetched. (optional) - size = 10 # int | Number of elements per page. (optional) - order_by = ['name:asc'] # List[str] | Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. (optional) - object_storage_id = 'd8417276-d2d9-43a9-a0a8-9a6fa6060246' # str | The identifier of the S3 object storage (optional) - region_name = 'Asia (Singapore)' # str | Filter for Object Storage by regions. Available regions: Asia (Singapore), European Union, United States (Central) (optional) - display_name = 'Object Storage EU 420' # str | Filter for Object Storage by his displayName. (optional) - - try: - # Get list of S3 compatible object storage credentials for user. - api_response = api_instance.list_object_storage_credentials(x_request_id, user_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, object_storage_id=object_storage_id, region_name=region_name, display_name=display_name) - print("The response of UsersApi->list_object_storage_credentials:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling UsersApi->list_object_storage_credentials: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | - **user_id** | **str**| The identifier of the user. | - **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] - **page** | **int**| Number of page to be fetched. | [optional] - **size** | **int**| Number of elements per page. | [optional] - **order_by** | [**List[str]**](str.md)| Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. | [optional] - **object_storage_id** | **str**| The identifier of the S3 object storage | [optional] - **region_name** | **str**| Filter for Object Storage by regions. Available regions: Asia (Singapore), European Union, United States (Central) | [optional] - **display_name** | **str**| Filter for Object Storage by his displayName. | [optional] - -### Return type - -[**ListCredentialResponse**](ListCredentialResponse.md) - -### Authorization - -[bearer](../README.md#bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The response will be an array of JSON objects that contains S3 credentials. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **regenerate_object_storage_credentials** -> FindCredentialResponse regenerate_object_storage_credentials(x_request_id, user_id, object_storage_id, credential_id, x_trace_id=x_trace_id) +# **resend_email_verification** +> resend_email_verification(x_request_id, user_id, x_trace_id=x_trace_id, redirect_url=redirect_url) -Regenerates secret key of specified user for the S3 compatible object storages. +Resend email verification -Regenerates secret key of specified user for the a specific S3 compatible object storages. +Resend email verification for a specific user ### Example @@ -453,7 +271,6 @@ Regenerates secret key of specified user for the a specific S3 compatible object ```python import pfruck_contabo -from pfruck_contabo.models.find_credential_response import FindCredentialResponse from pfruck_contabo.rest import ApiException from pprint import pprint @@ -479,17 +296,14 @@ with pfruck_contabo.ApiClient(configuration) as api_client: api_instance = pfruck_contabo.UsersApi(api_client) x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. user_id = '6cdf5968-f9fe-4192-97c2-f349e813c5e8' # str | The identifier of the user. - object_storage_id = 'd8417276-d2d9-43a9-a0a8-9a6fa6060246' # str | The identifier of the S3 object storage - credential_id = 12345 # int | The ID of the object storage credential x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + redirect_url = 'https://test.contabo.de' # str | The redirect url used for email verification (optional) try: - # Regenerates secret key of specified user for the S3 compatible object storages. - api_response = api_instance.regenerate_object_storage_credentials(x_request_id, user_id, object_storage_id, credential_id, x_trace_id=x_trace_id) - print("The response of UsersApi->regenerate_object_storage_credentials:\n") - pprint(api_response) + # Resend email verification + api_instance.resend_email_verification(x_request_id, user_id, x_trace_id=x_trace_id, redirect_url=redirect_url) except Exception as e: - print("Exception when calling UsersApi->regenerate_object_storage_credentials: %s\n" % e) + print("Exception when calling UsersApi->resend_email_verification: %s\n" % e) ``` @@ -501,13 +315,12 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | **user_id** | **str**| The identifier of the user. | - **object_storage_id** | **str**| The identifier of the S3 object storage | - **credential_id** | **int**| The ID of the object storage credential | **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + **redirect_url** | **str**| The redirect url used for email verification | [optional] ### Return type -[**FindCredentialResponse**](FindCredentialResponse.md) +void (empty response body) ### Authorization @@ -516,22 +329,22 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json + - **Accept**: Not defined ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | The response will be a JSON object and contains object storage S3 credentials. | - | +**204** | Response body has no content | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **resend_email_verification** -> resend_email_verification(x_request_id, user_id, x_trace_id=x_trace_id, redirect_url=redirect_url) +# **reset_password** +> reset_password(x_request_id, user_id, x_trace_id=x_trace_id, redirect_url=redirect_url) -Resend email verification +Send reset password email -Resend email verification for a specific user +Send reset password email for a specific user ### Example @@ -565,13 +378,13 @@ with pfruck_contabo.ApiClient(configuration) as api_client: x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. user_id = '6cdf5968-f9fe-4192-97c2-f349e813c5e8' # str | The identifier of the user. x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) - redirect_url = 'https://test.contabo.de' # str | The redirect url used for email verification (optional) + redirect_url = 'https://test.contabo.de' # str | The redirect url used for resetting password (optional) try: - # Resend email verification - api_instance.resend_email_verification(x_request_id, user_id, x_trace_id=x_trace_id, redirect_url=redirect_url) + # Send reset password email + api_instance.reset_password(x_request_id, user_id, x_trace_id=x_trace_id, redirect_url=redirect_url) except Exception as e: - print("Exception when calling UsersApi->resend_email_verification: %s\n" % e) + print("Exception when calling UsersApi->reset_password: %s\n" % e) ``` @@ -584,7 +397,7 @@ Name | Type | Description | Notes **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | **user_id** | **str**| The identifier of the user. | **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] - **redirect_url** | **str**| The redirect url used for email verification | [optional] + **redirect_url** | **str**| The redirect url used for resetting password | [optional] ### Return type @@ -607,12 +420,12 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **reset_password** -> reset_password(x_request_id, user_id, x_trace_id=x_trace_id, redirect_url=redirect_url) +# **retrieve_user** +> FindUserResponse retrieve_user(x_request_id, user_id, x_trace_id=x_trace_id) -Send reset password email +Get specific user by id -Send reset password email for a specific user +Get attributes for a specific user. ### Example @@ -620,6 +433,7 @@ Send reset password email for a specific user ```python import pfruck_contabo +from pfruck_contabo.models.find_user_response import FindUserResponse from pfruck_contabo.rest import ApiException from pprint import pprint @@ -646,13 +460,14 @@ with pfruck_contabo.ApiClient(configuration) as api_client: x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. user_id = '6cdf5968-f9fe-4192-97c2-f349e813c5e8' # str | The identifier of the user. x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) - redirect_url = 'https://test.contabo.de' # str | The redirect url used for resetting password (optional) try: - # Send reset password email - api_instance.reset_password(x_request_id, user_id, x_trace_id=x_trace_id, redirect_url=redirect_url) + # Get specific user by id + api_response = api_instance.retrieve_user(x_request_id, user_id, x_trace_id=x_trace_id) + print("The response of UsersApi->retrieve_user:\n") + pprint(api_response) except Exception as e: - print("Exception when calling UsersApi->reset_password: %s\n" % e) + print("Exception when calling UsersApi->retrieve_user: %s\n" % e) ``` @@ -665,11 +480,10 @@ Name | Type | Description | Notes **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | **user_id** | **str**| The identifier of the user. | **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] - **redirect_url** | **str**| The redirect url used for resetting password | [optional] ### Return type -void (empty response body) +[**FindUserResponse**](FindUserResponse.md) ### Authorization @@ -678,22 +492,22 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: Not defined + - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**204** | Response body has no content | - | +**200** | The response will be a JSON object and contains standard user attributes. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **retrieve_user** -> FindUserResponse retrieve_user(x_request_id, user_id, x_trace_id=x_trace_id) +# **retrieve_user_client** +> FindClientResponse retrieve_user_client(x_request_id, x_trace_id=x_trace_id) -Get specific user by id +Get client -Get attributes for a specific user. +Get idm client. ### Example @@ -701,7 +515,7 @@ Get attributes for a specific user. ```python import pfruck_contabo -from pfruck_contabo.models.find_user_response import FindUserResponse +from pfruck_contabo.models.find_client_response import FindClientResponse from pfruck_contabo.rest import ApiException from pprint import pprint @@ -726,16 +540,15 @@ with pfruck_contabo.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = pfruck_contabo.UsersApi(api_client) x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. - user_id = '6cdf5968-f9fe-4192-97c2-f349e813c5e8' # str | The identifier of the user. x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) try: - # Get specific user by id - api_response = api_instance.retrieve_user(x_request_id, user_id, x_trace_id=x_trace_id) - print("The response of UsersApi->retrieve_user:\n") + # Get client + api_response = api_instance.retrieve_user_client(x_request_id, x_trace_id=x_trace_id) + print("The response of UsersApi->retrieve_user_client:\n") pprint(api_response) except Exception as e: - print("Exception when calling UsersApi->retrieve_user: %s\n" % e) + print("Exception when calling UsersApi->retrieve_user_client: %s\n" % e) ``` @@ -746,12 +559,11 @@ with pfruck_contabo.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | - **user_id** | **str**| The identifier of the user. | **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] ### Return type -[**FindUserResponse**](FindUserResponse.md) +[**FindClientResponse**](FindClientResponse.md) ### Authorization @@ -766,16 +578,16 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | The response will be a JSON object and contains standard user attributes. | - | +**200** | The response will be a JSON object and contains standard client attributes. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **retrieve_user_client** -> FindClientResponse retrieve_user_client(x_request_id, x_trace_id=x_trace_id) +# **retrieve_user_is_password_set** +> FindUserIsPasswordSetResponse retrieve_user_is_password_set(x_request_id, x_trace_id=x_trace_id, user_id=user_id) -Get client +Get user is password set status -Get idm client. +Get info about idm user if the password is set. ### Example @@ -783,7 +595,7 @@ Get idm client. ```python import pfruck_contabo -from pfruck_contabo.models.find_client_response import FindClientResponse +from pfruck_contabo.models.find_user_is_password_set_response import FindUserIsPasswordSetResponse from pfruck_contabo.rest import ApiException from pprint import pprint @@ -809,14 +621,15 @@ with pfruck_contabo.ApiClient(configuration) as api_client: api_instance = pfruck_contabo.UsersApi(api_client) x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + user_id = '6cdf5968-f9fe-4192-97c2-f349e813c5e8' # str | The user ID for checking if password is set for him (optional) try: - # Get client - api_response = api_instance.retrieve_user_client(x_request_id, x_trace_id=x_trace_id) - print("The response of UsersApi->retrieve_user_client:\n") + # Get user is password set status + api_response = api_instance.retrieve_user_is_password_set(x_request_id, x_trace_id=x_trace_id, user_id=user_id) + print("The response of UsersApi->retrieve_user_is_password_set:\n") pprint(api_response) except Exception as e: - print("Exception when calling UsersApi->retrieve_user_client: %s\n" % e) + print("Exception when calling UsersApi->retrieve_user_is_password_set: %s\n" % e) ``` @@ -828,10 +641,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + **user_id** | **str**| The user ID for checking if password is set for him | [optional] ### Return type -[**FindClientResponse**](FindClientResponse.md) +[**FindUserIsPasswordSetResponse**](FindUserIsPasswordSetResponse.md) ### Authorization @@ -846,7 +660,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | The response will be a JSON object and contains standard client attributes. | - | +**200** | The response will be a JSON object and contains standard user attributes. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/UsersObjectStorageCredentialsApi.md b/docs/UsersObjectStorageCredentialsApi.md new file mode 100644 index 00000000..3fc48200 --- /dev/null +++ b/docs/UsersObjectStorageCredentialsApi.md @@ -0,0 +1,277 @@ +# pfruck_contabo.UsersObjectStorageCredentialsApi + +All URIs are relative to *https://api.contabo.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_object_storage_credentials**](UsersObjectStorageCredentialsApi.md#get_object_storage_credentials) | **GET** /v1/users/{userId}/object-storages/{objectStorageId}/credentials/{credentialId} | Get S3 compatible object storage credentials. +[**list_object_storage_credentials**](UsersObjectStorageCredentialsApi.md#list_object_storage_credentials) | **GET** /v1/users/{userId}/object-storages/credentials | Get list of S3 compatible object storage credentials for user. +[**regenerate_object_storage_credentials**](UsersObjectStorageCredentialsApi.md#regenerate_object_storage_credentials) | **PATCH** /v1/users/{userId}/object-storages/{objectStorageId}/credentials/{credentialId} | Regenerates secret key of specified user for the S3 compatible object storages. + + +# **get_object_storage_credentials** +> FindCredentialResponse get_object_storage_credentials(x_request_id, user_id, object_storage_id, credential_id, x_trace_id=x_trace_id) + +Get S3 compatible object storage credentials. + +Get S3 compatible object storage credentials for accessing it via S3 compatible tools like `aws` cli. + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.find_credential_response import FindCredentialResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.UsersObjectStorageCredentialsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + user_id = '6cdf5968-f9fe-4192-97c2-f349e813c5e8' # str | The identifier of the user. + object_storage_id = 'd8417276-d2d9-43a9-a0a8-9a6fa6060246' # str | The identifier of the S3 object storage + credential_id = 12345 # int | The ID of the object storage credential + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Get S3 compatible object storage credentials. + api_response = api_instance.get_object_storage_credentials(x_request_id, user_id, object_storage_id, credential_id, x_trace_id=x_trace_id) + print("The response of UsersObjectStorageCredentialsApi->get_object_storage_credentials:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UsersObjectStorageCredentialsApi->get_object_storage_credentials: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **user_id** | **str**| The identifier of the user. | + **object_storage_id** | **str**| The identifier of the S3 object storage | + **credential_id** | **int**| The ID of the object storage credential | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**FindCredentialResponse**](FindCredentialResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The response will be a JSON object and contains S3 credentials. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_object_storage_credentials** +> ListCredentialResponse list_object_storage_credentials(x_request_id, user_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, object_storage_id=object_storage_id, region_name=region_name, display_name=display_name) + +Get list of S3 compatible object storage credentials for user. + +Get list of S3 compatible object storage credentials for accessing it via S3 compatible tools like `aws` cli. + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.list_credential_response import ListCredentialResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.UsersObjectStorageCredentialsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + user_id = '6cdf5968-f9fe-4192-97c2-f349e813c5e8' # str | The identifier of the user. + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + page = 1 # int | Number of page to be fetched. (optional) + size = 10 # int | Number of elements per page. (optional) + order_by = ['name:asc'] # List[str] | Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. (optional) + object_storage_id = 'd8417276-d2d9-43a9-a0a8-9a6fa6060246' # str | The identifier of the S3 object storage (optional) + region_name = 'Asia (Singapore)' # str | Filter for Object Storage by regions. Available regions: Asia (Singapore), European Union, United States (Central) (optional) + display_name = 'Object Storage EU 420' # str | Filter for Object Storage by his displayName. (optional) + + try: + # Get list of S3 compatible object storage credentials for user. + api_response = api_instance.list_object_storage_credentials(x_request_id, user_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, object_storage_id=object_storage_id, region_name=region_name, display_name=display_name) + print("The response of UsersObjectStorageCredentialsApi->list_object_storage_credentials:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UsersObjectStorageCredentialsApi->list_object_storage_credentials: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **user_id** | **str**| The identifier of the user. | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + **page** | **int**| Number of page to be fetched. | [optional] + **size** | **int**| Number of elements per page. | [optional] + **order_by** | [**List[str]**](str.md)| Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. | [optional] + **object_storage_id** | **str**| The identifier of the S3 object storage | [optional] + **region_name** | **str**| Filter for Object Storage by regions. Available regions: Asia (Singapore), European Union, United States (Central) | [optional] + **display_name** | **str**| Filter for Object Storage by his displayName. | [optional] + +### Return type + +[**ListCredentialResponse**](ListCredentialResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The response will be an array of JSON objects that contains S3 credentials. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **regenerate_object_storage_credentials** +> FindCredentialResponse regenerate_object_storage_credentials(x_request_id, user_id, object_storage_id, credential_id, x_trace_id=x_trace_id) + +Regenerates secret key of specified user for the S3 compatible object storages. + +Regenerates secret key of specified user for the a specific S3 compatible object storages. + +### Example + +* Bearer (JWT) Authentication (bearer): + +```python +import pfruck_contabo +from pfruck_contabo.models.find_credential_response import FindCredentialResponse +from pfruck_contabo.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.contabo.com +# See configuration.py for a list of all supported configuration parameters. +configuration = pfruck_contabo.Configuration( + host = "https://api.contabo.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): bearer +configuration = pfruck_contabo.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with pfruck_contabo.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = pfruck_contabo.UsersObjectStorageCredentialsApi(api_client) + x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. + user_id = '6cdf5968-f9fe-4192-97c2-f349e813c5e8' # str | The identifier of the user. + object_storage_id = 'd8417276-d2d9-43a9-a0a8-9a6fa6060246' # str | The identifier of the S3 object storage + credential_id = 12345 # int | The ID of the object storage credential + x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) + + try: + # Regenerates secret key of specified user for the S3 compatible object storages. + api_response = api_instance.regenerate_object_storage_credentials(x_request_id, user_id, object_storage_id, credential_id, x_trace_id=x_trace_id) + print("The response of UsersObjectStorageCredentialsApi->regenerate_object_storage_credentials:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UsersObjectStorageCredentialsApi->regenerate_object_storage_credentials: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_request_id** | **str**| [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. | + **user_id** | **str**| The identifier of the user. | + **object_storage_id** | **str**| The identifier of the S3 object storage | + **credential_id** | **int**| The ID of the object storage credential | + **x_trace_id** | **str**| Identifier to trace group of requests. | [optional] + +### Return type + +[**FindCredentialResponse**](FindCredentialResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The response will be a JSON object and contains object storage S3 credentials. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/VipResponse.md b/docs/VipResponse.md index dfe38210..e6ffb62b 100644 --- a/docs/VipResponse.md +++ b/docs/VipResponse.md @@ -16,7 +16,7 @@ Name | Type | Description | Notes **resource_display_name** | **str** | Resource display name. | **ip_version** | **str** | Version of Ip. | **type** | **str** | The VIP type. | [optional] -**v4** | [**IpV41**](IpV41.md) | | [optional] +**v4** | [**IpV4**](IpV4.md) | | [optional] ## Example diff --git a/docs/ZoneAuditResponse.md b/docs/ZoneAuditResponse.md new file mode 100644 index 00000000..a7d869ea --- /dev/null +++ b/docs/ZoneAuditResponse.md @@ -0,0 +1,31 @@ +# ZoneAuditResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**PaginationMeta**](PaginationMeta.md) | Data about pagination like how many results, pages, page size. | +**data** | [**List[ZoneAuditResponseData]**](ZoneAuditResponseData.md) | | +**links** | [**Links**](Links.md) | | + +## Example + +```python +from pfruck_contabo.models.zone_audit_response import ZoneAuditResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ZoneAuditResponse from a JSON string +zone_audit_response_instance = ZoneAuditResponse.from_json(json) +# print the JSON string representation of the object +print(ZoneAuditResponse.to_json()) + +# convert the object into a dict +zone_audit_response_dict = zone_audit_response_instance.to_dict() +# create an instance of ZoneAuditResponse from a dict +zone_audit_response_from_dict = ZoneAuditResponse.from_dict(zone_audit_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ZoneAuditResponseData.md b/docs/ZoneAuditResponseData.md new file mode 100644 index 00000000..16659b03 --- /dev/null +++ b/docs/ZoneAuditResponseData.md @@ -0,0 +1,39 @@ +# ZoneAuditResponseData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | The ID of the audit entry. | +**action** | **str** | Type of the action. | +**timestamp** | **datetime** | When the change took place. | +**tenant_id** | **str** | Customer tenant id | +**customer_id** | **str** | Customer ID | +**changed_by** | **str** | Id of user who performed the change | +**username** | **str** | Name of the user which led to the change. | +**request_id** | **str** | The requestId of the API call which led to the change. | +**trace_id** | **str** | The traceId of the API call which led to the change. | +**name** | **str** | DNS Zone name | +**changes** | **object** | List of actual changes. | [optional] + +## Example + +```python +from pfruck_contabo.models.zone_audit_response_data import ZoneAuditResponseData + +# TODO update the JSON string below +json = "{}" +# create an instance of ZoneAuditResponseData from a JSON string +zone_audit_response_data_instance = ZoneAuditResponseData.from_json(json) +# print the JSON string representation of the object +print(ZoneAuditResponseData.to_json()) + +# convert the object into a dict +zone_audit_response_data_dict = zone_audit_response_data_instance.to_dict() +# create an instance of ZoneAuditResponseData from a dict +zone_audit_response_data_from_dict = ZoneAuditResponseData.from_dict(zone_audit_response_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pfruck_contabo/__init__.py b/pfruck_contabo/__init__.py index 2e5dfc11..5f5a870d 100644 --- a/pfruck_contabo/__init__.py +++ b/pfruck_contabo/__init__.py @@ -17,17 +17,40 @@ __version__ = "2.0.0" # import apis into sdk package +from pfruck_contabo.api.check_collection_templates_api import CheckCollectionTemplatesApi +from pfruck_contabo.api.check_collections_api import CheckCollectionsApi +from pfruck_contabo.api.checks_api import ChecksApi +from pfruck_contabo.api.dns_api import DNSApi +from pfruck_contabo.api.dns_audits_api import DNSAuditsApi +from pfruck_contabo.api.domains_api import DomainsApi +from pfruck_contabo.api.domains_audits_api import DomainsAuditsApi +from pfruck_contabo.api.firewalls_api import FirewallsApi +from pfruck_contabo.api.firewalls_audits_api import FirewallsAuditsApi +from pfruck_contabo.api.handles_api import HandlesApi +from pfruck_contabo.api.handles_audits_api import HandlesAuditsApi from pfruck_contabo.api.images_api import ImagesApi from pfruck_contabo.api.images_audits_api import ImagesAuditsApi from pfruck_contabo.api.instance_actions_api import InstanceActionsApi from pfruck_contabo.api.instance_actions_audits_api import InstanceActionsAuditsApi from pfruck_contabo.api.instances_api import InstancesApi from pfruck_contabo.api.instances_audits_api import InstancesAuditsApi -from pfruck_contabo.api.internal_api import InternalApi +from pfruck_contabo.api.internal_check_audits_api import InternalCheckAuditsApi +from pfruck_contabo.api.internal_check_collection_audits_api import InternalCheckCollectionAuditsApi +from pfruck_contabo.api.internal_check_collection_replay_api import InternalCheckCollectionReplayApi +from pfruck_contabo.api.internal_check_collection_templates_api import InternalCheckCollectionTemplatesApi +from pfruck_contabo.api.internal_check_collections_api import InternalCheckCollectionsApi +from pfruck_contabo.api.internal_check_replay_api import InternalCheckReplayApi +from pfruck_contabo.api.internal_check_templates_api import InternalCheckTemplatesApi +from pfruck_contabo.api.internal_checks_api import InternalChecksApi +from pfruck_contabo.api.internal_remedies_api import InternalRemediesApi +from pfruck_contabo.api.internal_remedy_audits_api import InternalRemedyAuditsApi +from pfruck_contabo.api.internal_remedy_replay_api import InternalRemedyReplayApi +from pfruck_contabo.api.internal_remedy_templates_api import InternalRemedyTemplatesApi from pfruck_contabo.api.object_storages_api import ObjectStoragesApi from pfruck_contabo.api.object_storages_audits_api import ObjectStoragesAuditsApi from pfruck_contabo.api.private_networks_api import PrivateNetworksApi from pfruck_contabo.api.private_networks_audits_api import PrivateNetworksAuditsApi +from pfruck_contabo.api.remedies_api import RemediesApi from pfruck_contabo.api.roles_api import RolesApi from pfruck_contabo.api.roles_audits_api import RolesAuditsApi from pfruck_contabo.api.secrets_api import SecretsApi @@ -40,6 +63,7 @@ from pfruck_contabo.api.tags_audits_api import TagsAuditsApi from pfruck_contabo.api.users_api import UsersApi from pfruck_contabo.api.users_audits_api import UsersAuditsApi +from pfruck_contabo.api.users_object_storage_credentials_api import UsersObjectStorageCredentialsApi from pfruck_contabo.api.vip_api import VIPApi from pfruck_contabo.api.vip_audits_api import VipAuditsApi @@ -55,25 +79,67 @@ from pfruck_contabo.exceptions import ApiException # import models into sdk package +from pfruck_contabo.models.account_org_response import AccountOrgResponse +from pfruck_contabo.models.accounts_list_response import AccountsListResponse from pfruck_contabo.models.add_on_quantity_request import AddOnQuantityRequest from pfruck_contabo.models.add_on_request import AddOnRequest from pfruck_contabo.models.add_on_response import AddOnResponse from pfruck_contabo.models.additional_ip import AdditionalIp +from pfruck_contabo.models.api_bulk_delete_dns_zone_records_response import ApiBulkDeleteDnsZoneRecordsResponse +from pfruck_contabo.models.api_dns_zone_record_response import ApiDnsZoneRecordResponse +from pfruck_contabo.models.api_dns_zone_response import ApiDnsZoneResponse from pfruck_contabo.models.api_permissions_response import ApiPermissionsResponse +from pfruck_contabo.models.api_ptr_record_response import ApiPtrRecordResponse from pfruck_contabo.models.application_config import ApplicationConfig +from pfruck_contabo.models.application_meta_data import ApplicationMetaData from pfruck_contabo.models.application_requirements import ApplicationRequirements from pfruck_contabo.models.application_response import ApplicationResponse +from pfruck_contabo.models.assign_instance_firewall_response import AssignInstanceFirewallResponse from pfruck_contabo.models.assign_instance_private_network_response import AssignInstancePrivateNetworkResponse from pfruck_contabo.models.assign_vip_response import AssignVipResponse from pfruck_contabo.models.assigned_tag_response import AssignedTagResponse from pfruck_contabo.models.assignment_audit_response import AssignmentAuditResponse from pfruck_contabo.models.assignment_response import AssignmentResponse +from pfruck_contabo.models.audit_count_response import AuditCountResponse from pfruck_contabo.models.auto_scaling_type_request import AutoScalingTypeRequest from pfruck_contabo.models.auto_scaling_type_response import AutoScalingTypeResponse +from pfruck_contabo.models.base_check_collection_create_request import BaseCheckCollectionCreateRequest +from pfruck_contabo.models.base_check_create_request import BaseCheckCreateRequest +from pfruck_contabo.models.base_remedy_create_request import BaseRemedyCreateRequest +from pfruck_contabo.models.bulk_delete_dns_zone_records_request import BulkDeleteDnsZoneRecordsRequest +from pfruck_contabo.models.bulk_delete_result_response import BulkDeleteResultResponse +from pfruck_contabo.models.cancel_domain_request import CancelDomainRequest +from pfruck_contabo.models.cancel_instance_request import CancelInstanceRequest from pfruck_contabo.models.cancel_instance_response import CancelInstanceResponse from pfruck_contabo.models.cancel_instance_response_data import CancelInstanceResponseData +from pfruck_contabo.models.cancel_object_storage_request import CancelObjectStorageRequest from pfruck_contabo.models.cancel_object_storage_response import CancelObjectStorageResponse from pfruck_contabo.models.cancel_object_storage_response_data import CancelObjectStorageResponseData +from pfruck_contabo.models.cancel_request import CancelRequest +from pfruck_contabo.models.changed_auth_code import ChangedAuthCode +from pfruck_contabo.models.changes import Changes +from pfruck_contabo.models.check_collection_check_templates import CheckCollectionCheckTemplates +from pfruck_contabo.models.check_collection_create_request import CheckCollectionCreateRequest +from pfruck_contabo.models.check_collection_response import CheckCollectionResponse +from pfruck_contabo.models.check_collection_template_response import CheckCollectionTemplateResponse +from pfruck_contabo.models.check_collection_templates_check_templates import CheckCollectionTemplatesCheckTemplates +from pfruck_contabo.models.check_collection_templates_get_response import CheckCollectionTemplatesGetResponse +from pfruck_contabo.models.check_collection_templates_list_response import CheckCollectionTemplatesListResponse +from pfruck_contabo.models.check_collections_audit_list_response import CheckCollectionsAuditListResponse +from pfruck_contabo.models.check_collections_audit_response import CheckCollectionsAuditResponse +from pfruck_contabo.models.check_collections_get_response import CheckCollectionsGetResponse +from pfruck_contabo.models.check_collections_list_response import CheckCollectionsListResponse +from pfruck_contabo.models.check_collections_replay_request import CheckCollectionsReplayRequest +from pfruck_contabo.models.check_create_request import CheckCreateRequest +from pfruck_contabo.models.check_response import CheckResponse +from pfruck_contabo.models.check_template_response import CheckTemplateResponse +from pfruck_contabo.models.check_templates_get_response import CheckTemplatesGetResponse +from pfruck_contabo.models.check_templates_list_response import CheckTemplatesListResponse +from pfruck_contabo.models.checks_audit_list_response import ChecksAuditListResponse +from pfruck_contabo.models.checks_audit_response import ChecksAuditResponse +from pfruck_contabo.models.checks_get_response import ChecksGetResponse +from pfruck_contabo.models.checks_list_response import ChecksListResponse +from pfruck_contabo.models.checks_replay_request import ChecksReplayRequest from pfruck_contabo.models.client_response import ClientResponse from pfruck_contabo.models.client_secret_response import ClientSecretResponse from pfruck_contabo.models.create_assignment_response import CreateAssignmentResponse @@ -81,6 +147,10 @@ from pfruck_contabo.models.create_custom_image_request import CreateCustomImageRequest from pfruck_contabo.models.create_custom_image_response import CreateCustomImageResponse from pfruck_contabo.models.create_custom_image_response_data import CreateCustomImageResponseData +from pfruck_contabo.models.create_dns_zone_record_request import CreateDnsZoneRecordRequest +from pfruck_contabo.models.create_dns_zone_request import CreateDnsZoneRequest +from pfruck_contabo.models.create_firewall_request import CreateFirewallRequest +from pfruck_contabo.models.create_firewall_response import CreateFirewallResponse from pfruck_contabo.models.create_instance_addons import CreateInstanceAddons from pfruck_contabo.models.create_instance_request import CreateInstanceRequest from pfruck_contabo.models.create_instance_response import CreateInstanceResponse @@ -90,6 +160,7 @@ from pfruck_contabo.models.create_object_storage_response_data import CreateObjectStorageResponseData from pfruck_contabo.models.create_private_network_request import CreatePrivateNetworkRequest from pfruck_contabo.models.create_private_network_response import CreatePrivateNetworkResponse +from pfruck_contabo.models.create_ptr_record_request import CreatePtrRecordRequest from pfruck_contabo.models.create_role_request import CreateRoleRequest from pfruck_contabo.models.create_role_response import CreateRoleResponse from pfruck_contabo.models.create_role_response_data import CreateRoleResponseData @@ -100,9 +171,6 @@ from pfruck_contabo.models.create_tag_request import CreateTagRequest from pfruck_contabo.models.create_tag_response import CreateTagResponse from pfruck_contabo.models.create_tag_response_data import CreateTagResponseData -from pfruck_contabo.models.create_ticket_request import CreateTicketRequest -from pfruck_contabo.models.create_ticket_response import CreateTicketResponse -from pfruck_contabo.models.create_ticket_response_data import CreateTicketResponseData from pfruck_contabo.models.create_user_request import CreateUserRequest from pfruck_contabo.models.create_user_response import CreateUserResponse from pfruck_contabo.models.create_user_response_data import CreateUserResponseData @@ -110,10 +178,40 @@ from pfruck_contabo.models.custom_images_stats_response import CustomImagesStatsResponse from pfruck_contabo.models.custom_images_stats_response_data import CustomImagesStatsResponseData from pfruck_contabo.models.data_center_response import DataCenterResponse +from pfruck_contabo.models.dns_zone_record_response import DnsZoneRecordResponse +from pfruck_contabo.models.dns_zone_response import DnsZoneResponse +from pfruck_contabo.models.domain_audit_response import DomainAuditResponse +from pfruck_contabo.models.domain_audit_response_data import DomainAuditResponseData +from pfruck_contabo.models.domain_auth_code_regenerate_response import DomainAuthCodeRegenerateResponse +from pfruck_contabo.models.domain_auth_code_response import DomainAuthCodeResponse +from pfruck_contabo.models.domain_cancel import DomainCancel +from pfruck_contabo.models.domain_cancel_response import DomainCancelResponse +from pfruck_contabo.models.domain_create_request import DomainCreateRequest +from pfruck_contabo.models.domain_create_response import DomainCreateResponse +from pfruck_contabo.models.domain_details import DomainDetails +from pfruck_contabo.models.domain_find_response import DomainFindResponse +from pfruck_contabo.models.domain_handles import DomainHandles +from pfruck_contabo.models.domain_patch_request import DomainPatchRequest +from pfruck_contabo.models.domain_patch_response import DomainPatchResponse +from pfruck_contabo.models.domain_response import DomainResponse +from pfruck_contabo.models.domains_list_response import DomainsListResponse +from pfruck_contabo.models.ext_check_collection_response import ExtCheckCollectionResponse +from pfruck_contabo.models.ext_check_collection_template_response import ExtCheckCollectionTemplateResponse +from pfruck_contabo.models.ext_check_collection_templates_get_response import ExtCheckCollectionTemplatesGetResponse +from pfruck_contabo.models.ext_check_collection_templates_list_response import ExtCheckCollectionTemplatesListResponse +from pfruck_contabo.models.ext_check_collections_get_response import ExtCheckCollectionsGetResponse +from pfruck_contabo.models.ext_check_collections_list_response import ExtCheckCollectionsListResponse +from pfruck_contabo.models.ext_check_response import ExtCheckResponse +from pfruck_contabo.models.ext_checks_get_response import ExtChecksGetResponse +from pfruck_contabo.models.ext_checks_list_response import ExtChecksListResponse +from pfruck_contabo.models.ext_remedies_get_response import ExtRemediesGetResponse +from pfruck_contabo.models.ext_remedies_list_response import ExtRemediesListResponse +from pfruck_contabo.models.ext_remedy_response import ExtRemedyResponse from pfruck_contabo.models.extra_storage_request import ExtraStorageRequest from pfruck_contabo.models.find_assignment_response import FindAssignmentResponse from pfruck_contabo.models.find_client_response import FindClientResponse from pfruck_contabo.models.find_credential_response import FindCredentialResponse +from pfruck_contabo.models.find_firewall_response import FindFirewallResponse from pfruck_contabo.models.find_image_response import FindImageResponse from pfruck_contabo.models.find_instance_response import FindInstanceResponse from pfruck_contabo.models.find_object_storage_response import FindObjectStorageResponse @@ -126,12 +224,30 @@ from pfruck_contabo.models.find_user_response import FindUserResponse from pfruck_contabo.models.find_vip_response import FindVipResponse from pfruck_contabo.models.find_vnc_response import FindVncResponse +from pfruck_contabo.models.firewall_audit_response import FirewallAuditResponse +from pfruck_contabo.models.firewall_response import FirewallResponse +from pfruck_contabo.models.firewall_rule_request import FirewallRuleRequest +from pfruck_contabo.models.firewall_rule_response import FirewallRuleResponse from pfruck_contabo.models.firewalling_upgrade_request import FirewallingUpgradeRequest from pfruck_contabo.models.generate_client_secret_response import GenerateClientSecretResponse +from pfruck_contabo.models.handle_address import HandleAddress +from pfruck_contabo.models.handle_audit_response import HandleAuditResponse +from pfruck_contabo.models.handle_audit_response_data import HandleAuditResponseData +from pfruck_contabo.models.handle_birth_info import HandleBirthInfo +from pfruck_contabo.models.handle_create_request import HandleCreateRequest +from pfruck_contabo.models.handle_create_response import HandleCreateResponse +from pfruck_contabo.models.handle_find_response import HandleFindResponse +from pfruck_contabo.models.handle_list_response import HandleListResponse +from pfruck_contabo.models.handle_patch_request import HandlePatchRequest +from pfruck_contabo.models.handle_patch_response import HandlePatchResponse +from pfruck_contabo.models.handle_phone import HandlePhone +from pfruck_contabo.models.handle_response import HandleResponse from pfruck_contabo.models.image_audit_response import ImageAuditResponse from pfruck_contabo.models.image_audit_response_data import ImageAuditResponseData from pfruck_contabo.models.image_response import ImageResponse from pfruck_contabo.models.instance_assignment_self_links import InstanceAssignmentSelfLinks +from pfruck_contabo.models.instance_assignment_self_links1 import InstanceAssignmentSelfLinks1 +from pfruck_contabo.models.instance_details import InstanceDetails from pfruck_contabo.models.instance_rescue_action_response import InstanceRescueActionResponse from pfruck_contabo.models.instance_rescue_action_response_data import InstanceRescueActionResponseData from pfruck_contabo.models.instance_reset_password_action_response import InstanceResetPasswordActionResponse @@ -144,6 +260,7 @@ from pfruck_contabo.models.instance_start_action_response import InstanceStartActionResponse from pfruck_contabo.models.instance_start_action_response_data import InstanceStartActionResponseData from pfruck_contabo.models.instance_status import InstanceStatus +from pfruck_contabo.models.instance_status_representation import InstanceStatusRepresentation from pfruck_contabo.models.instance_stop_action_response import InstanceStopActionResponse from pfruck_contabo.models.instance_stop_action_response_data import InstanceStopActionResponseData from pfruck_contabo.models.instances import Instances @@ -152,8 +269,12 @@ from pfruck_contabo.models.instances_audit_response import InstancesAuditResponse from pfruck_contabo.models.instances_reset_password_actions_request import InstancesResetPasswordActionsRequest from pfruck_contabo.models.ip_config import IpConfig +from pfruck_contabo.models.ip_config1 import IpConfig1 +from pfruck_contabo.models.ip_config2 import IpConfig2 from pfruck_contabo.models.ip_v4 import IpV4 from pfruck_contabo.models.ip_v41 import IpV41 +from pfruck_contabo.models.ip_v42 import IpV42 +from pfruck_contabo.models.ip_v43 import IpV43 from pfruck_contabo.models.ip_v6 import IpV6 from pfruck_contabo.models.links import Links from pfruck_contabo.models.list_api_permission_response import ListApiPermissionResponse @@ -162,6 +283,11 @@ from pfruck_contabo.models.list_assignment_response import ListAssignmentResponse from pfruck_contabo.models.list_credential_response import ListCredentialResponse from pfruck_contabo.models.list_data_center_response import ListDataCenterResponse +from pfruck_contabo.models.list_dns_zone_records_response import ListDnsZoneRecordsResponse +from pfruck_contabo.models.list_dns_zones_response import ListDnsZonesResponse +from pfruck_contabo.models.list_firewall_audit_response import ListFirewallAuditResponse +from pfruck_contabo.models.list_firewall_response import ListFirewallResponse +from pfruck_contabo.models.list_firewall_response_data import ListFirewallResponseData from pfruck_contabo.models.list_image_response import ListImageResponse from pfruck_contabo.models.list_image_response_data import ListImageResponseData from pfruck_contabo.models.list_instances_actions_audit_response import ListInstancesActionsAuditResponse @@ -170,9 +296,11 @@ from pfruck_contabo.models.list_instances_response_data import ListInstancesResponseData from pfruck_contabo.models.list_object_storage_audit_response import ListObjectStorageAuditResponse from pfruck_contabo.models.list_object_storage_response import ListObjectStorageResponse +from pfruck_contabo.models.list_preset_rules_response import ListPresetRulesResponse from pfruck_contabo.models.list_private_network_audit_response import ListPrivateNetworkAuditResponse from pfruck_contabo.models.list_private_network_response import ListPrivateNetworkResponse from pfruck_contabo.models.list_private_network_response_data import ListPrivateNetworkResponseData +from pfruck_contabo.models.list_ptr_records_response import ListPtrRecordsResponse from pfruck_contabo.models.list_role_audit_response import ListRoleAuditResponse from pfruck_contabo.models.list_role_response import ListRoleResponse from pfruck_contabo.models.list_secret_audit_response import ListSecretAuditResponse @@ -187,12 +315,15 @@ from pfruck_contabo.models.list_vip_response import ListVipResponse from pfruck_contabo.models.list_vip_response_data import ListVipResponseData from pfruck_contabo.models.minimum_requirements import MinimumRequirements +from pfruck_contabo.models.nameserver import Nameserver from pfruck_contabo.models.object_storage_audit_response import ObjectStorageAuditResponse from pfruck_contabo.models.object_storage_response import ObjectStorageResponse from pfruck_contabo.models.object_storages_stats_response import ObjectStoragesStatsResponse from pfruck_contabo.models.object_storages_stats_response_data import ObjectStoragesStatsResponseData from pfruck_contabo.models.optimal_requirements import OptimalRequirements from pfruck_contabo.models.pagination_meta import PaginationMeta +from pfruck_contabo.models.patch_firewall_request import PatchFirewallRequest +from pfruck_contabo.models.patch_firewall_response import PatchFirewallResponse from pfruck_contabo.models.patch_instance_request import PatchInstanceRequest from pfruck_contabo.models.patch_instance_response import PatchInstanceResponse from pfruck_contabo.models.patch_instance_response_data import PatchInstanceResponseData @@ -202,28 +333,52 @@ from pfruck_contabo.models.patch_vnc_request import PatchVncRequest from pfruck_contabo.models.permission_request import PermissionRequest from pfruck_contabo.models.permission_response import PermissionResponse +from pfruck_contabo.models.preset_rules_response import PresetRulesResponse from pfruck_contabo.models.private_ip_config import PrivateIpConfig from pfruck_contabo.models.private_network_audit_response import PrivateNetworkAuditResponse from pfruck_contabo.models.private_network_response import PrivateNetworkResponse +from pfruck_contabo.models.ptr_record_response import PtrRecordResponse +from pfruck_contabo.models.put_firewall_request import PutFirewallRequest +from pfruck_contabo.models.put_firewall_response import PutFirewallResponse +from pfruck_contabo.models.record_audit_response import RecordAuditResponse +from pfruck_contabo.models.record_audit_response_data import RecordAuditResponseData from pfruck_contabo.models.reinstall_instance_request import ReinstallInstanceRequest from pfruck_contabo.models.reinstall_instance_response import ReinstallInstanceResponse from pfruck_contabo.models.reinstall_instance_response_data import ReinstallInstanceResponseData +from pfruck_contabo.models.remedies_audit_list_response import RemediesAuditListResponse +from pfruck_contabo.models.remedies_audit_response import RemediesAuditResponse +from pfruck_contabo.models.remedies_create_request import RemediesCreateRequest +from pfruck_contabo.models.remedies_get_response import RemediesGetResponse +from pfruck_contabo.models.remedies_list_response import RemediesListResponse +from pfruck_contabo.models.remedies_replay_request import RemediesReplayRequest +from pfruck_contabo.models.remedy_response import RemedyResponse +from pfruck_contabo.models.remedy_template_response import RemedyTemplateResponse +from pfruck_contabo.models.remedy_templates_get_response import RemedyTemplatesGetResponse +from pfruck_contabo.models.remedy_templates_list_response import RemedyTemplatesListResponse +from pfruck_contabo.models.replay_response import ReplayResponse from pfruck_contabo.models.resource_permissions_response import ResourcePermissionsResponse from pfruck_contabo.models.role_audit_response import RoleAuditResponse from pfruck_contabo.models.role_response import RoleResponse from pfruck_contabo.models.rollback_snapshot_response import RollbackSnapshotResponse +from pfruck_contabo.models.rules import Rules +from pfruck_contabo.models.rules_request import RulesRequest from pfruck_contabo.models.secret_audit_response import SecretAuditResponse from pfruck_contabo.models.secret_response import SecretResponse from pfruck_contabo.models.self_links import SelfLinks +from pfruck_contabo.models.set_default_handle_response import SetDefaultHandleResponse from pfruck_contabo.models.snapshot_response import SnapshotResponse from pfruck_contabo.models.snapshots_audit_response import SnapshotsAuditResponse +from pfruck_contabo.models.src_cidr import SrcCidr from pfruck_contabo.models.tag_assignment_self_links import TagAssignmentSelfLinks from pfruck_contabo.models.tag_audit_response import TagAuditResponse from pfruck_contabo.models.tag_response import TagResponse +from pfruck_contabo.models.unassign_instance_firewall_response import UnassignInstanceFirewallResponse from pfruck_contabo.models.unassign_instance_private_network_response import UnassignInstancePrivateNetworkResponse from pfruck_contabo.models.update_custom_image_request import UpdateCustomImageRequest from pfruck_contabo.models.update_custom_image_response import UpdateCustomImageResponse from pfruck_contabo.models.update_custom_image_response_data import UpdateCustomImageResponseData +from pfruck_contabo.models.update_dns_zone_record_request import UpdateDnsZoneRecordRequest +from pfruck_contabo.models.update_ptr_record_request import UpdatePtrRecordRequest from pfruck_contabo.models.update_role_request import UpdateRoleRequest from pfruck_contabo.models.update_role_response import UpdateRoleResponse from pfruck_contabo.models.update_secret_request import UpdateSecretRequest @@ -245,3 +400,5 @@ from pfruck_contabo.models.vip_audit_response import VipAuditResponse from pfruck_contabo.models.vip_response import VipResponse from pfruck_contabo.models.vnc_response import VncResponse +from pfruck_contabo.models.zone_audit_response import ZoneAuditResponse +from pfruck_contabo.models.zone_audit_response_data import ZoneAuditResponseData diff --git a/pfruck_contabo/api/__init__.py b/pfruck_contabo/api/__init__.py index 3d904e9e..3d210436 100644 --- a/pfruck_contabo/api/__init__.py +++ b/pfruck_contabo/api/__init__.py @@ -1,17 +1,40 @@ # flake8: noqa # import apis into api package +from pfruck_contabo.api.check_collection_templates_api import CheckCollectionTemplatesApi +from pfruck_contabo.api.check_collections_api import CheckCollectionsApi +from pfruck_contabo.api.checks_api import ChecksApi +from pfruck_contabo.api.dns_api import DNSApi +from pfruck_contabo.api.dns_audits_api import DNSAuditsApi +from pfruck_contabo.api.domains_api import DomainsApi +from pfruck_contabo.api.domains_audits_api import DomainsAuditsApi +from pfruck_contabo.api.firewalls_api import FirewallsApi +from pfruck_contabo.api.firewalls_audits_api import FirewallsAuditsApi +from pfruck_contabo.api.handles_api import HandlesApi +from pfruck_contabo.api.handles_audits_api import HandlesAuditsApi from pfruck_contabo.api.images_api import ImagesApi from pfruck_contabo.api.images_audits_api import ImagesAuditsApi from pfruck_contabo.api.instance_actions_api import InstanceActionsApi from pfruck_contabo.api.instance_actions_audits_api import InstanceActionsAuditsApi from pfruck_contabo.api.instances_api import InstancesApi from pfruck_contabo.api.instances_audits_api import InstancesAuditsApi -from pfruck_contabo.api.internal_api import InternalApi +from pfruck_contabo.api.internal_check_audits_api import InternalCheckAuditsApi +from pfruck_contabo.api.internal_check_collection_audits_api import InternalCheckCollectionAuditsApi +from pfruck_contabo.api.internal_check_collection_replay_api import InternalCheckCollectionReplayApi +from pfruck_contabo.api.internal_check_collection_templates_api import InternalCheckCollectionTemplatesApi +from pfruck_contabo.api.internal_check_collections_api import InternalCheckCollectionsApi +from pfruck_contabo.api.internal_check_replay_api import InternalCheckReplayApi +from pfruck_contabo.api.internal_check_templates_api import InternalCheckTemplatesApi +from pfruck_contabo.api.internal_checks_api import InternalChecksApi +from pfruck_contabo.api.internal_remedies_api import InternalRemediesApi +from pfruck_contabo.api.internal_remedy_audits_api import InternalRemedyAuditsApi +from pfruck_contabo.api.internal_remedy_replay_api import InternalRemedyReplayApi +from pfruck_contabo.api.internal_remedy_templates_api import InternalRemedyTemplatesApi from pfruck_contabo.api.object_storages_api import ObjectStoragesApi from pfruck_contabo.api.object_storages_audits_api import ObjectStoragesAuditsApi from pfruck_contabo.api.private_networks_api import PrivateNetworksApi from pfruck_contabo.api.private_networks_audits_api import PrivateNetworksAuditsApi +from pfruck_contabo.api.remedies_api import RemediesApi from pfruck_contabo.api.roles_api import RolesApi from pfruck_contabo.api.roles_audits_api import RolesAuditsApi from pfruck_contabo.api.secrets_api import SecretsApi @@ -24,6 +47,7 @@ from pfruck_contabo.api.tags_audits_api import TagsAuditsApi from pfruck_contabo.api.users_api import UsersApi from pfruck_contabo.api.users_audits_api import UsersAuditsApi +from pfruck_contabo.api.users_object_storage_credentials_api import UsersObjectStorageCredentialsApi from pfruck_contabo.api.vip_api import VIPApi from pfruck_contabo.api.vip_audits_api import VipAuditsApi diff --git a/pfruck_contabo/api/internal_api.py b/pfruck_contabo/api/check_collection_templates_api.py similarity index 62% rename from pfruck_contabo/api/internal_api.py rename to pfruck_contabo/api/check_collection_templates_api.py index f930a887..95c477e2 100644 --- a/pfruck_contabo/api/internal_api.py +++ b/pfruck_contabo/api/check_collection_templates_api.py @@ -16,19 +16,19 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictStr, field_validator -from typing import Optional +from datetime import datetime +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import List, Optional, Union from typing_extensions import Annotated -from pfruck_contabo.models.create_ticket_request import CreateTicketRequest -from pfruck_contabo.models.create_ticket_response import CreateTicketResponse -from pfruck_contabo.models.find_user_is_password_set_response import FindUserIsPasswordSetResponse +from pfruck_contabo.models.ext_check_collection_templates_get_response import ExtCheckCollectionTemplatesGetResponse +from pfruck_contabo.models.ext_check_collection_templates_list_response import ExtCheckCollectionTemplatesListResponse from pfruck_contabo.api_client import ApiClient, RequestSerialized from pfruck_contabo.api_response import ApiResponse from pfruck_contabo.rest import RESTResponseType -class InternalApi: +class CheckCollectionTemplatesApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech @@ -42,10 +42,10 @@ def __init__(self, api_client=None) -> None: @validate_call - def create_ticket( + def get_ext_check_collection_template( self, x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], - create_ticket_request: CreateTicketRequest, + check_collection_template_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Check collection template's id")], x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, _request_timeout: Union[ None, @@ -59,15 +59,15 @@ def create_ticket( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> CreateTicketResponse: - """Create a new support ticket + ) -> ExtCheckCollectionTemplatesGetResponse: + """Get check - Create a new support ticket. + Get a single check collection template by id :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) :type x_request_id: str - :param create_ticket_request: (required) - :type create_ticket_request: CreateTicketRequest + :param check_collection_template_id: Check collection template's id (required) + :type check_collection_template_id: float :param x_trace_id: Identifier to trace group of requests. :type x_trace_id: str :param _request_timeout: timeout setting for this request. If one @@ -92,9 +92,9 @@ def create_ticket( :return: Returns the result object. """ # noqa: E501 - _param = self._create_ticket_serialize( + _param = self._get_ext_check_collection_template_serialize( x_request_id=x_request_id, - create_ticket_request=create_ticket_request, + check_collection_template_id=check_collection_template_id, x_trace_id=x_trace_id, _request_auth=_request_auth, _content_type=_content_type, @@ -103,7 +103,7 @@ def create_ticket( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateTicketResponse", + '200': "ExtCheckCollectionTemplatesGetResponse", } response_data = self.api_client.call_api( *_param, @@ -117,10 +117,10 @@ def create_ticket( @validate_call - def create_ticket_with_http_info( + def get_ext_check_collection_template_with_http_info( self, x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], - create_ticket_request: CreateTicketRequest, + check_collection_template_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Check collection template's id")], x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, _request_timeout: Union[ None, @@ -134,15 +134,15 @@ def create_ticket_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[CreateTicketResponse]: - """Create a new support ticket + ) -> ApiResponse[ExtCheckCollectionTemplatesGetResponse]: + """Get check - Create a new support ticket. + Get a single check collection template by id :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) :type x_request_id: str - :param create_ticket_request: (required) - :type create_ticket_request: CreateTicketRequest + :param check_collection_template_id: Check collection template's id (required) + :type check_collection_template_id: float :param x_trace_id: Identifier to trace group of requests. :type x_trace_id: str :param _request_timeout: timeout setting for this request. If one @@ -167,9 +167,9 @@ def create_ticket_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_ticket_serialize( + _param = self._get_ext_check_collection_template_serialize( x_request_id=x_request_id, - create_ticket_request=create_ticket_request, + check_collection_template_id=check_collection_template_id, x_trace_id=x_trace_id, _request_auth=_request_auth, _content_type=_content_type, @@ -178,7 +178,7 @@ def create_ticket_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateTicketResponse", + '200': "ExtCheckCollectionTemplatesGetResponse", } response_data = self.api_client.call_api( *_param, @@ -192,10 +192,10 @@ def create_ticket_with_http_info( @validate_call - def create_ticket_without_preload_content( + def get_ext_check_collection_template_without_preload_content( self, x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], - create_ticket_request: CreateTicketRequest, + check_collection_template_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Check collection template's id")], x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, _request_timeout: Union[ None, @@ -210,14 +210,14 @@ def create_ticket_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create a new support ticket + """Get check - Create a new support ticket. + Get a single check collection template by id :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) :type x_request_id: str - :param create_ticket_request: (required) - :type create_ticket_request: CreateTicketRequest + :param check_collection_template_id: Check collection template's id (required) + :type check_collection_template_id: float :param x_trace_id: Identifier to trace group of requests. :type x_trace_id: str :param _request_timeout: timeout setting for this request. If one @@ -242,9 +242,9 @@ def create_ticket_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_ticket_serialize( + _param = self._get_ext_check_collection_template_serialize( x_request_id=x_request_id, - create_ticket_request=create_ticket_request, + check_collection_template_id=check_collection_template_id, x_trace_id=x_trace_id, _request_auth=_request_auth, _content_type=_content_type, @@ -253,7 +253,7 @@ def create_ticket_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateTicketResponse", + '200': "ExtCheckCollectionTemplatesGetResponse", } response_data = self.api_client.call_api( *_param, @@ -262,10 +262,10 @@ def create_ticket_without_preload_content( return response_data.response - def _create_ticket_serialize( + def _get_ext_check_collection_template_serialize( self, x_request_id, - create_ticket_request, + check_collection_template_id, x_trace_id, _request_auth, _content_type, @@ -286,6 +286,8 @@ def _create_ticket_serialize( _body_params: Optional[bytes] = None # process the path parameters + if check_collection_template_id is not None: + _path_params['checkCollectionTemplateId'] = check_collection_template_id # process the query parameters # process the header parameters if x_request_id is not None: @@ -294,8 +296,6 @@ def _create_ticket_serialize( _header_params['x-trace-id'] = x_trace_id # process the form parameters # process the body parameter - if create_ticket_request is not None: - _body_params = create_ticket_request # set the HTTP header `Accept` @@ -305,19 +305,6 @@ def _create_ticket_serialize( ] ) - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -325,8 +312,8 @@ def _create_ticket_serialize( ] return self.api_client.param_serialize( - method='POST', - resource_path='/v1/create-ticket', + method='GET', + resource_path='/v1/troubleshooting/check-collection-templates/{checkCollectionTemplateId}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -343,11 +330,19 @@ def _create_ticket_serialize( @validate_call - def retrieve_user_is_password_set( + def list_ext_check_collection_templates( self, x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="The user ID for checking if password is set for him")] = None, + internal: Annotated[Optional[StrictBool], Field(description="Is check only internal (not shown to the customer)")] = None, + object_type: Annotated[Optional[StrictStr], Field(description="Object type for which the check template can be used")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + creation_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for created date")] = None, + creation_end_time: Annotated[Optional[datetime], Field(description="End of search time range for created date")] = None, + modification_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for modified date")] = None, + modification_end_time: Annotated[Optional[datetime], Field(description="End of search time range for modified date")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -360,17 +355,33 @@ def retrieve_user_is_password_set( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> FindUserIsPasswordSetResponse: - """Get user is password set status + ) -> ExtCheckCollectionTemplatesListResponse: + """List check collection templates - Get info about idm user if the password is set. + List and filter all check collection templates :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) :type x_request_id: str :param x_trace_id: Identifier to trace group of requests. :type x_trace_id: str - :param user_id: The user ID for checking if password is set for him - :type user_id: str + :param internal: Is check only internal (not shown to the customer) + :type internal: bool + :param object_type: Object type for which the check template can be used + :type object_type: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param creation_start_time: Start of search time range for created date + :type creation_start_time: datetime + :param creation_end_time: End of search time range for created date + :type creation_end_time: datetime + :param modification_start_time: Start of search time range for modified date + :type modification_start_time: datetime + :param modification_end_time: End of search time range for modified date + :type modification_end_time: datetime :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -393,10 +404,18 @@ def retrieve_user_is_password_set( :return: Returns the result object. """ # noqa: E501 - _param = self._retrieve_user_is_password_set_serialize( + _param = self._list_ext_check_collection_templates_serialize( x_request_id=x_request_id, x_trace_id=x_trace_id, - user_id=user_id, + internal=internal, + object_type=object_type, + page=page, + size=size, + order_by=order_by, + creation_start_time=creation_start_time, + creation_end_time=creation_end_time, + modification_start_time=modification_start_time, + modification_end_time=modification_end_time, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -404,7 +423,7 @@ def retrieve_user_is_password_set( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FindUserIsPasswordSetResponse", + '200': "ExtCheckCollectionTemplatesListResponse", } response_data = self.api_client.call_api( *_param, @@ -418,11 +437,19 @@ def retrieve_user_is_password_set( @validate_call - def retrieve_user_is_password_set_with_http_info( + def list_ext_check_collection_templates_with_http_info( self, x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="The user ID for checking if password is set for him")] = None, + internal: Annotated[Optional[StrictBool], Field(description="Is check only internal (not shown to the customer)")] = None, + object_type: Annotated[Optional[StrictStr], Field(description="Object type for which the check template can be used")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + creation_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for created date")] = None, + creation_end_time: Annotated[Optional[datetime], Field(description="End of search time range for created date")] = None, + modification_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for modified date")] = None, + modification_end_time: Annotated[Optional[datetime], Field(description="End of search time range for modified date")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -435,17 +462,33 @@ def retrieve_user_is_password_set_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FindUserIsPasswordSetResponse]: - """Get user is password set status + ) -> ApiResponse[ExtCheckCollectionTemplatesListResponse]: + """List check collection templates - Get info about idm user if the password is set. + List and filter all check collection templates :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) :type x_request_id: str :param x_trace_id: Identifier to trace group of requests. :type x_trace_id: str - :param user_id: The user ID for checking if password is set for him - :type user_id: str + :param internal: Is check only internal (not shown to the customer) + :type internal: bool + :param object_type: Object type for which the check template can be used + :type object_type: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param creation_start_time: Start of search time range for created date + :type creation_start_time: datetime + :param creation_end_time: End of search time range for created date + :type creation_end_time: datetime + :param modification_start_time: Start of search time range for modified date + :type modification_start_time: datetime + :param modification_end_time: End of search time range for modified date + :type modification_end_time: datetime :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -468,10 +511,18 @@ def retrieve_user_is_password_set_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._retrieve_user_is_password_set_serialize( + _param = self._list_ext_check_collection_templates_serialize( x_request_id=x_request_id, x_trace_id=x_trace_id, - user_id=user_id, + internal=internal, + object_type=object_type, + page=page, + size=size, + order_by=order_by, + creation_start_time=creation_start_time, + creation_end_time=creation_end_time, + modification_start_time=modification_start_time, + modification_end_time=modification_end_time, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -479,7 +530,7 @@ def retrieve_user_is_password_set_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FindUserIsPasswordSetResponse", + '200': "ExtCheckCollectionTemplatesListResponse", } response_data = self.api_client.call_api( *_param, @@ -493,11 +544,19 @@ def retrieve_user_is_password_set_with_http_info( @validate_call - def retrieve_user_is_password_set_without_preload_content( + def list_ext_check_collection_templates_without_preload_content( self, x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, - user_id: Annotated[Optional[StrictStr], Field(description="The user ID for checking if password is set for him")] = None, + internal: Annotated[Optional[StrictBool], Field(description="Is check only internal (not shown to the customer)")] = None, + object_type: Annotated[Optional[StrictStr], Field(description="Object type for which the check template can be used")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + creation_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for created date")] = None, + creation_end_time: Annotated[Optional[datetime], Field(description="End of search time range for created date")] = None, + modification_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for modified date")] = None, + modification_end_time: Annotated[Optional[datetime], Field(description="End of search time range for modified date")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -511,16 +570,32 @@ def retrieve_user_is_password_set_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get user is password set status + """List check collection templates - Get info about idm user if the password is set. + List and filter all check collection templates :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) :type x_request_id: str :param x_trace_id: Identifier to trace group of requests. :type x_trace_id: str - :param user_id: The user ID for checking if password is set for him - :type user_id: str + :param internal: Is check only internal (not shown to the customer) + :type internal: bool + :param object_type: Object type for which the check template can be used + :type object_type: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param creation_start_time: Start of search time range for created date + :type creation_start_time: datetime + :param creation_end_time: End of search time range for created date + :type creation_end_time: datetime + :param modification_start_time: Start of search time range for modified date + :type modification_start_time: datetime + :param modification_end_time: End of search time range for modified date + :type modification_end_time: datetime :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -543,10 +618,18 @@ def retrieve_user_is_password_set_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._retrieve_user_is_password_set_serialize( + _param = self._list_ext_check_collection_templates_serialize( x_request_id=x_request_id, x_trace_id=x_trace_id, - user_id=user_id, + internal=internal, + object_type=object_type, + page=page, + size=size, + order_by=order_by, + creation_start_time=creation_start_time, + creation_end_time=creation_end_time, + modification_start_time=modification_start_time, + modification_end_time=modification_end_time, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -554,7 +637,7 @@ def retrieve_user_is_password_set_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FindUserIsPasswordSetResponse", + '200': "ExtCheckCollectionTemplatesListResponse", } response_data = self.api_client.call_api( *_param, @@ -563,11 +646,19 @@ def retrieve_user_is_password_set_without_preload_content( return response_data.response - def _retrieve_user_is_password_set_serialize( + def _list_ext_check_collection_templates_serialize( self, x_request_id, x_trace_id, - user_id, + internal, + object_type, + page, + size, + order_by, + creation_start_time, + creation_end_time, + modification_start_time, + modification_end_time, _request_auth, _content_type, _headers, @@ -577,6 +668,7 @@ def _retrieve_user_is_password_set_serialize( _host = None _collection_formats: Dict[str, str] = { + 'orderBy': 'multi', } _path_params: Dict[str, str] = {} @@ -588,9 +680,77 @@ def _retrieve_user_is_password_set_serialize( # process the path parameters # process the query parameters - if user_id is not None: + if internal is not None: + + _query_params.append(('internal', internal)) + + if object_type is not None: + + _query_params.append(('objectType', object_type)) + + if page is not None: + + _query_params.append(('page', page)) + + if size is not None: + + _query_params.append(('size', size)) - _query_params.append(('userId', user_id)) + if order_by is not None: + + _query_params.append(('orderBy', order_by)) + + if creation_start_time is not None: + if isinstance(creation_start_time, datetime): + _query_params.append( + ( + 'creationStartTime', + creation_start_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('creationStartTime', creation_start_time)) + + if creation_end_time is not None: + if isinstance(creation_end_time, datetime): + _query_params.append( + ( + 'creationEndTime', + creation_end_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('creationEndTime', creation_end_time)) + + if modification_start_time is not None: + if isinstance(modification_start_time, datetime): + _query_params.append( + ( + 'modificationStartTime', + modification_start_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('modificationStartTime', modification_start_time)) + + if modification_end_time is not None: + if isinstance(modification_end_time, datetime): + _query_params.append( + ( + 'modificationEndTime', + modification_end_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('modificationEndTime', modification_end_time)) # process the header parameters if x_request_id is not None: @@ -616,7 +776,7 @@ def _retrieve_user_is_password_set_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v1/users/is-password-set', + resource_path='/v1/troubleshooting/check-collection-templates', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/pfruck_contabo/api/check_collections_api.py b/pfruck_contabo/api/check_collections_api.py new file mode 100644 index 00000000..d7c6c5e8 --- /dev/null +++ b/pfruck_contabo/api/check_collections_api.py @@ -0,0 +1,1464 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from datetime import datetime +from pydantic import Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import List, Optional, Union +from typing_extensions import Annotated +from pfruck_contabo.models.base_check_collection_create_request import BaseCheckCollectionCreateRequest +from pfruck_contabo.models.cancel_request import CancelRequest +from pfruck_contabo.models.ext_check_collections_get_response import ExtCheckCollectionsGetResponse +from pfruck_contabo.models.ext_check_collections_list_response import ExtCheckCollectionsListResponse + +from pfruck_contabo.api_client import ApiClient, RequestSerialized +from pfruck_contabo.api_response import ApiResponse +from pfruck_contabo.rest import RESTResponseType + + +class CheckCollectionsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def cancel_ext_check_collection( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + check_collection_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Check collection's id")], + cancel_request: CancelRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ExtCheckCollectionsGetResponse: + """Cancel check collection + + Cancel check collection + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param check_collection_id: Check collection's id (required) + :type check_collection_id: float + :param cancel_request: (required) + :type cancel_request: CancelRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._cancel_ext_check_collection_serialize( + x_request_id=x_request_id, + check_collection_id=check_collection_id, + cancel_request=cancel_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtCheckCollectionsGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def cancel_ext_check_collection_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + check_collection_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Check collection's id")], + cancel_request: CancelRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ExtCheckCollectionsGetResponse]: + """Cancel check collection + + Cancel check collection + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param check_collection_id: Check collection's id (required) + :type check_collection_id: float + :param cancel_request: (required) + :type cancel_request: CancelRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._cancel_ext_check_collection_serialize( + x_request_id=x_request_id, + check_collection_id=check_collection_id, + cancel_request=cancel_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtCheckCollectionsGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def cancel_ext_check_collection_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + check_collection_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Check collection's id")], + cancel_request: CancelRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Cancel check collection + + Cancel check collection + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param check_collection_id: Check collection's id (required) + :type check_collection_id: float + :param cancel_request: (required) + :type cancel_request: CancelRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._cancel_ext_check_collection_serialize( + x_request_id=x_request_id, + check_collection_id=check_collection_id, + cancel_request=cancel_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtCheckCollectionsGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _cancel_ext_check_collection_serialize( + self, + x_request_id, + check_collection_id, + cancel_request, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if check_collection_id is not None: + _path_params['checkCollectionId'] = check_collection_id + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + if cancel_request is not None: + _body_params = cancel_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v1/troubleshooting/check-collections/{checkCollectionId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_ext_check_collection( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + check_collection_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Check collection's id")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + exclude_check_statuses: Annotated[Optional[List[StrictStr]], Field(description="Check statuses to exclude")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ExtCheckCollectionsGetResponse: + """Get check collection + + Get a single check collection by id + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param check_collection_id: Check collection's id (required) + :type check_collection_id: float + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param exclude_check_statuses: Check statuses to exclude + :type exclude_check_statuses: List[str] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_ext_check_collection_serialize( + x_request_id=x_request_id, + check_collection_id=check_collection_id, + x_trace_id=x_trace_id, + exclude_check_statuses=exclude_check_statuses, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtCheckCollectionsGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_ext_check_collection_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + check_collection_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Check collection's id")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + exclude_check_statuses: Annotated[Optional[List[StrictStr]], Field(description="Check statuses to exclude")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ExtCheckCollectionsGetResponse]: + """Get check collection + + Get a single check collection by id + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param check_collection_id: Check collection's id (required) + :type check_collection_id: float + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param exclude_check_statuses: Check statuses to exclude + :type exclude_check_statuses: List[str] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_ext_check_collection_serialize( + x_request_id=x_request_id, + check_collection_id=check_collection_id, + x_trace_id=x_trace_id, + exclude_check_statuses=exclude_check_statuses, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtCheckCollectionsGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_ext_check_collection_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + check_collection_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Check collection's id")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + exclude_check_statuses: Annotated[Optional[List[StrictStr]], Field(description="Check statuses to exclude")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get check collection + + Get a single check collection by id + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param check_collection_id: Check collection's id (required) + :type check_collection_id: float + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param exclude_check_statuses: Check statuses to exclude + :type exclude_check_statuses: List[str] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_ext_check_collection_serialize( + x_request_id=x_request_id, + check_collection_id=check_collection_id, + x_trace_id=x_trace_id, + exclude_check_statuses=exclude_check_statuses, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtCheckCollectionsGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_ext_check_collection_serialize( + self, + x_request_id, + check_collection_id, + x_trace_id, + exclude_check_statuses, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'excludeCheckStatuses': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if check_collection_id is not None: + _path_params['checkCollectionId'] = check_collection_id + # process the query parameters + if exclude_check_statuses is not None: + + _query_params.append(('excludeCheckStatuses', exclude_check_statuses)) + + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/troubleshooting/check-collections/{checkCollectionId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_ext_check_collections( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + object_type: Annotated[Optional[StrictStr], Field(description="Object type to be handled")] = None, + object_id: Annotated[Optional[StrictStr], Field(description="ID of the object, to be handled")] = None, + check_collection_template_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Check Collection Template for this check collection")] = None, + exclude_check_statuses: Annotated[Optional[List[StrictStr]], Field(description="Check statuses to exclude")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + creation_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for created date")] = None, + creation_end_time: Annotated[Optional[datetime], Field(description="End of search time range for created date")] = None, + modification_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for modified date")] = None, + modification_end_time: Annotated[Optional[datetime], Field(description="End of search time range for modified date")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ExtCheckCollectionsListResponse: + """List check collections + + List and filter all check collections + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param object_type: Object type to be handled + :type object_type: str + :param object_id: ID of the object, to be handled + :type object_id: str + :param check_collection_template_id: Check Collection Template for this check collection + :type check_collection_template_id: float + :param exclude_check_statuses: Check statuses to exclude + :type exclude_check_statuses: List[str] + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param creation_start_time: Start of search time range for created date + :type creation_start_time: datetime + :param creation_end_time: End of search time range for created date + :type creation_end_time: datetime + :param modification_start_time: Start of search time range for modified date + :type modification_start_time: datetime + :param modification_end_time: End of search time range for modified date + :type modification_end_time: datetime + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_ext_check_collections_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + object_type=object_type, + object_id=object_id, + check_collection_template_id=check_collection_template_id, + exclude_check_statuses=exclude_check_statuses, + page=page, + size=size, + order_by=order_by, + creation_start_time=creation_start_time, + creation_end_time=creation_end_time, + modification_start_time=modification_start_time, + modification_end_time=modification_end_time, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtCheckCollectionsListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_ext_check_collections_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + object_type: Annotated[Optional[StrictStr], Field(description="Object type to be handled")] = None, + object_id: Annotated[Optional[StrictStr], Field(description="ID of the object, to be handled")] = None, + check_collection_template_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Check Collection Template for this check collection")] = None, + exclude_check_statuses: Annotated[Optional[List[StrictStr]], Field(description="Check statuses to exclude")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + creation_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for created date")] = None, + creation_end_time: Annotated[Optional[datetime], Field(description="End of search time range for created date")] = None, + modification_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for modified date")] = None, + modification_end_time: Annotated[Optional[datetime], Field(description="End of search time range for modified date")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ExtCheckCollectionsListResponse]: + """List check collections + + List and filter all check collections + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param object_type: Object type to be handled + :type object_type: str + :param object_id: ID of the object, to be handled + :type object_id: str + :param check_collection_template_id: Check Collection Template for this check collection + :type check_collection_template_id: float + :param exclude_check_statuses: Check statuses to exclude + :type exclude_check_statuses: List[str] + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param creation_start_time: Start of search time range for created date + :type creation_start_time: datetime + :param creation_end_time: End of search time range for created date + :type creation_end_time: datetime + :param modification_start_time: Start of search time range for modified date + :type modification_start_time: datetime + :param modification_end_time: End of search time range for modified date + :type modification_end_time: datetime + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_ext_check_collections_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + object_type=object_type, + object_id=object_id, + check_collection_template_id=check_collection_template_id, + exclude_check_statuses=exclude_check_statuses, + page=page, + size=size, + order_by=order_by, + creation_start_time=creation_start_time, + creation_end_time=creation_end_time, + modification_start_time=modification_start_time, + modification_end_time=modification_end_time, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtCheckCollectionsListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_ext_check_collections_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + object_type: Annotated[Optional[StrictStr], Field(description="Object type to be handled")] = None, + object_id: Annotated[Optional[StrictStr], Field(description="ID of the object, to be handled")] = None, + check_collection_template_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Check Collection Template for this check collection")] = None, + exclude_check_statuses: Annotated[Optional[List[StrictStr]], Field(description="Check statuses to exclude")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + creation_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for created date")] = None, + creation_end_time: Annotated[Optional[datetime], Field(description="End of search time range for created date")] = None, + modification_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for modified date")] = None, + modification_end_time: Annotated[Optional[datetime], Field(description="End of search time range for modified date")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List check collections + + List and filter all check collections + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param object_type: Object type to be handled + :type object_type: str + :param object_id: ID of the object, to be handled + :type object_id: str + :param check_collection_template_id: Check Collection Template for this check collection + :type check_collection_template_id: float + :param exclude_check_statuses: Check statuses to exclude + :type exclude_check_statuses: List[str] + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param creation_start_time: Start of search time range for created date + :type creation_start_time: datetime + :param creation_end_time: End of search time range for created date + :type creation_end_time: datetime + :param modification_start_time: Start of search time range for modified date + :type modification_start_time: datetime + :param modification_end_time: End of search time range for modified date + :type modification_end_time: datetime + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_ext_check_collections_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + object_type=object_type, + object_id=object_id, + check_collection_template_id=check_collection_template_id, + exclude_check_statuses=exclude_check_statuses, + page=page, + size=size, + order_by=order_by, + creation_start_time=creation_start_time, + creation_end_time=creation_end_time, + modification_start_time=modification_start_time, + modification_end_time=modification_end_time, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtCheckCollectionsListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_ext_check_collections_serialize( + self, + x_request_id, + x_trace_id, + object_type, + object_id, + check_collection_template_id, + exclude_check_statuses, + page, + size, + order_by, + creation_start_time, + creation_end_time, + modification_start_time, + modification_end_time, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'excludeCheckStatuses': 'multi', + 'orderBy': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if object_type is not None: + + _query_params.append(('objectType', object_type)) + + if object_id is not None: + + _query_params.append(('objectId', object_id)) + + if check_collection_template_id is not None: + + _query_params.append(('checkCollectionTemplateId', check_collection_template_id)) + + if exclude_check_statuses is not None: + + _query_params.append(('excludeCheckStatuses', exclude_check_statuses)) + + if page is not None: + + _query_params.append(('page', page)) + + if size is not None: + + _query_params.append(('size', size)) + + if order_by is not None: + + _query_params.append(('orderBy', order_by)) + + if creation_start_time is not None: + if isinstance(creation_start_time, datetime): + _query_params.append( + ( + 'creationStartTime', + creation_start_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('creationStartTime', creation_start_time)) + + if creation_end_time is not None: + if isinstance(creation_end_time, datetime): + _query_params.append( + ( + 'creationEndTime', + creation_end_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('creationEndTime', creation_end_time)) + + if modification_start_time is not None: + if isinstance(modification_start_time, datetime): + _query_params.append( + ( + 'modificationStartTime', + modification_start_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('modificationStartTime', modification_start_time)) + + if modification_end_time is not None: + if isinstance(modification_end_time, datetime): + _query_params.append( + ( + 'modificationEndTime', + modification_end_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('modificationEndTime', modification_end_time)) + + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/troubleshooting/check-collections', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def start_ext_check_collection( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + base_check_collection_create_request: BaseCheckCollectionCreateRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ExtCheckCollectionsGetResponse: + """Start check collection + + Start a new check collection + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param base_check_collection_create_request: (required) + :type base_check_collection_create_request: BaseCheckCollectionCreateRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._start_ext_check_collection_serialize( + x_request_id=x_request_id, + base_check_collection_create_request=base_check_collection_create_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ExtCheckCollectionsGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def start_ext_check_collection_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + base_check_collection_create_request: BaseCheckCollectionCreateRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ExtCheckCollectionsGetResponse]: + """Start check collection + + Start a new check collection + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param base_check_collection_create_request: (required) + :type base_check_collection_create_request: BaseCheckCollectionCreateRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._start_ext_check_collection_serialize( + x_request_id=x_request_id, + base_check_collection_create_request=base_check_collection_create_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ExtCheckCollectionsGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def start_ext_check_collection_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + base_check_collection_create_request: BaseCheckCollectionCreateRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Start check collection + + Start a new check collection + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param base_check_collection_create_request: (required) + :type base_check_collection_create_request: BaseCheckCollectionCreateRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._start_ext_check_collection_serialize( + x_request_id=x_request_id, + base_check_collection_create_request=base_check_collection_create_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ExtCheckCollectionsGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _start_ext_check_collection_serialize( + self, + x_request_id, + base_check_collection_create_request, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + if base_check_collection_create_request is not None: + _body_params = base_check_collection_create_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/troubleshooting/check-collections', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/pfruck_contabo/api/checks_api.py b/pfruck_contabo/api/checks_api.py new file mode 100644 index 00000000..e483a2aa --- /dev/null +++ b/pfruck_contabo/api/checks_api.py @@ -0,0 +1,1305 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Optional, Union +from typing_extensions import Annotated +from pfruck_contabo.models.base_check_create_request import BaseCheckCreateRequest +from pfruck_contabo.models.cancel_request import CancelRequest +from pfruck_contabo.models.ext_checks_get_response import ExtChecksGetResponse +from pfruck_contabo.models.ext_checks_list_response import ExtChecksListResponse + +from pfruck_contabo.api_client import ApiClient, RequestSerialized +from pfruck_contabo.api_response import ApiResponse +from pfruck_contabo.rest import RESTResponseType + + +class ChecksApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def cancel_ext_check( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + check_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Check's id")], + cancel_request: CancelRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ExtChecksGetResponse: + """Cancel check + + Cancel check + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param check_id: Check's id (required) + :type check_id: float + :param cancel_request: (required) + :type cancel_request: CancelRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._cancel_ext_check_serialize( + x_request_id=x_request_id, + check_id=check_id, + cancel_request=cancel_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtChecksGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def cancel_ext_check_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + check_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Check's id")], + cancel_request: CancelRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ExtChecksGetResponse]: + """Cancel check + + Cancel check + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param check_id: Check's id (required) + :type check_id: float + :param cancel_request: (required) + :type cancel_request: CancelRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._cancel_ext_check_serialize( + x_request_id=x_request_id, + check_id=check_id, + cancel_request=cancel_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtChecksGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def cancel_ext_check_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + check_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Check's id")], + cancel_request: CancelRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Cancel check + + Cancel check + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param check_id: Check's id (required) + :type check_id: float + :param cancel_request: (required) + :type cancel_request: CancelRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._cancel_ext_check_serialize( + x_request_id=x_request_id, + check_id=check_id, + cancel_request=cancel_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtChecksGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _cancel_ext_check_serialize( + self, + x_request_id, + check_id, + cancel_request, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if check_id is not None: + _path_params['checkId'] = check_id + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + if cancel_request is not None: + _body_params = cancel_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v1/troubleshooting/checks/{checkId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_ext_check( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + check_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Check's id")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ExtChecksGetResponse: + """Get check + + Get a single check by id + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param check_id: Check's id (required) + :type check_id: float + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_ext_check_serialize( + x_request_id=x_request_id, + check_id=check_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtChecksGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_ext_check_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + check_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Check's id")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ExtChecksGetResponse]: + """Get check + + Get a single check by id + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param check_id: Check's id (required) + :type check_id: float + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_ext_check_serialize( + x_request_id=x_request_id, + check_id=check_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtChecksGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_ext_check_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + check_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Check's id")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get check + + Get a single check by id + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param check_id: Check's id (required) + :type check_id: float + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_ext_check_serialize( + x_request_id=x_request_id, + check_id=check_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtChecksGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_ext_check_serialize( + self, + x_request_id, + check_id, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if check_id is not None: + _path_params['checkId'] = check_id + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/troubleshooting/checks/{checkId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_ext_checks( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + object_type: Annotated[Optional[StrictStr], Field(description="Object type to be handled")] = None, + object_id: Annotated[Optional[StrictStr], Field(description="ID of the object, to be handled")] = None, + status: Annotated[Optional[StrictStr], Field(description="Status of the handle")] = None, + check_collection_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="ID of check collection if started in scope of a collection")] = None, + check_template_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Check Template for this check")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ExtChecksListResponse: + """List check + + List and filter all check + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param object_type: Object type to be handled + :type object_type: str + :param object_id: ID of the object, to be handled + :type object_id: str + :param status: Status of the handle + :type status: str + :param check_collection_id: ID of check collection if started in scope of a collection + :type check_collection_id: float + :param check_template_id: Check Template for this check + :type check_template_id: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_ext_checks_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + object_type=object_type, + object_id=object_id, + status=status, + check_collection_id=check_collection_id, + check_template_id=check_template_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtChecksListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_ext_checks_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + object_type: Annotated[Optional[StrictStr], Field(description="Object type to be handled")] = None, + object_id: Annotated[Optional[StrictStr], Field(description="ID of the object, to be handled")] = None, + status: Annotated[Optional[StrictStr], Field(description="Status of the handle")] = None, + check_collection_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="ID of check collection if started in scope of a collection")] = None, + check_template_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Check Template for this check")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ExtChecksListResponse]: + """List check + + List and filter all check + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param object_type: Object type to be handled + :type object_type: str + :param object_id: ID of the object, to be handled + :type object_id: str + :param status: Status of the handle + :type status: str + :param check_collection_id: ID of check collection if started in scope of a collection + :type check_collection_id: float + :param check_template_id: Check Template for this check + :type check_template_id: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_ext_checks_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + object_type=object_type, + object_id=object_id, + status=status, + check_collection_id=check_collection_id, + check_template_id=check_template_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtChecksListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_ext_checks_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + object_type: Annotated[Optional[StrictStr], Field(description="Object type to be handled")] = None, + object_id: Annotated[Optional[StrictStr], Field(description="ID of the object, to be handled")] = None, + status: Annotated[Optional[StrictStr], Field(description="Status of the handle")] = None, + check_collection_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="ID of check collection if started in scope of a collection")] = None, + check_template_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Check Template for this check")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List check + + List and filter all check + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param object_type: Object type to be handled + :type object_type: str + :param object_id: ID of the object, to be handled + :type object_id: str + :param status: Status of the handle + :type status: str + :param check_collection_id: ID of check collection if started in scope of a collection + :type check_collection_id: float + :param check_template_id: Check Template for this check + :type check_template_id: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_ext_checks_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + object_type=object_type, + object_id=object_id, + status=status, + check_collection_id=check_collection_id, + check_template_id=check_template_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtChecksListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_ext_checks_serialize( + self, + x_request_id, + x_trace_id, + object_type, + object_id, + status, + check_collection_id, + check_template_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if object_type is not None: + + _query_params.append(('objectType', object_type)) + + if object_id is not None: + + _query_params.append(('objectId', object_id)) + + if status is not None: + + _query_params.append(('status', status)) + + if check_collection_id is not None: + + _query_params.append(('checkCollectionId', check_collection_id)) + + if check_template_id is not None: + + _query_params.append(('checkTemplateId', check_template_id)) + + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/troubleshooting/checks', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def start_ext_check( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + base_check_create_request: BaseCheckCreateRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ExtChecksGetResponse: + """Start check + + Start a new check + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param base_check_create_request: (required) + :type base_check_create_request: BaseCheckCreateRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._start_ext_check_serialize( + x_request_id=x_request_id, + base_check_create_request=base_check_create_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ExtChecksGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def start_ext_check_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + base_check_create_request: BaseCheckCreateRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ExtChecksGetResponse]: + """Start check + + Start a new check + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param base_check_create_request: (required) + :type base_check_create_request: BaseCheckCreateRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._start_ext_check_serialize( + x_request_id=x_request_id, + base_check_create_request=base_check_create_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ExtChecksGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def start_ext_check_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + base_check_create_request: BaseCheckCreateRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Start check + + Start a new check + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param base_check_create_request: (required) + :type base_check_create_request: BaseCheckCreateRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._start_ext_check_serialize( + x_request_id=x_request_id, + base_check_create_request=base_check_create_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ExtChecksGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _start_ext_check_serialize( + self, + x_request_id, + base_check_create_request, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + if base_check_create_request is not None: + _body_params = base_check_create_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/troubleshooting/checks', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/pfruck_contabo/api/dns_api.py b/pfruck_contabo/api/dns_api.py new file mode 100644 index 00000000..00d5dde3 --- /dev/null +++ b/pfruck_contabo/api/dns_api.py @@ -0,0 +1,4484 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictInt, StrictStr, field_validator +from typing import List, Optional +from typing_extensions import Annotated +from pfruck_contabo.models.api_bulk_delete_dns_zone_records_response import ApiBulkDeleteDnsZoneRecordsResponse +from pfruck_contabo.models.api_dns_zone_record_response import ApiDnsZoneRecordResponse +from pfruck_contabo.models.api_dns_zone_response import ApiDnsZoneResponse +from pfruck_contabo.models.api_ptr_record_response import ApiPtrRecordResponse +from pfruck_contabo.models.bulk_delete_dns_zone_records_request import BulkDeleteDnsZoneRecordsRequest +from pfruck_contabo.models.create_dns_zone_record_request import CreateDnsZoneRecordRequest +from pfruck_contabo.models.create_dns_zone_request import CreateDnsZoneRequest +from pfruck_contabo.models.create_ptr_record_request import CreatePtrRecordRequest +from pfruck_contabo.models.list_dns_zone_records_response import ListDnsZoneRecordsResponse +from pfruck_contabo.models.list_dns_zones_response import ListDnsZonesResponse +from pfruck_contabo.models.list_ptr_records_response import ListPtrRecordsResponse +from pfruck_contabo.models.update_dns_zone_record_request import UpdateDnsZoneRecordRequest +from pfruck_contabo.models.update_ptr_record_request import UpdatePtrRecordRequest + +from pfruck_contabo.api_client import ApiClient, RequestSerialized +from pfruck_contabo.api_response import ApiResponse +from pfruck_contabo.rest import RESTResponseType + + +class DNSApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def bulk_delete_dns_zone_records( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + zone_name: Annotated[StrictStr, Field(description="Zone name")], + bulk_delete_dns_zone_records_request: BulkDeleteDnsZoneRecordsRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiBulkDeleteDnsZoneRecordsResponse: + """Bulk delete DNS zone records + + Delete multiple zone records from a DNS Zone + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param zone_name: Zone name (required) + :type zone_name: str + :param bulk_delete_dns_zone_records_request: (required) + :type bulk_delete_dns_zone_records_request: BulkDeleteDnsZoneRecordsRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_delete_dns_zone_records_serialize( + x_request_id=x_request_id, + zone_name=zone_name, + bulk_delete_dns_zone_records_request=bulk_delete_dns_zone_records_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiBulkDeleteDnsZoneRecordsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def bulk_delete_dns_zone_records_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + zone_name: Annotated[StrictStr, Field(description="Zone name")], + bulk_delete_dns_zone_records_request: BulkDeleteDnsZoneRecordsRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiBulkDeleteDnsZoneRecordsResponse]: + """Bulk delete DNS zone records + + Delete multiple zone records from a DNS Zone + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param zone_name: Zone name (required) + :type zone_name: str + :param bulk_delete_dns_zone_records_request: (required) + :type bulk_delete_dns_zone_records_request: BulkDeleteDnsZoneRecordsRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_delete_dns_zone_records_serialize( + x_request_id=x_request_id, + zone_name=zone_name, + bulk_delete_dns_zone_records_request=bulk_delete_dns_zone_records_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiBulkDeleteDnsZoneRecordsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def bulk_delete_dns_zone_records_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + zone_name: Annotated[StrictStr, Field(description="Zone name")], + bulk_delete_dns_zone_records_request: BulkDeleteDnsZoneRecordsRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Bulk delete DNS zone records + + Delete multiple zone records from a DNS Zone + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param zone_name: Zone name (required) + :type zone_name: str + :param bulk_delete_dns_zone_records_request: (required) + :type bulk_delete_dns_zone_records_request: BulkDeleteDnsZoneRecordsRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_delete_dns_zone_records_serialize( + x_request_id=x_request_id, + zone_name=zone_name, + bulk_delete_dns_zone_records_request=bulk_delete_dns_zone_records_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiBulkDeleteDnsZoneRecordsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _bulk_delete_dns_zone_records_serialize( + self, + x_request_id, + zone_name, + bulk_delete_dns_zone_records_request, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if zone_name is not None: + _path_params['zoneName'] = zone_name + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + if bulk_delete_dns_zone_records_request is not None: + _body_params = bulk_delete_dns_zone_records_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/dns/zones/{zoneName}/records/bulk', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def create_dns_zone( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + create_dns_zone_request: CreateDnsZoneRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiDnsZoneResponse: + """Create DNS zone + + Creates a new DNS zone for a customer + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param create_dns_zone_request: (required) + :type create_dns_zone_request: CreateDnsZoneRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_dns_zone_serialize( + x_request_id=x_request_id, + create_dns_zone_request=create_dns_zone_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ApiDnsZoneResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_dns_zone_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + create_dns_zone_request: CreateDnsZoneRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiDnsZoneResponse]: + """Create DNS zone + + Creates a new DNS zone for a customer + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param create_dns_zone_request: (required) + :type create_dns_zone_request: CreateDnsZoneRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_dns_zone_serialize( + x_request_id=x_request_id, + create_dns_zone_request=create_dns_zone_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ApiDnsZoneResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_dns_zone_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + create_dns_zone_request: CreateDnsZoneRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create DNS zone + + Creates a new DNS zone for a customer + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param create_dns_zone_request: (required) + :type create_dns_zone_request: CreateDnsZoneRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_dns_zone_serialize( + x_request_id=x_request_id, + create_dns_zone_request=create_dns_zone_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ApiDnsZoneResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_dns_zone_serialize( + self, + x_request_id, + create_dns_zone_request, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + if create_dns_zone_request is not None: + _body_params = create_dns_zone_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/dns/zones', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def create_dns_zone_record( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + zone_name: Annotated[StrictStr, Field(description="Zone name")], + create_dns_zone_record_request: CreateDnsZoneRecordRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiDnsZoneRecordResponse: + """Create DNS zone record + + Create resource record in a zone + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param zone_name: Zone name (required) + :type zone_name: str + :param create_dns_zone_record_request: (required) + :type create_dns_zone_record_request: CreateDnsZoneRecordRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_dns_zone_record_serialize( + x_request_id=x_request_id, + zone_name=zone_name, + create_dns_zone_record_request=create_dns_zone_record_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ApiDnsZoneRecordResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_dns_zone_record_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + zone_name: Annotated[StrictStr, Field(description="Zone name")], + create_dns_zone_record_request: CreateDnsZoneRecordRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiDnsZoneRecordResponse]: + """Create DNS zone record + + Create resource record in a zone + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param zone_name: Zone name (required) + :type zone_name: str + :param create_dns_zone_record_request: (required) + :type create_dns_zone_record_request: CreateDnsZoneRecordRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_dns_zone_record_serialize( + x_request_id=x_request_id, + zone_name=zone_name, + create_dns_zone_record_request=create_dns_zone_record_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ApiDnsZoneRecordResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_dns_zone_record_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + zone_name: Annotated[StrictStr, Field(description="Zone name")], + create_dns_zone_record_request: CreateDnsZoneRecordRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create DNS zone record + + Create resource record in a zone + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param zone_name: Zone name (required) + :type zone_name: str + :param create_dns_zone_record_request: (required) + :type create_dns_zone_record_request: CreateDnsZoneRecordRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_dns_zone_record_serialize( + x_request_id=x_request_id, + zone_name=zone_name, + create_dns_zone_record_request=create_dns_zone_record_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ApiDnsZoneRecordResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_dns_zone_record_serialize( + self, + x_request_id, + zone_name, + create_dns_zone_record_request, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if zone_name is not None: + _path_params['zoneName'] = zone_name + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + if create_dns_zone_record_request is not None: + _body_params = create_dns_zone_record_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/dns/zones/{zoneName}/records', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def create_ptr_record( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + create_ptr_record_request: CreatePtrRecordRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiPtrRecordResponse: + """Create a new PTR Record using ip address + + Create a new PTR Record using ip address. Only IPv6 can be created + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param create_ptr_record_request: (required) + :type create_ptr_record_request: CreatePtrRecordRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_ptr_record_serialize( + x_request_id=x_request_id, + create_ptr_record_request=create_ptr_record_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ApiPtrRecordResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_ptr_record_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + create_ptr_record_request: CreatePtrRecordRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiPtrRecordResponse]: + """Create a new PTR Record using ip address + + Create a new PTR Record using ip address. Only IPv6 can be created + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param create_ptr_record_request: (required) + :type create_ptr_record_request: CreatePtrRecordRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_ptr_record_serialize( + x_request_id=x_request_id, + create_ptr_record_request=create_ptr_record_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ApiPtrRecordResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_ptr_record_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + create_ptr_record_request: CreatePtrRecordRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a new PTR Record using ip address + + Create a new PTR Record using ip address. Only IPv6 can be created + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param create_ptr_record_request: (required) + :type create_ptr_record_request: CreatePtrRecordRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_ptr_record_serialize( + x_request_id=x_request_id, + create_ptr_record_request=create_ptr_record_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ApiPtrRecordResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_ptr_record_serialize( + self, + x_request_id, + create_ptr_record_request, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + if create_ptr_record_request is not None: + _body_params = create_ptr_record_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/dns/ptrs', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_dns_zone( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + zone_name: Annotated[StrictStr, Field(description="Zone name")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete a DNS zone. + + Delete a DNS Zone using zone name. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param zone_name: Zone name (required) + :type zone_name: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_dns_zone_serialize( + x_request_id=x_request_id, + zone_name=zone_name, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_dns_zone_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + zone_name: Annotated[StrictStr, Field(description="Zone name")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete a DNS zone. + + Delete a DNS Zone using zone name. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param zone_name: Zone name (required) + :type zone_name: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_dns_zone_serialize( + x_request_id=x_request_id, + zone_name=zone_name, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_dns_zone_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + zone_name: Annotated[StrictStr, Field(description="Zone name")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete a DNS zone. + + Delete a DNS Zone using zone name. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param zone_name: Zone name (required) + :type zone_name: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_dns_zone_serialize( + x_request_id=x_request_id, + zone_name=zone_name, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_dns_zone_serialize( + self, + x_request_id, + zone_name, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if zone_name is not None: + _path_params['zoneName'] = zone_name + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/dns/zones/{zoneName}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_dns_zone_record( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + record_id: Annotated[StrictInt, Field(description="The identifier of the DNS record")], + zone_name: Annotated[StrictStr, Field(description="Zone name")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete a DNS zone record + + Delete a DNZ Zone's record + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param record_id: The identifier of the DNS record (required) + :type record_id: int + :param zone_name: Zone name (required) + :type zone_name: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_dns_zone_record_serialize( + x_request_id=x_request_id, + record_id=record_id, + zone_name=zone_name, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_dns_zone_record_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + record_id: Annotated[StrictInt, Field(description="The identifier of the DNS record")], + zone_name: Annotated[StrictStr, Field(description="Zone name")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete a DNS zone record + + Delete a DNZ Zone's record + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param record_id: The identifier of the DNS record (required) + :type record_id: int + :param zone_name: Zone name (required) + :type zone_name: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_dns_zone_record_serialize( + x_request_id=x_request_id, + record_id=record_id, + zone_name=zone_name, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_dns_zone_record_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + record_id: Annotated[StrictInt, Field(description="The identifier of the DNS record")], + zone_name: Annotated[StrictStr, Field(description="Zone name")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete a DNS zone record + + Delete a DNZ Zone's record + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param record_id: The identifier of the DNS record (required) + :type record_id: int + :param zone_name: Zone name (required) + :type zone_name: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_dns_zone_record_serialize( + x_request_id=x_request_id, + record_id=record_id, + zone_name=zone_name, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_dns_zone_record_serialize( + self, + x_request_id, + record_id, + zone_name, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if record_id is not None: + _path_params['recordId'] = record_id + if zone_name is not None: + _path_params['zoneName'] = zone_name + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/dns/zones/{zoneName}/records/{recordId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_ptr_record( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + ip_address: Annotated[StrictStr, Field(description="Ip Address")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete a PTR Record using ip address + + Delete a PTR Record using ip address. Only IPv6 can be deleted + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param ip_address: Ip Address (required) + :type ip_address: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_ptr_record_serialize( + x_request_id=x_request_id, + ip_address=ip_address, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_ptr_record_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + ip_address: Annotated[StrictStr, Field(description="Ip Address")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete a PTR Record using ip address + + Delete a PTR Record using ip address. Only IPv6 can be deleted + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param ip_address: Ip Address (required) + :type ip_address: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_ptr_record_serialize( + x_request_id=x_request_id, + ip_address=ip_address, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_ptr_record_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + ip_address: Annotated[StrictStr, Field(description="Ip Address")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete a PTR Record using ip address + + Delete a PTR Record using ip address. Only IPv6 can be deleted + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param ip_address: Ip Address (required) + :type ip_address: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_ptr_record_serialize( + x_request_id=x_request_id, + ip_address=ip_address, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_ptr_record_serialize( + self, + x_request_id, + ip_address, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if ip_address is not None: + _path_params['ipAddress'] = ip_address + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/dns/ptrs/{ipAddress}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def retrieve_dns_zone( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + zone_name: Annotated[StrictStr, Field(description="Zone name")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Retrieve a DNS Zone by zone name + + Get all attributes for a specific DNS Zone + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param zone_name: Zone name (required) + :type zone_name: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_dns_zone_serialize( + x_request_id=x_request_id, + zone_name=zone_name, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def retrieve_dns_zone_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + zone_name: Annotated[StrictStr, Field(description="Zone name")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Retrieve a DNS Zone by zone name + + Get all attributes for a specific DNS Zone + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param zone_name: Zone name (required) + :type zone_name: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_dns_zone_serialize( + x_request_id=x_request_id, + zone_name=zone_name, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def retrieve_dns_zone_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + zone_name: Annotated[StrictStr, Field(description="Zone name")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Retrieve a DNS Zone by zone name + + Get all attributes for a specific DNS Zone + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param zone_name: Zone name (required) + :type zone_name: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_dns_zone_serialize( + x_request_id=x_request_id, + zone_name=zone_name, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _retrieve_dns_zone_serialize( + self, + x_request_id, + zone_name, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if zone_name is not None: + _path_params['zoneName'] = zone_name + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/dns/zones/{zoneName}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def retrieve_dns_zone_records_list( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + zone_name: Annotated[StrictStr, Field(description="Zone name")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + search: Annotated[Optional[StrictStr], Field(description="Search DNS records by name, type or data")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ListDnsZoneRecordsResponse: + """List a DNS Zone's records + + Get all the records of a DNS Zone + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param zone_name: Zone name (required) + :type zone_name: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param search: Search DNS records by name, type or data + :type search: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_dns_zone_records_list_serialize( + x_request_id=x_request_id, + zone_name=zone_name, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + search=search, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListDnsZoneRecordsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def retrieve_dns_zone_records_list_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + zone_name: Annotated[StrictStr, Field(description="Zone name")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + search: Annotated[Optional[StrictStr], Field(description="Search DNS records by name, type or data")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ListDnsZoneRecordsResponse]: + """List a DNS Zone's records + + Get all the records of a DNS Zone + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param zone_name: Zone name (required) + :type zone_name: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param search: Search DNS records by name, type or data + :type search: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_dns_zone_records_list_serialize( + x_request_id=x_request_id, + zone_name=zone_name, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + search=search, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListDnsZoneRecordsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def retrieve_dns_zone_records_list_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + zone_name: Annotated[StrictStr, Field(description="Zone name")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + search: Annotated[Optional[StrictStr], Field(description="Search DNS records by name, type or data")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List a DNS Zone's records + + Get all the records of a DNS Zone + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param zone_name: Zone name (required) + :type zone_name: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param search: Search DNS records by name, type or data + :type search: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_dns_zone_records_list_serialize( + x_request_id=x_request_id, + zone_name=zone_name, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + search=search, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListDnsZoneRecordsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _retrieve_dns_zone_records_list_serialize( + self, + x_request_id, + zone_name, + x_trace_id, + page, + size, + order_by, + search, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'orderBy': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if zone_name is not None: + _path_params['zoneName'] = zone_name + # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if size is not None: + + _query_params.append(('size', size)) + + if order_by is not None: + + _query_params.append(('orderBy', order_by)) + + if search is not None: + + _query_params.append(('search', search)) + + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/dns/zones/{zoneName}/records', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def retrieve_dns_zones_list( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + customer_id: Annotated[Optional[StrictStr], Field(description="Customer ID")] = None, + tenant_id: Annotated[Optional[StrictStr], Field(description="Tenant ID")] = None, + zone_name: Annotated[Optional[StrictStr], Field(description="Seach by zone name")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ListDnsZonesResponse: + """List DNS zones + + Get a list of all zones + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param customer_id: Customer ID + :type customer_id: str + :param tenant_id: Tenant ID + :type tenant_id: str + :param zone_name: Seach by zone name + :type zone_name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_dns_zones_list_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + customer_id=customer_id, + tenant_id=tenant_id, + zone_name=zone_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListDnsZonesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def retrieve_dns_zones_list_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + customer_id: Annotated[Optional[StrictStr], Field(description="Customer ID")] = None, + tenant_id: Annotated[Optional[StrictStr], Field(description="Tenant ID")] = None, + zone_name: Annotated[Optional[StrictStr], Field(description="Seach by zone name")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ListDnsZonesResponse]: + """List DNS zones + + Get a list of all zones + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param customer_id: Customer ID + :type customer_id: str + :param tenant_id: Tenant ID + :type tenant_id: str + :param zone_name: Seach by zone name + :type zone_name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_dns_zones_list_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + customer_id=customer_id, + tenant_id=tenant_id, + zone_name=zone_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListDnsZonesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def retrieve_dns_zones_list_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + customer_id: Annotated[Optional[StrictStr], Field(description="Customer ID")] = None, + tenant_id: Annotated[Optional[StrictStr], Field(description="Tenant ID")] = None, + zone_name: Annotated[Optional[StrictStr], Field(description="Seach by zone name")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List DNS zones + + Get a list of all zones + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param customer_id: Customer ID + :type customer_id: str + :param tenant_id: Tenant ID + :type tenant_id: str + :param zone_name: Seach by zone name + :type zone_name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_dns_zones_list_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + customer_id=customer_id, + tenant_id=tenant_id, + zone_name=zone_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListDnsZonesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _retrieve_dns_zones_list_serialize( + self, + x_request_id, + x_trace_id, + page, + size, + order_by, + customer_id, + tenant_id, + zone_name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'orderBy': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if size is not None: + + _query_params.append(('size', size)) + + if order_by is not None: + + _query_params.append(('orderBy', order_by)) + + if customer_id is not None: + + _query_params.append(('customerId', customer_id)) + + if tenant_id is not None: + + _query_params.append(('tenantId', tenant_id)) + + if zone_name is not None: + + _query_params.append(('zoneName', zone_name)) + + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/dns/zones', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def retrieve_ptr_record( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + ip_address: Annotated[StrictStr, Field(description="Ip Address")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiPtrRecordResponse: + """Retrieve a PTR Record by ip address + + Get all attributes for a specific PTR Record + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param ip_address: Ip Address (required) + :type ip_address: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_ptr_record_serialize( + x_request_id=x_request_id, + ip_address=ip_address, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiPtrRecordResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def retrieve_ptr_record_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + ip_address: Annotated[StrictStr, Field(description="Ip Address")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiPtrRecordResponse]: + """Retrieve a PTR Record by ip address + + Get all attributes for a specific PTR Record + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param ip_address: Ip Address (required) + :type ip_address: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_ptr_record_serialize( + x_request_id=x_request_id, + ip_address=ip_address, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiPtrRecordResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def retrieve_ptr_record_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + ip_address: Annotated[StrictStr, Field(description="Ip Address")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Retrieve a PTR Record by ip address + + Get all attributes for a specific PTR Record + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param ip_address: Ip Address (required) + :type ip_address: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_ptr_record_serialize( + x_request_id=x_request_id, + ip_address=ip_address, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiPtrRecordResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _retrieve_ptr_record_serialize( + self, + x_request_id, + ip_address, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if ip_address is not None: + _path_params['ipAddress'] = ip_address + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/dns/ptrs/{ipAddress}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def retrieve_ptr_records_list( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + customer_id: Annotated[Optional[StrictStr], Field(description="Customer ID")] = None, + tenant_id: Annotated[Optional[StrictStr], Field(description="Tenant ID")] = None, + ips: Annotated[Optional[List[StrictStr]], Field(description="List of IPs, separated by commas")] = None, + search: Annotated[Optional[StrictStr], Field(description="Search PTR records by ip or data")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ListPtrRecordsResponse: + """List PTR records + + Get a list of all PTR records, either customer or a list of IPs is required + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param customer_id: Customer ID + :type customer_id: str + :param tenant_id: Tenant ID + :type tenant_id: str + :param ips: List of IPs, separated by commas + :type ips: List[str] + :param search: Search PTR records by ip or data + :type search: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_ptr_records_list_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + customer_id=customer_id, + tenant_id=tenant_id, + ips=ips, + search=search, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListPtrRecordsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def retrieve_ptr_records_list_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + customer_id: Annotated[Optional[StrictStr], Field(description="Customer ID")] = None, + tenant_id: Annotated[Optional[StrictStr], Field(description="Tenant ID")] = None, + ips: Annotated[Optional[List[StrictStr]], Field(description="List of IPs, separated by commas")] = None, + search: Annotated[Optional[StrictStr], Field(description="Search PTR records by ip or data")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ListPtrRecordsResponse]: + """List PTR records + + Get a list of all PTR records, either customer or a list of IPs is required + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param customer_id: Customer ID + :type customer_id: str + :param tenant_id: Tenant ID + :type tenant_id: str + :param ips: List of IPs, separated by commas + :type ips: List[str] + :param search: Search PTR records by ip or data + :type search: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_ptr_records_list_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + customer_id=customer_id, + tenant_id=tenant_id, + ips=ips, + search=search, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListPtrRecordsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def retrieve_ptr_records_list_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + customer_id: Annotated[Optional[StrictStr], Field(description="Customer ID")] = None, + tenant_id: Annotated[Optional[StrictStr], Field(description="Tenant ID")] = None, + ips: Annotated[Optional[List[StrictStr]], Field(description="List of IPs, separated by commas")] = None, + search: Annotated[Optional[StrictStr], Field(description="Search PTR records by ip or data")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List PTR records + + Get a list of all PTR records, either customer or a list of IPs is required + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param customer_id: Customer ID + :type customer_id: str + :param tenant_id: Tenant ID + :type tenant_id: str + :param ips: List of IPs, separated by commas + :type ips: List[str] + :param search: Search PTR records by ip or data + :type search: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_ptr_records_list_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + customer_id=customer_id, + tenant_id=tenant_id, + ips=ips, + search=search, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListPtrRecordsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _retrieve_ptr_records_list_serialize( + self, + x_request_id, + x_trace_id, + page, + size, + order_by, + customer_id, + tenant_id, + ips, + search, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'orderBy': 'multi', + 'ips': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if size is not None: + + _query_params.append(('size', size)) + + if order_by is not None: + + _query_params.append(('orderBy', order_by)) + + if customer_id is not None: + + _query_params.append(('customerId', customer_id)) + + if tenant_id is not None: + + _query_params.append(('tenantId', tenant_id)) + + if ips is not None: + + _query_params.append(('ips', ips)) + + if search is not None: + + _query_params.append(('search', search)) + + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/dns/ptrs', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def update_dns_zone_record( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + record_id: Annotated[StrictInt, Field(description="The identifier of the DNS record")], + zone_name: Annotated[StrictStr, Field(description="Zone name")], + update_dns_zone_record_request: UpdateDnsZoneRecordRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiDnsZoneRecordResponse: + """Update DNS zone record + + Create resource record in a zone + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param record_id: The identifier of the DNS record (required) + :type record_id: int + :param zone_name: Zone name (required) + :type zone_name: str + :param update_dns_zone_record_request: (required) + :type update_dns_zone_record_request: UpdateDnsZoneRecordRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_dns_zone_record_serialize( + x_request_id=x_request_id, + record_id=record_id, + zone_name=zone_name, + update_dns_zone_record_request=update_dns_zone_record_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiDnsZoneRecordResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def update_dns_zone_record_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + record_id: Annotated[StrictInt, Field(description="The identifier of the DNS record")], + zone_name: Annotated[StrictStr, Field(description="Zone name")], + update_dns_zone_record_request: UpdateDnsZoneRecordRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiDnsZoneRecordResponse]: + """Update DNS zone record + + Create resource record in a zone + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param record_id: The identifier of the DNS record (required) + :type record_id: int + :param zone_name: Zone name (required) + :type zone_name: str + :param update_dns_zone_record_request: (required) + :type update_dns_zone_record_request: UpdateDnsZoneRecordRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_dns_zone_record_serialize( + x_request_id=x_request_id, + record_id=record_id, + zone_name=zone_name, + update_dns_zone_record_request=update_dns_zone_record_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiDnsZoneRecordResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def update_dns_zone_record_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + record_id: Annotated[StrictInt, Field(description="The identifier of the DNS record")], + zone_name: Annotated[StrictStr, Field(description="Zone name")], + update_dns_zone_record_request: UpdateDnsZoneRecordRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update DNS zone record + + Create resource record in a zone + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param record_id: The identifier of the DNS record (required) + :type record_id: int + :param zone_name: Zone name (required) + :type zone_name: str + :param update_dns_zone_record_request: (required) + :type update_dns_zone_record_request: UpdateDnsZoneRecordRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_dns_zone_record_serialize( + x_request_id=x_request_id, + record_id=record_id, + zone_name=zone_name, + update_dns_zone_record_request=update_dns_zone_record_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiDnsZoneRecordResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_dns_zone_record_serialize( + self, + x_request_id, + record_id, + zone_name, + update_dns_zone_record_request, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if record_id is not None: + _path_params['recordId'] = record_id + if zone_name is not None: + _path_params['zoneName'] = zone_name + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + if update_dns_zone_record_request is not None: + _body_params = update_dns_zone_record_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v1/dns/zones/{zoneName}/records/{recordId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def update_ptr_record( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + ip_address: Annotated[StrictStr, Field(description="Ip Address")], + update_ptr_record_request: UpdatePtrRecordRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Edit a PTR Record by ip address + + Edit attributes for a specific PTR Record + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param ip_address: Ip Address (required) + :type ip_address: str + :param update_ptr_record_request: (required) + :type update_ptr_record_request: UpdatePtrRecordRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_ptr_record_serialize( + x_request_id=x_request_id, + ip_address=ip_address, + update_ptr_record_request=update_ptr_record_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def update_ptr_record_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + ip_address: Annotated[StrictStr, Field(description="Ip Address")], + update_ptr_record_request: UpdatePtrRecordRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Edit a PTR Record by ip address + + Edit attributes for a specific PTR Record + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param ip_address: Ip Address (required) + :type ip_address: str + :param update_ptr_record_request: (required) + :type update_ptr_record_request: UpdatePtrRecordRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_ptr_record_serialize( + x_request_id=x_request_id, + ip_address=ip_address, + update_ptr_record_request=update_ptr_record_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def update_ptr_record_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + ip_address: Annotated[StrictStr, Field(description="Ip Address")], + update_ptr_record_request: UpdatePtrRecordRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Edit a PTR Record by ip address + + Edit attributes for a specific PTR Record + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param ip_address: Ip Address (required) + :type ip_address: str + :param update_ptr_record_request: (required) + :type update_ptr_record_request: UpdatePtrRecordRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_ptr_record_serialize( + x_request_id=x_request_id, + ip_address=ip_address, + update_ptr_record_request=update_ptr_record_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_ptr_record_serialize( + self, + x_request_id, + ip_address, + update_ptr_record_request, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if ip_address is not None: + _path_params['ipAddress'] = ip_address + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + if update_ptr_record_request is not None: + _body_params = update_ptr_record_request + + + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v1/dns/ptrs/{ipAddress}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/pfruck_contabo/api/dns_audits_api.py b/pfruck_contabo/api/dns_audits_api.py new file mode 100644 index 00000000..e7a9da2f --- /dev/null +++ b/pfruck_contabo/api/dns_audits_api.py @@ -0,0 +1,897 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from datetime import date +from pydantic import Field, StrictInt, StrictStr, field_validator +from typing import List, Optional +from typing_extensions import Annotated +from pfruck_contabo.models.record_audit_response import RecordAuditResponse +from pfruck_contabo.models.zone_audit_response import ZoneAuditResponse + +from pfruck_contabo.api_client import ApiClient, RequestSerialized +from pfruck_contabo.api_response import ApiResponse +from pfruck_contabo.rest import RESTResponseType + + +class DNSAuditsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def retrieve_dns_audits_list( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Dns Zone name.")] = None, + request_id: Annotated[Optional[StrictStr], Field(description="The requestId of the API call which led to the change.")] = None, + changed_by: Annotated[Optional[StrictStr], Field(description="UserId of the user which led to the change.")] = None, + start_date: Annotated[Optional[date], Field(description="Start of search time range.")] = None, + end_date: Annotated[Optional[date], Field(description="End of search time range.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ZoneAuditResponse: + """List history about your DNS Zones (audit) + + List and filters the history about your DNS Zones . + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param name: Dns Zone name. + :type name: str + :param request_id: The requestId of the API call which led to the change. + :type request_id: str + :param changed_by: UserId of the user which led to the change. + :type changed_by: str + :param start_date: Start of search time range. + :type start_date: date + :param end_date: End of search time range. + :type end_date: date + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_dns_audits_list_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + name=name, + request_id=request_id, + changed_by=changed_by, + start_date=start_date, + end_date=end_date, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ZoneAuditResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def retrieve_dns_audits_list_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Dns Zone name.")] = None, + request_id: Annotated[Optional[StrictStr], Field(description="The requestId of the API call which led to the change.")] = None, + changed_by: Annotated[Optional[StrictStr], Field(description="UserId of the user which led to the change.")] = None, + start_date: Annotated[Optional[date], Field(description="Start of search time range.")] = None, + end_date: Annotated[Optional[date], Field(description="End of search time range.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ZoneAuditResponse]: + """List history about your DNS Zones (audit) + + List and filters the history about your DNS Zones . + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param name: Dns Zone name. + :type name: str + :param request_id: The requestId of the API call which led to the change. + :type request_id: str + :param changed_by: UserId of the user which led to the change. + :type changed_by: str + :param start_date: Start of search time range. + :type start_date: date + :param end_date: End of search time range. + :type end_date: date + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_dns_audits_list_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + name=name, + request_id=request_id, + changed_by=changed_by, + start_date=start_date, + end_date=end_date, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ZoneAuditResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def retrieve_dns_audits_list_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Dns Zone name.")] = None, + request_id: Annotated[Optional[StrictStr], Field(description="The requestId of the API call which led to the change.")] = None, + changed_by: Annotated[Optional[StrictStr], Field(description="UserId of the user which led to the change.")] = None, + start_date: Annotated[Optional[date], Field(description="Start of search time range.")] = None, + end_date: Annotated[Optional[date], Field(description="End of search time range.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List history about your DNS Zones (audit) + + List and filters the history about your DNS Zones . + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param name: Dns Zone name. + :type name: str + :param request_id: The requestId of the API call which led to the change. + :type request_id: str + :param changed_by: UserId of the user which led to the change. + :type changed_by: str + :param start_date: Start of search time range. + :type start_date: date + :param end_date: End of search time range. + :type end_date: date + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_dns_audits_list_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + name=name, + request_id=request_id, + changed_by=changed_by, + start_date=start_date, + end_date=end_date, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ZoneAuditResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _retrieve_dns_audits_list_serialize( + self, + x_request_id, + x_trace_id, + page, + size, + order_by, + name, + request_id, + changed_by, + start_date, + end_date, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'orderBy': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if size is not None: + + _query_params.append(('size', size)) + + if order_by is not None: + + _query_params.append(('orderBy', order_by)) + + if name is not None: + + _query_params.append(('name', name)) + + if request_id is not None: + + _query_params.append(('requestId', request_id)) + + if changed_by is not None: + + _query_params.append(('changedBy', changed_by)) + + if start_date is not None: + if isinstance(start_date, date): + _query_params.append( + ( + 'startDate', + start_date.strftime( + self.api_client.configuration.date_format + ) + ) + ) + else: + _query_params.append(('startDate', start_date)) + + if end_date is not None: + if isinstance(end_date, date): + _query_params.append( + ( + 'endDate', + end_date.strftime( + self.api_client.configuration.date_format + ) + ) + ) + else: + _query_params.append(('endDate', end_date)) + + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/dns/zones/audits', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def retrieve_record_audits_list( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + record_id: Annotated[Optional[StrictInt], Field(description="The identifier of the Zone record")] = None, + request_id: Annotated[Optional[StrictStr], Field(description="The requestId of the API call which led to the change.")] = None, + changed_by: Annotated[Optional[StrictStr], Field(description="UserId of the user which led to the change.")] = None, + start_date: Annotated[Optional[date], Field(description="Start of search time range.")] = None, + end_date: Annotated[Optional[date], Field(description="End of search time range.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RecordAuditResponse: + """List history about your DNS Records (audit) + + List and filter the history of changes made to your DNS Records. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param record_id: The identifier of the Zone record + :type record_id: int + :param request_id: The requestId of the API call which led to the change. + :type request_id: str + :param changed_by: UserId of the user which led to the change. + :type changed_by: str + :param start_date: Start of search time range. + :type start_date: date + :param end_date: End of search time range. + :type end_date: date + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_record_audits_list_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + record_id=record_id, + request_id=request_id, + changed_by=changed_by, + start_date=start_date, + end_date=end_date, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RecordAuditResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def retrieve_record_audits_list_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + record_id: Annotated[Optional[StrictInt], Field(description="The identifier of the Zone record")] = None, + request_id: Annotated[Optional[StrictStr], Field(description="The requestId of the API call which led to the change.")] = None, + changed_by: Annotated[Optional[StrictStr], Field(description="UserId of the user which led to the change.")] = None, + start_date: Annotated[Optional[date], Field(description="Start of search time range.")] = None, + end_date: Annotated[Optional[date], Field(description="End of search time range.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[RecordAuditResponse]: + """List history about your DNS Records (audit) + + List and filter the history of changes made to your DNS Records. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param record_id: The identifier of the Zone record + :type record_id: int + :param request_id: The requestId of the API call which led to the change. + :type request_id: str + :param changed_by: UserId of the user which led to the change. + :type changed_by: str + :param start_date: Start of search time range. + :type start_date: date + :param end_date: End of search time range. + :type end_date: date + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_record_audits_list_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + record_id=record_id, + request_id=request_id, + changed_by=changed_by, + start_date=start_date, + end_date=end_date, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RecordAuditResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def retrieve_record_audits_list_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + record_id: Annotated[Optional[StrictInt], Field(description="The identifier of the Zone record")] = None, + request_id: Annotated[Optional[StrictStr], Field(description="The requestId of the API call which led to the change.")] = None, + changed_by: Annotated[Optional[StrictStr], Field(description="UserId of the user which led to the change.")] = None, + start_date: Annotated[Optional[date], Field(description="Start of search time range.")] = None, + end_date: Annotated[Optional[date], Field(description="End of search time range.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List history about your DNS Records (audit) + + List and filter the history of changes made to your DNS Records. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param record_id: The identifier of the Zone record + :type record_id: int + :param request_id: The requestId of the API call which led to the change. + :type request_id: str + :param changed_by: UserId of the user which led to the change. + :type changed_by: str + :param start_date: Start of search time range. + :type start_date: date + :param end_date: End of search time range. + :type end_date: date + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_record_audits_list_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + record_id=record_id, + request_id=request_id, + changed_by=changed_by, + start_date=start_date, + end_date=end_date, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RecordAuditResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _retrieve_record_audits_list_serialize( + self, + x_request_id, + x_trace_id, + page, + size, + order_by, + record_id, + request_id, + changed_by, + start_date, + end_date, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'orderBy': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if size is not None: + + _query_params.append(('size', size)) + + if order_by is not None: + + _query_params.append(('orderBy', order_by)) + + if record_id is not None: + + _query_params.append(('recordId', record_id)) + + if request_id is not None: + + _query_params.append(('requestId', request_id)) + + if changed_by is not None: + + _query_params.append(('changedBy', changed_by)) + + if start_date is not None: + if isinstance(start_date, date): + _query_params.append( + ( + 'startDate', + start_date.strftime( + self.api_client.configuration.date_format + ) + ) + ) + else: + _query_params.append(('startDate', start_date)) + + if end_date is not None: + if isinstance(end_date, date): + _query_params.append( + ( + 'endDate', + end_date.strftime( + self.api_client.configuration.date_format + ) + ) + ) + else: + _query_params.append(('endDate', end_date)) + + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/dns/records/audits', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/pfruck_contabo/api/domains_api.py b/pfruck_contabo/api/domains_api.py new file mode 100644 index 00000000..b7c470e7 --- /dev/null +++ b/pfruck_contabo/api/domains_api.py @@ -0,0 +1,3627 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictInt, StrictStr, field_validator +from typing import List, Optional +from typing_extensions import Annotated +from pfruck_contabo.models.cancel_domain_request import CancelDomainRequest +from pfruck_contabo.models.domain_auth_code_regenerate_response import DomainAuthCodeRegenerateResponse +from pfruck_contabo.models.domain_cancel_response import DomainCancelResponse +from pfruck_contabo.models.domain_create_request import DomainCreateRequest +from pfruck_contabo.models.domain_create_response import DomainCreateResponse +from pfruck_contabo.models.domain_find_response import DomainFindResponse +from pfruck_contabo.models.domain_patch_request import DomainPatchRequest +from pfruck_contabo.models.domain_patch_response import DomainPatchResponse +from pfruck_contabo.models.domains_list_response import DomainsListResponse + +from pfruck_contabo.api_client import ApiClient, RequestSerialized +from pfruck_contabo.api_response import ApiResponse +from pfruck_contabo.rest import RESTResponseType + + +class DomainsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def cancel_domain( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + domain: Annotated[StrictStr, Field(description="Domain Name")], + cancel_domain_request: CancelDomainRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DomainCancelResponse: + """Cancel a specific domain + + Cancel a specific domain + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param domain: Domain Name (required) + :type domain: str + :param cancel_domain_request: (required) + :type cancel_domain_request: CancelDomainRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._cancel_domain_serialize( + x_request_id=x_request_id, + domain=domain, + cancel_domain_request=cancel_domain_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainCancelResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def cancel_domain_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + domain: Annotated[StrictStr, Field(description="Domain Name")], + cancel_domain_request: CancelDomainRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DomainCancelResponse]: + """Cancel a specific domain + + Cancel a specific domain + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param domain: Domain Name (required) + :type domain: str + :param cancel_domain_request: (required) + :type cancel_domain_request: CancelDomainRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._cancel_domain_serialize( + x_request_id=x_request_id, + domain=domain, + cancel_domain_request=cancel_domain_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainCancelResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def cancel_domain_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + domain: Annotated[StrictStr, Field(description="Domain Name")], + cancel_domain_request: CancelDomainRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Cancel a specific domain + + Cancel a specific domain + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param domain: Domain Name (required) + :type domain: str + :param cancel_domain_request: (required) + :type cancel_domain_request: CancelDomainRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._cancel_domain_serialize( + x_request_id=x_request_id, + domain=domain, + cancel_domain_request=cancel_domain_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainCancelResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _cancel_domain_serialize( + self, + x_request_id, + domain, + cancel_domain_request, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if domain is not None: + _path_params['domain'] = domain + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + if cancel_domain_request is not None: + _body_params = cancel_domain_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/domains/{domain}/cancel', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def confirm_domain_transfer_out( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + domain: Annotated[StrictStr, Field(description="Domain Name")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Confirm transfer out for a domain + + Confirm transfer out for a domain + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param domain: Domain Name (required) + :type domain: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._confirm_domain_transfer_out_serialize( + x_request_id=x_request_id, + domain=domain, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def confirm_domain_transfer_out_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + domain: Annotated[StrictStr, Field(description="Domain Name")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Confirm transfer out for a domain + + Confirm transfer out for a domain + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param domain: Domain Name (required) + :type domain: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._confirm_domain_transfer_out_serialize( + x_request_id=x_request_id, + domain=domain, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def confirm_domain_transfer_out_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + domain: Annotated[StrictStr, Field(description="Domain Name")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Confirm transfer out for a domain + + Confirm transfer out for a domain + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param domain: Domain Name (required) + :type domain: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._confirm_domain_transfer_out_serialize( + x_request_id=x_request_id, + domain=domain, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _confirm_domain_transfer_out_serialize( + self, + x_request_id, + domain, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if domain is not None: + _path_params['domain'] = domain + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/domains/{domain}/transfer-out', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def confirm_domain_transfer_out_0( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + domain: Annotated[StrictStr, Field(description="Domain Name")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Confirm transfer out for a domain + + Confirm transfer out for a domain + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param domain: Domain Name (required) + :type domain: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._confirm_domain_transfer_out_0_serialize( + x_request_id=x_request_id, + domain=domain, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def confirm_domain_transfer_out_0_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + domain: Annotated[StrictStr, Field(description="Domain Name")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Confirm transfer out for a domain + + Confirm transfer out for a domain + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param domain: Domain Name (required) + :type domain: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._confirm_domain_transfer_out_0_serialize( + x_request_id=x_request_id, + domain=domain, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def confirm_domain_transfer_out_0_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + domain: Annotated[StrictStr, Field(description="Domain Name")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Confirm transfer out for a domain + + Confirm transfer out for a domain + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param domain: Domain Name (required) + :type domain: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._confirm_domain_transfer_out_0_serialize( + x_request_id=x_request_id, + domain=domain, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _confirm_domain_transfer_out_0_serialize( + self, + x_request_id, + domain, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if domain is not None: + _path_params['domain'] = domain + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/domains/{domain}/transfer-out', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_auth_code( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + domain: Annotated[StrictStr, Field(description="Domain Name")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DomainAuthCodeRegenerateResponse: + """Get auth code for a domain + + Get auth code for a domain by id + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param domain: Domain Name (required) + :type domain: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_auth_code_serialize( + x_request_id=x_request_id, + domain=domain, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainAuthCodeRegenerateResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_auth_code_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + domain: Annotated[StrictStr, Field(description="Domain Name")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DomainAuthCodeRegenerateResponse]: + """Get auth code for a domain + + Get auth code for a domain by id + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param domain: Domain Name (required) + :type domain: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_auth_code_serialize( + x_request_id=x_request_id, + domain=domain, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainAuthCodeRegenerateResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_auth_code_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + domain: Annotated[StrictStr, Field(description="Domain Name")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get auth code for a domain + + Get auth code for a domain by id + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param domain: Domain Name (required) + :type domain: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_auth_code_serialize( + x_request_id=x_request_id, + domain=domain, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainAuthCodeRegenerateResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_auth_code_serialize( + self, + x_request_id, + domain, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if domain is not None: + _path_params['domain'] = domain + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/domains/{domain}/generate-auth-code', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_domains( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + sld: Annotated[Optional[StrictStr], Field(description="Filter as substring match for domain sld.")] = None, + tld: Annotated[Optional[StrictStr], Field(description="Filter as substring match for domain tld.")] = None, + status: Annotated[Optional[StrictStr], Field(description="Filter domains by status")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DomainsListResponse: + """List all domains + + List and filter all your domains + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param sld: Filter as substring match for domain sld. + :type sld: str + :param tld: Filter as substring match for domain tld. + :type tld: str + :param status: Filter domains by status + :type status: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_domains_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + sld=sld, + tld=tld, + status=status, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainsListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_domains_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + sld: Annotated[Optional[StrictStr], Field(description="Filter as substring match for domain sld.")] = None, + tld: Annotated[Optional[StrictStr], Field(description="Filter as substring match for domain tld.")] = None, + status: Annotated[Optional[StrictStr], Field(description="Filter domains by status")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DomainsListResponse]: + """List all domains + + List and filter all your domains + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param sld: Filter as substring match for domain sld. + :type sld: str + :param tld: Filter as substring match for domain tld. + :type tld: str + :param status: Filter domains by status + :type status: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_domains_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + sld=sld, + tld=tld, + status=status, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainsListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_domains_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + sld: Annotated[Optional[StrictStr], Field(description="Filter as substring match for domain sld.")] = None, + tld: Annotated[Optional[StrictStr], Field(description="Filter as substring match for domain tld.")] = None, + status: Annotated[Optional[StrictStr], Field(description="Filter domains by status")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List all domains + + List and filter all your domains + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param sld: Filter as substring match for domain sld. + :type sld: str + :param tld: Filter as substring match for domain tld. + :type tld: str + :param status: Filter domains by status + :type status: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_domains_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + sld=sld, + tld=tld, + status=status, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainsListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_domains_serialize( + self, + x_request_id, + x_trace_id, + page, + size, + order_by, + sld, + tld, + status, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'orderBy': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if size is not None: + + _query_params.append(('size', size)) + + if order_by is not None: + + _query_params.append(('orderBy', order_by)) + + if sld is not None: + + _query_params.append(('sld', sld)) + + if tld is not None: + + _query_params.append(('tld', tld)) + + if status is not None: + + _query_params.append(('status', status)) + + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/domains', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def order_domain( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + domain_create_request: DomainCreateRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DomainCreateResponse: + """Create or transfer a domain + + Create or transfer a domain + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param domain_create_request: (required) + :type domain_create_request: DomainCreateRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._order_domain_serialize( + x_request_id=x_request_id, + domain_create_request=domain_create_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "DomainCreateResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def order_domain_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + domain_create_request: DomainCreateRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DomainCreateResponse]: + """Create or transfer a domain + + Create or transfer a domain + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param domain_create_request: (required) + :type domain_create_request: DomainCreateRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._order_domain_serialize( + x_request_id=x_request_id, + domain_create_request=domain_create_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "DomainCreateResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def order_domain_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + domain_create_request: DomainCreateRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create or transfer a domain + + Create or transfer a domain + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param domain_create_request: (required) + :type domain_create_request: DomainCreateRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._order_domain_serialize( + x_request_id=x_request_id, + domain_create_request=domain_create_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "DomainCreateResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _order_domain_serialize( + self, + x_request_id, + domain_create_request, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + if domain_create_request is not None: + _body_params = domain_create_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/domains', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def retrieve_domain( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + domain: Annotated[StrictStr, Field(description="Domain Name")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DomainFindResponse: + """List specific domain + + List specific domain + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param domain: Domain Name (required) + :type domain: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_domain_serialize( + x_request_id=x_request_id, + domain=domain, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainFindResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def retrieve_domain_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + domain: Annotated[StrictStr, Field(description="Domain Name")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DomainFindResponse]: + """List specific domain + + List specific domain + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param domain: Domain Name (required) + :type domain: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_domain_serialize( + x_request_id=x_request_id, + domain=domain, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainFindResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def retrieve_domain_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + domain: Annotated[StrictStr, Field(description="Domain Name")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List specific domain + + List specific domain + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param domain: Domain Name (required) + :type domain: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_domain_serialize( + x_request_id=x_request_id, + domain=domain, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainFindResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _retrieve_domain_serialize( + self, + x_request_id, + domain, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if domain is not None: + _path_params['domain'] = domain + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/domains/{domain}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def revoke_cancel_domain( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + domain: Annotated[StrictStr, Field(description="Domain Name")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Revoke cancellation for a specific domain + + Revoke cancellation for a specific domain + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param domain: Domain Name (required) + :type domain: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._revoke_cancel_domain_serialize( + x_request_id=x_request_id, + domain=domain, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def revoke_cancel_domain_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + domain: Annotated[StrictStr, Field(description="Domain Name")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Revoke cancellation for a specific domain + + Revoke cancellation for a specific domain + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param domain: Domain Name (required) + :type domain: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._revoke_cancel_domain_serialize( + x_request_id=x_request_id, + domain=domain, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def revoke_cancel_domain_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + domain: Annotated[StrictStr, Field(description="Domain Name")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Revoke cancellation for a specific domain + + Revoke cancellation for a specific domain + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param domain: Domain Name (required) + :type domain: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._revoke_cancel_domain_serialize( + x_request_id=x_request_id, + domain=domain, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _revoke_cancel_domain_serialize( + self, + x_request_id, + domain, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if domain is not None: + _path_params['domain'] = domain + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/domains/{domain}/revoke-cancellation', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def revoke_domain_transfer_out( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + domain: Annotated[StrictStr, Field(description="Domain Name")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Revoke transfer out for a domain + + Revoke transfer out for a domain + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param domain: Domain Name (required) + :type domain: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._revoke_domain_transfer_out_serialize( + x_request_id=x_request_id, + domain=domain, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def revoke_domain_transfer_out_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + domain: Annotated[StrictStr, Field(description="Domain Name")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Revoke transfer out for a domain + + Revoke transfer out for a domain + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param domain: Domain Name (required) + :type domain: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._revoke_domain_transfer_out_serialize( + x_request_id=x_request_id, + domain=domain, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def revoke_domain_transfer_out_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + domain: Annotated[StrictStr, Field(description="Domain Name")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Revoke transfer out for a domain + + Revoke transfer out for a domain + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param domain: Domain Name (required) + :type domain: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._revoke_domain_transfer_out_serialize( + x_request_id=x_request_id, + domain=domain, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _revoke_domain_transfer_out_serialize( + self, + x_request_id, + domain, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if domain is not None: + _path_params['domain'] = domain + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/domains/{domain}/transfer-out', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def revoke_domain_transfer_out_0( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + domain: Annotated[StrictStr, Field(description="Domain Name")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Revoke transfer out for a domain + + Revoke transfer out for a domain + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param domain: Domain Name (required) + :type domain: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._revoke_domain_transfer_out_0_serialize( + x_request_id=x_request_id, + domain=domain, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def revoke_domain_transfer_out_0_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + domain: Annotated[StrictStr, Field(description="Domain Name")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Revoke transfer out for a domain + + Revoke transfer out for a domain + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param domain: Domain Name (required) + :type domain: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._revoke_domain_transfer_out_0_serialize( + x_request_id=x_request_id, + domain=domain, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def revoke_domain_transfer_out_0_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + domain: Annotated[StrictStr, Field(description="Domain Name")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Revoke transfer out for a domain + + Revoke transfer out for a domain + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param domain: Domain Name (required) + :type domain: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._revoke_domain_transfer_out_0_serialize( + x_request_id=x_request_id, + domain=domain, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _revoke_domain_transfer_out_0_serialize( + self, + x_request_id, + domain, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if domain is not None: + _path_params['domain'] = domain + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/domains/{domain}/transfer-out', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def update_domain( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + domain: Annotated[StrictStr, Field(description="Domain Name")], + domain_patch_request: DomainPatchRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DomainPatchResponse: + """Update a specific domain + + Update nameservers and handles for a specific domain + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param domain: Domain Name (required) + :type domain: str + :param domain_patch_request: (required) + :type domain_patch_request: DomainPatchRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_domain_serialize( + x_request_id=x_request_id, + domain=domain, + domain_patch_request=domain_patch_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainPatchResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def update_domain_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + domain: Annotated[StrictStr, Field(description="Domain Name")], + domain_patch_request: DomainPatchRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DomainPatchResponse]: + """Update a specific domain + + Update nameservers and handles for a specific domain + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param domain: Domain Name (required) + :type domain: str + :param domain_patch_request: (required) + :type domain_patch_request: DomainPatchRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_domain_serialize( + x_request_id=x_request_id, + domain=domain, + domain_patch_request=domain_patch_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainPatchResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def update_domain_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + domain: Annotated[StrictStr, Field(description="Domain Name")], + domain_patch_request: DomainPatchRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update a specific domain + + Update nameservers and handles for a specific domain + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param domain: Domain Name (required) + :type domain: str + :param domain_patch_request: (required) + :type domain_patch_request: DomainPatchRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_domain_serialize( + x_request_id=x_request_id, + domain=domain, + domain_patch_request=domain_patch_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainPatchResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_domain_serialize( + self, + x_request_id, + domain, + domain_patch_request, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if domain is not None: + _path_params['domain'] = domain + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + if domain_patch_request is not None: + _body_params = domain_patch_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v1/domains/{domain}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def validate_domain_availability( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + domain: Annotated[StrictStr, Field(description="Domain Name")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Check domain availablility + + Check if a specific domain is available or not + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param domain: Domain Name (required) + :type domain: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._validate_domain_availability_serialize( + x_request_id=x_request_id, + domain=domain, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def validate_domain_availability_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + domain: Annotated[StrictStr, Field(description="Domain Name")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Check domain availablility + + Check if a specific domain is available or not + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param domain: Domain Name (required) + :type domain: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._validate_domain_availability_serialize( + x_request_id=x_request_id, + domain=domain, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def validate_domain_availability_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + domain: Annotated[StrictStr, Field(description="Domain Name")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Check domain availablility + + Check if a specific domain is available or not + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param domain: Domain Name (required) + :type domain: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._validate_domain_availability_serialize( + x_request_id=x_request_id, + domain=domain, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _validate_domain_availability_serialize( + self, + x_request_id, + domain, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if domain is not None: + _path_params['domain'] = domain + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/registries-domains/{domain}/check-availability', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/pfruck_contabo/api/domains_audits_api.py b/pfruck_contabo/api/domains_audits_api.py new file mode 100644 index 00000000..3d794981 --- /dev/null +++ b/pfruck_contabo/api/domains_audits_api.py @@ -0,0 +1,468 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from datetime import date +from pydantic import Field, StrictInt, StrictStr, field_validator +from typing import List, Optional +from typing_extensions import Annotated +from pfruck_contabo.models.domain_audit_response import DomainAuditResponse + +from pfruck_contabo.api_client import ApiClient, RequestSerialized +from pfruck_contabo.api_response import ApiResponse +from pfruck_contabo.rest import RESTResponseType + + +class DomainsAuditsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def retrieve_domains_audits_list( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + domain: Annotated[Optional[StrictStr], Field(description="The domain name.")] = None, + request_id: Annotated[Optional[StrictStr], Field(description="The requestId of the API call which led to the change.")] = None, + changed_by: Annotated[Optional[StrictStr], Field(description="UserId of the user which led to the change.")] = None, + start_date: Annotated[Optional[date], Field(description="Start of search time range.")] = None, + end_date: Annotated[Optional[date], Field(description="End of search time range.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DomainAuditResponse: + """List history about your Domains (audit) + + List and filters the history about your Domains. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param domain: The domain name. + :type domain: str + :param request_id: The requestId of the API call which led to the change. + :type request_id: str + :param changed_by: UserId of the user which led to the change. + :type changed_by: str + :param start_date: Start of search time range. + :type start_date: date + :param end_date: End of search time range. + :type end_date: date + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_domains_audits_list_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + domain=domain, + request_id=request_id, + changed_by=changed_by, + start_date=start_date, + end_date=end_date, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainAuditResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def retrieve_domains_audits_list_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + domain: Annotated[Optional[StrictStr], Field(description="The domain name.")] = None, + request_id: Annotated[Optional[StrictStr], Field(description="The requestId of the API call which led to the change.")] = None, + changed_by: Annotated[Optional[StrictStr], Field(description="UserId of the user which led to the change.")] = None, + start_date: Annotated[Optional[date], Field(description="Start of search time range.")] = None, + end_date: Annotated[Optional[date], Field(description="End of search time range.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DomainAuditResponse]: + """List history about your Domains (audit) + + List and filters the history about your Domains. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param domain: The domain name. + :type domain: str + :param request_id: The requestId of the API call which led to the change. + :type request_id: str + :param changed_by: UserId of the user which led to the change. + :type changed_by: str + :param start_date: Start of search time range. + :type start_date: date + :param end_date: End of search time range. + :type end_date: date + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_domains_audits_list_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + domain=domain, + request_id=request_id, + changed_by=changed_by, + start_date=start_date, + end_date=end_date, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainAuditResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def retrieve_domains_audits_list_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + domain: Annotated[Optional[StrictStr], Field(description="The domain name.")] = None, + request_id: Annotated[Optional[StrictStr], Field(description="The requestId of the API call which led to the change.")] = None, + changed_by: Annotated[Optional[StrictStr], Field(description="UserId of the user which led to the change.")] = None, + start_date: Annotated[Optional[date], Field(description="Start of search time range.")] = None, + end_date: Annotated[Optional[date], Field(description="End of search time range.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List history about your Domains (audit) + + List and filters the history about your Domains. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param domain: The domain name. + :type domain: str + :param request_id: The requestId of the API call which led to the change. + :type request_id: str + :param changed_by: UserId of the user which led to the change. + :type changed_by: str + :param start_date: Start of search time range. + :type start_date: date + :param end_date: End of search time range. + :type end_date: date + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_domains_audits_list_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + domain=domain, + request_id=request_id, + changed_by=changed_by, + start_date=start_date, + end_date=end_date, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainAuditResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _retrieve_domains_audits_list_serialize( + self, + x_request_id, + x_trace_id, + page, + size, + order_by, + domain, + request_id, + changed_by, + start_date, + end_date, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'orderBy': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if size is not None: + + _query_params.append(('size', size)) + + if order_by is not None: + + _query_params.append(('orderBy', order_by)) + + if domain is not None: + + _query_params.append(('domain', domain)) + + if request_id is not None: + + _query_params.append(('requestId', request_id)) + + if changed_by is not None: + + _query_params.append(('changedBy', changed_by)) + + if start_date is not None: + if isinstance(start_date, date): + _query_params.append( + ( + 'startDate', + start_date.strftime( + self.api_client.configuration.date_format + ) + ) + ) + else: + _query_params.append(('startDate', start_date)) + + if end_date is not None: + if isinstance(end_date, date): + _query_params.append( + ( + 'endDate', + end_date.strftime( + self.api_client.configuration.date_format + ) + ) + ) + else: + _query_params.append(('endDate', end_date)) + + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/domains/audits', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/pfruck_contabo/api/firewalls_api.py b/pfruck_contabo/api/firewalls_api.py new file mode 100644 index 00000000..54efa2cf --- /dev/null +++ b/pfruck_contabo/api/firewalls_api.py @@ -0,0 +1,2942 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictInt, StrictStr, field_validator +from typing import List, Optional +from typing_extensions import Annotated +from pfruck_contabo.models.assign_instance_firewall_response import AssignInstanceFirewallResponse +from pfruck_contabo.models.create_firewall_request import CreateFirewallRequest +from pfruck_contabo.models.create_firewall_response import CreateFirewallResponse +from pfruck_contabo.models.find_firewall_response import FindFirewallResponse +from pfruck_contabo.models.list_firewall_response import ListFirewallResponse +from pfruck_contabo.models.list_preset_rules_response import ListPresetRulesResponse +from pfruck_contabo.models.patch_firewall_request import PatchFirewallRequest +from pfruck_contabo.models.patch_firewall_response import PatchFirewallResponse +from pfruck_contabo.models.put_firewall_request import PutFirewallRequest +from pfruck_contabo.models.put_firewall_response import PutFirewallResponse +from pfruck_contabo.models.unassign_instance_firewall_response import UnassignInstanceFirewallResponse + +from pfruck_contabo.api_client import ApiClient, RequestSerialized +from pfruck_contabo.api_response import ApiResponse +from pfruck_contabo.rest import RESTResponseType + + +class FirewallsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def assign_instance_firewall( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + firewall_id: Annotated[StrictStr, Field(description="The identifier of the firewall")], + instance_id: Annotated[StrictInt, Field(description="The identifier of the instance")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AssignInstanceFirewallResponse: + """Add instance to a firewall + + Add a specific instance to a firewall + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param firewall_id: The identifier of the firewall (required) + :type firewall_id: str + :param instance_id: The identifier of the instance (required) + :type instance_id: int + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._assign_instance_firewall_serialize( + x_request_id=x_request_id, + firewall_id=firewall_id, + instance_id=instance_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "AssignInstanceFirewallResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def assign_instance_firewall_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + firewall_id: Annotated[StrictStr, Field(description="The identifier of the firewall")], + instance_id: Annotated[StrictInt, Field(description="The identifier of the instance")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AssignInstanceFirewallResponse]: + """Add instance to a firewall + + Add a specific instance to a firewall + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param firewall_id: The identifier of the firewall (required) + :type firewall_id: str + :param instance_id: The identifier of the instance (required) + :type instance_id: int + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._assign_instance_firewall_serialize( + x_request_id=x_request_id, + firewall_id=firewall_id, + instance_id=instance_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "AssignInstanceFirewallResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def assign_instance_firewall_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + firewall_id: Annotated[StrictStr, Field(description="The identifier of the firewall")], + instance_id: Annotated[StrictInt, Field(description="The identifier of the instance")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Add instance to a firewall + + Add a specific instance to a firewall + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param firewall_id: The identifier of the firewall (required) + :type firewall_id: str + :param instance_id: The identifier of the instance (required) + :type instance_id: int + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._assign_instance_firewall_serialize( + x_request_id=x_request_id, + firewall_id=firewall_id, + instance_id=instance_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "AssignInstanceFirewallResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _assign_instance_firewall_serialize( + self, + x_request_id, + firewall_id, + instance_id, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if firewall_id is not None: + _path_params['firewallId'] = firewall_id + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/firewalls/{firewallId}/instances/{instanceId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def create_firewall( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + create_firewall_request: CreateFirewallRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CreateFirewallResponse: + """Create a new firewall definition + + Create a new firewall definition by specifying its name and a set of rules. The status of the firewall determines whether the rules are active or not. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param create_firewall_request: (required) + :type create_firewall_request: CreateFirewallRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_firewall_serialize( + x_request_id=x_request_id, + create_firewall_request=create_firewall_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateFirewallResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_firewall_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + create_firewall_request: CreateFirewallRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CreateFirewallResponse]: + """Create a new firewall definition + + Create a new firewall definition by specifying its name and a set of rules. The status of the firewall determines whether the rules are active or not. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param create_firewall_request: (required) + :type create_firewall_request: CreateFirewallRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_firewall_serialize( + x_request_id=x_request_id, + create_firewall_request=create_firewall_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateFirewallResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_firewall_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + create_firewall_request: CreateFirewallRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a new firewall definition + + Create a new firewall definition by specifying its name and a set of rules. The status of the firewall determines whether the rules are active or not. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param create_firewall_request: (required) + :type create_firewall_request: CreateFirewallRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_firewall_serialize( + x_request_id=x_request_id, + create_firewall_request=create_firewall_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateFirewallResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_firewall_serialize( + self, + x_request_id, + create_firewall_request, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + if create_firewall_request is not None: + _body_params = create_firewall_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/firewalls', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_firewall( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + firewall_id: Annotated[StrictStr, Field(description="The identifier of the firewall")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete existing firewall by id + + Delete existing firewall by id. A firewall cannot be deleted if there are instances attached to it. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param firewall_id: The identifier of the firewall (required) + :type firewall_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_firewall_serialize( + x_request_id=x_request_id, + firewall_id=firewall_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_firewall_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + firewall_id: Annotated[StrictStr, Field(description="The identifier of the firewall")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete existing firewall by id + + Delete existing firewall by id. A firewall cannot be deleted if there are instances attached to it. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param firewall_id: The identifier of the firewall (required) + :type firewall_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_firewall_serialize( + x_request_id=x_request_id, + firewall_id=firewall_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_firewall_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + firewall_id: Annotated[StrictStr, Field(description="The identifier of the firewall")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete existing firewall by id + + Delete existing firewall by id. A firewall cannot be deleted if there are instances attached to it. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param firewall_id: The identifier of the firewall (required) + :type firewall_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_firewall_serialize( + x_request_id=x_request_id, + firewall_id=firewall_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_firewall_serialize( + self, + x_request_id, + firewall_id, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if firewall_id is not None: + _path_params['firewallId'] = firewall_id + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/firewalls/{firewallId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def patch_firewall( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + firewall_id: Annotated[StrictStr, Field(description="The identifier of the firewall")], + patch_firewall_request: PatchFirewallRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PatchFirewallResponse: + """Update a firewall by id + + Update a firewall by id in your account. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param firewall_id: The identifier of the firewall (required) + :type firewall_id: str + :param patch_firewall_request: (required) + :type patch_firewall_request: PatchFirewallRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._patch_firewall_serialize( + x_request_id=x_request_id, + firewall_id=firewall_id, + patch_firewall_request=patch_firewall_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PatchFirewallResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def patch_firewall_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + firewall_id: Annotated[StrictStr, Field(description="The identifier of the firewall")], + patch_firewall_request: PatchFirewallRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PatchFirewallResponse]: + """Update a firewall by id + + Update a firewall by id in your account. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param firewall_id: The identifier of the firewall (required) + :type firewall_id: str + :param patch_firewall_request: (required) + :type patch_firewall_request: PatchFirewallRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._patch_firewall_serialize( + x_request_id=x_request_id, + firewall_id=firewall_id, + patch_firewall_request=patch_firewall_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PatchFirewallResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def patch_firewall_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + firewall_id: Annotated[StrictStr, Field(description="The identifier of the firewall")], + patch_firewall_request: PatchFirewallRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update a firewall by id + + Update a firewall by id in your account. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param firewall_id: The identifier of the firewall (required) + :type firewall_id: str + :param patch_firewall_request: (required) + :type patch_firewall_request: PatchFirewallRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._patch_firewall_serialize( + x_request_id=x_request_id, + firewall_id=firewall_id, + patch_firewall_request=patch_firewall_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PatchFirewallResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _patch_firewall_serialize( + self, + x_request_id, + firewall_id, + patch_firewall_request, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if firewall_id is not None: + _path_params['firewallId'] = firewall_id + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + if patch_firewall_request is not None: + _body_params = patch_firewall_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v1/firewalls/{firewallId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def put_firewall( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + firewall_id: Annotated[StrictStr, Field(description="The identifier of the firewall")], + put_firewall_request: PutFirewallRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PutFirewallResponse: + """Update specific firewall rules + + Set rules for a specific firewall. Currently only inbound rules are allowed to be configured. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param firewall_id: The identifier of the firewall (required) + :type firewall_id: str + :param put_firewall_request: (required) + :type put_firewall_request: PutFirewallRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._put_firewall_serialize( + x_request_id=x_request_id, + firewall_id=firewall_id, + put_firewall_request=put_firewall_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PutFirewallResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def put_firewall_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + firewall_id: Annotated[StrictStr, Field(description="The identifier of the firewall")], + put_firewall_request: PutFirewallRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PutFirewallResponse]: + """Update specific firewall rules + + Set rules for a specific firewall. Currently only inbound rules are allowed to be configured. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param firewall_id: The identifier of the firewall (required) + :type firewall_id: str + :param put_firewall_request: (required) + :type put_firewall_request: PutFirewallRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._put_firewall_serialize( + x_request_id=x_request_id, + firewall_id=firewall_id, + put_firewall_request=put_firewall_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PutFirewallResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def put_firewall_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + firewall_id: Annotated[StrictStr, Field(description="The identifier of the firewall")], + put_firewall_request: PutFirewallRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update specific firewall rules + + Set rules for a specific firewall. Currently only inbound rules are allowed to be configured. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param firewall_id: The identifier of the firewall (required) + :type firewall_id: str + :param put_firewall_request: (required) + :type put_firewall_request: PutFirewallRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._put_firewall_serialize( + x_request_id=x_request_id, + firewall_id=firewall_id, + put_firewall_request=put_firewall_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PutFirewallResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _put_firewall_serialize( + self, + x_request_id, + firewall_id, + put_firewall_request, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if firewall_id is not None: + _path_params['firewallId'] = firewall_id + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + if put_firewall_request is not None: + _body_params = put_firewall_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v1/firewalls/{firewallId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def retrieve_firewall( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + firewall_id: Annotated[StrictStr, Field(description="The identifier of the firewall")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + name: Annotated[Optional[StrictStr], Field(description="The name of the firewall")] = None, + instance_ids: Annotated[Optional[StrictStr], Field(description="Comma separated instance IDs.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FindFirewallResponse: + """Get specific firewall by its id + + Get data for a specific firewall on your account. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param firewall_id: The identifier of the firewall (required) + :type firewall_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param name: The name of the firewall + :type name: str + :param instance_ids: Comma separated instance IDs. + :type instance_ids: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_firewall_serialize( + x_request_id=x_request_id, + firewall_id=firewall_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + name=name, + instance_ids=instance_ids, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FindFirewallResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def retrieve_firewall_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + firewall_id: Annotated[StrictStr, Field(description="The identifier of the firewall")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + name: Annotated[Optional[StrictStr], Field(description="The name of the firewall")] = None, + instance_ids: Annotated[Optional[StrictStr], Field(description="Comma separated instance IDs.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FindFirewallResponse]: + """Get specific firewall by its id + + Get data for a specific firewall on your account. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param firewall_id: The identifier of the firewall (required) + :type firewall_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param name: The name of the firewall + :type name: str + :param instance_ids: Comma separated instance IDs. + :type instance_ids: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_firewall_serialize( + x_request_id=x_request_id, + firewall_id=firewall_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + name=name, + instance_ids=instance_ids, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FindFirewallResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def retrieve_firewall_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + firewall_id: Annotated[StrictStr, Field(description="The identifier of the firewall")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + name: Annotated[Optional[StrictStr], Field(description="The name of the firewall")] = None, + instance_ids: Annotated[Optional[StrictStr], Field(description="Comma separated instance IDs.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get specific firewall by its id + + Get data for a specific firewall on your account. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param firewall_id: The identifier of the firewall (required) + :type firewall_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param name: The name of the firewall + :type name: str + :param instance_ids: Comma separated instance IDs. + :type instance_ids: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_firewall_serialize( + x_request_id=x_request_id, + firewall_id=firewall_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + name=name, + instance_ids=instance_ids, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FindFirewallResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _retrieve_firewall_serialize( + self, + x_request_id, + firewall_id, + x_trace_id, + page, + size, + order_by, + name, + instance_ids, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'orderBy': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if firewall_id is not None: + _path_params['firewallId'] = firewall_id + # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if size is not None: + + _query_params.append(('size', size)) + + if order_by is not None: + + _query_params.append(('orderBy', order_by)) + + if name is not None: + + _query_params.append(('name', name)) + + if instance_ids is not None: + + _query_params.append(('instanceIds', instance_ids)) + + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/firewalls/{firewallId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def retrieve_firewall_list( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + name: Annotated[Optional[StrictStr], Field(description="The name of the firewall")] = None, + instance_ids: Annotated[Optional[StrictStr], Field(description="Comma separated instance IDs.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ListFirewallResponse: + """List all firewalls + + List and filter all firewalls on your account + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param name: The name of the firewall + :type name: str + :param instance_ids: Comma separated instance IDs. + :type instance_ids: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_firewall_list_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + name=name, + instance_ids=instance_ids, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListFirewallResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def retrieve_firewall_list_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + name: Annotated[Optional[StrictStr], Field(description="The name of the firewall")] = None, + instance_ids: Annotated[Optional[StrictStr], Field(description="Comma separated instance IDs.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ListFirewallResponse]: + """List all firewalls + + List and filter all firewalls on your account + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param name: The name of the firewall + :type name: str + :param instance_ids: Comma separated instance IDs. + :type instance_ids: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_firewall_list_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + name=name, + instance_ids=instance_ids, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListFirewallResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def retrieve_firewall_list_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + name: Annotated[Optional[StrictStr], Field(description="The name of the firewall")] = None, + instance_ids: Annotated[Optional[StrictStr], Field(description="Comma separated instance IDs.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List all firewalls + + List and filter all firewalls on your account + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param name: The name of the firewall + :type name: str + :param instance_ids: Comma separated instance IDs. + :type instance_ids: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_firewall_list_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + name=name, + instance_ids=instance_ids, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListFirewallResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _retrieve_firewall_list_serialize( + self, + x_request_id, + x_trace_id, + page, + size, + order_by, + name, + instance_ids, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'orderBy': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if size is not None: + + _query_params.append(('size', size)) + + if order_by is not None: + + _query_params.append(('orderBy', order_by)) + + if name is not None: + + _query_params.append(('name', name)) + + if instance_ids is not None: + + _query_params.append(('instanceIds', instance_ids)) + + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/firewalls', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def retrieve_preset_rules( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + name: Annotated[Optional[StrictStr], Field(description="The name of preset rule")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ListPresetRulesResponse: + """Get all preset rules + + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param name: The name of preset rule + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_preset_rules_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListPresetRulesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def retrieve_preset_rules_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + name: Annotated[Optional[StrictStr], Field(description="The name of preset rule")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ListPresetRulesResponse]: + """Get all preset rules + + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param name: The name of preset rule + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_preset_rules_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListPresetRulesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def retrieve_preset_rules_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + name: Annotated[Optional[StrictStr], Field(description="The name of preset rule")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get all preset rules + + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param name: The name of preset rule + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_preset_rules_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListPresetRulesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _retrieve_preset_rules_serialize( + self, + x_request_id, + x_trace_id, + page, + size, + order_by, + name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'orderBy': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if size is not None: + + _query_params.append(('size', size)) + + if order_by is not None: + + _query_params.append(('orderBy', order_by)) + + if name is not None: + + _query_params.append(('name', name)) + + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/firewalls/preset-rules', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def unassign_instance_firewall( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + firewall_id: Annotated[StrictStr, Field(description="The identifier of the firewall")], + instance_id: Annotated[StrictInt, Field(description="The identifier of the instance")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> UnassignInstanceFirewallResponse: + """Remove instance from a firewall + + Remove a specific instance from a firewall + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param firewall_id: The identifier of the firewall (required) + :type firewall_id: str + :param instance_id: The identifier of the instance (required) + :type instance_id: int + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._unassign_instance_firewall_serialize( + x_request_id=x_request_id, + firewall_id=firewall_id, + instance_id=instance_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UnassignInstanceFirewallResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def unassign_instance_firewall_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + firewall_id: Annotated[StrictStr, Field(description="The identifier of the firewall")], + instance_id: Annotated[StrictInt, Field(description="The identifier of the instance")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UnassignInstanceFirewallResponse]: + """Remove instance from a firewall + + Remove a specific instance from a firewall + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param firewall_id: The identifier of the firewall (required) + :type firewall_id: str + :param instance_id: The identifier of the instance (required) + :type instance_id: int + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._unassign_instance_firewall_serialize( + x_request_id=x_request_id, + firewall_id=firewall_id, + instance_id=instance_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UnassignInstanceFirewallResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def unassign_instance_firewall_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + firewall_id: Annotated[StrictStr, Field(description="The identifier of the firewall")], + instance_id: Annotated[StrictInt, Field(description="The identifier of the instance")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Remove instance from a firewall + + Remove a specific instance from a firewall + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param firewall_id: The identifier of the firewall (required) + :type firewall_id: str + :param instance_id: The identifier of the instance (required) + :type instance_id: int + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._unassign_instance_firewall_serialize( + x_request_id=x_request_id, + firewall_id=firewall_id, + instance_id=instance_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UnassignInstanceFirewallResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _unassign_instance_firewall_serialize( + self, + x_request_id, + firewall_id, + instance_id, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if firewall_id is not None: + _path_params['firewallId'] = firewall_id + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/firewalls/{firewallId}/instances/{instanceId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/pfruck_contabo/api/firewalls_audits_api.py b/pfruck_contabo/api/firewalls_audits_api.py new file mode 100644 index 00000000..ed9ba679 --- /dev/null +++ b/pfruck_contabo/api/firewalls_audits_api.py @@ -0,0 +1,468 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from datetime import date +from pydantic import Field, StrictInt, StrictStr, field_validator +from typing import List, Optional +from typing_extensions import Annotated +from pfruck_contabo.models.list_firewall_audit_response import ListFirewallAuditResponse + +from pfruck_contabo.api_client import ApiClient, RequestSerialized +from pfruck_contabo.api_response import ApiResponse +from pfruck_contabo.rest import RESTResponseType + + +class FirewallsAuditsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def retrieve_firewall_audits_list( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + firewall_id: Annotated[Optional[StrictStr], Field(description="The identifier of the Firewall.")] = None, + request_id: Annotated[Optional[StrictStr], Field(description="The requestId of the API call which led to the change.")] = None, + changed_by: Annotated[Optional[StrictStr], Field(description="User name which did the change.")] = None, + start_date: Annotated[Optional[date], Field(description="Start of search time range.")] = None, + end_date: Annotated[Optional[date], Field(description="End of search time range.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ListFirewallAuditResponse: + """List history about your Firewalls (audit) + + List and filters the history about your Firewalls. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param firewall_id: The identifier of the Firewall. + :type firewall_id: str + :param request_id: The requestId of the API call which led to the change. + :type request_id: str + :param changed_by: User name which did the change. + :type changed_by: str + :param start_date: Start of search time range. + :type start_date: date + :param end_date: End of search time range. + :type end_date: date + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_firewall_audits_list_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + firewall_id=firewall_id, + request_id=request_id, + changed_by=changed_by, + start_date=start_date, + end_date=end_date, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListFirewallAuditResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def retrieve_firewall_audits_list_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + firewall_id: Annotated[Optional[StrictStr], Field(description="The identifier of the Firewall.")] = None, + request_id: Annotated[Optional[StrictStr], Field(description="The requestId of the API call which led to the change.")] = None, + changed_by: Annotated[Optional[StrictStr], Field(description="User name which did the change.")] = None, + start_date: Annotated[Optional[date], Field(description="Start of search time range.")] = None, + end_date: Annotated[Optional[date], Field(description="End of search time range.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ListFirewallAuditResponse]: + """List history about your Firewalls (audit) + + List and filters the history about your Firewalls. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param firewall_id: The identifier of the Firewall. + :type firewall_id: str + :param request_id: The requestId of the API call which led to the change. + :type request_id: str + :param changed_by: User name which did the change. + :type changed_by: str + :param start_date: Start of search time range. + :type start_date: date + :param end_date: End of search time range. + :type end_date: date + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_firewall_audits_list_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + firewall_id=firewall_id, + request_id=request_id, + changed_by=changed_by, + start_date=start_date, + end_date=end_date, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListFirewallAuditResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def retrieve_firewall_audits_list_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + firewall_id: Annotated[Optional[StrictStr], Field(description="The identifier of the Firewall.")] = None, + request_id: Annotated[Optional[StrictStr], Field(description="The requestId of the API call which led to the change.")] = None, + changed_by: Annotated[Optional[StrictStr], Field(description="User name which did the change.")] = None, + start_date: Annotated[Optional[date], Field(description="Start of search time range.")] = None, + end_date: Annotated[Optional[date], Field(description="End of search time range.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List history about your Firewalls (audit) + + List and filters the history about your Firewalls. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param firewall_id: The identifier of the Firewall. + :type firewall_id: str + :param request_id: The requestId of the API call which led to the change. + :type request_id: str + :param changed_by: User name which did the change. + :type changed_by: str + :param start_date: Start of search time range. + :type start_date: date + :param end_date: End of search time range. + :type end_date: date + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_firewall_audits_list_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + firewall_id=firewall_id, + request_id=request_id, + changed_by=changed_by, + start_date=start_date, + end_date=end_date, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListFirewallAuditResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _retrieve_firewall_audits_list_serialize( + self, + x_request_id, + x_trace_id, + page, + size, + order_by, + firewall_id, + request_id, + changed_by, + start_date, + end_date, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'orderBy': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if size is not None: + + _query_params.append(('size', size)) + + if order_by is not None: + + _query_params.append(('orderBy', order_by)) + + if firewall_id is not None: + + _query_params.append(('firewallId', firewall_id)) + + if request_id is not None: + + _query_params.append(('requestId', request_id)) + + if changed_by is not None: + + _query_params.append(('changedBy', changed_by)) + + if start_date is not None: + if isinstance(start_date, date): + _query_params.append( + ( + 'startDate', + start_date.strftime( + self.api_client.configuration.date_format + ) + ) + ) + else: + _query_params.append(('startDate', start_date)) + + if end_date is not None: + if isinstance(end_date, date): + _query_params.append( + ( + 'endDate', + end_date.strftime( + self.api_client.configuration.date_format + ) + ) + ) + else: + _query_params.append(('endDate', end_date)) + + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/firewalls/audits', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/pfruck_contabo/api/handles_api.py b/pfruck_contabo/api/handles_api.py new file mode 100644 index 00000000..175ef94b --- /dev/null +++ b/pfruck_contabo/api/handles_api.py @@ -0,0 +1,1964 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import List, Optional +from typing_extensions import Annotated +from pfruck_contabo.models.handle_create_request import HandleCreateRequest +from pfruck_contabo.models.handle_create_response import HandleCreateResponse +from pfruck_contabo.models.handle_find_response import HandleFindResponse +from pfruck_contabo.models.handle_list_response import HandleListResponse +from pfruck_contabo.models.handle_patch_request import HandlePatchRequest +from pfruck_contabo.models.handle_patch_response import HandlePatchResponse +from pfruck_contabo.models.set_default_handle_response import SetDefaultHandleResponse + +from pfruck_contabo.api_client import ApiClient, RequestSerialized +from pfruck_contabo.api_response import ApiResponse +from pfruck_contabo.rest import RESTResponseType + + +class HandlesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def create_handle( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + handle_create_request: HandleCreateRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> HandleCreateResponse: + """Create specific handle + + Create specific handle + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param handle_create_request: (required) + :type handle_create_request: HandleCreateRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_handle_serialize( + x_request_id=x_request_id, + handle_create_request=handle_create_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "HandleCreateResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_handle_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + handle_create_request: HandleCreateRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[HandleCreateResponse]: + """Create specific handle + + Create specific handle + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param handle_create_request: (required) + :type handle_create_request: HandleCreateRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_handle_serialize( + x_request_id=x_request_id, + handle_create_request=handle_create_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "HandleCreateResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_handle_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + handle_create_request: HandleCreateRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create specific handle + + Create specific handle + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param handle_create_request: (required) + :type handle_create_request: HandleCreateRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_handle_serialize( + x_request_id=x_request_id, + handle_create_request=handle_create_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "HandleCreateResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_handle_serialize( + self, + x_request_id, + handle_create_request, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + if handle_create_request is not None: + _body_params = handle_create_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/domains/handles', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_handles( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Filter as substring match for handle name.")] = None, + show_defaults: Annotated[Optional[StrictBool], Field(description="Filter handles to show or not the public handles")] = None, + search: Annotated[Optional[StrictStr], Field(description="full text search on handles on handleid, organization name, handlename ")] = None, + countries: Annotated[Optional[StrictStr], Field(description="list of country codes to filter handles that are available in these countries (comma separated)")] = None, + handle_type: Annotated[Optional[StrictStr], Field(description="Filter handles by type, e.g. person, organization.")] = None, + first_name: Annotated[Optional[StrictStr], Field(description="Filter handles by first name.")] = None, + last_name: Annotated[Optional[StrictStr], Field(description="Filter handles by last name.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> HandleListResponse: + """List all handles + + List and filter all your handles + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param name: Filter as substring match for handle name. + :type name: str + :param show_defaults: Filter handles to show or not the public handles + :type show_defaults: bool + :param search: full text search on handles on handleid, organization name, handlename + :type search: str + :param countries: list of country codes to filter handles that are available in these countries (comma separated) + :type countries: str + :param handle_type: Filter handles by type, e.g. person, organization. + :type handle_type: str + :param first_name: Filter handles by first name. + :type first_name: str + :param last_name: Filter handles by last name. + :type last_name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_handles_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + name=name, + show_defaults=show_defaults, + search=search, + countries=countries, + handle_type=handle_type, + first_name=first_name, + last_name=last_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HandleListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_handles_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Filter as substring match for handle name.")] = None, + show_defaults: Annotated[Optional[StrictBool], Field(description="Filter handles to show or not the public handles")] = None, + search: Annotated[Optional[StrictStr], Field(description="full text search on handles on handleid, organization name, handlename ")] = None, + countries: Annotated[Optional[StrictStr], Field(description="list of country codes to filter handles that are available in these countries (comma separated)")] = None, + handle_type: Annotated[Optional[StrictStr], Field(description="Filter handles by type, e.g. person, organization.")] = None, + first_name: Annotated[Optional[StrictStr], Field(description="Filter handles by first name.")] = None, + last_name: Annotated[Optional[StrictStr], Field(description="Filter handles by last name.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[HandleListResponse]: + """List all handles + + List and filter all your handles + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param name: Filter as substring match for handle name. + :type name: str + :param show_defaults: Filter handles to show or not the public handles + :type show_defaults: bool + :param search: full text search on handles on handleid, organization name, handlename + :type search: str + :param countries: list of country codes to filter handles that are available in these countries (comma separated) + :type countries: str + :param handle_type: Filter handles by type, e.g. person, organization. + :type handle_type: str + :param first_name: Filter handles by first name. + :type first_name: str + :param last_name: Filter handles by last name. + :type last_name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_handles_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + name=name, + show_defaults=show_defaults, + search=search, + countries=countries, + handle_type=handle_type, + first_name=first_name, + last_name=last_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HandleListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_handles_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Filter as substring match for handle name.")] = None, + show_defaults: Annotated[Optional[StrictBool], Field(description="Filter handles to show or not the public handles")] = None, + search: Annotated[Optional[StrictStr], Field(description="full text search on handles on handleid, organization name, handlename ")] = None, + countries: Annotated[Optional[StrictStr], Field(description="list of country codes to filter handles that are available in these countries (comma separated)")] = None, + handle_type: Annotated[Optional[StrictStr], Field(description="Filter handles by type, e.g. person, organization.")] = None, + first_name: Annotated[Optional[StrictStr], Field(description="Filter handles by first name.")] = None, + last_name: Annotated[Optional[StrictStr], Field(description="Filter handles by last name.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List all handles + + List and filter all your handles + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param name: Filter as substring match for handle name. + :type name: str + :param show_defaults: Filter handles to show or not the public handles + :type show_defaults: bool + :param search: full text search on handles on handleid, organization name, handlename + :type search: str + :param countries: list of country codes to filter handles that are available in these countries (comma separated) + :type countries: str + :param handle_type: Filter handles by type, e.g. person, organization. + :type handle_type: str + :param first_name: Filter handles by first name. + :type first_name: str + :param last_name: Filter handles by last name. + :type last_name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_handles_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + name=name, + show_defaults=show_defaults, + search=search, + countries=countries, + handle_type=handle_type, + first_name=first_name, + last_name=last_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HandleListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_handles_serialize( + self, + x_request_id, + x_trace_id, + page, + size, + order_by, + name, + show_defaults, + search, + countries, + handle_type, + first_name, + last_name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'orderBy': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if size is not None: + + _query_params.append(('size', size)) + + if order_by is not None: + + _query_params.append(('orderBy', order_by)) + + if name is not None: + + _query_params.append(('name', name)) + + if show_defaults is not None: + + _query_params.append(('showDefaults', show_defaults)) + + if search is not None: + + _query_params.append(('search', search)) + + if countries is not None: + + _query_params.append(('countries', countries)) + + if handle_type is not None: + + _query_params.append(('handleType', handle_type)) + + if first_name is not None: + + _query_params.append(('firstName', first_name)) + + if last_name is not None: + + _query_params.append(('lastName', last_name)) + + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/domains/handles', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def remove_handle( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + handle_id: Annotated[StrictStr, Field(description="The identifier of the handle")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Remove specific handle + + Remove specific handle + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param handle_id: The identifier of the handle (required) + :type handle_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_handle_serialize( + x_request_id=x_request_id, + handle_id=handle_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def remove_handle_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + handle_id: Annotated[StrictStr, Field(description="The identifier of the handle")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Remove specific handle + + Remove specific handle + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param handle_id: The identifier of the handle (required) + :type handle_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_handle_serialize( + x_request_id=x_request_id, + handle_id=handle_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def remove_handle_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + handle_id: Annotated[StrictStr, Field(description="The identifier of the handle")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Remove specific handle + + Remove specific handle + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param handle_id: The identifier of the handle (required) + :type handle_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_handle_serialize( + x_request_id=x_request_id, + handle_id=handle_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _remove_handle_serialize( + self, + x_request_id, + handle_id, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if handle_id is not None: + _path_params['handleId'] = handle_id + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/domains/handles/{handleId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def retrieve_handle( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + handle_id: Annotated[StrictStr, Field(description="The identifier of the handle")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> HandleFindResponse: + """Get specific handle + + Get specific handle + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param handle_id: The identifier of the handle (required) + :type handle_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_handle_serialize( + x_request_id=x_request_id, + handle_id=handle_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HandleFindResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def retrieve_handle_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + handle_id: Annotated[StrictStr, Field(description="The identifier of the handle")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[HandleFindResponse]: + """Get specific handle + + Get specific handle + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param handle_id: The identifier of the handle (required) + :type handle_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_handle_serialize( + x_request_id=x_request_id, + handle_id=handle_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HandleFindResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def retrieve_handle_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + handle_id: Annotated[StrictStr, Field(description="The identifier of the handle")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get specific handle + + Get specific handle + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param handle_id: The identifier of the handle (required) + :type handle_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_handle_serialize( + x_request_id=x_request_id, + handle_id=handle_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HandleFindResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _retrieve_handle_serialize( + self, + x_request_id, + handle_id, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if handle_id is not None: + _path_params['handleId'] = handle_id + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/domains/handles/{handleId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def set_default_handle( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + handle_id: Annotated[StrictStr, Field(description="The identifier of the handle")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SetDefaultHandleResponse: + """Set default handle + + Set default handle + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param handle_id: The identifier of the handle (required) + :type handle_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_default_handle_serialize( + x_request_id=x_request_id, + handle_id=handle_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SetDefaultHandleResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def set_default_handle_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + handle_id: Annotated[StrictStr, Field(description="The identifier of the handle")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SetDefaultHandleResponse]: + """Set default handle + + Set default handle + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param handle_id: The identifier of the handle (required) + :type handle_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_default_handle_serialize( + x_request_id=x_request_id, + handle_id=handle_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SetDefaultHandleResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def set_default_handle_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + handle_id: Annotated[StrictStr, Field(description="The identifier of the handle")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Set default handle + + Set default handle + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param handle_id: The identifier of the handle (required) + :type handle_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_default_handle_serialize( + x_request_id=x_request_id, + handle_id=handle_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SetDefaultHandleResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _set_default_handle_serialize( + self, + x_request_id, + handle_id, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if handle_id is not None: + _path_params['handleId'] = handle_id + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v1/domains/handles/{handleId}/default', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def update_handle( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + handle_id: Annotated[StrictStr, Field(description="The identifier of the handle")], + handle_patch_request: HandlePatchRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> HandlePatchResponse: + """Update specific handle + + Update specific handle + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param handle_id: The identifier of the handle (required) + :type handle_id: str + :param handle_patch_request: (required) + :type handle_patch_request: HandlePatchRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_handle_serialize( + x_request_id=x_request_id, + handle_id=handle_id, + handle_patch_request=handle_patch_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HandlePatchResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def update_handle_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + handle_id: Annotated[StrictStr, Field(description="The identifier of the handle")], + handle_patch_request: HandlePatchRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[HandlePatchResponse]: + """Update specific handle + + Update specific handle + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param handle_id: The identifier of the handle (required) + :type handle_id: str + :param handle_patch_request: (required) + :type handle_patch_request: HandlePatchRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_handle_serialize( + x_request_id=x_request_id, + handle_id=handle_id, + handle_patch_request=handle_patch_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HandlePatchResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def update_handle_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + handle_id: Annotated[StrictStr, Field(description="The identifier of the handle")], + handle_patch_request: HandlePatchRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update specific handle + + Update specific handle + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param handle_id: The identifier of the handle (required) + :type handle_id: str + :param handle_patch_request: (required) + :type handle_patch_request: HandlePatchRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_handle_serialize( + x_request_id=x_request_id, + handle_id=handle_id, + handle_patch_request=handle_patch_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HandlePatchResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_handle_serialize( + self, + x_request_id, + handle_id, + handle_patch_request, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if handle_id is not None: + _path_params['handleId'] = handle_id + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + if handle_patch_request is not None: + _body_params = handle_patch_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v1/domains/handles/{handleId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/pfruck_contabo/api/handles_audits_api.py b/pfruck_contabo/api/handles_audits_api.py new file mode 100644 index 00000000..2146a20e --- /dev/null +++ b/pfruck_contabo/api/handles_audits_api.py @@ -0,0 +1,468 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from datetime import date +from pydantic import Field, StrictInt, StrictStr, field_validator +from typing import List, Optional +from typing_extensions import Annotated +from pfruck_contabo.models.handle_audit_response import HandleAuditResponse + +from pfruck_contabo.api_client import ApiClient, RequestSerialized +from pfruck_contabo.api_response import ApiResponse +from pfruck_contabo.rest import RESTResponseType + + +class HandlesAuditsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def retrieve_handles_audits_list( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + handle_id: Annotated[Optional[StrictStr], Field(description="The identifier of the handle.")] = None, + request_id: Annotated[Optional[StrictStr], Field(description="The requestId of the API call which led to the change.")] = None, + changed_by: Annotated[Optional[StrictStr], Field(description="UserId of the user which led to the change.")] = None, + start_date: Annotated[Optional[date], Field(description="Start of search time range.")] = None, + end_date: Annotated[Optional[date], Field(description="End of search time range.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> HandleAuditResponse: + """List history about your handles (audit) + + List and filters the history about your handles. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param handle_id: The identifier of the handle. + :type handle_id: str + :param request_id: The requestId of the API call which led to the change. + :type request_id: str + :param changed_by: UserId of the user which led to the change. + :type changed_by: str + :param start_date: Start of search time range. + :type start_date: date + :param end_date: End of search time range. + :type end_date: date + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_handles_audits_list_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + handle_id=handle_id, + request_id=request_id, + changed_by=changed_by, + start_date=start_date, + end_date=end_date, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HandleAuditResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def retrieve_handles_audits_list_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + handle_id: Annotated[Optional[StrictStr], Field(description="The identifier of the handle.")] = None, + request_id: Annotated[Optional[StrictStr], Field(description="The requestId of the API call which led to the change.")] = None, + changed_by: Annotated[Optional[StrictStr], Field(description="UserId of the user which led to the change.")] = None, + start_date: Annotated[Optional[date], Field(description="Start of search time range.")] = None, + end_date: Annotated[Optional[date], Field(description="End of search time range.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[HandleAuditResponse]: + """List history about your handles (audit) + + List and filters the history about your handles. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param handle_id: The identifier of the handle. + :type handle_id: str + :param request_id: The requestId of the API call which led to the change. + :type request_id: str + :param changed_by: UserId of the user which led to the change. + :type changed_by: str + :param start_date: Start of search time range. + :type start_date: date + :param end_date: End of search time range. + :type end_date: date + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_handles_audits_list_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + handle_id=handle_id, + request_id=request_id, + changed_by=changed_by, + start_date=start_date, + end_date=end_date, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HandleAuditResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def retrieve_handles_audits_list_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + handle_id: Annotated[Optional[StrictStr], Field(description="The identifier of the handle.")] = None, + request_id: Annotated[Optional[StrictStr], Field(description="The requestId of the API call which led to the change.")] = None, + changed_by: Annotated[Optional[StrictStr], Field(description="UserId of the user which led to the change.")] = None, + start_date: Annotated[Optional[date], Field(description="Start of search time range.")] = None, + end_date: Annotated[Optional[date], Field(description="End of search time range.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List history about your handles (audit) + + List and filters the history about your handles. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param handle_id: The identifier of the handle. + :type handle_id: str + :param request_id: The requestId of the API call which led to the change. + :type request_id: str + :param changed_by: UserId of the user which led to the change. + :type changed_by: str + :param start_date: Start of search time range. + :type start_date: date + :param end_date: End of search time range. + :type end_date: date + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_handles_audits_list_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + handle_id=handle_id, + request_id=request_id, + changed_by=changed_by, + start_date=start_date, + end_date=end_date, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HandleAuditResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _retrieve_handles_audits_list_serialize( + self, + x_request_id, + x_trace_id, + page, + size, + order_by, + handle_id, + request_id, + changed_by, + start_date, + end_date, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'orderBy': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if size is not None: + + _query_params.append(('size', size)) + + if order_by is not None: + + _query_params.append(('orderBy', order_by)) + + if handle_id is not None: + + _query_params.append(('handleId', handle_id)) + + if request_id is not None: + + _query_params.append(('requestId', request_id)) + + if changed_by is not None: + + _query_params.append(('changedBy', changed_by)) + + if start_date is not None: + if isinstance(start_date, date): + _query_params.append( + ( + 'startDate', + start_date.strftime( + self.api_client.configuration.date_format + ) + ) + ) + else: + _query_params.append(('startDate', start_date)) + + if end_date is not None: + if isinstance(end_date, date): + _query_params.append( + ( + 'endDate', + end_date.strftime( + self.api_client.configuration.date_format + ) + ) + ) + else: + _query_params.append(('endDate', end_date)) + + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/domains/handles/audits', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/pfruck_contabo/api/images_api.py b/pfruck_contabo/api/images_api.py index 970e711f..f8105f75 100644 --- a/pfruck_contabo/api/images_api.py +++ b/pfruck_contabo/api/images_api.py @@ -1202,6 +1202,7 @@ def retrieve_image_list( order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, name: Annotated[Optional[StrictStr], Field(description="The name of the image")] = None, standard_image: Annotated[Optional[StrictBool], Field(description="Flag indicating that image is either a standard (true) or a custom image (false)")] = None, + search: Annotated[Optional[StrictStr], Field(description="full text search on image name or image os type")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1233,6 +1234,8 @@ def retrieve_image_list( :type name: str :param standard_image: Flag indicating that image is either a standard (true) or a custom image (false) :type standard_image: bool + :param search: full text search on image name or image os type + :type search: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1263,6 +1266,7 @@ def retrieve_image_list( order_by=order_by, name=name, standard_image=standard_image, + search=search, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1293,6 +1297,7 @@ def retrieve_image_list_with_http_info( order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, name: Annotated[Optional[StrictStr], Field(description="The name of the image")] = None, standard_image: Annotated[Optional[StrictBool], Field(description="Flag indicating that image is either a standard (true) or a custom image (false)")] = None, + search: Annotated[Optional[StrictStr], Field(description="full text search on image name or image os type")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1324,6 +1329,8 @@ def retrieve_image_list_with_http_info( :type name: str :param standard_image: Flag indicating that image is either a standard (true) or a custom image (false) :type standard_image: bool + :param search: full text search on image name or image os type + :type search: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1354,6 +1361,7 @@ def retrieve_image_list_with_http_info( order_by=order_by, name=name, standard_image=standard_image, + search=search, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1384,6 +1392,7 @@ def retrieve_image_list_without_preload_content( order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, name: Annotated[Optional[StrictStr], Field(description="The name of the image")] = None, standard_image: Annotated[Optional[StrictBool], Field(description="Flag indicating that image is either a standard (true) or a custom image (false)")] = None, + search: Annotated[Optional[StrictStr], Field(description="full text search on image name or image os type")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1415,6 +1424,8 @@ def retrieve_image_list_without_preload_content( :type name: str :param standard_image: Flag indicating that image is either a standard (true) or a custom image (false) :type standard_image: bool + :param search: full text search on image name or image os type + :type search: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1445,6 +1456,7 @@ def retrieve_image_list_without_preload_content( order_by=order_by, name=name, standard_image=standard_image, + search=search, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1470,6 +1482,7 @@ def _retrieve_image_list_serialize( order_by, name, standard_image, + search, _request_auth, _content_type, _headers, @@ -1511,6 +1524,10 @@ def _retrieve_image_list_serialize( _query_params.append(('standardImage', standard_image)) + if search is not None: + + _query_params.append(('search', search)) + # process the header parameters if x_request_id is not None: _header_params['x-request-id'] = x_request_id diff --git a/pfruck_contabo/api/instances_api.py b/pfruck_contabo/api/instances_api.py index a6cdb361..52080ddf 100644 --- a/pfruck_contabo/api/instances_api.py +++ b/pfruck_contabo/api/instances_api.py @@ -17,8 +17,9 @@ from typing_extensions import Annotated from pydantic import Field, StrictBool, StrictInt, StrictStr, field_validator -from typing import Any, Dict, List, Optional +from typing import List, Optional from typing_extensions import Annotated +from pfruck_contabo.models.cancel_instance_request import CancelInstanceRequest from pfruck_contabo.models.cancel_instance_response import CancelInstanceResponse from pfruck_contabo.models.create_instance_request import CreateInstanceRequest from pfruck_contabo.models.create_instance_response import CreateInstanceResponse @@ -53,7 +54,7 @@ def cancel_instance( self, x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], instance_id: Annotated[StrictInt, Field(description="The identifier of the instance")], - body: Dict[str, Any], + cancel_instance_request: CancelInstanceRequest, x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, _request_timeout: Union[ None, @@ -76,8 +77,8 @@ def cancel_instance( :type x_request_id: str :param instance_id: The identifier of the instance (required) :type instance_id: int - :param body: (required) - :type body: object + :param cancel_instance_request: (required) + :type cancel_instance_request: CancelInstanceRequest :param x_trace_id: Identifier to trace group of requests. :type x_trace_id: str :param _request_timeout: timeout setting for this request. If one @@ -105,7 +106,7 @@ def cancel_instance( _param = self._cancel_instance_serialize( x_request_id=x_request_id, instance_id=instance_id, - body=body, + cancel_instance_request=cancel_instance_request, x_trace_id=x_trace_id, _request_auth=_request_auth, _content_type=_content_type, @@ -132,7 +133,7 @@ def cancel_instance_with_http_info( self, x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], instance_id: Annotated[StrictInt, Field(description="The identifier of the instance")], - body: Dict[str, Any], + cancel_instance_request: CancelInstanceRequest, x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, _request_timeout: Union[ None, @@ -155,8 +156,8 @@ def cancel_instance_with_http_info( :type x_request_id: str :param instance_id: The identifier of the instance (required) :type instance_id: int - :param body: (required) - :type body: object + :param cancel_instance_request: (required) + :type cancel_instance_request: CancelInstanceRequest :param x_trace_id: Identifier to trace group of requests. :type x_trace_id: str :param _request_timeout: timeout setting for this request. If one @@ -184,7 +185,7 @@ def cancel_instance_with_http_info( _param = self._cancel_instance_serialize( x_request_id=x_request_id, instance_id=instance_id, - body=body, + cancel_instance_request=cancel_instance_request, x_trace_id=x_trace_id, _request_auth=_request_auth, _content_type=_content_type, @@ -211,7 +212,7 @@ def cancel_instance_without_preload_content( self, x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], instance_id: Annotated[StrictInt, Field(description="The identifier of the instance")], - body: Dict[str, Any], + cancel_instance_request: CancelInstanceRequest, x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, _request_timeout: Union[ None, @@ -234,8 +235,8 @@ def cancel_instance_without_preload_content( :type x_request_id: str :param instance_id: The identifier of the instance (required) :type instance_id: int - :param body: (required) - :type body: object + :param cancel_instance_request: (required) + :type cancel_instance_request: CancelInstanceRequest :param x_trace_id: Identifier to trace group of requests. :type x_trace_id: str :param _request_timeout: timeout setting for this request. If one @@ -263,7 +264,7 @@ def cancel_instance_without_preload_content( _param = self._cancel_instance_serialize( x_request_id=x_request_id, instance_id=instance_id, - body=body, + cancel_instance_request=cancel_instance_request, x_trace_id=x_trace_id, _request_auth=_request_auth, _content_type=_content_type, @@ -285,7 +286,7 @@ def _cancel_instance_serialize( self, x_request_id, instance_id, - body, + cancel_instance_request, x_trace_id, _request_auth, _content_type, @@ -316,8 +317,8 @@ def _cancel_instance_serialize( _header_params['x-trace-id'] = x_trace_id # process the form parameters # process the body parameter - if body is not None: - _body_params = body + if cancel_instance_request is not None: + _body_params = cancel_instance_request # set the HTTP header `Accept` @@ -385,7 +386,7 @@ def create_instance( ) -> CreateInstanceResponse: """Create a new instance - Create a new instance for your account with the provided parameters.
ProductIdProductDisk Size
V45VPS 1 SSD400 GB SSD
V47VPS 1 Storage800 GB SSD
V46VPS 1 NVMe100 GB NVMe
V48VPS 2 SSD400 GB SSD
V50VPS 2 Storage800 GB SSD
V49VPS 2 NVMe200 GB NVMe
V51VPS 3 SSD1200 GB SSD
V53VPS 3 Storage2400 GB SSD
V52VPS 3 NVMe300 GB NVMe
V54VPS 4 SSD1600 GB SSD
V56VPS 4 Storage3200 GB SSD
V55VPS 4 NVMe400 GB NVMe
V57VPS 5 SSD2000 GB SSD
V59VPS 5 Storage4000 GB SSD
V58VPS 5 NVMe500 GB NVMe
V60VPS 6 SSD2400 GB SSD
V62VPS 6 Storage4800 GB SSD
V61VPS 6 NVMe600 GB NVMe
V8VDS S180 GB NVMe
V9VDS M240 GB NVMe
V10VDS L360 GB NVMe
V11VDS XL480 GB NVMe
V16VDS XXL720 GB NVMe
+ Create a new instance for your account with the provided parameters.
ProductIdProductDisk Size
V91VPS 10 NVMe75 GB NVMe
V92VPS 10 SSD150 GB SSD
V93VPS 10 Storage300 GB SSD
V94VPS 20 NVMe100 GB NVMe
V95VPS 20 SSD200 GB SSD
V96VPS 20 Storage400 GB SSD
V97VPS 30 NVMe200 GB NVMe
V98VPS 30 SSD400 GB SSD
V99VPS 30 Storage1000 GB NVMe
V100VPS 40 NVMe250 GB NVMe
V101VPS 40 SSD500 GB SSD
V102VPS 40 Storage1200 GB NVMe
V103VPS 50 NVMe300 GB NVMe
V104VPS 50 SSD600 GB SSD
V105VPS 50 Storage1400 GB SSD
V106VPS 60 NVMe350 GB NVMe
V107VPS 60 SSD700 GB SSD
V8VDS S180 GB NVMe
V9VDS M240 GB NVMe
V10VDS L360 GB NVMe
V11VDS XL480 GB NVMe
V16VDS XXL720 GB NVMe
:param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) :type x_request_id: str @@ -460,7 +461,7 @@ def create_instance_with_http_info( ) -> ApiResponse[CreateInstanceResponse]: """Create a new instance - Create a new instance for your account with the provided parameters.
ProductIdProductDisk Size
V45VPS 1 SSD400 GB SSD
V47VPS 1 Storage800 GB SSD
V46VPS 1 NVMe100 GB NVMe
V48VPS 2 SSD400 GB SSD
V50VPS 2 Storage800 GB SSD
V49VPS 2 NVMe200 GB NVMe
V51VPS 3 SSD1200 GB SSD
V53VPS 3 Storage2400 GB SSD
V52VPS 3 NVMe300 GB NVMe
V54VPS 4 SSD1600 GB SSD
V56VPS 4 Storage3200 GB SSD
V55VPS 4 NVMe400 GB NVMe
V57VPS 5 SSD2000 GB SSD
V59VPS 5 Storage4000 GB SSD
V58VPS 5 NVMe500 GB NVMe
V60VPS 6 SSD2400 GB SSD
V62VPS 6 Storage4800 GB SSD
V61VPS 6 NVMe600 GB NVMe
V8VDS S180 GB NVMe
V9VDS M240 GB NVMe
V10VDS L360 GB NVMe
V11VDS XL480 GB NVMe
V16VDS XXL720 GB NVMe
+ Create a new instance for your account with the provided parameters.
ProductIdProductDisk Size
V91VPS 10 NVMe75 GB NVMe
V92VPS 10 SSD150 GB SSD
V93VPS 10 Storage300 GB SSD
V94VPS 20 NVMe100 GB NVMe
V95VPS 20 SSD200 GB SSD
V96VPS 20 Storage400 GB SSD
V97VPS 30 NVMe200 GB NVMe
V98VPS 30 SSD400 GB SSD
V99VPS 30 Storage1000 GB NVMe
V100VPS 40 NVMe250 GB NVMe
V101VPS 40 SSD500 GB SSD
V102VPS 40 Storage1200 GB NVMe
V103VPS 50 NVMe300 GB NVMe
V104VPS 50 SSD600 GB SSD
V105VPS 50 Storage1400 GB SSD
V106VPS 60 NVMe350 GB NVMe
V107VPS 60 SSD700 GB SSD
V8VDS S180 GB NVMe
V9VDS M240 GB NVMe
V10VDS L360 GB NVMe
V11VDS XL480 GB NVMe
V16VDS XXL720 GB NVMe
:param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) :type x_request_id: str @@ -535,7 +536,7 @@ def create_instance_without_preload_content( ) -> RESTResponseType: """Create a new instance - Create a new instance for your account with the provided parameters.
ProductIdProductDisk Size
V45VPS 1 SSD400 GB SSD
V47VPS 1 Storage800 GB SSD
V46VPS 1 NVMe100 GB NVMe
V48VPS 2 SSD400 GB SSD
V50VPS 2 Storage800 GB SSD
V49VPS 2 NVMe200 GB NVMe
V51VPS 3 SSD1200 GB SSD
V53VPS 3 Storage2400 GB SSD
V52VPS 3 NVMe300 GB NVMe
V54VPS 4 SSD1600 GB SSD
V56VPS 4 Storage3200 GB SSD
V55VPS 4 NVMe400 GB NVMe
V57VPS 5 SSD2000 GB SSD
V59VPS 5 Storage4000 GB SSD
V58VPS 5 NVMe500 GB NVMe
V60VPS 6 SSD2400 GB SSD
V62VPS 6 Storage4800 GB SSD
V61VPS 6 NVMe600 GB NVMe
V8VDS S180 GB NVMe
V9VDS M240 GB NVMe
V10VDS L360 GB NVMe
V11VDS XL480 GB NVMe
V16VDS XXL720 GB NVMe
+ Create a new instance for your account with the provided parameters.
ProductIdProductDisk Size
V91VPS 10 NVMe75 GB NVMe
V92VPS 10 SSD150 GB SSD
V93VPS 10 Storage300 GB SSD
V94VPS 20 NVMe100 GB NVMe
V95VPS 20 SSD200 GB SSD
V96VPS 20 Storage400 GB SSD
V97VPS 30 NVMe200 GB NVMe
V98VPS 30 SSD400 GB SSD
V99VPS 30 Storage1000 GB NVMe
V100VPS 40 NVMe250 GB NVMe
V101VPS 40 SSD500 GB SSD
V102VPS 40 Storage1200 GB NVMe
V103VPS 50 NVMe300 GB NVMe
V104VPS 50 SSD600 GB SSD
V105VPS 50 Storage1400 GB SSD
V106VPS 60 NVMe350 GB NVMe
V107VPS 60 SSD700 GB SSD
V8VDS S180 GB NVMe
V9VDS M240 GB NVMe
V10VDS L360 GB NVMe
V11VDS XL480 GB NVMe
V16VDS XXL720 GB NVMe
:param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) :type x_request_id: str @@ -1600,10 +1601,13 @@ def retrieve_instances_list( instance_id: Annotated[Optional[StrictInt], Field(description="The identifier of the instance (deprecated)")] = None, instance_ids: Annotated[Optional[StrictStr], Field(description="Comma separated instances identifiers")] = None, status: Annotated[Optional[StrictStr], Field(description="The status of the instance")] = None, + product_ids: Annotated[Optional[StrictStr], Field(description="Identifiers of the instance products")] = None, add_on_ids: Annotated[Optional[StrictStr], Field(description="Identifiers of Addons the instances have")] = None, product_types: Annotated[Optional[StrictStr], Field(description="Comma separated instance's category depending on Product Id")] = None, ip_config: Annotated[Optional[StrictBool], Field(description="Filter instances that have an ip config")] = None, search: Annotated[Optional[StrictStr], Field(description="Full text search when listing the instances. Can be searched by `name`, `displayName`, `ipAddress`")] = None, + customer_id: Annotated[Optional[StrictStr], Field(description="Filter by customer ID")] = None, + tenant_id: Annotated[Optional[StrictStr], Field(description="Filter by tenant ID")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1645,6 +1649,8 @@ def retrieve_instances_list( :type instance_ids: str :param status: The status of the instance :type status: str + :param product_ids: Identifiers of the instance products + :type product_ids: str :param add_on_ids: Identifiers of Addons the instances have :type add_on_ids: str :param product_types: Comma separated instance's category depending on Product Id @@ -1653,6 +1659,10 @@ def retrieve_instances_list( :type ip_config: bool :param search: Full text search when listing the instances. Can be searched by `name`, `displayName`, `ipAddress` :type search: str + :param customer_id: Filter by customer ID + :type customer_id: str + :param tenant_id: Filter by tenant ID + :type tenant_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1688,10 +1698,13 @@ def retrieve_instances_list( instance_id=instance_id, instance_ids=instance_ids, status=status, + product_ids=product_ids, add_on_ids=add_on_ids, product_types=product_types, ip_config=ip_config, search=search, + customer_id=customer_id, + tenant_id=tenant_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1727,10 +1740,13 @@ def retrieve_instances_list_with_http_info( instance_id: Annotated[Optional[StrictInt], Field(description="The identifier of the instance (deprecated)")] = None, instance_ids: Annotated[Optional[StrictStr], Field(description="Comma separated instances identifiers")] = None, status: Annotated[Optional[StrictStr], Field(description="The status of the instance")] = None, + product_ids: Annotated[Optional[StrictStr], Field(description="Identifiers of the instance products")] = None, add_on_ids: Annotated[Optional[StrictStr], Field(description="Identifiers of Addons the instances have")] = None, product_types: Annotated[Optional[StrictStr], Field(description="Comma separated instance's category depending on Product Id")] = None, ip_config: Annotated[Optional[StrictBool], Field(description="Filter instances that have an ip config")] = None, search: Annotated[Optional[StrictStr], Field(description="Full text search when listing the instances. Can be searched by `name`, `displayName`, `ipAddress`")] = None, + customer_id: Annotated[Optional[StrictStr], Field(description="Filter by customer ID")] = None, + tenant_id: Annotated[Optional[StrictStr], Field(description="Filter by tenant ID")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1772,6 +1788,8 @@ def retrieve_instances_list_with_http_info( :type instance_ids: str :param status: The status of the instance :type status: str + :param product_ids: Identifiers of the instance products + :type product_ids: str :param add_on_ids: Identifiers of Addons the instances have :type add_on_ids: str :param product_types: Comma separated instance's category depending on Product Id @@ -1780,6 +1798,10 @@ def retrieve_instances_list_with_http_info( :type ip_config: bool :param search: Full text search when listing the instances. Can be searched by `name`, `displayName`, `ipAddress` :type search: str + :param customer_id: Filter by customer ID + :type customer_id: str + :param tenant_id: Filter by tenant ID + :type tenant_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1815,10 +1837,13 @@ def retrieve_instances_list_with_http_info( instance_id=instance_id, instance_ids=instance_ids, status=status, + product_ids=product_ids, add_on_ids=add_on_ids, product_types=product_types, ip_config=ip_config, search=search, + customer_id=customer_id, + tenant_id=tenant_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1854,10 +1879,13 @@ def retrieve_instances_list_without_preload_content( instance_id: Annotated[Optional[StrictInt], Field(description="The identifier of the instance (deprecated)")] = None, instance_ids: Annotated[Optional[StrictStr], Field(description="Comma separated instances identifiers")] = None, status: Annotated[Optional[StrictStr], Field(description="The status of the instance")] = None, + product_ids: Annotated[Optional[StrictStr], Field(description="Identifiers of the instance products")] = None, add_on_ids: Annotated[Optional[StrictStr], Field(description="Identifiers of Addons the instances have")] = None, product_types: Annotated[Optional[StrictStr], Field(description="Comma separated instance's category depending on Product Id")] = None, ip_config: Annotated[Optional[StrictBool], Field(description="Filter instances that have an ip config")] = None, search: Annotated[Optional[StrictStr], Field(description="Full text search when listing the instances. Can be searched by `name`, `displayName`, `ipAddress`")] = None, + customer_id: Annotated[Optional[StrictStr], Field(description="Filter by customer ID")] = None, + tenant_id: Annotated[Optional[StrictStr], Field(description="Filter by tenant ID")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1899,6 +1927,8 @@ def retrieve_instances_list_without_preload_content( :type instance_ids: str :param status: The status of the instance :type status: str + :param product_ids: Identifiers of the instance products + :type product_ids: str :param add_on_ids: Identifiers of Addons the instances have :type add_on_ids: str :param product_types: Comma separated instance's category depending on Product Id @@ -1907,6 +1937,10 @@ def retrieve_instances_list_without_preload_content( :type ip_config: bool :param search: Full text search when listing the instances. Can be searched by `name`, `displayName`, `ipAddress` :type search: str + :param customer_id: Filter by customer ID + :type customer_id: str + :param tenant_id: Filter by tenant ID + :type tenant_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1942,10 +1976,13 @@ def retrieve_instances_list_without_preload_content( instance_id=instance_id, instance_ids=instance_ids, status=status, + product_ids=product_ids, add_on_ids=add_on_ids, product_types=product_types, ip_config=ip_config, search=search, + customer_id=customer_id, + tenant_id=tenant_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1976,10 +2013,13 @@ def _retrieve_instances_list_serialize( instance_id, instance_ids, status, + product_ids, add_on_ids, product_types, ip_config, search, + customer_id, + tenant_id, _request_auth, _content_type, _headers, @@ -2041,6 +2081,10 @@ def _retrieve_instances_list_serialize( _query_params.append(('status', status)) + if product_ids is not None: + + _query_params.append(('productIds', product_ids)) + if add_on_ids is not None: _query_params.append(('addOnIds', add_on_ids)) @@ -2057,6 +2101,14 @@ def _retrieve_instances_list_serialize( _query_params.append(('search', search)) + if customer_id is not None: + + _query_params.append(('customerId', customer_id)) + + if tenant_id is not None: + + _query_params.append(('tenantId', tenant_id)) + # process the header parameters if x_request_id is not None: _header_params['x-request-id'] = x_request_id diff --git a/pfruck_contabo/api/internal_check_audits_api.py b/pfruck_contabo/api/internal_check_audits_api.py new file mode 100644 index 00000000..34435a2c --- /dev/null +++ b/pfruck_contabo/api/internal_check_audits_api.py @@ -0,0 +1,520 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from datetime import datetime +from pydantic import Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import List, Optional, Union +from typing_extensions import Annotated +from pfruck_contabo.models.checks_audit_list_response import ChecksAuditListResponse + +from pfruck_contabo.api_client import ApiClient, RequestSerialized +from pfruck_contabo.api_response import ApiResponse +from pfruck_contabo.rest import RESTResponseType + + +class InternalCheckAuditsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def retrieve_checks_audits_list( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + org_ids: Annotated[List[StrictStr], Field(description="Org IDs")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + creation_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for created date")] = None, + creation_end_time: Annotated[Optional[datetime], Field(description="End of search time range for created date")] = None, + account_id: Annotated[Optional[StrictStr], Field(description="Filter by account ID")] = None, + request_id: Annotated[Optional[StrictStr], Field(description="The requestId of the API call which led to the change.")] = None, + foreign_changed_by: Annotated[Optional[StrictStr], Field(description="Foreign uerId of the user which led to the change.")] = None, + changed_by: Annotated[Optional[StrictStr], Field(description="UserId of the user which led to the change.")] = None, + check_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Check's id")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ChecksAuditListResponse: + """List history about your Data (audit) + + List and filters the history about your Data. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param org_ids: Org IDs (required) + :type org_ids: List[str] + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param creation_start_time: Start of search time range for created date + :type creation_start_time: datetime + :param creation_end_time: End of search time range for created date + :type creation_end_time: datetime + :param account_id: Filter by account ID + :type account_id: str + :param request_id: The requestId of the API call which led to the change. + :type request_id: str + :param foreign_changed_by: Foreign uerId of the user which led to the change. + :type foreign_changed_by: str + :param changed_by: UserId of the user which led to the change. + :type changed_by: str + :param check_id: Check's id + :type check_id: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_checks_audits_list_serialize( + x_request_id=x_request_id, + org_ids=org_ids, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + creation_start_time=creation_start_time, + creation_end_time=creation_end_time, + account_id=account_id, + request_id=request_id, + foreign_changed_by=foreign_changed_by, + changed_by=changed_by, + check_id=check_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ChecksAuditListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def retrieve_checks_audits_list_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + org_ids: Annotated[List[StrictStr], Field(description="Org IDs")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + creation_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for created date")] = None, + creation_end_time: Annotated[Optional[datetime], Field(description="End of search time range for created date")] = None, + account_id: Annotated[Optional[StrictStr], Field(description="Filter by account ID")] = None, + request_id: Annotated[Optional[StrictStr], Field(description="The requestId of the API call which led to the change.")] = None, + foreign_changed_by: Annotated[Optional[StrictStr], Field(description="Foreign uerId of the user which led to the change.")] = None, + changed_by: Annotated[Optional[StrictStr], Field(description="UserId of the user which led to the change.")] = None, + check_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Check's id")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ChecksAuditListResponse]: + """List history about your Data (audit) + + List and filters the history about your Data. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param org_ids: Org IDs (required) + :type org_ids: List[str] + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param creation_start_time: Start of search time range for created date + :type creation_start_time: datetime + :param creation_end_time: End of search time range for created date + :type creation_end_time: datetime + :param account_id: Filter by account ID + :type account_id: str + :param request_id: The requestId of the API call which led to the change. + :type request_id: str + :param foreign_changed_by: Foreign uerId of the user which led to the change. + :type foreign_changed_by: str + :param changed_by: UserId of the user which led to the change. + :type changed_by: str + :param check_id: Check's id + :type check_id: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_checks_audits_list_serialize( + x_request_id=x_request_id, + org_ids=org_ids, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + creation_start_time=creation_start_time, + creation_end_time=creation_end_time, + account_id=account_id, + request_id=request_id, + foreign_changed_by=foreign_changed_by, + changed_by=changed_by, + check_id=check_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ChecksAuditListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def retrieve_checks_audits_list_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + org_ids: Annotated[List[StrictStr], Field(description="Org IDs")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + creation_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for created date")] = None, + creation_end_time: Annotated[Optional[datetime], Field(description="End of search time range for created date")] = None, + account_id: Annotated[Optional[StrictStr], Field(description="Filter by account ID")] = None, + request_id: Annotated[Optional[StrictStr], Field(description="The requestId of the API call which led to the change.")] = None, + foreign_changed_by: Annotated[Optional[StrictStr], Field(description="Foreign uerId of the user which led to the change.")] = None, + changed_by: Annotated[Optional[StrictStr], Field(description="UserId of the user which led to the change.")] = None, + check_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Check's id")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List history about your Data (audit) + + List and filters the history about your Data. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param org_ids: Org IDs (required) + :type org_ids: List[str] + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param creation_start_time: Start of search time range for created date + :type creation_start_time: datetime + :param creation_end_time: End of search time range for created date + :type creation_end_time: datetime + :param account_id: Filter by account ID + :type account_id: str + :param request_id: The requestId of the API call which led to the change. + :type request_id: str + :param foreign_changed_by: Foreign uerId of the user which led to the change. + :type foreign_changed_by: str + :param changed_by: UserId of the user which led to the change. + :type changed_by: str + :param check_id: Check's id + :type check_id: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_checks_audits_list_serialize( + x_request_id=x_request_id, + org_ids=org_ids, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + creation_start_time=creation_start_time, + creation_end_time=creation_end_time, + account_id=account_id, + request_id=request_id, + foreign_changed_by=foreign_changed_by, + changed_by=changed_by, + check_id=check_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ChecksAuditListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _retrieve_checks_audits_list_serialize( + self, + x_request_id, + org_ids, + x_trace_id, + page, + size, + order_by, + creation_start_time, + creation_end_time, + account_id, + request_id, + foreign_changed_by, + changed_by, + check_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'orgIds': 'multi', + 'orderBy': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if size is not None: + + _query_params.append(('size', size)) + + if order_by is not None: + + _query_params.append(('orderBy', order_by)) + + if creation_start_time is not None: + if isinstance(creation_start_time, datetime): + _query_params.append( + ( + 'creationStartTime', + creation_start_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('creationStartTime', creation_start_time)) + + if creation_end_time is not None: + if isinstance(creation_end_time, datetime): + _query_params.append( + ( + 'creationEndTime', + creation_end_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('creationEndTime', creation_end_time)) + + if org_ids is not None: + + _query_params.append(('orgIds', org_ids)) + + if account_id is not None: + + _query_params.append(('accountId', account_id)) + + if request_id is not None: + + _query_params.append(('requestId', request_id)) + + if foreign_changed_by is not None: + + _query_params.append(('foreignChangedBy', foreign_changed_by)) + + if changed_by is not None: + + _query_params.append(('changedBy', changed_by)) + + if check_id is not None: + + _query_params.append(('checkId', check_id)) + + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/internal/v1/troubleshooting/checks/audits', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/pfruck_contabo/api/internal_check_collection_audits_api.py b/pfruck_contabo/api/internal_check_collection_audits_api.py new file mode 100644 index 00000000..8ffaeb71 --- /dev/null +++ b/pfruck_contabo/api/internal_check_collection_audits_api.py @@ -0,0 +1,520 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from datetime import datetime +from pydantic import Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import List, Optional, Union +from typing_extensions import Annotated +from pfruck_contabo.models.check_collections_audit_list_response import CheckCollectionsAuditListResponse + +from pfruck_contabo.api_client import ApiClient, RequestSerialized +from pfruck_contabo.api_response import ApiResponse +from pfruck_contabo.rest import RESTResponseType + + +class InternalCheckCollectionAuditsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def retrieve_check_collections_audits_list( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + org_ids: Annotated[List[StrictStr], Field(description="Org IDs")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + creation_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for created date")] = None, + creation_end_time: Annotated[Optional[datetime], Field(description="End of search time range for created date")] = None, + account_id: Annotated[Optional[StrictStr], Field(description="Filter by account ID")] = None, + request_id: Annotated[Optional[StrictStr], Field(description="The requestId of the API call which led to the change.")] = None, + foreign_changed_by: Annotated[Optional[StrictStr], Field(description="Foreign uerId of the user which led to the change.")] = None, + changed_by: Annotated[Optional[StrictStr], Field(description="UserId of the user which led to the change.")] = None, + check_collection_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Check collection's id")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CheckCollectionsAuditListResponse: + """List history about your Data (audit) + + List and filters the history about your Data. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param org_ids: Org IDs (required) + :type org_ids: List[str] + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param creation_start_time: Start of search time range for created date + :type creation_start_time: datetime + :param creation_end_time: End of search time range for created date + :type creation_end_time: datetime + :param account_id: Filter by account ID + :type account_id: str + :param request_id: The requestId of the API call which led to the change. + :type request_id: str + :param foreign_changed_by: Foreign uerId of the user which led to the change. + :type foreign_changed_by: str + :param changed_by: UserId of the user which led to the change. + :type changed_by: str + :param check_collection_id: Check collection's id + :type check_collection_id: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_check_collections_audits_list_serialize( + x_request_id=x_request_id, + org_ids=org_ids, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + creation_start_time=creation_start_time, + creation_end_time=creation_end_time, + account_id=account_id, + request_id=request_id, + foreign_changed_by=foreign_changed_by, + changed_by=changed_by, + check_collection_id=check_collection_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CheckCollectionsAuditListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def retrieve_check_collections_audits_list_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + org_ids: Annotated[List[StrictStr], Field(description="Org IDs")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + creation_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for created date")] = None, + creation_end_time: Annotated[Optional[datetime], Field(description="End of search time range for created date")] = None, + account_id: Annotated[Optional[StrictStr], Field(description="Filter by account ID")] = None, + request_id: Annotated[Optional[StrictStr], Field(description="The requestId of the API call which led to the change.")] = None, + foreign_changed_by: Annotated[Optional[StrictStr], Field(description="Foreign uerId of the user which led to the change.")] = None, + changed_by: Annotated[Optional[StrictStr], Field(description="UserId of the user which led to the change.")] = None, + check_collection_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Check collection's id")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CheckCollectionsAuditListResponse]: + """List history about your Data (audit) + + List and filters the history about your Data. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param org_ids: Org IDs (required) + :type org_ids: List[str] + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param creation_start_time: Start of search time range for created date + :type creation_start_time: datetime + :param creation_end_time: End of search time range for created date + :type creation_end_time: datetime + :param account_id: Filter by account ID + :type account_id: str + :param request_id: The requestId of the API call which led to the change. + :type request_id: str + :param foreign_changed_by: Foreign uerId of the user which led to the change. + :type foreign_changed_by: str + :param changed_by: UserId of the user which led to the change. + :type changed_by: str + :param check_collection_id: Check collection's id + :type check_collection_id: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_check_collections_audits_list_serialize( + x_request_id=x_request_id, + org_ids=org_ids, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + creation_start_time=creation_start_time, + creation_end_time=creation_end_time, + account_id=account_id, + request_id=request_id, + foreign_changed_by=foreign_changed_by, + changed_by=changed_by, + check_collection_id=check_collection_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CheckCollectionsAuditListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def retrieve_check_collections_audits_list_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + org_ids: Annotated[List[StrictStr], Field(description="Org IDs")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + creation_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for created date")] = None, + creation_end_time: Annotated[Optional[datetime], Field(description="End of search time range for created date")] = None, + account_id: Annotated[Optional[StrictStr], Field(description="Filter by account ID")] = None, + request_id: Annotated[Optional[StrictStr], Field(description="The requestId of the API call which led to the change.")] = None, + foreign_changed_by: Annotated[Optional[StrictStr], Field(description="Foreign uerId of the user which led to the change.")] = None, + changed_by: Annotated[Optional[StrictStr], Field(description="UserId of the user which led to the change.")] = None, + check_collection_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Check collection's id")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List history about your Data (audit) + + List and filters the history about your Data. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param org_ids: Org IDs (required) + :type org_ids: List[str] + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param creation_start_time: Start of search time range for created date + :type creation_start_time: datetime + :param creation_end_time: End of search time range for created date + :type creation_end_time: datetime + :param account_id: Filter by account ID + :type account_id: str + :param request_id: The requestId of the API call which led to the change. + :type request_id: str + :param foreign_changed_by: Foreign uerId of the user which led to the change. + :type foreign_changed_by: str + :param changed_by: UserId of the user which led to the change. + :type changed_by: str + :param check_collection_id: Check collection's id + :type check_collection_id: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_check_collections_audits_list_serialize( + x_request_id=x_request_id, + org_ids=org_ids, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + creation_start_time=creation_start_time, + creation_end_time=creation_end_time, + account_id=account_id, + request_id=request_id, + foreign_changed_by=foreign_changed_by, + changed_by=changed_by, + check_collection_id=check_collection_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CheckCollectionsAuditListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _retrieve_check_collections_audits_list_serialize( + self, + x_request_id, + org_ids, + x_trace_id, + page, + size, + order_by, + creation_start_time, + creation_end_time, + account_id, + request_id, + foreign_changed_by, + changed_by, + check_collection_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'orgIds': 'multi', + 'orderBy': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if size is not None: + + _query_params.append(('size', size)) + + if order_by is not None: + + _query_params.append(('orderBy', order_by)) + + if creation_start_time is not None: + if isinstance(creation_start_time, datetime): + _query_params.append( + ( + 'creationStartTime', + creation_start_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('creationStartTime', creation_start_time)) + + if creation_end_time is not None: + if isinstance(creation_end_time, datetime): + _query_params.append( + ( + 'creationEndTime', + creation_end_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('creationEndTime', creation_end_time)) + + if org_ids is not None: + + _query_params.append(('orgIds', org_ids)) + + if account_id is not None: + + _query_params.append(('accountId', account_id)) + + if request_id is not None: + + _query_params.append(('requestId', request_id)) + + if foreign_changed_by is not None: + + _query_params.append(('foreignChangedBy', foreign_changed_by)) + + if changed_by is not None: + + _query_params.append(('changedBy', changed_by)) + + if check_collection_id is not None: + + _query_params.append(('checkCollectionId', check_collection_id)) + + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/internal/v1/troubleshooting/check-collections/audits', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/pfruck_contabo/api/internal_check_collection_replay_api.py b/pfruck_contabo/api/internal_check_collection_replay_api.py new file mode 100644 index 00000000..e185fb46 --- /dev/null +++ b/pfruck_contabo/api/internal_check_collection_replay_api.py @@ -0,0 +1,341 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr, field_validator +from typing import Optional +from typing_extensions import Annotated +from pfruck_contabo.models.check_collections_replay_request import CheckCollectionsReplayRequest +from pfruck_contabo.models.replay_response import ReplayResponse + +from pfruck_contabo.api_client import ApiClient, RequestSerialized +from pfruck_contabo.api_response import ApiResponse +from pfruck_contabo.rest import RESTResponseType + + +class InternalCheckCollectionReplayApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def replay_check_collection( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + check_collections_replay_request: CheckCollectionsReplayRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ReplayResponse: + """Replay changes for Check + + Replay changes for Check + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param check_collections_replay_request: (required) + :type check_collections_replay_request: CheckCollectionsReplayRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._replay_check_collection_serialize( + x_request_id=x_request_id, + check_collections_replay_request=check_collections_replay_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "ReplayResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def replay_check_collection_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + check_collections_replay_request: CheckCollectionsReplayRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ReplayResponse]: + """Replay changes for Check + + Replay changes for Check + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param check_collections_replay_request: (required) + :type check_collections_replay_request: CheckCollectionsReplayRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._replay_check_collection_serialize( + x_request_id=x_request_id, + check_collections_replay_request=check_collections_replay_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "ReplayResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def replay_check_collection_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + check_collections_replay_request: CheckCollectionsReplayRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Replay changes for Check + + Replay changes for Check + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param check_collections_replay_request: (required) + :type check_collections_replay_request: CheckCollectionsReplayRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._replay_check_collection_serialize( + x_request_id=x_request_id, + check_collections_replay_request=check_collections_replay_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "ReplayResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _replay_check_collection_serialize( + self, + x_request_id, + check_collections_replay_request, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + if check_collections_replay_request is not None: + _body_params = check_collections_replay_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/internal/v1/troubleshooting/check-collections/replays', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/pfruck_contabo/api/internal_check_collection_templates_api.py b/pfruck_contabo/api/internal_check_collection_templates_api.py new file mode 100644 index 00000000..8ba68f8f --- /dev/null +++ b/pfruck_contabo/api/internal_check_collection_templates_api.py @@ -0,0 +1,842 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from datetime import datetime +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import List, Optional, Union +from typing_extensions import Annotated +from pfruck_contabo.models.check_collection_templates_get_response import CheckCollectionTemplatesGetResponse +from pfruck_contabo.models.check_collection_templates_list_response import CheckCollectionTemplatesListResponse + +from pfruck_contabo.api_client import ApiClient, RequestSerialized +from pfruck_contabo.api_response import ApiResponse +from pfruck_contabo.rest import RESTResponseType + + +class InternalCheckCollectionTemplatesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def get_check_collection_template( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + check_collection_template_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Check collection template's id")], + org_id: Annotated[StrictStr, Field(description="Org ID")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CheckCollectionTemplatesGetResponse: + """Get check + + Get a single check collection template by id + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param check_collection_template_id: Check collection template's id (required) + :type check_collection_template_id: float + :param org_id: Org ID (required) + :type org_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_check_collection_template_serialize( + x_request_id=x_request_id, + check_collection_template_id=check_collection_template_id, + org_id=org_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CheckCollectionTemplatesGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_check_collection_template_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + check_collection_template_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Check collection template's id")], + org_id: Annotated[StrictStr, Field(description="Org ID")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CheckCollectionTemplatesGetResponse]: + """Get check + + Get a single check collection template by id + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param check_collection_template_id: Check collection template's id (required) + :type check_collection_template_id: float + :param org_id: Org ID (required) + :type org_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_check_collection_template_serialize( + x_request_id=x_request_id, + check_collection_template_id=check_collection_template_id, + org_id=org_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CheckCollectionTemplatesGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_check_collection_template_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + check_collection_template_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Check collection template's id")], + org_id: Annotated[StrictStr, Field(description="Org ID")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get check + + Get a single check collection template by id + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param check_collection_template_id: Check collection template's id (required) + :type check_collection_template_id: float + :param org_id: Org ID (required) + :type org_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_check_collection_template_serialize( + x_request_id=x_request_id, + check_collection_template_id=check_collection_template_id, + org_id=org_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CheckCollectionTemplatesGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_check_collection_template_serialize( + self, + x_request_id, + check_collection_template_id, + org_id, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if check_collection_template_id is not None: + _path_params['checkCollectionTemplateId'] = check_collection_template_id + if org_id is not None: + _path_params['orgId'] = org_id + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/internal/v1/troubleshooting/check-collection-templates/{orgId}/{checkCollectionTemplateId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_check_collection_templates( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + org_ids: Annotated[List[StrictStr], Field(description="Org IDs")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + internal: Annotated[Optional[StrictBool], Field(description="Is check only internal (not shown to the customer)")] = None, + object_type: Annotated[Optional[StrictStr], Field(description="Object type for which the check template can be used")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + creation_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for created date")] = None, + creation_end_time: Annotated[Optional[datetime], Field(description="End of search time range for created date")] = None, + modification_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for modified date")] = None, + modification_end_time: Annotated[Optional[datetime], Field(description="End of search time range for modified date")] = None, + account_id: Annotated[Optional[StrictStr], Field(description="Filter by account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CheckCollectionTemplatesListResponse: + """List check collection templates + + List and filter all check collection templates + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param org_ids: Org IDs (required) + :type org_ids: List[str] + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param internal: Is check only internal (not shown to the customer) + :type internal: bool + :param object_type: Object type for which the check template can be used + :type object_type: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param creation_start_time: Start of search time range for created date + :type creation_start_time: datetime + :param creation_end_time: End of search time range for created date + :type creation_end_time: datetime + :param modification_start_time: Start of search time range for modified date + :type modification_start_time: datetime + :param modification_end_time: End of search time range for modified date + :type modification_end_time: datetime + :param account_id: Filter by account ID + :type account_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_check_collection_templates_serialize( + x_request_id=x_request_id, + org_ids=org_ids, + x_trace_id=x_trace_id, + internal=internal, + object_type=object_type, + page=page, + size=size, + order_by=order_by, + creation_start_time=creation_start_time, + creation_end_time=creation_end_time, + modification_start_time=modification_start_time, + modification_end_time=modification_end_time, + account_id=account_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CheckCollectionTemplatesListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_check_collection_templates_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + org_ids: Annotated[List[StrictStr], Field(description="Org IDs")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + internal: Annotated[Optional[StrictBool], Field(description="Is check only internal (not shown to the customer)")] = None, + object_type: Annotated[Optional[StrictStr], Field(description="Object type for which the check template can be used")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + creation_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for created date")] = None, + creation_end_time: Annotated[Optional[datetime], Field(description="End of search time range for created date")] = None, + modification_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for modified date")] = None, + modification_end_time: Annotated[Optional[datetime], Field(description="End of search time range for modified date")] = None, + account_id: Annotated[Optional[StrictStr], Field(description="Filter by account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CheckCollectionTemplatesListResponse]: + """List check collection templates + + List and filter all check collection templates + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param org_ids: Org IDs (required) + :type org_ids: List[str] + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param internal: Is check only internal (not shown to the customer) + :type internal: bool + :param object_type: Object type for which the check template can be used + :type object_type: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param creation_start_time: Start of search time range for created date + :type creation_start_time: datetime + :param creation_end_time: End of search time range for created date + :type creation_end_time: datetime + :param modification_start_time: Start of search time range for modified date + :type modification_start_time: datetime + :param modification_end_time: End of search time range for modified date + :type modification_end_time: datetime + :param account_id: Filter by account ID + :type account_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_check_collection_templates_serialize( + x_request_id=x_request_id, + org_ids=org_ids, + x_trace_id=x_trace_id, + internal=internal, + object_type=object_type, + page=page, + size=size, + order_by=order_by, + creation_start_time=creation_start_time, + creation_end_time=creation_end_time, + modification_start_time=modification_start_time, + modification_end_time=modification_end_time, + account_id=account_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CheckCollectionTemplatesListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_check_collection_templates_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + org_ids: Annotated[List[StrictStr], Field(description="Org IDs")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + internal: Annotated[Optional[StrictBool], Field(description="Is check only internal (not shown to the customer)")] = None, + object_type: Annotated[Optional[StrictStr], Field(description="Object type for which the check template can be used")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + creation_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for created date")] = None, + creation_end_time: Annotated[Optional[datetime], Field(description="End of search time range for created date")] = None, + modification_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for modified date")] = None, + modification_end_time: Annotated[Optional[datetime], Field(description="End of search time range for modified date")] = None, + account_id: Annotated[Optional[StrictStr], Field(description="Filter by account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List check collection templates + + List and filter all check collection templates + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param org_ids: Org IDs (required) + :type org_ids: List[str] + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param internal: Is check only internal (not shown to the customer) + :type internal: bool + :param object_type: Object type for which the check template can be used + :type object_type: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param creation_start_time: Start of search time range for created date + :type creation_start_time: datetime + :param creation_end_time: End of search time range for created date + :type creation_end_time: datetime + :param modification_start_time: Start of search time range for modified date + :type modification_start_time: datetime + :param modification_end_time: End of search time range for modified date + :type modification_end_time: datetime + :param account_id: Filter by account ID + :type account_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_check_collection_templates_serialize( + x_request_id=x_request_id, + org_ids=org_ids, + x_trace_id=x_trace_id, + internal=internal, + object_type=object_type, + page=page, + size=size, + order_by=order_by, + creation_start_time=creation_start_time, + creation_end_time=creation_end_time, + modification_start_time=modification_start_time, + modification_end_time=modification_end_time, + account_id=account_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CheckCollectionTemplatesListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_check_collection_templates_serialize( + self, + x_request_id, + org_ids, + x_trace_id, + internal, + object_type, + page, + size, + order_by, + creation_start_time, + creation_end_time, + modification_start_time, + modification_end_time, + account_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'orgIds': 'multi', + 'orderBy': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if internal is not None: + + _query_params.append(('internal', internal)) + + if object_type is not None: + + _query_params.append(('objectType', object_type)) + + if page is not None: + + _query_params.append(('page', page)) + + if size is not None: + + _query_params.append(('size', size)) + + if order_by is not None: + + _query_params.append(('orderBy', order_by)) + + if creation_start_time is not None: + if isinstance(creation_start_time, datetime): + _query_params.append( + ( + 'creationStartTime', + creation_start_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('creationStartTime', creation_start_time)) + + if creation_end_time is not None: + if isinstance(creation_end_time, datetime): + _query_params.append( + ( + 'creationEndTime', + creation_end_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('creationEndTime', creation_end_time)) + + if modification_start_time is not None: + if isinstance(modification_start_time, datetime): + _query_params.append( + ( + 'modificationStartTime', + modification_start_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('modificationStartTime', modification_start_time)) + + if modification_end_time is not None: + if isinstance(modification_end_time, datetime): + _query_params.append( + ( + 'modificationEndTime', + modification_end_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('modificationEndTime', modification_end_time)) + + if org_ids is not None: + + _query_params.append(('orgIds', org_ids)) + + if account_id is not None: + + _query_params.append(('accountId', account_id)) + + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/internal/v1/troubleshooting/check-collection-templates', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/pfruck_contabo/api/internal_check_collections_api.py b/pfruck_contabo/api/internal_check_collections_api.py new file mode 100644 index 00000000..eb81b117 --- /dev/null +++ b/pfruck_contabo/api/internal_check_collections_api.py @@ -0,0 +1,1529 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from datetime import datetime +from pydantic import Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import List, Optional, Union +from typing_extensions import Annotated +from pfruck_contabo.models.cancel_request import CancelRequest +from pfruck_contabo.models.check_collection_create_request import CheckCollectionCreateRequest +from pfruck_contabo.models.check_collections_get_response import CheckCollectionsGetResponse +from pfruck_contabo.models.check_collections_list_response import CheckCollectionsListResponse + +from pfruck_contabo.api_client import ApiClient, RequestSerialized +from pfruck_contabo.api_response import ApiResponse +from pfruck_contabo.rest import RESTResponseType + + +class InternalCheckCollectionsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def cancel_check_collection( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + check_collection_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Check collection's id")], + org_id: Annotated[StrictStr, Field(description="Org ID")], + cancel_request: CancelRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CheckCollectionsGetResponse: + """Cancel check collection + + Cancel check collection + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param check_collection_id: Check collection's id (required) + :type check_collection_id: float + :param org_id: Org ID (required) + :type org_id: str + :param cancel_request: (required) + :type cancel_request: CancelRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._cancel_check_collection_serialize( + x_request_id=x_request_id, + check_collection_id=check_collection_id, + org_id=org_id, + cancel_request=cancel_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CheckCollectionsGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def cancel_check_collection_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + check_collection_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Check collection's id")], + org_id: Annotated[StrictStr, Field(description="Org ID")], + cancel_request: CancelRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CheckCollectionsGetResponse]: + """Cancel check collection + + Cancel check collection + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param check_collection_id: Check collection's id (required) + :type check_collection_id: float + :param org_id: Org ID (required) + :type org_id: str + :param cancel_request: (required) + :type cancel_request: CancelRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._cancel_check_collection_serialize( + x_request_id=x_request_id, + check_collection_id=check_collection_id, + org_id=org_id, + cancel_request=cancel_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CheckCollectionsGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def cancel_check_collection_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + check_collection_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Check collection's id")], + org_id: Annotated[StrictStr, Field(description="Org ID")], + cancel_request: CancelRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Cancel check collection + + Cancel check collection + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param check_collection_id: Check collection's id (required) + :type check_collection_id: float + :param org_id: Org ID (required) + :type org_id: str + :param cancel_request: (required) + :type cancel_request: CancelRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._cancel_check_collection_serialize( + x_request_id=x_request_id, + check_collection_id=check_collection_id, + org_id=org_id, + cancel_request=cancel_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CheckCollectionsGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _cancel_check_collection_serialize( + self, + x_request_id, + check_collection_id, + org_id, + cancel_request, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if check_collection_id is not None: + _path_params['checkCollectionId'] = check_collection_id + if org_id is not None: + _path_params['orgId'] = org_id + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + if cancel_request is not None: + _body_params = cancel_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/internal/v1/troubleshooting/check-collections/{orgId}/{checkCollectionId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_check_collection( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + check_collection_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Check collection's id")], + org_id: Annotated[StrictStr, Field(description="Org ID")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + exclude_check_statuses: Annotated[Optional[List[StrictStr]], Field(description="Check statuses to exclude")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CheckCollectionsGetResponse: + """Get check collection + + Get a single check collection by id + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param check_collection_id: Check collection's id (required) + :type check_collection_id: float + :param org_id: Org ID (required) + :type org_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param exclude_check_statuses: Check statuses to exclude + :type exclude_check_statuses: List[str] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_check_collection_serialize( + x_request_id=x_request_id, + check_collection_id=check_collection_id, + org_id=org_id, + x_trace_id=x_trace_id, + exclude_check_statuses=exclude_check_statuses, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CheckCollectionsGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_check_collection_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + check_collection_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Check collection's id")], + org_id: Annotated[StrictStr, Field(description="Org ID")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + exclude_check_statuses: Annotated[Optional[List[StrictStr]], Field(description="Check statuses to exclude")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CheckCollectionsGetResponse]: + """Get check collection + + Get a single check collection by id + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param check_collection_id: Check collection's id (required) + :type check_collection_id: float + :param org_id: Org ID (required) + :type org_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param exclude_check_statuses: Check statuses to exclude + :type exclude_check_statuses: List[str] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_check_collection_serialize( + x_request_id=x_request_id, + check_collection_id=check_collection_id, + org_id=org_id, + x_trace_id=x_trace_id, + exclude_check_statuses=exclude_check_statuses, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CheckCollectionsGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_check_collection_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + check_collection_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Check collection's id")], + org_id: Annotated[StrictStr, Field(description="Org ID")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + exclude_check_statuses: Annotated[Optional[List[StrictStr]], Field(description="Check statuses to exclude")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get check collection + + Get a single check collection by id + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param check_collection_id: Check collection's id (required) + :type check_collection_id: float + :param org_id: Org ID (required) + :type org_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param exclude_check_statuses: Check statuses to exclude + :type exclude_check_statuses: List[str] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_check_collection_serialize( + x_request_id=x_request_id, + check_collection_id=check_collection_id, + org_id=org_id, + x_trace_id=x_trace_id, + exclude_check_statuses=exclude_check_statuses, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CheckCollectionsGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_check_collection_serialize( + self, + x_request_id, + check_collection_id, + org_id, + x_trace_id, + exclude_check_statuses, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'excludeCheckStatuses': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if check_collection_id is not None: + _path_params['checkCollectionId'] = check_collection_id + if org_id is not None: + _path_params['orgId'] = org_id + # process the query parameters + if exclude_check_statuses is not None: + + _query_params.append(('excludeCheckStatuses', exclude_check_statuses)) + + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/internal/v1/troubleshooting/check-collections/{orgId}/{checkCollectionId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_check_collections( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + org_ids: Annotated[List[StrictStr], Field(description="Org IDs")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + object_type: Annotated[Optional[StrictStr], Field(description="Object type to be handled")] = None, + object_id: Annotated[Optional[StrictStr], Field(description="ID of the object, to be handled")] = None, + check_collection_template_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Check Collection Template for this check collection")] = None, + exclude_check_statuses: Annotated[Optional[List[StrictStr]], Field(description="Check statuses to exclude")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + creation_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for created date")] = None, + creation_end_time: Annotated[Optional[datetime], Field(description="End of search time range for created date")] = None, + modification_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for modified date")] = None, + modification_end_time: Annotated[Optional[datetime], Field(description="End of search time range for modified date")] = None, + account_id: Annotated[Optional[StrictStr], Field(description="Filter by account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CheckCollectionsListResponse: + """List check collections + + List and filter all check collections + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param org_ids: Org IDs (required) + :type org_ids: List[str] + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param object_type: Object type to be handled + :type object_type: str + :param object_id: ID of the object, to be handled + :type object_id: str + :param check_collection_template_id: Check Collection Template for this check collection + :type check_collection_template_id: float + :param exclude_check_statuses: Check statuses to exclude + :type exclude_check_statuses: List[str] + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param creation_start_time: Start of search time range for created date + :type creation_start_time: datetime + :param creation_end_time: End of search time range for created date + :type creation_end_time: datetime + :param modification_start_time: Start of search time range for modified date + :type modification_start_time: datetime + :param modification_end_time: End of search time range for modified date + :type modification_end_time: datetime + :param account_id: Filter by account ID + :type account_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_check_collections_serialize( + x_request_id=x_request_id, + org_ids=org_ids, + x_trace_id=x_trace_id, + object_type=object_type, + object_id=object_id, + check_collection_template_id=check_collection_template_id, + exclude_check_statuses=exclude_check_statuses, + page=page, + size=size, + order_by=order_by, + creation_start_time=creation_start_time, + creation_end_time=creation_end_time, + modification_start_time=modification_start_time, + modification_end_time=modification_end_time, + account_id=account_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CheckCollectionsListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_check_collections_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + org_ids: Annotated[List[StrictStr], Field(description="Org IDs")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + object_type: Annotated[Optional[StrictStr], Field(description="Object type to be handled")] = None, + object_id: Annotated[Optional[StrictStr], Field(description="ID of the object, to be handled")] = None, + check_collection_template_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Check Collection Template for this check collection")] = None, + exclude_check_statuses: Annotated[Optional[List[StrictStr]], Field(description="Check statuses to exclude")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + creation_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for created date")] = None, + creation_end_time: Annotated[Optional[datetime], Field(description="End of search time range for created date")] = None, + modification_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for modified date")] = None, + modification_end_time: Annotated[Optional[datetime], Field(description="End of search time range for modified date")] = None, + account_id: Annotated[Optional[StrictStr], Field(description="Filter by account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CheckCollectionsListResponse]: + """List check collections + + List and filter all check collections + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param org_ids: Org IDs (required) + :type org_ids: List[str] + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param object_type: Object type to be handled + :type object_type: str + :param object_id: ID of the object, to be handled + :type object_id: str + :param check_collection_template_id: Check Collection Template for this check collection + :type check_collection_template_id: float + :param exclude_check_statuses: Check statuses to exclude + :type exclude_check_statuses: List[str] + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param creation_start_time: Start of search time range for created date + :type creation_start_time: datetime + :param creation_end_time: End of search time range for created date + :type creation_end_time: datetime + :param modification_start_time: Start of search time range for modified date + :type modification_start_time: datetime + :param modification_end_time: End of search time range for modified date + :type modification_end_time: datetime + :param account_id: Filter by account ID + :type account_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_check_collections_serialize( + x_request_id=x_request_id, + org_ids=org_ids, + x_trace_id=x_trace_id, + object_type=object_type, + object_id=object_id, + check_collection_template_id=check_collection_template_id, + exclude_check_statuses=exclude_check_statuses, + page=page, + size=size, + order_by=order_by, + creation_start_time=creation_start_time, + creation_end_time=creation_end_time, + modification_start_time=modification_start_time, + modification_end_time=modification_end_time, + account_id=account_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CheckCollectionsListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_check_collections_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + org_ids: Annotated[List[StrictStr], Field(description="Org IDs")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + object_type: Annotated[Optional[StrictStr], Field(description="Object type to be handled")] = None, + object_id: Annotated[Optional[StrictStr], Field(description="ID of the object, to be handled")] = None, + check_collection_template_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Check Collection Template for this check collection")] = None, + exclude_check_statuses: Annotated[Optional[List[StrictStr]], Field(description="Check statuses to exclude")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + creation_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for created date")] = None, + creation_end_time: Annotated[Optional[datetime], Field(description="End of search time range for created date")] = None, + modification_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for modified date")] = None, + modification_end_time: Annotated[Optional[datetime], Field(description="End of search time range for modified date")] = None, + account_id: Annotated[Optional[StrictStr], Field(description="Filter by account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List check collections + + List and filter all check collections + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param org_ids: Org IDs (required) + :type org_ids: List[str] + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param object_type: Object type to be handled + :type object_type: str + :param object_id: ID of the object, to be handled + :type object_id: str + :param check_collection_template_id: Check Collection Template for this check collection + :type check_collection_template_id: float + :param exclude_check_statuses: Check statuses to exclude + :type exclude_check_statuses: List[str] + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param creation_start_time: Start of search time range for created date + :type creation_start_time: datetime + :param creation_end_time: End of search time range for created date + :type creation_end_time: datetime + :param modification_start_time: Start of search time range for modified date + :type modification_start_time: datetime + :param modification_end_time: End of search time range for modified date + :type modification_end_time: datetime + :param account_id: Filter by account ID + :type account_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_check_collections_serialize( + x_request_id=x_request_id, + org_ids=org_ids, + x_trace_id=x_trace_id, + object_type=object_type, + object_id=object_id, + check_collection_template_id=check_collection_template_id, + exclude_check_statuses=exclude_check_statuses, + page=page, + size=size, + order_by=order_by, + creation_start_time=creation_start_time, + creation_end_time=creation_end_time, + modification_start_time=modification_start_time, + modification_end_time=modification_end_time, + account_id=account_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CheckCollectionsListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_check_collections_serialize( + self, + x_request_id, + org_ids, + x_trace_id, + object_type, + object_id, + check_collection_template_id, + exclude_check_statuses, + page, + size, + order_by, + creation_start_time, + creation_end_time, + modification_start_time, + modification_end_time, + account_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'orgIds': 'multi', + 'excludeCheckStatuses': 'multi', + 'orderBy': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if object_type is not None: + + _query_params.append(('objectType', object_type)) + + if object_id is not None: + + _query_params.append(('objectId', object_id)) + + if check_collection_template_id is not None: + + _query_params.append(('checkCollectionTemplateId', check_collection_template_id)) + + if exclude_check_statuses is not None: + + _query_params.append(('excludeCheckStatuses', exclude_check_statuses)) + + if page is not None: + + _query_params.append(('page', page)) + + if size is not None: + + _query_params.append(('size', size)) + + if order_by is not None: + + _query_params.append(('orderBy', order_by)) + + if creation_start_time is not None: + if isinstance(creation_start_time, datetime): + _query_params.append( + ( + 'creationStartTime', + creation_start_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('creationStartTime', creation_start_time)) + + if creation_end_time is not None: + if isinstance(creation_end_time, datetime): + _query_params.append( + ( + 'creationEndTime', + creation_end_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('creationEndTime', creation_end_time)) + + if modification_start_time is not None: + if isinstance(modification_start_time, datetime): + _query_params.append( + ( + 'modificationStartTime', + modification_start_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('modificationStartTime', modification_start_time)) + + if modification_end_time is not None: + if isinstance(modification_end_time, datetime): + _query_params.append( + ( + 'modificationEndTime', + modification_end_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('modificationEndTime', modification_end_time)) + + if org_ids is not None: + + _query_params.append(('orgIds', org_ids)) + + if account_id is not None: + + _query_params.append(('accountId', account_id)) + + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/internal/v1/troubleshooting/check-collections', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def start_check_collection( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + check_collection_create_request: CheckCollectionCreateRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CheckCollectionsGetResponse: + """Start check collection + + Start a new check collection + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param check_collection_create_request: (required) + :type check_collection_create_request: CheckCollectionCreateRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._start_check_collection_serialize( + x_request_id=x_request_id, + check_collection_create_request=check_collection_create_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CheckCollectionsGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def start_check_collection_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + check_collection_create_request: CheckCollectionCreateRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CheckCollectionsGetResponse]: + """Start check collection + + Start a new check collection + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param check_collection_create_request: (required) + :type check_collection_create_request: CheckCollectionCreateRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._start_check_collection_serialize( + x_request_id=x_request_id, + check_collection_create_request=check_collection_create_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CheckCollectionsGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def start_check_collection_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + check_collection_create_request: CheckCollectionCreateRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Start check collection + + Start a new check collection + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param check_collection_create_request: (required) + :type check_collection_create_request: CheckCollectionCreateRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._start_check_collection_serialize( + x_request_id=x_request_id, + check_collection_create_request=check_collection_create_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CheckCollectionsGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _start_check_collection_serialize( + self, + x_request_id, + check_collection_create_request, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + if check_collection_create_request is not None: + _body_params = check_collection_create_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/internal/v1/troubleshooting/check-collections', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/pfruck_contabo/api/internal_check_replay_api.py b/pfruck_contabo/api/internal_check_replay_api.py new file mode 100644 index 00000000..aaa930e0 --- /dev/null +++ b/pfruck_contabo/api/internal_check_replay_api.py @@ -0,0 +1,341 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr, field_validator +from typing import Optional +from typing_extensions import Annotated +from pfruck_contabo.models.checks_replay_request import ChecksReplayRequest +from pfruck_contabo.models.replay_response import ReplayResponse + +from pfruck_contabo.api_client import ApiClient, RequestSerialized +from pfruck_contabo.api_response import ApiResponse +from pfruck_contabo.rest import RESTResponseType + + +class InternalCheckReplayApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def replay_check( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + checks_replay_request: ChecksReplayRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ReplayResponse: + """Replay changes for Check + + Replay changes for Check + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param checks_replay_request: (required) + :type checks_replay_request: ChecksReplayRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._replay_check_serialize( + x_request_id=x_request_id, + checks_replay_request=checks_replay_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "ReplayResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def replay_check_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + checks_replay_request: ChecksReplayRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ReplayResponse]: + """Replay changes for Check + + Replay changes for Check + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param checks_replay_request: (required) + :type checks_replay_request: ChecksReplayRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._replay_check_serialize( + x_request_id=x_request_id, + checks_replay_request=checks_replay_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "ReplayResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def replay_check_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + checks_replay_request: ChecksReplayRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Replay changes for Check + + Replay changes for Check + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param checks_replay_request: (required) + :type checks_replay_request: ChecksReplayRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._replay_check_serialize( + x_request_id=x_request_id, + checks_replay_request=checks_replay_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "ReplayResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _replay_check_serialize( + self, + x_request_id, + checks_replay_request, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + if checks_replay_request is not None: + _body_params = checks_replay_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/internal/v1/troubleshooting/checks/replays', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/pfruck_contabo/api/internal_check_templates_api.py b/pfruck_contabo/api/internal_check_templates_api.py new file mode 100644 index 00000000..7c1459a1 --- /dev/null +++ b/pfruck_contabo/api/internal_check_templates_api.py @@ -0,0 +1,876 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from datetime import datetime +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import List, Optional, Union +from typing_extensions import Annotated +from pfruck_contabo.models.check_templates_get_response import CheckTemplatesGetResponse +from pfruck_contabo.models.check_templates_list_response import CheckTemplatesListResponse + +from pfruck_contabo.api_client import ApiClient, RequestSerialized +from pfruck_contabo.api_response import ApiResponse +from pfruck_contabo.rest import RESTResponseType + + +class InternalCheckTemplatesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def get_check_template( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + org_id: Annotated[StrictStr, Field(description="Org ID")], + check_template_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Check template's id")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CheckTemplatesGetResponse: + """Get check + + Get a single check template by id + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param org_id: Org ID (required) + :type org_id: str + :param check_template_id: Check template's id (required) + :type check_template_id: float + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_check_template_serialize( + x_request_id=x_request_id, + org_id=org_id, + check_template_id=check_template_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CheckTemplatesGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_check_template_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + org_id: Annotated[StrictStr, Field(description="Org ID")], + check_template_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Check template's id")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CheckTemplatesGetResponse]: + """Get check + + Get a single check template by id + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param org_id: Org ID (required) + :type org_id: str + :param check_template_id: Check template's id (required) + :type check_template_id: float + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_check_template_serialize( + x_request_id=x_request_id, + org_id=org_id, + check_template_id=check_template_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CheckTemplatesGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_check_template_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + org_id: Annotated[StrictStr, Field(description="Org ID")], + check_template_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Check template's id")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get check + + Get a single check template by id + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param org_id: Org ID (required) + :type org_id: str + :param check_template_id: Check template's id (required) + :type check_template_id: float + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_check_template_serialize( + x_request_id=x_request_id, + org_id=org_id, + check_template_id=check_template_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CheckTemplatesGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_check_template_serialize( + self, + x_request_id, + org_id, + check_template_id, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if org_id is not None: + _path_params['orgId'] = org_id + if check_template_id is not None: + _path_params['checkTemplateId'] = check_template_id + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/internal/v1/troubleshooting/check-templates/{orgId}/{checkTemplateId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_check_templates( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + org_ids: Annotated[List[StrictStr], Field(description="Org IDs")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + creation_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for created date")] = None, + creation_end_time: Annotated[Optional[datetime], Field(description="End of search time range for created date")] = None, + modification_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for modified date")] = None, + modification_end_time: Annotated[Optional[datetime], Field(description="End of search time range for modified date")] = None, + account_id: Annotated[Optional[StrictStr], Field(description="Filter by account ID")] = None, + internal: Annotated[Optional[StrictBool], Field(description="Is check only internal (not shown to the customer)")] = None, + object_type: Annotated[Optional[StrictStr], Field(description="Object type for which the check template can be used")] = None, + collector_class: Annotated[Optional[StrictStr], Field(description="Class used to collect the required information for the check")] = None, + check_class: Annotated[Optional[StrictStr], Field(description="Class used to perform the check")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CheckTemplatesListResponse: + """List check templates + + List and filter all check templates + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param org_ids: Org IDs (required) + :type org_ids: List[str] + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param creation_start_time: Start of search time range for created date + :type creation_start_time: datetime + :param creation_end_time: End of search time range for created date + :type creation_end_time: datetime + :param modification_start_time: Start of search time range for modified date + :type modification_start_time: datetime + :param modification_end_time: End of search time range for modified date + :type modification_end_time: datetime + :param account_id: Filter by account ID + :type account_id: str + :param internal: Is check only internal (not shown to the customer) + :type internal: bool + :param object_type: Object type for which the check template can be used + :type object_type: str + :param collector_class: Class used to collect the required information for the check + :type collector_class: str + :param check_class: Class used to perform the check + :type check_class: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_check_templates_serialize( + x_request_id=x_request_id, + org_ids=org_ids, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + creation_start_time=creation_start_time, + creation_end_time=creation_end_time, + modification_start_time=modification_start_time, + modification_end_time=modification_end_time, + account_id=account_id, + internal=internal, + object_type=object_type, + collector_class=collector_class, + check_class=check_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CheckTemplatesListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_check_templates_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + org_ids: Annotated[List[StrictStr], Field(description="Org IDs")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + creation_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for created date")] = None, + creation_end_time: Annotated[Optional[datetime], Field(description="End of search time range for created date")] = None, + modification_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for modified date")] = None, + modification_end_time: Annotated[Optional[datetime], Field(description="End of search time range for modified date")] = None, + account_id: Annotated[Optional[StrictStr], Field(description="Filter by account ID")] = None, + internal: Annotated[Optional[StrictBool], Field(description="Is check only internal (not shown to the customer)")] = None, + object_type: Annotated[Optional[StrictStr], Field(description="Object type for which the check template can be used")] = None, + collector_class: Annotated[Optional[StrictStr], Field(description="Class used to collect the required information for the check")] = None, + check_class: Annotated[Optional[StrictStr], Field(description="Class used to perform the check")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CheckTemplatesListResponse]: + """List check templates + + List and filter all check templates + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param org_ids: Org IDs (required) + :type org_ids: List[str] + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param creation_start_time: Start of search time range for created date + :type creation_start_time: datetime + :param creation_end_time: End of search time range for created date + :type creation_end_time: datetime + :param modification_start_time: Start of search time range for modified date + :type modification_start_time: datetime + :param modification_end_time: End of search time range for modified date + :type modification_end_time: datetime + :param account_id: Filter by account ID + :type account_id: str + :param internal: Is check only internal (not shown to the customer) + :type internal: bool + :param object_type: Object type for which the check template can be used + :type object_type: str + :param collector_class: Class used to collect the required information for the check + :type collector_class: str + :param check_class: Class used to perform the check + :type check_class: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_check_templates_serialize( + x_request_id=x_request_id, + org_ids=org_ids, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + creation_start_time=creation_start_time, + creation_end_time=creation_end_time, + modification_start_time=modification_start_time, + modification_end_time=modification_end_time, + account_id=account_id, + internal=internal, + object_type=object_type, + collector_class=collector_class, + check_class=check_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CheckTemplatesListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_check_templates_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + org_ids: Annotated[List[StrictStr], Field(description="Org IDs")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + creation_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for created date")] = None, + creation_end_time: Annotated[Optional[datetime], Field(description="End of search time range for created date")] = None, + modification_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for modified date")] = None, + modification_end_time: Annotated[Optional[datetime], Field(description="End of search time range for modified date")] = None, + account_id: Annotated[Optional[StrictStr], Field(description="Filter by account ID")] = None, + internal: Annotated[Optional[StrictBool], Field(description="Is check only internal (not shown to the customer)")] = None, + object_type: Annotated[Optional[StrictStr], Field(description="Object type for which the check template can be used")] = None, + collector_class: Annotated[Optional[StrictStr], Field(description="Class used to collect the required information for the check")] = None, + check_class: Annotated[Optional[StrictStr], Field(description="Class used to perform the check")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List check templates + + List and filter all check templates + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param org_ids: Org IDs (required) + :type org_ids: List[str] + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param creation_start_time: Start of search time range for created date + :type creation_start_time: datetime + :param creation_end_time: End of search time range for created date + :type creation_end_time: datetime + :param modification_start_time: Start of search time range for modified date + :type modification_start_time: datetime + :param modification_end_time: End of search time range for modified date + :type modification_end_time: datetime + :param account_id: Filter by account ID + :type account_id: str + :param internal: Is check only internal (not shown to the customer) + :type internal: bool + :param object_type: Object type for which the check template can be used + :type object_type: str + :param collector_class: Class used to collect the required information for the check + :type collector_class: str + :param check_class: Class used to perform the check + :type check_class: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_check_templates_serialize( + x_request_id=x_request_id, + org_ids=org_ids, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + creation_start_time=creation_start_time, + creation_end_time=creation_end_time, + modification_start_time=modification_start_time, + modification_end_time=modification_end_time, + account_id=account_id, + internal=internal, + object_type=object_type, + collector_class=collector_class, + check_class=check_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CheckTemplatesListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_check_templates_serialize( + self, + x_request_id, + org_ids, + x_trace_id, + page, + size, + order_by, + creation_start_time, + creation_end_time, + modification_start_time, + modification_end_time, + account_id, + internal, + object_type, + collector_class, + check_class, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'orgIds': 'multi', + 'orderBy': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if size is not None: + + _query_params.append(('size', size)) + + if order_by is not None: + + _query_params.append(('orderBy', order_by)) + + if creation_start_time is not None: + if isinstance(creation_start_time, datetime): + _query_params.append( + ( + 'creationStartTime', + creation_start_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('creationStartTime', creation_start_time)) + + if creation_end_time is not None: + if isinstance(creation_end_time, datetime): + _query_params.append( + ( + 'creationEndTime', + creation_end_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('creationEndTime', creation_end_time)) + + if modification_start_time is not None: + if isinstance(modification_start_time, datetime): + _query_params.append( + ( + 'modificationStartTime', + modification_start_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('modificationStartTime', modification_start_time)) + + if modification_end_time is not None: + if isinstance(modification_end_time, datetime): + _query_params.append( + ( + 'modificationEndTime', + modification_end_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('modificationEndTime', modification_end_time)) + + if org_ids is not None: + + _query_params.append(('orgIds', org_ids)) + + if account_id is not None: + + _query_params.append(('accountId', account_id)) + + if internal is not None: + + _query_params.append(('internal', internal)) + + if object_type is not None: + + _query_params.append(('objectType', object_type)) + + if collector_class is not None: + + _query_params.append(('collectorClass', collector_class)) + + if check_class is not None: + + _query_params.append(('checkClass', check_class)) + + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/internal/v1/troubleshooting/check-templates', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/pfruck_contabo/api/internal_checks_api.py b/pfruck_contabo/api/internal_checks_api.py new file mode 100644 index 00000000..9f14ca4f --- /dev/null +++ b/pfruck_contabo/api/internal_checks_api.py @@ -0,0 +1,1527 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from datetime import datetime +from pydantic import Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import List, Optional, Union +from typing_extensions import Annotated +from pfruck_contabo.models.cancel_request import CancelRequest +from pfruck_contabo.models.check_create_request import CheckCreateRequest +from pfruck_contabo.models.checks_get_response import ChecksGetResponse +from pfruck_contabo.models.checks_list_response import ChecksListResponse + +from pfruck_contabo.api_client import ApiClient, RequestSerialized +from pfruck_contabo.api_response import ApiResponse +from pfruck_contabo.rest import RESTResponseType + + +class InternalChecksApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def cancel_check( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + check_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Check's id")], + org_id: Annotated[StrictStr, Field(description="Org ID")], + cancel_request: CancelRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ChecksGetResponse: + """Cancel check + + Cancel check + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param check_id: Check's id (required) + :type check_id: float + :param org_id: Org ID (required) + :type org_id: str + :param cancel_request: (required) + :type cancel_request: CancelRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._cancel_check_serialize( + x_request_id=x_request_id, + check_id=check_id, + org_id=org_id, + cancel_request=cancel_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ChecksGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def cancel_check_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + check_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Check's id")], + org_id: Annotated[StrictStr, Field(description="Org ID")], + cancel_request: CancelRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ChecksGetResponse]: + """Cancel check + + Cancel check + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param check_id: Check's id (required) + :type check_id: float + :param org_id: Org ID (required) + :type org_id: str + :param cancel_request: (required) + :type cancel_request: CancelRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._cancel_check_serialize( + x_request_id=x_request_id, + check_id=check_id, + org_id=org_id, + cancel_request=cancel_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ChecksGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def cancel_check_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + check_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Check's id")], + org_id: Annotated[StrictStr, Field(description="Org ID")], + cancel_request: CancelRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Cancel check + + Cancel check + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param check_id: Check's id (required) + :type check_id: float + :param org_id: Org ID (required) + :type org_id: str + :param cancel_request: (required) + :type cancel_request: CancelRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._cancel_check_serialize( + x_request_id=x_request_id, + check_id=check_id, + org_id=org_id, + cancel_request=cancel_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ChecksGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _cancel_check_serialize( + self, + x_request_id, + check_id, + org_id, + cancel_request, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if check_id is not None: + _path_params['checkId'] = check_id + if org_id is not None: + _path_params['orgId'] = org_id + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + if cancel_request is not None: + _body_params = cancel_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/internal/v1/troubleshooting/checks/{orgId}/{checkId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_check( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + check_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Check's id")], + org_id: Annotated[StrictStr, Field(description="Org ID")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ChecksGetResponse: + """Get check + + Get a single check by id + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param check_id: Check's id (required) + :type check_id: float + :param org_id: Org ID (required) + :type org_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_check_serialize( + x_request_id=x_request_id, + check_id=check_id, + org_id=org_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ChecksGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_check_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + check_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Check's id")], + org_id: Annotated[StrictStr, Field(description="Org ID")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ChecksGetResponse]: + """Get check + + Get a single check by id + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param check_id: Check's id (required) + :type check_id: float + :param org_id: Org ID (required) + :type org_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_check_serialize( + x_request_id=x_request_id, + check_id=check_id, + org_id=org_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ChecksGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_check_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + check_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Check's id")], + org_id: Annotated[StrictStr, Field(description="Org ID")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get check + + Get a single check by id + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param check_id: Check's id (required) + :type check_id: float + :param org_id: Org ID (required) + :type org_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_check_serialize( + x_request_id=x_request_id, + check_id=check_id, + org_id=org_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ChecksGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_check_serialize( + self, + x_request_id, + check_id, + org_id, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if check_id is not None: + _path_params['checkId'] = check_id + if org_id is not None: + _path_params['orgId'] = org_id + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/internal/v1/troubleshooting/checks/{orgId}/{checkId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_checks( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + org_ids: Annotated[List[StrictStr], Field(description="Org IDs")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + object_type: Annotated[Optional[StrictStr], Field(description="Object type to be handled")] = None, + object_id: Annotated[Optional[StrictStr], Field(description="ID of the object, to be handled")] = None, + status: Annotated[Optional[StrictStr], Field(description="Status of the handle")] = None, + check_collection_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="ID of check collection if started in scope of a collection")] = None, + check_template_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Check Template for this check")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + creation_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for created date")] = None, + creation_end_time: Annotated[Optional[datetime], Field(description="End of search time range for created date")] = None, + modification_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for modified date")] = None, + modification_end_time: Annotated[Optional[datetime], Field(description="End of search time range for modified date")] = None, + account_id: Annotated[Optional[StrictStr], Field(description="Filter by account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ChecksListResponse: + """List check + + List and filter all checks + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param org_ids: Org IDs (required) + :type org_ids: List[str] + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param object_type: Object type to be handled + :type object_type: str + :param object_id: ID of the object, to be handled + :type object_id: str + :param status: Status of the handle + :type status: str + :param check_collection_id: ID of check collection if started in scope of a collection + :type check_collection_id: float + :param check_template_id: Check Template for this check + :type check_template_id: float + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param creation_start_time: Start of search time range for created date + :type creation_start_time: datetime + :param creation_end_time: End of search time range for created date + :type creation_end_time: datetime + :param modification_start_time: Start of search time range for modified date + :type modification_start_time: datetime + :param modification_end_time: End of search time range for modified date + :type modification_end_time: datetime + :param account_id: Filter by account ID + :type account_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_checks_serialize( + x_request_id=x_request_id, + org_ids=org_ids, + x_trace_id=x_trace_id, + object_type=object_type, + object_id=object_id, + status=status, + check_collection_id=check_collection_id, + check_template_id=check_template_id, + page=page, + size=size, + order_by=order_by, + creation_start_time=creation_start_time, + creation_end_time=creation_end_time, + modification_start_time=modification_start_time, + modification_end_time=modification_end_time, + account_id=account_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ChecksListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_checks_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + org_ids: Annotated[List[StrictStr], Field(description="Org IDs")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + object_type: Annotated[Optional[StrictStr], Field(description="Object type to be handled")] = None, + object_id: Annotated[Optional[StrictStr], Field(description="ID of the object, to be handled")] = None, + status: Annotated[Optional[StrictStr], Field(description="Status of the handle")] = None, + check_collection_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="ID of check collection if started in scope of a collection")] = None, + check_template_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Check Template for this check")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + creation_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for created date")] = None, + creation_end_time: Annotated[Optional[datetime], Field(description="End of search time range for created date")] = None, + modification_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for modified date")] = None, + modification_end_time: Annotated[Optional[datetime], Field(description="End of search time range for modified date")] = None, + account_id: Annotated[Optional[StrictStr], Field(description="Filter by account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ChecksListResponse]: + """List check + + List and filter all checks + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param org_ids: Org IDs (required) + :type org_ids: List[str] + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param object_type: Object type to be handled + :type object_type: str + :param object_id: ID of the object, to be handled + :type object_id: str + :param status: Status of the handle + :type status: str + :param check_collection_id: ID of check collection if started in scope of a collection + :type check_collection_id: float + :param check_template_id: Check Template for this check + :type check_template_id: float + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param creation_start_time: Start of search time range for created date + :type creation_start_time: datetime + :param creation_end_time: End of search time range for created date + :type creation_end_time: datetime + :param modification_start_time: Start of search time range for modified date + :type modification_start_time: datetime + :param modification_end_time: End of search time range for modified date + :type modification_end_time: datetime + :param account_id: Filter by account ID + :type account_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_checks_serialize( + x_request_id=x_request_id, + org_ids=org_ids, + x_trace_id=x_trace_id, + object_type=object_type, + object_id=object_id, + status=status, + check_collection_id=check_collection_id, + check_template_id=check_template_id, + page=page, + size=size, + order_by=order_by, + creation_start_time=creation_start_time, + creation_end_time=creation_end_time, + modification_start_time=modification_start_time, + modification_end_time=modification_end_time, + account_id=account_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ChecksListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_checks_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + org_ids: Annotated[List[StrictStr], Field(description="Org IDs")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + object_type: Annotated[Optional[StrictStr], Field(description="Object type to be handled")] = None, + object_id: Annotated[Optional[StrictStr], Field(description="ID of the object, to be handled")] = None, + status: Annotated[Optional[StrictStr], Field(description="Status of the handle")] = None, + check_collection_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="ID of check collection if started in scope of a collection")] = None, + check_template_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Check Template for this check")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + creation_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for created date")] = None, + creation_end_time: Annotated[Optional[datetime], Field(description="End of search time range for created date")] = None, + modification_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for modified date")] = None, + modification_end_time: Annotated[Optional[datetime], Field(description="End of search time range for modified date")] = None, + account_id: Annotated[Optional[StrictStr], Field(description="Filter by account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List check + + List and filter all checks + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param org_ids: Org IDs (required) + :type org_ids: List[str] + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param object_type: Object type to be handled + :type object_type: str + :param object_id: ID of the object, to be handled + :type object_id: str + :param status: Status of the handle + :type status: str + :param check_collection_id: ID of check collection if started in scope of a collection + :type check_collection_id: float + :param check_template_id: Check Template for this check + :type check_template_id: float + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param creation_start_time: Start of search time range for created date + :type creation_start_time: datetime + :param creation_end_time: End of search time range for created date + :type creation_end_time: datetime + :param modification_start_time: Start of search time range for modified date + :type modification_start_time: datetime + :param modification_end_time: End of search time range for modified date + :type modification_end_time: datetime + :param account_id: Filter by account ID + :type account_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_checks_serialize( + x_request_id=x_request_id, + org_ids=org_ids, + x_trace_id=x_trace_id, + object_type=object_type, + object_id=object_id, + status=status, + check_collection_id=check_collection_id, + check_template_id=check_template_id, + page=page, + size=size, + order_by=order_by, + creation_start_time=creation_start_time, + creation_end_time=creation_end_time, + modification_start_time=modification_start_time, + modification_end_time=modification_end_time, + account_id=account_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ChecksListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_checks_serialize( + self, + x_request_id, + org_ids, + x_trace_id, + object_type, + object_id, + status, + check_collection_id, + check_template_id, + page, + size, + order_by, + creation_start_time, + creation_end_time, + modification_start_time, + modification_end_time, + account_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'orgIds': 'multi', + 'orderBy': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if object_type is not None: + + _query_params.append(('objectType', object_type)) + + if object_id is not None: + + _query_params.append(('objectId', object_id)) + + if status is not None: + + _query_params.append(('status', status)) + + if check_collection_id is not None: + + _query_params.append(('checkCollectionId', check_collection_id)) + + if check_template_id is not None: + + _query_params.append(('checkTemplateId', check_template_id)) + + if page is not None: + + _query_params.append(('page', page)) + + if size is not None: + + _query_params.append(('size', size)) + + if order_by is not None: + + _query_params.append(('orderBy', order_by)) + + if creation_start_time is not None: + if isinstance(creation_start_time, datetime): + _query_params.append( + ( + 'creationStartTime', + creation_start_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('creationStartTime', creation_start_time)) + + if creation_end_time is not None: + if isinstance(creation_end_time, datetime): + _query_params.append( + ( + 'creationEndTime', + creation_end_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('creationEndTime', creation_end_time)) + + if modification_start_time is not None: + if isinstance(modification_start_time, datetime): + _query_params.append( + ( + 'modificationStartTime', + modification_start_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('modificationStartTime', modification_start_time)) + + if modification_end_time is not None: + if isinstance(modification_end_time, datetime): + _query_params.append( + ( + 'modificationEndTime', + modification_end_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('modificationEndTime', modification_end_time)) + + if org_ids is not None: + + _query_params.append(('orgIds', org_ids)) + + if account_id is not None: + + _query_params.append(('accountId', account_id)) + + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/internal/v1/troubleshooting/checks', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def start_check( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + check_create_request: CheckCreateRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ChecksGetResponse: + """Start check + + Start a new check + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param check_create_request: (required) + :type check_create_request: CheckCreateRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._start_check_serialize( + x_request_id=x_request_id, + check_create_request=check_create_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ChecksGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def start_check_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + check_create_request: CheckCreateRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ChecksGetResponse]: + """Start check + + Start a new check + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param check_create_request: (required) + :type check_create_request: CheckCreateRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._start_check_serialize( + x_request_id=x_request_id, + check_create_request=check_create_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ChecksGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def start_check_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + check_create_request: CheckCreateRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Start check + + Start a new check + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param check_create_request: (required) + :type check_create_request: CheckCreateRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._start_check_serialize( + x_request_id=x_request_id, + check_create_request=check_create_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ChecksGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _start_check_serialize( + self, + x_request_id, + check_create_request, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + if check_create_request is not None: + _body_params = check_create_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/internal/v1/troubleshooting/checks', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/pfruck_contabo/api/internal_remedies_api.py b/pfruck_contabo/api/internal_remedies_api.py new file mode 100644 index 00000000..3e88246e --- /dev/null +++ b/pfruck_contabo/api/internal_remedies_api.py @@ -0,0 +1,1527 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from datetime import datetime +from pydantic import Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import List, Optional, Union +from typing_extensions import Annotated +from pfruck_contabo.models.cancel_request import CancelRequest +from pfruck_contabo.models.remedies_create_request import RemediesCreateRequest +from pfruck_contabo.models.remedies_get_response import RemediesGetResponse +from pfruck_contabo.models.remedies_list_response import RemediesListResponse + +from pfruck_contabo.api_client import ApiClient, RequestSerialized +from pfruck_contabo.api_response import ApiResponse +from pfruck_contabo.rest import RESTResponseType + + +class InternalRemediesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def cancel_remedy( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + remedy_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Remedy's id")], + org_id: Annotated[StrictStr, Field(description="Org ID")], + cancel_request: CancelRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RemediesGetResponse: + """Cancel remedy + + Cancel remedy + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param remedy_id: Remedy's id (required) + :type remedy_id: float + :param org_id: Org ID (required) + :type org_id: str + :param cancel_request: (required) + :type cancel_request: CancelRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._cancel_remedy_serialize( + x_request_id=x_request_id, + remedy_id=remedy_id, + org_id=org_id, + cancel_request=cancel_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RemediesGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def cancel_remedy_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + remedy_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Remedy's id")], + org_id: Annotated[StrictStr, Field(description="Org ID")], + cancel_request: CancelRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[RemediesGetResponse]: + """Cancel remedy + + Cancel remedy + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param remedy_id: Remedy's id (required) + :type remedy_id: float + :param org_id: Org ID (required) + :type org_id: str + :param cancel_request: (required) + :type cancel_request: CancelRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._cancel_remedy_serialize( + x_request_id=x_request_id, + remedy_id=remedy_id, + org_id=org_id, + cancel_request=cancel_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RemediesGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def cancel_remedy_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + remedy_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Remedy's id")], + org_id: Annotated[StrictStr, Field(description="Org ID")], + cancel_request: CancelRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Cancel remedy + + Cancel remedy + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param remedy_id: Remedy's id (required) + :type remedy_id: float + :param org_id: Org ID (required) + :type org_id: str + :param cancel_request: (required) + :type cancel_request: CancelRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._cancel_remedy_serialize( + x_request_id=x_request_id, + remedy_id=remedy_id, + org_id=org_id, + cancel_request=cancel_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RemediesGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _cancel_remedy_serialize( + self, + x_request_id, + remedy_id, + org_id, + cancel_request, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if remedy_id is not None: + _path_params['remedyId'] = remedy_id + if org_id is not None: + _path_params['orgId'] = org_id + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + if cancel_request is not None: + _body_params = cancel_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/internal/v1/troubleshooting/remedies/{orgId}/{remedyId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_remedy( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + remedy_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Remedy's id")], + org_id: Annotated[StrictStr, Field(description="Org ID")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RemediesGetResponse: + """Get remedy + + Get a single remedy by id + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param remedy_id: Remedy's id (required) + :type remedy_id: float + :param org_id: Org ID (required) + :type org_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_remedy_serialize( + x_request_id=x_request_id, + remedy_id=remedy_id, + org_id=org_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RemediesGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_remedy_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + remedy_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Remedy's id")], + org_id: Annotated[StrictStr, Field(description="Org ID")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[RemediesGetResponse]: + """Get remedy + + Get a single remedy by id + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param remedy_id: Remedy's id (required) + :type remedy_id: float + :param org_id: Org ID (required) + :type org_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_remedy_serialize( + x_request_id=x_request_id, + remedy_id=remedy_id, + org_id=org_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RemediesGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_remedy_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + remedy_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Remedy's id")], + org_id: Annotated[StrictStr, Field(description="Org ID")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get remedy + + Get a single remedy by id + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param remedy_id: Remedy's id (required) + :type remedy_id: float + :param org_id: Org ID (required) + :type org_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_remedy_serialize( + x_request_id=x_request_id, + remedy_id=remedy_id, + org_id=org_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RemediesGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_remedy_serialize( + self, + x_request_id, + remedy_id, + org_id, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if remedy_id is not None: + _path_params['remedyId'] = remedy_id + if org_id is not None: + _path_params['orgId'] = org_id + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/internal/v1/troubleshooting/remedies/{orgId}/{remedyId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_remedies( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + org_ids: Annotated[List[StrictStr], Field(description="Org IDs")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + object_type: Annotated[Optional[StrictStr], Field(description="Object type to be handled")] = None, + object_id: Annotated[Optional[StrictStr], Field(description="ID of the object, to be handled")] = None, + status: Annotated[Optional[StrictStr], Field(description="Status of the handle")] = None, + remedy_collection_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="ID of remedy collection if started in scope of a collection")] = None, + remedy_template_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Remedy Template for this check")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + creation_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for created date")] = None, + creation_end_time: Annotated[Optional[datetime], Field(description="End of search time range for created date")] = None, + modification_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for modified date")] = None, + modification_end_time: Annotated[Optional[datetime], Field(description="End of search time range for modified date")] = None, + account_id: Annotated[Optional[StrictStr], Field(description="Filter by account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RemediesListResponse: + """List remedy + + List and filter all remedies + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param org_ids: Org IDs (required) + :type org_ids: List[str] + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param object_type: Object type to be handled + :type object_type: str + :param object_id: ID of the object, to be handled + :type object_id: str + :param status: Status of the handle + :type status: str + :param remedy_collection_id: ID of remedy collection if started in scope of a collection + :type remedy_collection_id: float + :param remedy_template_id: Remedy Template for this check + :type remedy_template_id: float + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param creation_start_time: Start of search time range for created date + :type creation_start_time: datetime + :param creation_end_time: End of search time range for created date + :type creation_end_time: datetime + :param modification_start_time: Start of search time range for modified date + :type modification_start_time: datetime + :param modification_end_time: End of search time range for modified date + :type modification_end_time: datetime + :param account_id: Filter by account ID + :type account_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_remedies_serialize( + x_request_id=x_request_id, + org_ids=org_ids, + x_trace_id=x_trace_id, + object_type=object_type, + object_id=object_id, + status=status, + remedy_collection_id=remedy_collection_id, + remedy_template_id=remedy_template_id, + page=page, + size=size, + order_by=order_by, + creation_start_time=creation_start_time, + creation_end_time=creation_end_time, + modification_start_time=modification_start_time, + modification_end_time=modification_end_time, + account_id=account_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RemediesListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_remedies_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + org_ids: Annotated[List[StrictStr], Field(description="Org IDs")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + object_type: Annotated[Optional[StrictStr], Field(description="Object type to be handled")] = None, + object_id: Annotated[Optional[StrictStr], Field(description="ID of the object, to be handled")] = None, + status: Annotated[Optional[StrictStr], Field(description="Status of the handle")] = None, + remedy_collection_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="ID of remedy collection if started in scope of a collection")] = None, + remedy_template_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Remedy Template for this check")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + creation_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for created date")] = None, + creation_end_time: Annotated[Optional[datetime], Field(description="End of search time range for created date")] = None, + modification_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for modified date")] = None, + modification_end_time: Annotated[Optional[datetime], Field(description="End of search time range for modified date")] = None, + account_id: Annotated[Optional[StrictStr], Field(description="Filter by account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[RemediesListResponse]: + """List remedy + + List and filter all remedies + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param org_ids: Org IDs (required) + :type org_ids: List[str] + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param object_type: Object type to be handled + :type object_type: str + :param object_id: ID of the object, to be handled + :type object_id: str + :param status: Status of the handle + :type status: str + :param remedy_collection_id: ID of remedy collection if started in scope of a collection + :type remedy_collection_id: float + :param remedy_template_id: Remedy Template for this check + :type remedy_template_id: float + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param creation_start_time: Start of search time range for created date + :type creation_start_time: datetime + :param creation_end_time: End of search time range for created date + :type creation_end_time: datetime + :param modification_start_time: Start of search time range for modified date + :type modification_start_time: datetime + :param modification_end_time: End of search time range for modified date + :type modification_end_time: datetime + :param account_id: Filter by account ID + :type account_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_remedies_serialize( + x_request_id=x_request_id, + org_ids=org_ids, + x_trace_id=x_trace_id, + object_type=object_type, + object_id=object_id, + status=status, + remedy_collection_id=remedy_collection_id, + remedy_template_id=remedy_template_id, + page=page, + size=size, + order_by=order_by, + creation_start_time=creation_start_time, + creation_end_time=creation_end_time, + modification_start_time=modification_start_time, + modification_end_time=modification_end_time, + account_id=account_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RemediesListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_remedies_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + org_ids: Annotated[List[StrictStr], Field(description="Org IDs")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + object_type: Annotated[Optional[StrictStr], Field(description="Object type to be handled")] = None, + object_id: Annotated[Optional[StrictStr], Field(description="ID of the object, to be handled")] = None, + status: Annotated[Optional[StrictStr], Field(description="Status of the handle")] = None, + remedy_collection_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="ID of remedy collection if started in scope of a collection")] = None, + remedy_template_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Remedy Template for this check")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + creation_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for created date")] = None, + creation_end_time: Annotated[Optional[datetime], Field(description="End of search time range for created date")] = None, + modification_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for modified date")] = None, + modification_end_time: Annotated[Optional[datetime], Field(description="End of search time range for modified date")] = None, + account_id: Annotated[Optional[StrictStr], Field(description="Filter by account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List remedy + + List and filter all remedies + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param org_ids: Org IDs (required) + :type org_ids: List[str] + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param object_type: Object type to be handled + :type object_type: str + :param object_id: ID of the object, to be handled + :type object_id: str + :param status: Status of the handle + :type status: str + :param remedy_collection_id: ID of remedy collection if started in scope of a collection + :type remedy_collection_id: float + :param remedy_template_id: Remedy Template for this check + :type remedy_template_id: float + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param creation_start_time: Start of search time range for created date + :type creation_start_time: datetime + :param creation_end_time: End of search time range for created date + :type creation_end_time: datetime + :param modification_start_time: Start of search time range for modified date + :type modification_start_time: datetime + :param modification_end_time: End of search time range for modified date + :type modification_end_time: datetime + :param account_id: Filter by account ID + :type account_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_remedies_serialize( + x_request_id=x_request_id, + org_ids=org_ids, + x_trace_id=x_trace_id, + object_type=object_type, + object_id=object_id, + status=status, + remedy_collection_id=remedy_collection_id, + remedy_template_id=remedy_template_id, + page=page, + size=size, + order_by=order_by, + creation_start_time=creation_start_time, + creation_end_time=creation_end_time, + modification_start_time=modification_start_time, + modification_end_time=modification_end_time, + account_id=account_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RemediesListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_remedies_serialize( + self, + x_request_id, + org_ids, + x_trace_id, + object_type, + object_id, + status, + remedy_collection_id, + remedy_template_id, + page, + size, + order_by, + creation_start_time, + creation_end_time, + modification_start_time, + modification_end_time, + account_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'orgIds': 'multi', + 'orderBy': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if object_type is not None: + + _query_params.append(('objectType', object_type)) + + if object_id is not None: + + _query_params.append(('objectId', object_id)) + + if status is not None: + + _query_params.append(('status', status)) + + if remedy_collection_id is not None: + + _query_params.append(('remedyCollectionId', remedy_collection_id)) + + if remedy_template_id is not None: + + _query_params.append(('remedyTemplateId', remedy_template_id)) + + if page is not None: + + _query_params.append(('page', page)) + + if size is not None: + + _query_params.append(('size', size)) + + if order_by is not None: + + _query_params.append(('orderBy', order_by)) + + if creation_start_time is not None: + if isinstance(creation_start_time, datetime): + _query_params.append( + ( + 'creationStartTime', + creation_start_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('creationStartTime', creation_start_time)) + + if creation_end_time is not None: + if isinstance(creation_end_time, datetime): + _query_params.append( + ( + 'creationEndTime', + creation_end_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('creationEndTime', creation_end_time)) + + if modification_start_time is not None: + if isinstance(modification_start_time, datetime): + _query_params.append( + ( + 'modificationStartTime', + modification_start_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('modificationStartTime', modification_start_time)) + + if modification_end_time is not None: + if isinstance(modification_end_time, datetime): + _query_params.append( + ( + 'modificationEndTime', + modification_end_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('modificationEndTime', modification_end_time)) + + if org_ids is not None: + + _query_params.append(('orgIds', org_ids)) + + if account_id is not None: + + _query_params.append(('accountId', account_id)) + + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/internal/v1/troubleshooting/remedies', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def start_remedy( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + remedies_create_request: RemediesCreateRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RemediesGetResponse: + """Start remedy + + Start a new remedy + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param remedies_create_request: (required) + :type remedies_create_request: RemediesCreateRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._start_remedy_serialize( + x_request_id=x_request_id, + remedies_create_request=remedies_create_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "RemediesGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def start_remedy_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + remedies_create_request: RemediesCreateRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[RemediesGetResponse]: + """Start remedy + + Start a new remedy + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param remedies_create_request: (required) + :type remedies_create_request: RemediesCreateRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._start_remedy_serialize( + x_request_id=x_request_id, + remedies_create_request=remedies_create_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "RemediesGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def start_remedy_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + remedies_create_request: RemediesCreateRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Start remedy + + Start a new remedy + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param remedies_create_request: (required) + :type remedies_create_request: RemediesCreateRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._start_remedy_serialize( + x_request_id=x_request_id, + remedies_create_request=remedies_create_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "RemediesGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _start_remedy_serialize( + self, + x_request_id, + remedies_create_request, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + if remedies_create_request is not None: + _body_params = remedies_create_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/internal/v1/troubleshooting/remedies', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/pfruck_contabo/api/internal_remedy_audits_api.py b/pfruck_contabo/api/internal_remedy_audits_api.py new file mode 100644 index 00000000..838466a2 --- /dev/null +++ b/pfruck_contabo/api/internal_remedy_audits_api.py @@ -0,0 +1,520 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from datetime import datetime +from pydantic import Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import List, Optional, Union +from typing_extensions import Annotated +from pfruck_contabo.models.remedies_audit_list_response import RemediesAuditListResponse + +from pfruck_contabo.api_client import ApiClient, RequestSerialized +from pfruck_contabo.api_response import ApiResponse +from pfruck_contabo.rest import RESTResponseType + + +class InternalRemedyAuditsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def retrieve_remedies_audits_list( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + org_ids: Annotated[List[StrictStr], Field(description="Org IDs")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + creation_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for created date")] = None, + creation_end_time: Annotated[Optional[datetime], Field(description="End of search time range for created date")] = None, + account_id: Annotated[Optional[StrictStr], Field(description="Filter by account ID")] = None, + request_id: Annotated[Optional[StrictStr], Field(description="The requestId of the API call which led to the change.")] = None, + foreign_changed_by: Annotated[Optional[StrictStr], Field(description="Foreign uerId of the user which led to the change.")] = None, + changed_by: Annotated[Optional[StrictStr], Field(description="UserId of the user which led to the change.")] = None, + remedy_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Remedy's id")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RemediesAuditListResponse: + """List history about your Data (audit) + + List and filters the history about your Data. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param org_ids: Org IDs (required) + :type org_ids: List[str] + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param creation_start_time: Start of search time range for created date + :type creation_start_time: datetime + :param creation_end_time: End of search time range for created date + :type creation_end_time: datetime + :param account_id: Filter by account ID + :type account_id: str + :param request_id: The requestId of the API call which led to the change. + :type request_id: str + :param foreign_changed_by: Foreign uerId of the user which led to the change. + :type foreign_changed_by: str + :param changed_by: UserId of the user which led to the change. + :type changed_by: str + :param remedy_id: Remedy's id + :type remedy_id: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_remedies_audits_list_serialize( + x_request_id=x_request_id, + org_ids=org_ids, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + creation_start_time=creation_start_time, + creation_end_time=creation_end_time, + account_id=account_id, + request_id=request_id, + foreign_changed_by=foreign_changed_by, + changed_by=changed_by, + remedy_id=remedy_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RemediesAuditListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def retrieve_remedies_audits_list_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + org_ids: Annotated[List[StrictStr], Field(description="Org IDs")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + creation_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for created date")] = None, + creation_end_time: Annotated[Optional[datetime], Field(description="End of search time range for created date")] = None, + account_id: Annotated[Optional[StrictStr], Field(description="Filter by account ID")] = None, + request_id: Annotated[Optional[StrictStr], Field(description="The requestId of the API call which led to the change.")] = None, + foreign_changed_by: Annotated[Optional[StrictStr], Field(description="Foreign uerId of the user which led to the change.")] = None, + changed_by: Annotated[Optional[StrictStr], Field(description="UserId of the user which led to the change.")] = None, + remedy_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Remedy's id")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[RemediesAuditListResponse]: + """List history about your Data (audit) + + List and filters the history about your Data. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param org_ids: Org IDs (required) + :type org_ids: List[str] + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param creation_start_time: Start of search time range for created date + :type creation_start_time: datetime + :param creation_end_time: End of search time range for created date + :type creation_end_time: datetime + :param account_id: Filter by account ID + :type account_id: str + :param request_id: The requestId of the API call which led to the change. + :type request_id: str + :param foreign_changed_by: Foreign uerId of the user which led to the change. + :type foreign_changed_by: str + :param changed_by: UserId of the user which led to the change. + :type changed_by: str + :param remedy_id: Remedy's id + :type remedy_id: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_remedies_audits_list_serialize( + x_request_id=x_request_id, + org_ids=org_ids, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + creation_start_time=creation_start_time, + creation_end_time=creation_end_time, + account_id=account_id, + request_id=request_id, + foreign_changed_by=foreign_changed_by, + changed_by=changed_by, + remedy_id=remedy_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RemediesAuditListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def retrieve_remedies_audits_list_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + org_ids: Annotated[List[StrictStr], Field(description="Org IDs")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + creation_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for created date")] = None, + creation_end_time: Annotated[Optional[datetime], Field(description="End of search time range for created date")] = None, + account_id: Annotated[Optional[StrictStr], Field(description="Filter by account ID")] = None, + request_id: Annotated[Optional[StrictStr], Field(description="The requestId of the API call which led to the change.")] = None, + foreign_changed_by: Annotated[Optional[StrictStr], Field(description="Foreign uerId of the user which led to the change.")] = None, + changed_by: Annotated[Optional[StrictStr], Field(description="UserId of the user which led to the change.")] = None, + remedy_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Remedy's id")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List history about your Data (audit) + + List and filters the history about your Data. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param org_ids: Org IDs (required) + :type org_ids: List[str] + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param creation_start_time: Start of search time range for created date + :type creation_start_time: datetime + :param creation_end_time: End of search time range for created date + :type creation_end_time: datetime + :param account_id: Filter by account ID + :type account_id: str + :param request_id: The requestId of the API call which led to the change. + :type request_id: str + :param foreign_changed_by: Foreign uerId of the user which led to the change. + :type foreign_changed_by: str + :param changed_by: UserId of the user which led to the change. + :type changed_by: str + :param remedy_id: Remedy's id + :type remedy_id: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_remedies_audits_list_serialize( + x_request_id=x_request_id, + org_ids=org_ids, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + creation_start_time=creation_start_time, + creation_end_time=creation_end_time, + account_id=account_id, + request_id=request_id, + foreign_changed_by=foreign_changed_by, + changed_by=changed_by, + remedy_id=remedy_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RemediesAuditListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _retrieve_remedies_audits_list_serialize( + self, + x_request_id, + org_ids, + x_trace_id, + page, + size, + order_by, + creation_start_time, + creation_end_time, + account_id, + request_id, + foreign_changed_by, + changed_by, + remedy_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'orgIds': 'multi', + 'orderBy': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if size is not None: + + _query_params.append(('size', size)) + + if order_by is not None: + + _query_params.append(('orderBy', order_by)) + + if creation_start_time is not None: + if isinstance(creation_start_time, datetime): + _query_params.append( + ( + 'creationStartTime', + creation_start_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('creationStartTime', creation_start_time)) + + if creation_end_time is not None: + if isinstance(creation_end_time, datetime): + _query_params.append( + ( + 'creationEndTime', + creation_end_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('creationEndTime', creation_end_time)) + + if org_ids is not None: + + _query_params.append(('orgIds', org_ids)) + + if account_id is not None: + + _query_params.append(('accountId', account_id)) + + if request_id is not None: + + _query_params.append(('requestId', request_id)) + + if foreign_changed_by is not None: + + _query_params.append(('foreignChangedBy', foreign_changed_by)) + + if changed_by is not None: + + _query_params.append(('changedBy', changed_by)) + + if remedy_id is not None: + + _query_params.append(('remedyId', remedy_id)) + + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/internal/v1/troubleshooting/remedies/audits', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/pfruck_contabo/api/internal_remedy_replay_api.py b/pfruck_contabo/api/internal_remedy_replay_api.py new file mode 100644 index 00000000..993bc689 --- /dev/null +++ b/pfruck_contabo/api/internal_remedy_replay_api.py @@ -0,0 +1,341 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr, field_validator +from typing import Optional +from typing_extensions import Annotated +from pfruck_contabo.models.remedies_replay_request import RemediesReplayRequest +from pfruck_contabo.models.replay_response import ReplayResponse + +from pfruck_contabo.api_client import ApiClient, RequestSerialized +from pfruck_contabo.api_response import ApiResponse +from pfruck_contabo.rest import RESTResponseType + + +class InternalRemedyReplayApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def replay_remedy( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + remedies_replay_request: RemediesReplayRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ReplayResponse: + """Replay changes for Remedy + + Replay changes for Remedy + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param remedies_replay_request: (required) + :type remedies_replay_request: RemediesReplayRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._replay_remedy_serialize( + x_request_id=x_request_id, + remedies_replay_request=remedies_replay_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "ReplayResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def replay_remedy_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + remedies_replay_request: RemediesReplayRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ReplayResponse]: + """Replay changes for Remedy + + Replay changes for Remedy + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param remedies_replay_request: (required) + :type remedies_replay_request: RemediesReplayRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._replay_remedy_serialize( + x_request_id=x_request_id, + remedies_replay_request=remedies_replay_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "ReplayResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def replay_remedy_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + remedies_replay_request: RemediesReplayRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Replay changes for Remedy + + Replay changes for Remedy + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param remedies_replay_request: (required) + :type remedies_replay_request: RemediesReplayRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._replay_remedy_serialize( + x_request_id=x_request_id, + remedies_replay_request=remedies_replay_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "ReplayResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _replay_remedy_serialize( + self, + x_request_id, + remedies_replay_request, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + if remedies_replay_request is not None: + _body_params = remedies_replay_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/internal/v1/troubleshooting/remedies/replays', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/pfruck_contabo/api/internal_remedy_templates_api.py b/pfruck_contabo/api/internal_remedy_templates_api.py new file mode 100644 index 00000000..71c0436e --- /dev/null +++ b/pfruck_contabo/api/internal_remedy_templates_api.py @@ -0,0 +1,876 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from datetime import datetime +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import List, Optional, Union +from typing_extensions import Annotated +from pfruck_contabo.models.remedy_templates_get_response import RemedyTemplatesGetResponse +from pfruck_contabo.models.remedy_templates_list_response import RemedyTemplatesListResponse + +from pfruck_contabo.api_client import ApiClient, RequestSerialized +from pfruck_contabo.api_response import ApiResponse +from pfruck_contabo.rest import RESTResponseType + + +class InternalRemedyTemplatesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def get_remedy_template( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + org_id: Annotated[StrictStr, Field(description="Org ID")], + remedy_template_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Remedy template's id")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RemedyTemplatesGetResponse: + """Get remedy + + Get a single remedy template by id + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param org_id: Org ID (required) + :type org_id: str + :param remedy_template_id: Remedy template's id (required) + :type remedy_template_id: float + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_remedy_template_serialize( + x_request_id=x_request_id, + org_id=org_id, + remedy_template_id=remedy_template_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RemedyTemplatesGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_remedy_template_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + org_id: Annotated[StrictStr, Field(description="Org ID")], + remedy_template_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Remedy template's id")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[RemedyTemplatesGetResponse]: + """Get remedy + + Get a single remedy template by id + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param org_id: Org ID (required) + :type org_id: str + :param remedy_template_id: Remedy template's id (required) + :type remedy_template_id: float + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_remedy_template_serialize( + x_request_id=x_request_id, + org_id=org_id, + remedy_template_id=remedy_template_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RemedyTemplatesGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_remedy_template_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + org_id: Annotated[StrictStr, Field(description="Org ID")], + remedy_template_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Remedy template's id")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get remedy + + Get a single remedy template by id + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param org_id: Org ID (required) + :type org_id: str + :param remedy_template_id: Remedy template's id (required) + :type remedy_template_id: float + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_remedy_template_serialize( + x_request_id=x_request_id, + org_id=org_id, + remedy_template_id=remedy_template_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RemedyTemplatesGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_remedy_template_serialize( + self, + x_request_id, + org_id, + remedy_template_id, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if org_id is not None: + _path_params['orgId'] = org_id + if remedy_template_id is not None: + _path_params['remedyTemplateId'] = remedy_template_id + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/internal/v1/troubleshooting/remedy-templates/{orgId}/{remedyTemplateId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_remedy_templates( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + org_ids: Annotated[List[StrictStr], Field(description="Org IDs")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + creation_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for created date")] = None, + creation_end_time: Annotated[Optional[datetime], Field(description="End of search time range for created date")] = None, + modification_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for modified date")] = None, + modification_end_time: Annotated[Optional[datetime], Field(description="End of search time range for modified date")] = None, + account_id: Annotated[Optional[StrictStr], Field(description="Filter by account ID")] = None, + internal: Annotated[Optional[StrictBool], Field(description="Is remedy only internal (not shown to the customer)")] = None, + object_type: Annotated[Optional[StrictStr], Field(description="Object type for which the remedy template can be used")] = None, + collector_class: Annotated[Optional[StrictStr], Field(description="Class used to collect the required information for the remedy")] = None, + remedy_class: Annotated[Optional[StrictStr], Field(description="Class used to perform the remedy")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RemedyTemplatesListResponse: + """List remedy templates + + List and filter all remedy templates + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param org_ids: Org IDs (required) + :type org_ids: List[str] + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param creation_start_time: Start of search time range for created date + :type creation_start_time: datetime + :param creation_end_time: End of search time range for created date + :type creation_end_time: datetime + :param modification_start_time: Start of search time range for modified date + :type modification_start_time: datetime + :param modification_end_time: End of search time range for modified date + :type modification_end_time: datetime + :param account_id: Filter by account ID + :type account_id: str + :param internal: Is remedy only internal (not shown to the customer) + :type internal: bool + :param object_type: Object type for which the remedy template can be used + :type object_type: str + :param collector_class: Class used to collect the required information for the remedy + :type collector_class: str + :param remedy_class: Class used to perform the remedy + :type remedy_class: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_remedy_templates_serialize( + x_request_id=x_request_id, + org_ids=org_ids, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + creation_start_time=creation_start_time, + creation_end_time=creation_end_time, + modification_start_time=modification_start_time, + modification_end_time=modification_end_time, + account_id=account_id, + internal=internal, + object_type=object_type, + collector_class=collector_class, + remedy_class=remedy_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RemedyTemplatesListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_remedy_templates_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + org_ids: Annotated[List[StrictStr], Field(description="Org IDs")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + creation_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for created date")] = None, + creation_end_time: Annotated[Optional[datetime], Field(description="End of search time range for created date")] = None, + modification_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for modified date")] = None, + modification_end_time: Annotated[Optional[datetime], Field(description="End of search time range for modified date")] = None, + account_id: Annotated[Optional[StrictStr], Field(description="Filter by account ID")] = None, + internal: Annotated[Optional[StrictBool], Field(description="Is remedy only internal (not shown to the customer)")] = None, + object_type: Annotated[Optional[StrictStr], Field(description="Object type for which the remedy template can be used")] = None, + collector_class: Annotated[Optional[StrictStr], Field(description="Class used to collect the required information for the remedy")] = None, + remedy_class: Annotated[Optional[StrictStr], Field(description="Class used to perform the remedy")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[RemedyTemplatesListResponse]: + """List remedy templates + + List and filter all remedy templates + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param org_ids: Org IDs (required) + :type org_ids: List[str] + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param creation_start_time: Start of search time range for created date + :type creation_start_time: datetime + :param creation_end_time: End of search time range for created date + :type creation_end_time: datetime + :param modification_start_time: Start of search time range for modified date + :type modification_start_time: datetime + :param modification_end_time: End of search time range for modified date + :type modification_end_time: datetime + :param account_id: Filter by account ID + :type account_id: str + :param internal: Is remedy only internal (not shown to the customer) + :type internal: bool + :param object_type: Object type for which the remedy template can be used + :type object_type: str + :param collector_class: Class used to collect the required information for the remedy + :type collector_class: str + :param remedy_class: Class used to perform the remedy + :type remedy_class: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_remedy_templates_serialize( + x_request_id=x_request_id, + org_ids=org_ids, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + creation_start_time=creation_start_time, + creation_end_time=creation_end_time, + modification_start_time=modification_start_time, + modification_end_time=modification_end_time, + account_id=account_id, + internal=internal, + object_type=object_type, + collector_class=collector_class, + remedy_class=remedy_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RemedyTemplatesListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_remedy_templates_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + org_ids: Annotated[List[StrictStr], Field(description="Org IDs")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + creation_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for created date")] = None, + creation_end_time: Annotated[Optional[datetime], Field(description="End of search time range for created date")] = None, + modification_start_time: Annotated[Optional[datetime], Field(description="Start of search time range for modified date")] = None, + modification_end_time: Annotated[Optional[datetime], Field(description="End of search time range for modified date")] = None, + account_id: Annotated[Optional[StrictStr], Field(description="Filter by account ID")] = None, + internal: Annotated[Optional[StrictBool], Field(description="Is remedy only internal (not shown to the customer)")] = None, + object_type: Annotated[Optional[StrictStr], Field(description="Object type for which the remedy template can be used")] = None, + collector_class: Annotated[Optional[StrictStr], Field(description="Class used to collect the required information for the remedy")] = None, + remedy_class: Annotated[Optional[StrictStr], Field(description="Class used to perform the remedy")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List remedy templates + + List and filter all remedy templates + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param org_ids: Org IDs (required) + :type org_ids: List[str] + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param creation_start_time: Start of search time range for created date + :type creation_start_time: datetime + :param creation_end_time: End of search time range for created date + :type creation_end_time: datetime + :param modification_start_time: Start of search time range for modified date + :type modification_start_time: datetime + :param modification_end_time: End of search time range for modified date + :type modification_end_time: datetime + :param account_id: Filter by account ID + :type account_id: str + :param internal: Is remedy only internal (not shown to the customer) + :type internal: bool + :param object_type: Object type for which the remedy template can be used + :type object_type: str + :param collector_class: Class used to collect the required information for the remedy + :type collector_class: str + :param remedy_class: Class used to perform the remedy + :type remedy_class: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_remedy_templates_serialize( + x_request_id=x_request_id, + org_ids=org_ids, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + creation_start_time=creation_start_time, + creation_end_time=creation_end_time, + modification_start_time=modification_start_time, + modification_end_time=modification_end_time, + account_id=account_id, + internal=internal, + object_type=object_type, + collector_class=collector_class, + remedy_class=remedy_class, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RemedyTemplatesListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_remedy_templates_serialize( + self, + x_request_id, + org_ids, + x_trace_id, + page, + size, + order_by, + creation_start_time, + creation_end_time, + modification_start_time, + modification_end_time, + account_id, + internal, + object_type, + collector_class, + remedy_class, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'orgIds': 'multi', + 'orderBy': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if size is not None: + + _query_params.append(('size', size)) + + if order_by is not None: + + _query_params.append(('orderBy', order_by)) + + if creation_start_time is not None: + if isinstance(creation_start_time, datetime): + _query_params.append( + ( + 'creationStartTime', + creation_start_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('creationStartTime', creation_start_time)) + + if creation_end_time is not None: + if isinstance(creation_end_time, datetime): + _query_params.append( + ( + 'creationEndTime', + creation_end_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('creationEndTime', creation_end_time)) + + if modification_start_time is not None: + if isinstance(modification_start_time, datetime): + _query_params.append( + ( + 'modificationStartTime', + modification_start_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('modificationStartTime', modification_start_time)) + + if modification_end_time is not None: + if isinstance(modification_end_time, datetime): + _query_params.append( + ( + 'modificationEndTime', + modification_end_time.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('modificationEndTime', modification_end_time)) + + if org_ids is not None: + + _query_params.append(('orgIds', org_ids)) + + if account_id is not None: + + _query_params.append(('accountId', account_id)) + + if internal is not None: + + _query_params.append(('internal', internal)) + + if object_type is not None: + + _query_params.append(('objectType', object_type)) + + if collector_class is not None: + + _query_params.append(('collectorClass', collector_class)) + + if remedy_class is not None: + + _query_params.append(('remedyClass', remedy_class)) + + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/internal/v1/troubleshooting/remedy-templates', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/pfruck_contabo/api/object_storages_api.py b/pfruck_contabo/api/object_storages_api.py index 4c044889..8d39f6b1 100644 --- a/pfruck_contabo/api/object_storages_api.py +++ b/pfruck_contabo/api/object_storages_api.py @@ -17,8 +17,9 @@ from typing_extensions import Annotated from pydantic import Field, StrictInt, StrictStr, field_validator -from typing import Any, Dict, List, Optional +from typing import List, Optional from typing_extensions import Annotated +from pfruck_contabo.models.cancel_object_storage_request import CancelObjectStorageRequest from pfruck_contabo.models.cancel_object_storage_response import CancelObjectStorageResponse from pfruck_contabo.models.create_object_storage_request import CreateObjectStorageRequest from pfruck_contabo.models.create_object_storage_response import CreateObjectStorageResponse @@ -53,7 +54,7 @@ def cancel_object_storage( self, x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], object_storage_id: Annotated[StrictStr, Field(description="The identifier of the object storage.")], - body: Dict[str, Any], + cancel_object_storage_request: CancelObjectStorageRequest, x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, _request_timeout: Union[ None, @@ -76,8 +77,8 @@ def cancel_object_storage( :type x_request_id: str :param object_storage_id: The identifier of the object storage. (required) :type object_storage_id: str - :param body: (required) - :type body: object + :param cancel_object_storage_request: (required) + :type cancel_object_storage_request: CancelObjectStorageRequest :param x_trace_id: Identifier to trace group of requests. :type x_trace_id: str :param _request_timeout: timeout setting for this request. If one @@ -105,7 +106,7 @@ def cancel_object_storage( _param = self._cancel_object_storage_serialize( x_request_id=x_request_id, object_storage_id=object_storage_id, - body=body, + cancel_object_storage_request=cancel_object_storage_request, x_trace_id=x_trace_id, _request_auth=_request_auth, _content_type=_content_type, @@ -132,7 +133,7 @@ def cancel_object_storage_with_http_info( self, x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], object_storage_id: Annotated[StrictStr, Field(description="The identifier of the object storage.")], - body: Dict[str, Any], + cancel_object_storage_request: CancelObjectStorageRequest, x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, _request_timeout: Union[ None, @@ -155,8 +156,8 @@ def cancel_object_storage_with_http_info( :type x_request_id: str :param object_storage_id: The identifier of the object storage. (required) :type object_storage_id: str - :param body: (required) - :type body: object + :param cancel_object_storage_request: (required) + :type cancel_object_storage_request: CancelObjectStorageRequest :param x_trace_id: Identifier to trace group of requests. :type x_trace_id: str :param _request_timeout: timeout setting for this request. If one @@ -184,7 +185,7 @@ def cancel_object_storage_with_http_info( _param = self._cancel_object_storage_serialize( x_request_id=x_request_id, object_storage_id=object_storage_id, - body=body, + cancel_object_storage_request=cancel_object_storage_request, x_trace_id=x_trace_id, _request_auth=_request_auth, _content_type=_content_type, @@ -211,7 +212,7 @@ def cancel_object_storage_without_preload_content( self, x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], object_storage_id: Annotated[StrictStr, Field(description="The identifier of the object storage.")], - body: Dict[str, Any], + cancel_object_storage_request: CancelObjectStorageRequest, x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, _request_timeout: Union[ None, @@ -234,8 +235,8 @@ def cancel_object_storage_without_preload_content( :type x_request_id: str :param object_storage_id: The identifier of the object storage. (required) :type object_storage_id: str - :param body: (required) - :type body: object + :param cancel_object_storage_request: (required) + :type cancel_object_storage_request: CancelObjectStorageRequest :param x_trace_id: Identifier to trace group of requests. :type x_trace_id: str :param _request_timeout: timeout setting for this request. If one @@ -263,7 +264,7 @@ def cancel_object_storage_without_preload_content( _param = self._cancel_object_storage_serialize( x_request_id=x_request_id, object_storage_id=object_storage_id, - body=body, + cancel_object_storage_request=cancel_object_storage_request, x_trace_id=x_trace_id, _request_auth=_request_auth, _content_type=_content_type, @@ -285,7 +286,7 @@ def _cancel_object_storage_serialize( self, x_request_id, object_storage_id, - body, + cancel_object_storage_request, x_trace_id, _request_auth, _content_type, @@ -316,8 +317,8 @@ def _cancel_object_storage_serialize( _header_params['x-trace-id'] = x_trace_id # process the form parameters # process the body parameter - if body is not None: - _body_params = body + if cancel_object_storage_request is not None: + _body_params = cancel_object_storage_request # set the HTTP header `Accept` diff --git a/pfruck_contabo/api/remedies_api.py b/pfruck_contabo/api/remedies_api.py new file mode 100644 index 00000000..de509b4e --- /dev/null +++ b/pfruck_contabo/api/remedies_api.py @@ -0,0 +1,1305 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Optional, Union +from typing_extensions import Annotated +from pfruck_contabo.models.base_remedy_create_request import BaseRemedyCreateRequest +from pfruck_contabo.models.cancel_request import CancelRequest +from pfruck_contabo.models.ext_remedies_get_response import ExtRemediesGetResponse +from pfruck_contabo.models.ext_remedies_list_response import ExtRemediesListResponse + +from pfruck_contabo.api_client import ApiClient, RequestSerialized +from pfruck_contabo.api_response import ApiResponse +from pfruck_contabo.rest import RESTResponseType + + +class RemediesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def cancel_ext_remedy( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + remedy_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Remedy's id")], + cancel_request: CancelRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ExtRemediesGetResponse: + """Cancel remedy + + Cancel remedy + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param remedy_id: Remedy's id (required) + :type remedy_id: float + :param cancel_request: (required) + :type cancel_request: CancelRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._cancel_ext_remedy_serialize( + x_request_id=x_request_id, + remedy_id=remedy_id, + cancel_request=cancel_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtRemediesGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def cancel_ext_remedy_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + remedy_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Remedy's id")], + cancel_request: CancelRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ExtRemediesGetResponse]: + """Cancel remedy + + Cancel remedy + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param remedy_id: Remedy's id (required) + :type remedy_id: float + :param cancel_request: (required) + :type cancel_request: CancelRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._cancel_ext_remedy_serialize( + x_request_id=x_request_id, + remedy_id=remedy_id, + cancel_request=cancel_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtRemediesGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def cancel_ext_remedy_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + remedy_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Remedy's id")], + cancel_request: CancelRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Cancel remedy + + Cancel remedy + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param remedy_id: Remedy's id (required) + :type remedy_id: float + :param cancel_request: (required) + :type cancel_request: CancelRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._cancel_ext_remedy_serialize( + x_request_id=x_request_id, + remedy_id=remedy_id, + cancel_request=cancel_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtRemediesGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _cancel_ext_remedy_serialize( + self, + x_request_id, + remedy_id, + cancel_request, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if remedy_id is not None: + _path_params['remedyId'] = remedy_id + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + if cancel_request is not None: + _body_params = cancel_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v1/troubleshooting/remedies/{remedyId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_ext_remedy( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + remedy_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Remedy's id")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ExtRemediesGetResponse: + """Get remedy + + Get a single remedy by id + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param remedy_id: Remedy's id (required) + :type remedy_id: float + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_ext_remedy_serialize( + x_request_id=x_request_id, + remedy_id=remedy_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtRemediesGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_ext_remedy_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + remedy_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Remedy's id")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ExtRemediesGetResponse]: + """Get remedy + + Get a single remedy by id + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param remedy_id: Remedy's id (required) + :type remedy_id: float + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_ext_remedy_serialize( + x_request_id=x_request_id, + remedy_id=remedy_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtRemediesGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_ext_remedy_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + remedy_id: Annotated[Union[StrictFloat, StrictInt], Field(description="Remedy's id")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get remedy + + Get a single remedy by id + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param remedy_id: Remedy's id (required) + :type remedy_id: float + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_ext_remedy_serialize( + x_request_id=x_request_id, + remedy_id=remedy_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtRemediesGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_ext_remedy_serialize( + self, + x_request_id, + remedy_id, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if remedy_id is not None: + _path_params['remedyId'] = remedy_id + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/troubleshooting/remedies/{remedyId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_ext_remedies( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + object_type: Annotated[Optional[StrictStr], Field(description="Object type to be handled")] = None, + object_id: Annotated[Optional[StrictStr], Field(description="ID of the object, to be handled")] = None, + status: Annotated[Optional[StrictStr], Field(description="Status of the handle")] = None, + remedy_collection_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="ID of remedy collection if started in scope of a collection")] = None, + remedy_template_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Remedy Template for this check")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ExtRemediesListResponse: + """List remedy + + List and filter all remedy + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param object_type: Object type to be handled + :type object_type: str + :param object_id: ID of the object, to be handled + :type object_id: str + :param status: Status of the handle + :type status: str + :param remedy_collection_id: ID of remedy collection if started in scope of a collection + :type remedy_collection_id: float + :param remedy_template_id: Remedy Template for this check + :type remedy_template_id: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_ext_remedies_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + object_type=object_type, + object_id=object_id, + status=status, + remedy_collection_id=remedy_collection_id, + remedy_template_id=remedy_template_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtRemediesListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_ext_remedies_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + object_type: Annotated[Optional[StrictStr], Field(description="Object type to be handled")] = None, + object_id: Annotated[Optional[StrictStr], Field(description="ID of the object, to be handled")] = None, + status: Annotated[Optional[StrictStr], Field(description="Status of the handle")] = None, + remedy_collection_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="ID of remedy collection if started in scope of a collection")] = None, + remedy_template_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Remedy Template for this check")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ExtRemediesListResponse]: + """List remedy + + List and filter all remedy + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param object_type: Object type to be handled + :type object_type: str + :param object_id: ID of the object, to be handled + :type object_id: str + :param status: Status of the handle + :type status: str + :param remedy_collection_id: ID of remedy collection if started in scope of a collection + :type remedy_collection_id: float + :param remedy_template_id: Remedy Template for this check + :type remedy_template_id: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_ext_remedies_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + object_type=object_type, + object_id=object_id, + status=status, + remedy_collection_id=remedy_collection_id, + remedy_template_id=remedy_template_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtRemediesListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_ext_remedies_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + object_type: Annotated[Optional[StrictStr], Field(description="Object type to be handled")] = None, + object_id: Annotated[Optional[StrictStr], Field(description="ID of the object, to be handled")] = None, + status: Annotated[Optional[StrictStr], Field(description="Status of the handle")] = None, + remedy_collection_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="ID of remedy collection if started in scope of a collection")] = None, + remedy_template_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Remedy Template for this check")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List remedy + + List and filter all remedy + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param object_type: Object type to be handled + :type object_type: str + :param object_id: ID of the object, to be handled + :type object_id: str + :param status: Status of the handle + :type status: str + :param remedy_collection_id: ID of remedy collection if started in scope of a collection + :type remedy_collection_id: float + :param remedy_template_id: Remedy Template for this check + :type remedy_template_id: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_ext_remedies_serialize( + x_request_id=x_request_id, + x_trace_id=x_trace_id, + object_type=object_type, + object_id=object_id, + status=status, + remedy_collection_id=remedy_collection_id, + remedy_template_id=remedy_template_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtRemediesListResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_ext_remedies_serialize( + self, + x_request_id, + x_trace_id, + object_type, + object_id, + status, + remedy_collection_id, + remedy_template_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if object_type is not None: + + _query_params.append(('objectType', object_type)) + + if object_id is not None: + + _query_params.append(('objectId', object_id)) + + if status is not None: + + _query_params.append(('status', status)) + + if remedy_collection_id is not None: + + _query_params.append(('remedyCollectionId', remedy_collection_id)) + + if remedy_template_id is not None: + + _query_params.append(('remedyTemplateId', remedy_template_id)) + + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/troubleshooting/remedies', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def start_ext_remedy( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + base_remedy_create_request: BaseRemedyCreateRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ExtRemediesGetResponse: + """Start remedy + + Start a new remedy + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param base_remedy_create_request: (required) + :type base_remedy_create_request: BaseRemedyCreateRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._start_ext_remedy_serialize( + x_request_id=x_request_id, + base_remedy_create_request=base_remedy_create_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ExtRemediesGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def start_ext_remedy_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + base_remedy_create_request: BaseRemedyCreateRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ExtRemediesGetResponse]: + """Start remedy + + Start a new remedy + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param base_remedy_create_request: (required) + :type base_remedy_create_request: BaseRemedyCreateRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._start_ext_remedy_serialize( + x_request_id=x_request_id, + base_remedy_create_request=base_remedy_create_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ExtRemediesGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def start_ext_remedy_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + base_remedy_create_request: BaseRemedyCreateRequest, + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Start remedy + + Start a new remedy + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param base_remedy_create_request: (required) + :type base_remedy_create_request: BaseRemedyCreateRequest + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._start_ext_remedy_serialize( + x_request_id=x_request_id, + base_remedy_create_request=base_remedy_create_request, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ExtRemediesGetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _start_ext_remedy_serialize( + self, + x_request_id, + base_remedy_create_request, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + if base_remedy_create_request is not None: + _body_params = base_remedy_create_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/troubleshooting/remedies', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/pfruck_contabo/api/users_api.py b/pfruck_contabo/api/users_api.py index eb0e0718..02b8c73b 100644 --- a/pfruck_contabo/api/users_api.py +++ b/pfruck_contabo/api/users_api.py @@ -22,10 +22,9 @@ from pfruck_contabo.models.create_user_request import CreateUserRequest from pfruck_contabo.models.create_user_response import CreateUserResponse from pfruck_contabo.models.find_client_response import FindClientResponse -from pfruck_contabo.models.find_credential_response import FindCredentialResponse +from pfruck_contabo.models.find_user_is_password_set_response import FindUserIsPasswordSetResponse from pfruck_contabo.models.find_user_response import FindUserResponse from pfruck_contabo.models.generate_client_secret_response import GenerateClientSecretResponse -from pfruck_contabo.models.list_credential_response import ListCredentialResponse from pfruck_contabo.models.list_user_response import ListUserResponse from pfruck_contabo.models.update_user_request import UpdateUserRequest from pfruck_contabo.models.update_user_response import UpdateUserResponse @@ -905,722 +904,12 @@ def _generate_client_secret_serialize( @validate_call - def get_object_storage_credentials( - self, - x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], - user_id: Annotated[StrictStr, Field(description="The identifier of the user.")], - object_storage_id: Annotated[StrictStr, Field(description="The identifier of the S3 object storage")], - credential_id: Annotated[StrictInt, Field(description="The ID of the object storage credential")], - x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> FindCredentialResponse: - """Get S3 compatible object storage credentials. - - Get S3 compatible object storage credentials for accessing it via S3 compatible tools like `aws` cli. - - :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) - :type x_request_id: str - :param user_id: The identifier of the user. (required) - :type user_id: str - :param object_storage_id: The identifier of the S3 object storage (required) - :type object_storage_id: str - :param credential_id: The ID of the object storage credential (required) - :type credential_id: int - :param x_trace_id: Identifier to trace group of requests. - :type x_trace_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_object_storage_credentials_serialize( - x_request_id=x_request_id, - user_id=user_id, - object_storage_id=object_storage_id, - credential_id=credential_id, - x_trace_id=x_trace_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FindCredentialResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_object_storage_credentials_with_http_info( - self, - x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], - user_id: Annotated[StrictStr, Field(description="The identifier of the user.")], - object_storage_id: Annotated[StrictStr, Field(description="The identifier of the S3 object storage")], - credential_id: Annotated[StrictInt, Field(description="The ID of the object storage credential")], - x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FindCredentialResponse]: - """Get S3 compatible object storage credentials. - - Get S3 compatible object storage credentials for accessing it via S3 compatible tools like `aws` cli. - - :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) - :type x_request_id: str - :param user_id: The identifier of the user. (required) - :type user_id: str - :param object_storage_id: The identifier of the S3 object storage (required) - :type object_storage_id: str - :param credential_id: The ID of the object storage credential (required) - :type credential_id: int - :param x_trace_id: Identifier to trace group of requests. - :type x_trace_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_object_storage_credentials_serialize( - x_request_id=x_request_id, - user_id=user_id, - object_storage_id=object_storage_id, - credential_id=credential_id, - x_trace_id=x_trace_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FindCredentialResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_object_storage_credentials_without_preload_content( - self, - x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], - user_id: Annotated[StrictStr, Field(description="The identifier of the user.")], - object_storage_id: Annotated[StrictStr, Field(description="The identifier of the S3 object storage")], - credential_id: Annotated[StrictInt, Field(description="The ID of the object storage credential")], - x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get S3 compatible object storage credentials. - - Get S3 compatible object storage credentials for accessing it via S3 compatible tools like `aws` cli. - - :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) - :type x_request_id: str - :param user_id: The identifier of the user. (required) - :type user_id: str - :param object_storage_id: The identifier of the S3 object storage (required) - :type object_storage_id: str - :param credential_id: The ID of the object storage credential (required) - :type credential_id: int - :param x_trace_id: Identifier to trace group of requests. - :type x_trace_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_object_storage_credentials_serialize( - x_request_id=x_request_id, - user_id=user_id, - object_storage_id=object_storage_id, - credential_id=credential_id, - x_trace_id=x_trace_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FindCredentialResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_object_storage_credentials_serialize( - self, - x_request_id, - user_id, - object_storage_id, - credential_id, - x_trace_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id - if object_storage_id is not None: - _path_params['objectStorageId'] = object_storage_id - if credential_id is not None: - _path_params['credentialId'] = credential_id - # process the query parameters - # process the header parameters - if x_request_id is not None: - _header_params['x-request-id'] = x_request_id - if x_trace_id is not None: - _header_params['x-trace-id'] = x_trace_id - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'bearer' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v1/users/{userId}/object-storages/{objectStorageId}/credentials/{credentialId}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def list_object_storage_credentials( - self, - x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], - user_id: Annotated[StrictStr, Field(description="The identifier of the user.")], - x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, - page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, - size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, - order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, - object_storage_id: Annotated[Optional[StrictStr], Field(description="The identifier of the S3 object storage")] = None, - region_name: Annotated[Optional[StrictStr], Field(description="Filter for Object Storage by regions. Available regions: Asia (Singapore), European Union, United States (Central)")] = None, - display_name: Annotated[Optional[StrictStr], Field(description="Filter for Object Storage by his displayName.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListCredentialResponse: - """Get list of S3 compatible object storage credentials for user. - - Get list of S3 compatible object storage credentials for accessing it via S3 compatible tools like `aws` cli. - - :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) - :type x_request_id: str - :param user_id: The identifier of the user. (required) - :type user_id: str - :param x_trace_id: Identifier to trace group of requests. - :type x_trace_id: str - :param page: Number of page to be fetched. - :type page: int - :param size: Number of elements per page. - :type size: int - :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. - :type order_by: List[str] - :param object_storage_id: The identifier of the S3 object storage - :type object_storage_id: str - :param region_name: Filter for Object Storage by regions. Available regions: Asia (Singapore), European Union, United States (Central) - :type region_name: str - :param display_name: Filter for Object Storage by his displayName. - :type display_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_object_storage_credentials_serialize( - x_request_id=x_request_id, - user_id=user_id, - x_trace_id=x_trace_id, - page=page, - size=size, - order_by=order_by, - object_storage_id=object_storage_id, - region_name=region_name, - display_name=display_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListCredentialResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def list_object_storage_credentials_with_http_info( - self, - x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], - user_id: Annotated[StrictStr, Field(description="The identifier of the user.")], - x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, - page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, - size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, - order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, - object_storage_id: Annotated[Optional[StrictStr], Field(description="The identifier of the S3 object storage")] = None, - region_name: Annotated[Optional[StrictStr], Field(description="Filter for Object Storage by regions. Available regions: Asia (Singapore), European Union, United States (Central)")] = None, - display_name: Annotated[Optional[StrictStr], Field(description="Filter for Object Storage by his displayName.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ListCredentialResponse]: - """Get list of S3 compatible object storage credentials for user. - - Get list of S3 compatible object storage credentials for accessing it via S3 compatible tools like `aws` cli. - - :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) - :type x_request_id: str - :param user_id: The identifier of the user. (required) - :type user_id: str - :param x_trace_id: Identifier to trace group of requests. - :type x_trace_id: str - :param page: Number of page to be fetched. - :type page: int - :param size: Number of elements per page. - :type size: int - :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. - :type order_by: List[str] - :param object_storage_id: The identifier of the S3 object storage - :type object_storage_id: str - :param region_name: Filter for Object Storage by regions. Available regions: Asia (Singapore), European Union, United States (Central) - :type region_name: str - :param display_name: Filter for Object Storage by his displayName. - :type display_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_object_storage_credentials_serialize( - x_request_id=x_request_id, - user_id=user_id, - x_trace_id=x_trace_id, - page=page, - size=size, - order_by=order_by, - object_storage_id=object_storage_id, - region_name=region_name, - display_name=display_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListCredentialResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def list_object_storage_credentials_without_preload_content( - self, - x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], - user_id: Annotated[StrictStr, Field(description="The identifier of the user.")], - x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, - page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, - size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, - order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, - object_storage_id: Annotated[Optional[StrictStr], Field(description="The identifier of the S3 object storage")] = None, - region_name: Annotated[Optional[StrictStr], Field(description="Filter for Object Storage by regions. Available regions: Asia (Singapore), European Union, United States (Central)")] = None, - display_name: Annotated[Optional[StrictStr], Field(description="Filter for Object Storage by his displayName.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get list of S3 compatible object storage credentials for user. - - Get list of S3 compatible object storage credentials for accessing it via S3 compatible tools like `aws` cli. - - :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) - :type x_request_id: str - :param user_id: The identifier of the user. (required) - :type user_id: str - :param x_trace_id: Identifier to trace group of requests. - :type x_trace_id: str - :param page: Number of page to be fetched. - :type page: int - :param size: Number of elements per page. - :type size: int - :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. - :type order_by: List[str] - :param object_storage_id: The identifier of the S3 object storage - :type object_storage_id: str - :param region_name: Filter for Object Storage by regions. Available regions: Asia (Singapore), European Union, United States (Central) - :type region_name: str - :param display_name: Filter for Object Storage by his displayName. - :type display_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_object_storage_credentials_serialize( - x_request_id=x_request_id, - user_id=user_id, - x_trace_id=x_trace_id, - page=page, - size=size, - order_by=order_by, - object_storage_id=object_storage_id, - region_name=region_name, - display_name=display_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListCredentialResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_object_storage_credentials_serialize( - self, - x_request_id, - user_id, - x_trace_id, - page, - size, - order_by, - object_storage_id, - region_name, - display_name, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - 'orderBy': 'multi', - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id - # process the query parameters - if page is not None: - - _query_params.append(('page', page)) - - if size is not None: - - _query_params.append(('size', size)) - - if order_by is not None: - - _query_params.append(('orderBy', order_by)) - - if object_storage_id is not None: - - _query_params.append(('objectStorageId', object_storage_id)) - - if region_name is not None: - - _query_params.append(('regionName', region_name)) - - if display_name is not None: - - _query_params.append(('displayName', display_name)) - - # process the header parameters - if x_request_id is not None: - _header_params['x-request-id'] = x_request_id - if x_trace_id is not None: - _header_params['x-trace-id'] = x_trace_id - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'bearer' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v1/users/{userId}/object-storages/credentials', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def regenerate_object_storage_credentials( + def resend_email_verification( self, x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], user_id: Annotated[StrictStr, Field(description="The identifier of the user.")], - object_storage_id: Annotated[StrictStr, Field(description="The identifier of the S3 object storage")], - credential_id: Annotated[StrictInt, Field(description="The ID of the object storage credential")], x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + redirect_url: Annotated[Optional[StrictStr], Field(description="The redirect url used for email verification")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1633,21 +922,19 @@ def regenerate_object_storage_credentials( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> FindCredentialResponse: - """Regenerates secret key of specified user for the S3 compatible object storages. + ) -> None: + """Resend email verification - Regenerates secret key of specified user for the a specific S3 compatible object storages. + Resend email verification for a specific user :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) :type x_request_id: str :param user_id: The identifier of the user. (required) :type user_id: str - :param object_storage_id: The identifier of the S3 object storage (required) - :type object_storage_id: str - :param credential_id: The ID of the object storage credential (required) - :type credential_id: int :param x_trace_id: Identifier to trace group of requests. :type x_trace_id: str + :param redirect_url: The redirect url used for email verification + :type redirect_url: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1670,12 +957,11 @@ def regenerate_object_storage_credentials( :return: Returns the result object. """ # noqa: E501 - _param = self._regenerate_object_storage_credentials_serialize( + _param = self._resend_email_verification_serialize( x_request_id=x_request_id, user_id=user_id, - object_storage_id=object_storage_id, - credential_id=credential_id, x_trace_id=x_trace_id, + redirect_url=redirect_url, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1683,7 +969,7 @@ def regenerate_object_storage_credentials( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FindCredentialResponse", + '204': None, } response_data = self.api_client.call_api( *_param, @@ -1697,13 +983,12 @@ def regenerate_object_storage_credentials( @validate_call - def regenerate_object_storage_credentials_with_http_info( + def resend_email_verification_with_http_info( self, x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], user_id: Annotated[StrictStr, Field(description="The identifier of the user.")], - object_storage_id: Annotated[StrictStr, Field(description="The identifier of the S3 object storage")], - credential_id: Annotated[StrictInt, Field(description="The ID of the object storage credential")], x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + redirect_url: Annotated[Optional[StrictStr], Field(description="The redirect url used for email verification")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1716,21 +1001,19 @@ def regenerate_object_storage_credentials_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FindCredentialResponse]: - """Regenerates secret key of specified user for the S3 compatible object storages. + ) -> ApiResponse[None]: + """Resend email verification - Regenerates secret key of specified user for the a specific S3 compatible object storages. + Resend email verification for a specific user :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) :type x_request_id: str :param user_id: The identifier of the user. (required) :type user_id: str - :param object_storage_id: The identifier of the S3 object storage (required) - :type object_storage_id: str - :param credential_id: The ID of the object storage credential (required) - :type credential_id: int :param x_trace_id: Identifier to trace group of requests. :type x_trace_id: str + :param redirect_url: The redirect url used for email verification + :type redirect_url: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1753,12 +1036,11 @@ def regenerate_object_storage_credentials_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._regenerate_object_storage_credentials_serialize( + _param = self._resend_email_verification_serialize( x_request_id=x_request_id, user_id=user_id, - object_storage_id=object_storage_id, - credential_id=credential_id, x_trace_id=x_trace_id, + redirect_url=redirect_url, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1766,7 +1048,7 @@ def regenerate_object_storage_credentials_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FindCredentialResponse", + '204': None, } response_data = self.api_client.call_api( *_param, @@ -1780,13 +1062,12 @@ def regenerate_object_storage_credentials_with_http_info( @validate_call - def regenerate_object_storage_credentials_without_preload_content( + def resend_email_verification_without_preload_content( self, x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], user_id: Annotated[StrictStr, Field(description="The identifier of the user.")], - object_storage_id: Annotated[StrictStr, Field(description="The identifier of the S3 object storage")], - credential_id: Annotated[StrictInt, Field(description="The ID of the object storage credential")], x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + redirect_url: Annotated[Optional[StrictStr], Field(description="The redirect url used for email verification")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1800,20 +1081,18 @@ def regenerate_object_storage_credentials_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Regenerates secret key of specified user for the S3 compatible object storages. + """Resend email verification - Regenerates secret key of specified user for the a specific S3 compatible object storages. + Resend email verification for a specific user :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) :type x_request_id: str :param user_id: The identifier of the user. (required) :type user_id: str - :param object_storage_id: The identifier of the S3 object storage (required) - :type object_storage_id: str - :param credential_id: The ID of the object storage credential (required) - :type credential_id: int :param x_trace_id: Identifier to trace group of requests. :type x_trace_id: str + :param redirect_url: The redirect url used for email verification + :type redirect_url: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1836,12 +1115,11 @@ def regenerate_object_storage_credentials_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._regenerate_object_storage_credentials_serialize( + _param = self._resend_email_verification_serialize( x_request_id=x_request_id, user_id=user_id, - object_storage_id=object_storage_id, - credential_id=credential_id, x_trace_id=x_trace_id, + redirect_url=redirect_url, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1849,7 +1127,7 @@ def regenerate_object_storage_credentials_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FindCredentialResponse", + '204': None, } response_data = self.api_client.call_api( *_param, @@ -1858,13 +1136,12 @@ def regenerate_object_storage_credentials_without_preload_content( return response_data.response - def _regenerate_object_storage_credentials_serialize( + def _resend_email_verification_serialize( self, x_request_id, user_id, - object_storage_id, - credential_id, x_trace_id, + redirect_url, _request_auth, _content_type, _headers, @@ -1886,11 +1163,11 @@ def _regenerate_object_storage_credentials_serialize( # process the path parameters if user_id is not None: _path_params['userId'] = user_id - if object_storage_id is not None: - _path_params['objectStorageId'] = object_storage_id - if credential_id is not None: - _path_params['credentialId'] = credential_id # process the query parameters + if redirect_url is not None: + + _query_params.append(('redirectUrl', redirect_url)) + # process the header parameters if x_request_id is not None: _header_params['x-request-id'] = x_request_id @@ -1900,12 +1177,6 @@ def _regenerate_object_storage_credentials_serialize( # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) # authentication setting @@ -1914,8 +1185,8 @@ def _regenerate_object_storage_credentials_serialize( ] return self.api_client.param_serialize( - method='PATCH', - resource_path='/v1/users/{userId}/object-storages/{objectStorageId}/credentials/{credentialId}', + method='POST', + resource_path='/v1/users/{userId}/resend-email-verification', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1932,12 +1203,12 @@ def _regenerate_object_storage_credentials_serialize( @validate_call - def resend_email_verification( + def reset_password( self, x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], user_id: Annotated[StrictStr, Field(description="The identifier of the user.")], x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, - redirect_url: Annotated[Optional[StrictStr], Field(description="The redirect url used for email verification")] = None, + redirect_url: Annotated[Optional[StrictStr], Field(description="The redirect url used for resetting password")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1951,9 +1222,9 @@ def resend_email_verification( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """Resend email verification + """Send reset password email - Resend email verification for a specific user + Send reset password email for a specific user :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) :type x_request_id: str @@ -1961,7 +1232,7 @@ def resend_email_verification( :type user_id: str :param x_trace_id: Identifier to trace group of requests. :type x_trace_id: str - :param redirect_url: The redirect url used for email verification + :param redirect_url: The redirect url used for resetting password :type redirect_url: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1985,7 +1256,7 @@ def resend_email_verification( :return: Returns the result object. """ # noqa: E501 - _param = self._resend_email_verification_serialize( + _param = self._reset_password_serialize( x_request_id=x_request_id, user_id=user_id, x_trace_id=x_trace_id, @@ -2011,12 +1282,12 @@ def resend_email_verification( @validate_call - def resend_email_verification_with_http_info( + def reset_password_with_http_info( self, x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], user_id: Annotated[StrictStr, Field(description="The identifier of the user.")], x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, - redirect_url: Annotated[Optional[StrictStr], Field(description="The redirect url used for email verification")] = None, + redirect_url: Annotated[Optional[StrictStr], Field(description="The redirect url used for resetting password")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2030,9 +1301,9 @@ def resend_email_verification_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """Resend email verification + """Send reset password email - Resend email verification for a specific user + Send reset password email for a specific user :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) :type x_request_id: str @@ -2040,7 +1311,7 @@ def resend_email_verification_with_http_info( :type user_id: str :param x_trace_id: Identifier to trace group of requests. :type x_trace_id: str - :param redirect_url: The redirect url used for email verification + :param redirect_url: The redirect url used for resetting password :type redirect_url: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2064,7 +1335,7 @@ def resend_email_verification_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._resend_email_verification_serialize( + _param = self._reset_password_serialize( x_request_id=x_request_id, user_id=user_id, x_trace_id=x_trace_id, @@ -2090,12 +1361,12 @@ def resend_email_verification_with_http_info( @validate_call - def resend_email_verification_without_preload_content( + def reset_password_without_preload_content( self, x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], user_id: Annotated[StrictStr, Field(description="The identifier of the user.")], x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, - redirect_url: Annotated[Optional[StrictStr], Field(description="The redirect url used for email verification")] = None, + redirect_url: Annotated[Optional[StrictStr], Field(description="The redirect url used for resetting password")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2109,9 +1380,9 @@ def resend_email_verification_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Resend email verification + """Send reset password email - Resend email verification for a specific user + Send reset password email for a specific user :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) :type x_request_id: str @@ -2119,7 +1390,7 @@ def resend_email_verification_without_preload_content( :type user_id: str :param x_trace_id: Identifier to trace group of requests. :type x_trace_id: str - :param redirect_url: The redirect url used for email verification + :param redirect_url: The redirect url used for resetting password :type redirect_url: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2143,7 +1414,7 @@ def resend_email_verification_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._resend_email_verification_serialize( + _param = self._reset_password_serialize( x_request_id=x_request_id, user_id=user_id, x_trace_id=x_trace_id, @@ -2164,7 +1435,7 @@ def resend_email_verification_without_preload_content( return response_data.response - def _resend_email_verification_serialize( + def _reset_password_serialize( self, x_request_id, user_id, @@ -2214,7 +1485,7 @@ def _resend_email_verification_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v1/users/{userId}/resend-email-verification', + resource_path='/v1/users/{userId}/reset-password', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2231,12 +1502,11 @@ def _resend_email_verification_serialize( @validate_call - def reset_password( + def retrieve_user( self, x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], user_id: Annotated[StrictStr, Field(description="The identifier of the user.")], x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, - redirect_url: Annotated[Optional[StrictStr], Field(description="The redirect url used for resetting password")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2249,10 +1519,10 @@ def reset_password( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Send reset password email + ) -> FindUserResponse: + """Get specific user by id - Send reset password email for a specific user + Get attributes for a specific user. :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) :type x_request_id: str @@ -2260,8 +1530,6 @@ def reset_password( :type user_id: str :param x_trace_id: Identifier to trace group of requests. :type x_trace_id: str - :param redirect_url: The redirect url used for resetting password - :type redirect_url: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2284,11 +1552,10 @@ def reset_password( :return: Returns the result object. """ # noqa: E501 - _param = self._reset_password_serialize( + _param = self._retrieve_user_serialize( x_request_id=x_request_id, user_id=user_id, x_trace_id=x_trace_id, - redirect_url=redirect_url, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2296,7 +1563,7 @@ def reset_password( ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + '200': "FindUserResponse", } response_data = self.api_client.call_api( *_param, @@ -2310,12 +1577,11 @@ def reset_password( @validate_call - def reset_password_with_http_info( + def retrieve_user_with_http_info( self, x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], user_id: Annotated[StrictStr, Field(description="The identifier of the user.")], x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, - redirect_url: Annotated[Optional[StrictStr], Field(description="The redirect url used for resetting password")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2328,10 +1594,10 @@ def reset_password_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Send reset password email + ) -> ApiResponse[FindUserResponse]: + """Get specific user by id - Send reset password email for a specific user + Get attributes for a specific user. :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) :type x_request_id: str @@ -2339,8 +1605,6 @@ def reset_password_with_http_info( :type user_id: str :param x_trace_id: Identifier to trace group of requests. :type x_trace_id: str - :param redirect_url: The redirect url used for resetting password - :type redirect_url: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2363,11 +1627,10 @@ def reset_password_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._reset_password_serialize( + _param = self._retrieve_user_serialize( x_request_id=x_request_id, user_id=user_id, x_trace_id=x_trace_id, - redirect_url=redirect_url, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2375,7 +1638,7 @@ def reset_password_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + '200': "FindUserResponse", } response_data = self.api_client.call_api( *_param, @@ -2389,12 +1652,11 @@ def reset_password_with_http_info( @validate_call - def reset_password_without_preload_content( + def retrieve_user_without_preload_content( self, x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], user_id: Annotated[StrictStr, Field(description="The identifier of the user.")], x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, - redirect_url: Annotated[Optional[StrictStr], Field(description="The redirect url used for resetting password")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2408,9 +1670,9 @@ def reset_password_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Send reset password email + """Get specific user by id - Send reset password email for a specific user + Get attributes for a specific user. :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) :type x_request_id: str @@ -2418,8 +1680,6 @@ def reset_password_without_preload_content( :type user_id: str :param x_trace_id: Identifier to trace group of requests. :type x_trace_id: str - :param redirect_url: The redirect url used for resetting password - :type redirect_url: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2442,11 +1702,10 @@ def reset_password_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._reset_password_serialize( + _param = self._retrieve_user_serialize( x_request_id=x_request_id, user_id=user_id, x_trace_id=x_trace_id, - redirect_url=redirect_url, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2454,7 +1713,7 @@ def reset_password_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + '200': "FindUserResponse", } response_data = self.api_client.call_api( *_param, @@ -2463,12 +1722,11 @@ def reset_password_without_preload_content( return response_data.response - def _reset_password_serialize( + def _retrieve_user_serialize( self, x_request_id, user_id, x_trace_id, - redirect_url, _request_auth, _content_type, _headers, @@ -2491,10 +1749,6 @@ def _reset_password_serialize( if user_id is not None: _path_params['userId'] = user_id # process the query parameters - if redirect_url is not None: - - _query_params.append(('redirectUrl', redirect_url)) - # process the header parameters if x_request_id is not None: _header_params['x-request-id'] = x_request_id @@ -2504,6 +1758,12 @@ def _reset_password_serialize( # process the body parameter + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -2512,8 +1772,8 @@ def _reset_password_serialize( ] return self.api_client.param_serialize( - method='POST', - resource_path='/v1/users/{userId}/reset-password', + method='GET', + resource_path='/v1/users/{userId}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2530,10 +1790,9 @@ def _reset_password_serialize( @validate_call - def retrieve_user( + def retrieve_user_client( self, x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], - user_id: Annotated[StrictStr, Field(description="The identifier of the user.")], x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, _request_timeout: Union[ None, @@ -2547,15 +1806,13 @@ def retrieve_user( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> FindUserResponse: - """Get specific user by id + ) -> FindClientResponse: + """Get client - Get attributes for a specific user. + Get idm client. :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) :type x_request_id: str - :param user_id: The identifier of the user. (required) - :type user_id: str :param x_trace_id: Identifier to trace group of requests. :type x_trace_id: str :param _request_timeout: timeout setting for this request. If one @@ -2580,9 +1837,8 @@ def retrieve_user( :return: Returns the result object. """ # noqa: E501 - _param = self._retrieve_user_serialize( + _param = self._retrieve_user_client_serialize( x_request_id=x_request_id, - user_id=user_id, x_trace_id=x_trace_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2591,7 +1847,7 @@ def retrieve_user( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FindUserResponse", + '200': "FindClientResponse", } response_data = self.api_client.call_api( *_param, @@ -2605,10 +1861,9 @@ def retrieve_user( @validate_call - def retrieve_user_with_http_info( + def retrieve_user_client_with_http_info( self, x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], - user_id: Annotated[StrictStr, Field(description="The identifier of the user.")], x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, _request_timeout: Union[ None, @@ -2622,15 +1877,13 @@ def retrieve_user_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FindUserResponse]: - """Get specific user by id + ) -> ApiResponse[FindClientResponse]: + """Get client - Get attributes for a specific user. + Get idm client. :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) :type x_request_id: str - :param user_id: The identifier of the user. (required) - :type user_id: str :param x_trace_id: Identifier to trace group of requests. :type x_trace_id: str :param _request_timeout: timeout setting for this request. If one @@ -2655,9 +1908,8 @@ def retrieve_user_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._retrieve_user_serialize( + _param = self._retrieve_user_client_serialize( x_request_id=x_request_id, - user_id=user_id, x_trace_id=x_trace_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2666,7 +1918,7 @@ def retrieve_user_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FindUserResponse", + '200': "FindClientResponse", } response_data = self.api_client.call_api( *_param, @@ -2680,10 +1932,9 @@ def retrieve_user_with_http_info( @validate_call - def retrieve_user_without_preload_content( + def retrieve_user_client_without_preload_content( self, x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], - user_id: Annotated[StrictStr, Field(description="The identifier of the user.")], x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, _request_timeout: Union[ None, @@ -2698,14 +1949,12 @@ def retrieve_user_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get specific user by id + """Get client - Get attributes for a specific user. + Get idm client. :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) :type x_request_id: str - :param user_id: The identifier of the user. (required) - :type user_id: str :param x_trace_id: Identifier to trace group of requests. :type x_trace_id: str :param _request_timeout: timeout setting for this request. If one @@ -2730,9 +1979,8 @@ def retrieve_user_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._retrieve_user_serialize( + _param = self._retrieve_user_client_serialize( x_request_id=x_request_id, - user_id=user_id, x_trace_id=x_trace_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2741,7 +1989,7 @@ def retrieve_user_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FindUserResponse", + '200': "FindClientResponse", } response_data = self.api_client.call_api( *_param, @@ -2750,10 +1998,9 @@ def retrieve_user_without_preload_content( return response_data.response - def _retrieve_user_serialize( + def _retrieve_user_client_serialize( self, x_request_id, - user_id, x_trace_id, _request_auth, _content_type, @@ -2774,8 +2021,6 @@ def _retrieve_user_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters if x_request_id is not None: @@ -2801,7 +2046,7 @@ def _retrieve_user_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v1/users/{userId}', + resource_path='/v1/users/client', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2818,10 +2063,11 @@ def _retrieve_user_serialize( @validate_call - def retrieve_user_client( + def retrieve_user_is_password_set( self, x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="The user ID for checking if password is set for him")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2834,15 +2080,17 @@ def retrieve_user_client( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> FindClientResponse: - """Get client + ) -> FindUserIsPasswordSetResponse: + """Get user is password set status - Get idm client. + Get info about idm user if the password is set. :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) :type x_request_id: str :param x_trace_id: Identifier to trace group of requests. :type x_trace_id: str + :param user_id: The user ID for checking if password is set for him + :type user_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2865,9 +2113,10 @@ def retrieve_user_client( :return: Returns the result object. """ # noqa: E501 - _param = self._retrieve_user_client_serialize( + _param = self._retrieve_user_is_password_set_serialize( x_request_id=x_request_id, x_trace_id=x_trace_id, + user_id=user_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2875,7 +2124,7 @@ def retrieve_user_client( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FindClientResponse", + '200': "FindUserIsPasswordSetResponse", } response_data = self.api_client.call_api( *_param, @@ -2889,10 +2138,11 @@ def retrieve_user_client( @validate_call - def retrieve_user_client_with_http_info( + def retrieve_user_is_password_set_with_http_info( self, x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="The user ID for checking if password is set for him")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2905,15 +2155,17 @@ def retrieve_user_client_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FindClientResponse]: - """Get client + ) -> ApiResponse[FindUserIsPasswordSetResponse]: + """Get user is password set status - Get idm client. + Get info about idm user if the password is set. :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) :type x_request_id: str :param x_trace_id: Identifier to trace group of requests. :type x_trace_id: str + :param user_id: The user ID for checking if password is set for him + :type user_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2936,9 +2188,10 @@ def retrieve_user_client_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._retrieve_user_client_serialize( + _param = self._retrieve_user_is_password_set_serialize( x_request_id=x_request_id, x_trace_id=x_trace_id, + user_id=user_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2946,7 +2199,7 @@ def retrieve_user_client_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FindClientResponse", + '200': "FindUserIsPasswordSetResponse", } response_data = self.api_client.call_api( *_param, @@ -2960,10 +2213,11 @@ def retrieve_user_client_with_http_info( @validate_call - def retrieve_user_client_without_preload_content( + def retrieve_user_is_password_set_without_preload_content( self, x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="The user ID for checking if password is set for him")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2977,14 +2231,16 @@ def retrieve_user_client_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get client + """Get user is password set status - Get idm client. + Get info about idm user if the password is set. :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) :type x_request_id: str :param x_trace_id: Identifier to trace group of requests. :type x_trace_id: str + :param user_id: The user ID for checking if password is set for him + :type user_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3007,9 +2263,10 @@ def retrieve_user_client_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._retrieve_user_client_serialize( + _param = self._retrieve_user_is_password_set_serialize( x_request_id=x_request_id, x_trace_id=x_trace_id, + user_id=user_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3017,7 +2274,7 @@ def retrieve_user_client_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FindClientResponse", + '200': "FindUserIsPasswordSetResponse", } response_data = self.api_client.call_api( *_param, @@ -3026,10 +2283,11 @@ def retrieve_user_client_without_preload_content( return response_data.response - def _retrieve_user_client_serialize( + def _retrieve_user_is_password_set_serialize( self, x_request_id, x_trace_id, + user_id, _request_auth, _content_type, _headers, @@ -3050,6 +2308,10 @@ def _retrieve_user_client_serialize( # process the path parameters # process the query parameters + if user_id is not None: + + _query_params.append(('userId', user_id)) + # process the header parameters if x_request_id is not None: _header_params['x-request-id'] = x_request_id @@ -3074,7 +2336,7 @@ def _retrieve_user_client_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v1/users/client', + resource_path='/v1/users/is-password-set', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/pfruck_contabo/api/users_object_storage_credentials_api.py b/pfruck_contabo/api/users_object_storage_credentials_api.py new file mode 100644 index 00000000..b6f98b5e --- /dev/null +++ b/pfruck_contabo/api/users_object_storage_credentials_api.py @@ -0,0 +1,1067 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictInt, StrictStr, field_validator +from typing import List, Optional +from typing_extensions import Annotated +from pfruck_contabo.models.find_credential_response import FindCredentialResponse +from pfruck_contabo.models.list_credential_response import ListCredentialResponse + +from pfruck_contabo.api_client import ApiClient, RequestSerialized +from pfruck_contabo.api_response import ApiResponse +from pfruck_contabo.rest import RESTResponseType + + +class UsersObjectStorageCredentialsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def get_object_storage_credentials( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + user_id: Annotated[StrictStr, Field(description="The identifier of the user.")], + object_storage_id: Annotated[StrictStr, Field(description="The identifier of the S3 object storage")], + credential_id: Annotated[StrictInt, Field(description="The ID of the object storage credential")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FindCredentialResponse: + """Get S3 compatible object storage credentials. + + Get S3 compatible object storage credentials for accessing it via S3 compatible tools like `aws` cli. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param user_id: The identifier of the user. (required) + :type user_id: str + :param object_storage_id: The identifier of the S3 object storage (required) + :type object_storage_id: str + :param credential_id: The ID of the object storage credential (required) + :type credential_id: int + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_object_storage_credentials_serialize( + x_request_id=x_request_id, + user_id=user_id, + object_storage_id=object_storage_id, + credential_id=credential_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FindCredentialResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_object_storage_credentials_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + user_id: Annotated[StrictStr, Field(description="The identifier of the user.")], + object_storage_id: Annotated[StrictStr, Field(description="The identifier of the S3 object storage")], + credential_id: Annotated[StrictInt, Field(description="The ID of the object storage credential")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FindCredentialResponse]: + """Get S3 compatible object storage credentials. + + Get S3 compatible object storage credentials for accessing it via S3 compatible tools like `aws` cli. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param user_id: The identifier of the user. (required) + :type user_id: str + :param object_storage_id: The identifier of the S3 object storage (required) + :type object_storage_id: str + :param credential_id: The ID of the object storage credential (required) + :type credential_id: int + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_object_storage_credentials_serialize( + x_request_id=x_request_id, + user_id=user_id, + object_storage_id=object_storage_id, + credential_id=credential_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FindCredentialResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_object_storage_credentials_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + user_id: Annotated[StrictStr, Field(description="The identifier of the user.")], + object_storage_id: Annotated[StrictStr, Field(description="The identifier of the S3 object storage")], + credential_id: Annotated[StrictInt, Field(description="The ID of the object storage credential")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get S3 compatible object storage credentials. + + Get S3 compatible object storage credentials for accessing it via S3 compatible tools like `aws` cli. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param user_id: The identifier of the user. (required) + :type user_id: str + :param object_storage_id: The identifier of the S3 object storage (required) + :type object_storage_id: str + :param credential_id: The ID of the object storage credential (required) + :type credential_id: int + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_object_storage_credentials_serialize( + x_request_id=x_request_id, + user_id=user_id, + object_storage_id=object_storage_id, + credential_id=credential_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FindCredentialResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_object_storage_credentials_serialize( + self, + x_request_id, + user_id, + object_storage_id, + credential_id, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['userId'] = user_id + if object_storage_id is not None: + _path_params['objectStorageId'] = object_storage_id + if credential_id is not None: + _path_params['credentialId'] = credential_id + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/users/{userId}/object-storages/{objectStorageId}/credentials/{credentialId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_object_storage_credentials( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + user_id: Annotated[StrictStr, Field(description="The identifier of the user.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + object_storage_id: Annotated[Optional[StrictStr], Field(description="The identifier of the S3 object storage")] = None, + region_name: Annotated[Optional[StrictStr], Field(description="Filter for Object Storage by regions. Available regions: Asia (Singapore), European Union, United States (Central)")] = None, + display_name: Annotated[Optional[StrictStr], Field(description="Filter for Object Storage by his displayName.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ListCredentialResponse: + """Get list of S3 compatible object storage credentials for user. + + Get list of S3 compatible object storage credentials for accessing it via S3 compatible tools like `aws` cli. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param user_id: The identifier of the user. (required) + :type user_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param object_storage_id: The identifier of the S3 object storage + :type object_storage_id: str + :param region_name: Filter for Object Storage by regions. Available regions: Asia (Singapore), European Union, United States (Central) + :type region_name: str + :param display_name: Filter for Object Storage by his displayName. + :type display_name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_object_storage_credentials_serialize( + x_request_id=x_request_id, + user_id=user_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + object_storage_id=object_storage_id, + region_name=region_name, + display_name=display_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListCredentialResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_object_storage_credentials_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + user_id: Annotated[StrictStr, Field(description="The identifier of the user.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + object_storage_id: Annotated[Optional[StrictStr], Field(description="The identifier of the S3 object storage")] = None, + region_name: Annotated[Optional[StrictStr], Field(description="Filter for Object Storage by regions. Available regions: Asia (Singapore), European Union, United States (Central)")] = None, + display_name: Annotated[Optional[StrictStr], Field(description="Filter for Object Storage by his displayName.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ListCredentialResponse]: + """Get list of S3 compatible object storage credentials for user. + + Get list of S3 compatible object storage credentials for accessing it via S3 compatible tools like `aws` cli. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param user_id: The identifier of the user. (required) + :type user_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param object_storage_id: The identifier of the S3 object storage + :type object_storage_id: str + :param region_name: Filter for Object Storage by regions. Available regions: Asia (Singapore), European Union, United States (Central) + :type region_name: str + :param display_name: Filter for Object Storage by his displayName. + :type display_name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_object_storage_credentials_serialize( + x_request_id=x_request_id, + user_id=user_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + object_storage_id=object_storage_id, + region_name=region_name, + display_name=display_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListCredentialResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_object_storage_credentials_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + user_id: Annotated[StrictStr, Field(description="The identifier of the user.")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + page: Annotated[Optional[StrictInt], Field(description="Number of page to be fetched.")] = None, + size: Annotated[Optional[StrictInt], Field(description="Number of elements per page.")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`.")] = None, + object_storage_id: Annotated[Optional[StrictStr], Field(description="The identifier of the S3 object storage")] = None, + region_name: Annotated[Optional[StrictStr], Field(description="Filter for Object Storage by regions. Available regions: Asia (Singapore), European Union, United States (Central)")] = None, + display_name: Annotated[Optional[StrictStr], Field(description="Filter for Object Storage by his displayName.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get list of S3 compatible object storage credentials for user. + + Get list of S3 compatible object storage credentials for accessing it via S3 compatible tools like `aws` cli. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param user_id: The identifier of the user. (required) + :type user_id: str + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param page: Number of page to be fetched. + :type page: int + :param size: Number of elements per page. + :type size: int + :param order_by: Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. + :type order_by: List[str] + :param object_storage_id: The identifier of the S3 object storage + :type object_storage_id: str + :param region_name: Filter for Object Storage by regions. Available regions: Asia (Singapore), European Union, United States (Central) + :type region_name: str + :param display_name: Filter for Object Storage by his displayName. + :type display_name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_object_storage_credentials_serialize( + x_request_id=x_request_id, + user_id=user_id, + x_trace_id=x_trace_id, + page=page, + size=size, + order_by=order_by, + object_storage_id=object_storage_id, + region_name=region_name, + display_name=display_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListCredentialResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_object_storage_credentials_serialize( + self, + x_request_id, + user_id, + x_trace_id, + page, + size, + order_by, + object_storage_id, + region_name, + display_name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'orderBy': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['userId'] = user_id + # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if size is not None: + + _query_params.append(('size', size)) + + if order_by is not None: + + _query_params.append(('orderBy', order_by)) + + if object_storage_id is not None: + + _query_params.append(('objectStorageId', object_storage_id)) + + if region_name is not None: + + _query_params.append(('regionName', region_name)) + + if display_name is not None: + + _query_params.append(('displayName', display_name)) + + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/users/{userId}/object-storages/credentials', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def regenerate_object_storage_credentials( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + user_id: Annotated[StrictStr, Field(description="The identifier of the user.")], + object_storage_id: Annotated[StrictStr, Field(description="The identifier of the S3 object storage")], + credential_id: Annotated[StrictInt, Field(description="The ID of the object storage credential")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FindCredentialResponse: + """Regenerates secret key of specified user for the S3 compatible object storages. + + Regenerates secret key of specified user for the a specific S3 compatible object storages. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param user_id: The identifier of the user. (required) + :type user_id: str + :param object_storage_id: The identifier of the S3 object storage (required) + :type object_storage_id: str + :param credential_id: The ID of the object storage credential (required) + :type credential_id: int + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._regenerate_object_storage_credentials_serialize( + x_request_id=x_request_id, + user_id=user_id, + object_storage_id=object_storage_id, + credential_id=credential_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FindCredentialResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def regenerate_object_storage_credentials_with_http_info( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + user_id: Annotated[StrictStr, Field(description="The identifier of the user.")], + object_storage_id: Annotated[StrictStr, Field(description="The identifier of the S3 object storage")], + credential_id: Annotated[StrictInt, Field(description="The ID of the object storage credential")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FindCredentialResponse]: + """Regenerates secret key of specified user for the S3 compatible object storages. + + Regenerates secret key of specified user for the a specific S3 compatible object storages. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param user_id: The identifier of the user. (required) + :type user_id: str + :param object_storage_id: The identifier of the S3 object storage (required) + :type object_storage_id: str + :param credential_id: The ID of the object storage credential (required) + :type credential_id: int + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._regenerate_object_storage_credentials_serialize( + x_request_id=x_request_id, + user_id=user_id, + object_storage_id=object_storage_id, + credential_id=credential_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FindCredentialResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def regenerate_object_storage_credentials_without_preload_content( + self, + x_request_id: Annotated[str, Field(strict=True, description="[Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.")], + user_id: Annotated[StrictStr, Field(description="The identifier of the user.")], + object_storage_id: Annotated[StrictStr, Field(description="The identifier of the S3 object storage")], + credential_id: Annotated[StrictInt, Field(description="The ID of the object storage credential")], + x_trace_id: Annotated[Optional[StrictStr], Field(description="Identifier to trace group of requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Regenerates secret key of specified user for the S3 compatible object storages. + + Regenerates secret key of specified user for the a specific S3 compatible object storages. + + :param x_request_id: [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. (required) + :type x_request_id: str + :param user_id: The identifier of the user. (required) + :type user_id: str + :param object_storage_id: The identifier of the S3 object storage (required) + :type object_storage_id: str + :param credential_id: The ID of the object storage credential (required) + :type credential_id: int + :param x_trace_id: Identifier to trace group of requests. + :type x_trace_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._regenerate_object_storage_credentials_serialize( + x_request_id=x_request_id, + user_id=user_id, + object_storage_id=object_storage_id, + credential_id=credential_id, + x_trace_id=x_trace_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FindCredentialResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _regenerate_object_storage_credentials_serialize( + self, + x_request_id, + user_id, + object_storage_id, + credential_id, + x_trace_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['userId'] = user_id + if object_storage_id is not None: + _path_params['objectStorageId'] = object_storage_id + if credential_id is not None: + _path_params['credentialId'] = credential_id + # process the query parameters + # process the header parameters + if x_request_id is not None: + _header_params['x-request-id'] = x_request_id + if x_trace_id is not None: + _header_params['x-trace-id'] = x_trace_id + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearer' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v1/users/{userId}/object-storages/{objectStorageId}/credentials/{credentialId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/pfruck_contabo/models/__init__.py b/pfruck_contabo/models/__init__.py index 8443d1d3..3870dcce 100644 --- a/pfruck_contabo/models/__init__.py +++ b/pfruck_contabo/models/__init__.py @@ -14,25 +14,67 @@ # import models into model package +from pfruck_contabo.models.account_org_response import AccountOrgResponse +from pfruck_contabo.models.accounts_list_response import AccountsListResponse from pfruck_contabo.models.add_on_quantity_request import AddOnQuantityRequest from pfruck_contabo.models.add_on_request import AddOnRequest from pfruck_contabo.models.add_on_response import AddOnResponse from pfruck_contabo.models.additional_ip import AdditionalIp +from pfruck_contabo.models.api_bulk_delete_dns_zone_records_response import ApiBulkDeleteDnsZoneRecordsResponse +from pfruck_contabo.models.api_dns_zone_record_response import ApiDnsZoneRecordResponse +from pfruck_contabo.models.api_dns_zone_response import ApiDnsZoneResponse from pfruck_contabo.models.api_permissions_response import ApiPermissionsResponse +from pfruck_contabo.models.api_ptr_record_response import ApiPtrRecordResponse from pfruck_contabo.models.application_config import ApplicationConfig +from pfruck_contabo.models.application_meta_data import ApplicationMetaData from pfruck_contabo.models.application_requirements import ApplicationRequirements from pfruck_contabo.models.application_response import ApplicationResponse +from pfruck_contabo.models.assign_instance_firewall_response import AssignInstanceFirewallResponse from pfruck_contabo.models.assign_instance_private_network_response import AssignInstancePrivateNetworkResponse from pfruck_contabo.models.assign_vip_response import AssignVipResponse from pfruck_contabo.models.assigned_tag_response import AssignedTagResponse from pfruck_contabo.models.assignment_audit_response import AssignmentAuditResponse from pfruck_contabo.models.assignment_response import AssignmentResponse +from pfruck_contabo.models.audit_count_response import AuditCountResponse from pfruck_contabo.models.auto_scaling_type_request import AutoScalingTypeRequest from pfruck_contabo.models.auto_scaling_type_response import AutoScalingTypeResponse +from pfruck_contabo.models.base_check_collection_create_request import BaseCheckCollectionCreateRequest +from pfruck_contabo.models.base_check_create_request import BaseCheckCreateRequest +from pfruck_contabo.models.base_remedy_create_request import BaseRemedyCreateRequest +from pfruck_contabo.models.bulk_delete_dns_zone_records_request import BulkDeleteDnsZoneRecordsRequest +from pfruck_contabo.models.bulk_delete_result_response import BulkDeleteResultResponse +from pfruck_contabo.models.cancel_domain_request import CancelDomainRequest +from pfruck_contabo.models.cancel_instance_request import CancelInstanceRequest from pfruck_contabo.models.cancel_instance_response import CancelInstanceResponse from pfruck_contabo.models.cancel_instance_response_data import CancelInstanceResponseData +from pfruck_contabo.models.cancel_object_storage_request import CancelObjectStorageRequest from pfruck_contabo.models.cancel_object_storage_response import CancelObjectStorageResponse from pfruck_contabo.models.cancel_object_storage_response_data import CancelObjectStorageResponseData +from pfruck_contabo.models.cancel_request import CancelRequest +from pfruck_contabo.models.changed_auth_code import ChangedAuthCode +from pfruck_contabo.models.changes import Changes +from pfruck_contabo.models.check_collection_check_templates import CheckCollectionCheckTemplates +from pfruck_contabo.models.check_collection_create_request import CheckCollectionCreateRequest +from pfruck_contabo.models.check_collection_response import CheckCollectionResponse +from pfruck_contabo.models.check_collection_template_response import CheckCollectionTemplateResponse +from pfruck_contabo.models.check_collection_templates_check_templates import CheckCollectionTemplatesCheckTemplates +from pfruck_contabo.models.check_collection_templates_get_response import CheckCollectionTemplatesGetResponse +from pfruck_contabo.models.check_collection_templates_list_response import CheckCollectionTemplatesListResponse +from pfruck_contabo.models.check_collections_audit_list_response import CheckCollectionsAuditListResponse +from pfruck_contabo.models.check_collections_audit_response import CheckCollectionsAuditResponse +from pfruck_contabo.models.check_collections_get_response import CheckCollectionsGetResponse +from pfruck_contabo.models.check_collections_list_response import CheckCollectionsListResponse +from pfruck_contabo.models.check_collections_replay_request import CheckCollectionsReplayRequest +from pfruck_contabo.models.check_create_request import CheckCreateRequest +from pfruck_contabo.models.check_response import CheckResponse +from pfruck_contabo.models.check_template_response import CheckTemplateResponse +from pfruck_contabo.models.check_templates_get_response import CheckTemplatesGetResponse +from pfruck_contabo.models.check_templates_list_response import CheckTemplatesListResponse +from pfruck_contabo.models.checks_audit_list_response import ChecksAuditListResponse +from pfruck_contabo.models.checks_audit_response import ChecksAuditResponse +from pfruck_contabo.models.checks_get_response import ChecksGetResponse +from pfruck_contabo.models.checks_list_response import ChecksListResponse +from pfruck_contabo.models.checks_replay_request import ChecksReplayRequest from pfruck_contabo.models.client_response import ClientResponse from pfruck_contabo.models.client_secret_response import ClientSecretResponse from pfruck_contabo.models.create_assignment_response import CreateAssignmentResponse @@ -40,6 +82,10 @@ from pfruck_contabo.models.create_custom_image_request import CreateCustomImageRequest from pfruck_contabo.models.create_custom_image_response import CreateCustomImageResponse from pfruck_contabo.models.create_custom_image_response_data import CreateCustomImageResponseData +from pfruck_contabo.models.create_dns_zone_record_request import CreateDnsZoneRecordRequest +from pfruck_contabo.models.create_dns_zone_request import CreateDnsZoneRequest +from pfruck_contabo.models.create_firewall_request import CreateFirewallRequest +from pfruck_contabo.models.create_firewall_response import CreateFirewallResponse from pfruck_contabo.models.create_instance_addons import CreateInstanceAddons from pfruck_contabo.models.create_instance_request import CreateInstanceRequest from pfruck_contabo.models.create_instance_response import CreateInstanceResponse @@ -49,6 +95,7 @@ from pfruck_contabo.models.create_object_storage_response_data import CreateObjectStorageResponseData from pfruck_contabo.models.create_private_network_request import CreatePrivateNetworkRequest from pfruck_contabo.models.create_private_network_response import CreatePrivateNetworkResponse +from pfruck_contabo.models.create_ptr_record_request import CreatePtrRecordRequest from pfruck_contabo.models.create_role_request import CreateRoleRequest from pfruck_contabo.models.create_role_response import CreateRoleResponse from pfruck_contabo.models.create_role_response_data import CreateRoleResponseData @@ -59,9 +106,6 @@ from pfruck_contabo.models.create_tag_request import CreateTagRequest from pfruck_contabo.models.create_tag_response import CreateTagResponse from pfruck_contabo.models.create_tag_response_data import CreateTagResponseData -from pfruck_contabo.models.create_ticket_request import CreateTicketRequest -from pfruck_contabo.models.create_ticket_response import CreateTicketResponse -from pfruck_contabo.models.create_ticket_response_data import CreateTicketResponseData from pfruck_contabo.models.create_user_request import CreateUserRequest from pfruck_contabo.models.create_user_response import CreateUserResponse from pfruck_contabo.models.create_user_response_data import CreateUserResponseData @@ -69,10 +113,40 @@ from pfruck_contabo.models.custom_images_stats_response import CustomImagesStatsResponse from pfruck_contabo.models.custom_images_stats_response_data import CustomImagesStatsResponseData from pfruck_contabo.models.data_center_response import DataCenterResponse +from pfruck_contabo.models.dns_zone_record_response import DnsZoneRecordResponse +from pfruck_contabo.models.dns_zone_response import DnsZoneResponse +from pfruck_contabo.models.domain_audit_response import DomainAuditResponse +from pfruck_contabo.models.domain_audit_response_data import DomainAuditResponseData +from pfruck_contabo.models.domain_auth_code_regenerate_response import DomainAuthCodeRegenerateResponse +from pfruck_contabo.models.domain_auth_code_response import DomainAuthCodeResponse +from pfruck_contabo.models.domain_cancel import DomainCancel +from pfruck_contabo.models.domain_cancel_response import DomainCancelResponse +from pfruck_contabo.models.domain_create_request import DomainCreateRequest +from pfruck_contabo.models.domain_create_response import DomainCreateResponse +from pfruck_contabo.models.domain_details import DomainDetails +from pfruck_contabo.models.domain_find_response import DomainFindResponse +from pfruck_contabo.models.domain_handles import DomainHandles +from pfruck_contabo.models.domain_patch_request import DomainPatchRequest +from pfruck_contabo.models.domain_patch_response import DomainPatchResponse +from pfruck_contabo.models.domain_response import DomainResponse +from pfruck_contabo.models.domains_list_response import DomainsListResponse +from pfruck_contabo.models.ext_check_collection_response import ExtCheckCollectionResponse +from pfruck_contabo.models.ext_check_collection_template_response import ExtCheckCollectionTemplateResponse +from pfruck_contabo.models.ext_check_collection_templates_get_response import ExtCheckCollectionTemplatesGetResponse +from pfruck_contabo.models.ext_check_collection_templates_list_response import ExtCheckCollectionTemplatesListResponse +from pfruck_contabo.models.ext_check_collections_get_response import ExtCheckCollectionsGetResponse +from pfruck_contabo.models.ext_check_collections_list_response import ExtCheckCollectionsListResponse +from pfruck_contabo.models.ext_check_response import ExtCheckResponse +from pfruck_contabo.models.ext_checks_get_response import ExtChecksGetResponse +from pfruck_contabo.models.ext_checks_list_response import ExtChecksListResponse +from pfruck_contabo.models.ext_remedies_get_response import ExtRemediesGetResponse +from pfruck_contabo.models.ext_remedies_list_response import ExtRemediesListResponse +from pfruck_contabo.models.ext_remedy_response import ExtRemedyResponse from pfruck_contabo.models.extra_storage_request import ExtraStorageRequest from pfruck_contabo.models.find_assignment_response import FindAssignmentResponse from pfruck_contabo.models.find_client_response import FindClientResponse from pfruck_contabo.models.find_credential_response import FindCredentialResponse +from pfruck_contabo.models.find_firewall_response import FindFirewallResponse from pfruck_contabo.models.find_image_response import FindImageResponse from pfruck_contabo.models.find_instance_response import FindInstanceResponse from pfruck_contabo.models.find_object_storage_response import FindObjectStorageResponse @@ -85,12 +159,30 @@ from pfruck_contabo.models.find_user_response import FindUserResponse from pfruck_contabo.models.find_vip_response import FindVipResponse from pfruck_contabo.models.find_vnc_response import FindVncResponse +from pfruck_contabo.models.firewall_audit_response import FirewallAuditResponse +from pfruck_contabo.models.firewall_response import FirewallResponse +from pfruck_contabo.models.firewall_rule_request import FirewallRuleRequest +from pfruck_contabo.models.firewall_rule_response import FirewallRuleResponse from pfruck_contabo.models.firewalling_upgrade_request import FirewallingUpgradeRequest from pfruck_contabo.models.generate_client_secret_response import GenerateClientSecretResponse +from pfruck_contabo.models.handle_address import HandleAddress +from pfruck_contabo.models.handle_audit_response import HandleAuditResponse +from pfruck_contabo.models.handle_audit_response_data import HandleAuditResponseData +from pfruck_contabo.models.handle_birth_info import HandleBirthInfo +from pfruck_contabo.models.handle_create_request import HandleCreateRequest +from pfruck_contabo.models.handle_create_response import HandleCreateResponse +from pfruck_contabo.models.handle_find_response import HandleFindResponse +from pfruck_contabo.models.handle_list_response import HandleListResponse +from pfruck_contabo.models.handle_patch_request import HandlePatchRequest +from pfruck_contabo.models.handle_patch_response import HandlePatchResponse +from pfruck_contabo.models.handle_phone import HandlePhone +from pfruck_contabo.models.handle_response import HandleResponse from pfruck_contabo.models.image_audit_response import ImageAuditResponse from pfruck_contabo.models.image_audit_response_data import ImageAuditResponseData from pfruck_contabo.models.image_response import ImageResponse from pfruck_contabo.models.instance_assignment_self_links import InstanceAssignmentSelfLinks +from pfruck_contabo.models.instance_assignment_self_links1 import InstanceAssignmentSelfLinks1 +from pfruck_contabo.models.instance_details import InstanceDetails from pfruck_contabo.models.instance_rescue_action_response import InstanceRescueActionResponse from pfruck_contabo.models.instance_rescue_action_response_data import InstanceRescueActionResponseData from pfruck_contabo.models.instance_reset_password_action_response import InstanceResetPasswordActionResponse @@ -103,6 +195,7 @@ from pfruck_contabo.models.instance_start_action_response import InstanceStartActionResponse from pfruck_contabo.models.instance_start_action_response_data import InstanceStartActionResponseData from pfruck_contabo.models.instance_status import InstanceStatus +from pfruck_contabo.models.instance_status_representation import InstanceStatusRepresentation from pfruck_contabo.models.instance_stop_action_response import InstanceStopActionResponse from pfruck_contabo.models.instance_stop_action_response_data import InstanceStopActionResponseData from pfruck_contabo.models.instances import Instances @@ -111,8 +204,12 @@ from pfruck_contabo.models.instances_audit_response import InstancesAuditResponse from pfruck_contabo.models.instances_reset_password_actions_request import InstancesResetPasswordActionsRequest from pfruck_contabo.models.ip_config import IpConfig +from pfruck_contabo.models.ip_config1 import IpConfig1 +from pfruck_contabo.models.ip_config2 import IpConfig2 from pfruck_contabo.models.ip_v4 import IpV4 from pfruck_contabo.models.ip_v41 import IpV41 +from pfruck_contabo.models.ip_v42 import IpV42 +from pfruck_contabo.models.ip_v43 import IpV43 from pfruck_contabo.models.ip_v6 import IpV6 from pfruck_contabo.models.links import Links from pfruck_contabo.models.list_api_permission_response import ListApiPermissionResponse @@ -121,6 +218,11 @@ from pfruck_contabo.models.list_assignment_response import ListAssignmentResponse from pfruck_contabo.models.list_credential_response import ListCredentialResponse from pfruck_contabo.models.list_data_center_response import ListDataCenterResponse +from pfruck_contabo.models.list_dns_zone_records_response import ListDnsZoneRecordsResponse +from pfruck_contabo.models.list_dns_zones_response import ListDnsZonesResponse +from pfruck_contabo.models.list_firewall_audit_response import ListFirewallAuditResponse +from pfruck_contabo.models.list_firewall_response import ListFirewallResponse +from pfruck_contabo.models.list_firewall_response_data import ListFirewallResponseData from pfruck_contabo.models.list_image_response import ListImageResponse from pfruck_contabo.models.list_image_response_data import ListImageResponseData from pfruck_contabo.models.list_instances_actions_audit_response import ListInstancesActionsAuditResponse @@ -129,9 +231,11 @@ from pfruck_contabo.models.list_instances_response_data import ListInstancesResponseData from pfruck_contabo.models.list_object_storage_audit_response import ListObjectStorageAuditResponse from pfruck_contabo.models.list_object_storage_response import ListObjectStorageResponse +from pfruck_contabo.models.list_preset_rules_response import ListPresetRulesResponse from pfruck_contabo.models.list_private_network_audit_response import ListPrivateNetworkAuditResponse from pfruck_contabo.models.list_private_network_response import ListPrivateNetworkResponse from pfruck_contabo.models.list_private_network_response_data import ListPrivateNetworkResponseData +from pfruck_contabo.models.list_ptr_records_response import ListPtrRecordsResponse from pfruck_contabo.models.list_role_audit_response import ListRoleAuditResponse from pfruck_contabo.models.list_role_response import ListRoleResponse from pfruck_contabo.models.list_secret_audit_response import ListSecretAuditResponse @@ -146,12 +250,15 @@ from pfruck_contabo.models.list_vip_response import ListVipResponse from pfruck_contabo.models.list_vip_response_data import ListVipResponseData from pfruck_contabo.models.minimum_requirements import MinimumRequirements +from pfruck_contabo.models.nameserver import Nameserver from pfruck_contabo.models.object_storage_audit_response import ObjectStorageAuditResponse from pfruck_contabo.models.object_storage_response import ObjectStorageResponse from pfruck_contabo.models.object_storages_stats_response import ObjectStoragesStatsResponse from pfruck_contabo.models.object_storages_stats_response_data import ObjectStoragesStatsResponseData from pfruck_contabo.models.optimal_requirements import OptimalRequirements from pfruck_contabo.models.pagination_meta import PaginationMeta +from pfruck_contabo.models.patch_firewall_request import PatchFirewallRequest +from pfruck_contabo.models.patch_firewall_response import PatchFirewallResponse from pfruck_contabo.models.patch_instance_request import PatchInstanceRequest from pfruck_contabo.models.patch_instance_response import PatchInstanceResponse from pfruck_contabo.models.patch_instance_response_data import PatchInstanceResponseData @@ -161,28 +268,52 @@ from pfruck_contabo.models.patch_vnc_request import PatchVncRequest from pfruck_contabo.models.permission_request import PermissionRequest from pfruck_contabo.models.permission_response import PermissionResponse +from pfruck_contabo.models.preset_rules_response import PresetRulesResponse from pfruck_contabo.models.private_ip_config import PrivateIpConfig from pfruck_contabo.models.private_network_audit_response import PrivateNetworkAuditResponse from pfruck_contabo.models.private_network_response import PrivateNetworkResponse +from pfruck_contabo.models.ptr_record_response import PtrRecordResponse +from pfruck_contabo.models.put_firewall_request import PutFirewallRequest +from pfruck_contabo.models.put_firewall_response import PutFirewallResponse +from pfruck_contabo.models.record_audit_response import RecordAuditResponse +from pfruck_contabo.models.record_audit_response_data import RecordAuditResponseData from pfruck_contabo.models.reinstall_instance_request import ReinstallInstanceRequest from pfruck_contabo.models.reinstall_instance_response import ReinstallInstanceResponse from pfruck_contabo.models.reinstall_instance_response_data import ReinstallInstanceResponseData +from pfruck_contabo.models.remedies_audit_list_response import RemediesAuditListResponse +from pfruck_contabo.models.remedies_audit_response import RemediesAuditResponse +from pfruck_contabo.models.remedies_create_request import RemediesCreateRequest +from pfruck_contabo.models.remedies_get_response import RemediesGetResponse +from pfruck_contabo.models.remedies_list_response import RemediesListResponse +from pfruck_contabo.models.remedies_replay_request import RemediesReplayRequest +from pfruck_contabo.models.remedy_response import RemedyResponse +from pfruck_contabo.models.remedy_template_response import RemedyTemplateResponse +from pfruck_contabo.models.remedy_templates_get_response import RemedyTemplatesGetResponse +from pfruck_contabo.models.remedy_templates_list_response import RemedyTemplatesListResponse +from pfruck_contabo.models.replay_response import ReplayResponse from pfruck_contabo.models.resource_permissions_response import ResourcePermissionsResponse from pfruck_contabo.models.role_audit_response import RoleAuditResponse from pfruck_contabo.models.role_response import RoleResponse from pfruck_contabo.models.rollback_snapshot_response import RollbackSnapshotResponse +from pfruck_contabo.models.rules import Rules +from pfruck_contabo.models.rules_request import RulesRequest from pfruck_contabo.models.secret_audit_response import SecretAuditResponse from pfruck_contabo.models.secret_response import SecretResponse from pfruck_contabo.models.self_links import SelfLinks +from pfruck_contabo.models.set_default_handle_response import SetDefaultHandleResponse from pfruck_contabo.models.snapshot_response import SnapshotResponse from pfruck_contabo.models.snapshots_audit_response import SnapshotsAuditResponse +from pfruck_contabo.models.src_cidr import SrcCidr from pfruck_contabo.models.tag_assignment_self_links import TagAssignmentSelfLinks from pfruck_contabo.models.tag_audit_response import TagAuditResponse from pfruck_contabo.models.tag_response import TagResponse +from pfruck_contabo.models.unassign_instance_firewall_response import UnassignInstanceFirewallResponse from pfruck_contabo.models.unassign_instance_private_network_response import UnassignInstancePrivateNetworkResponse from pfruck_contabo.models.update_custom_image_request import UpdateCustomImageRequest from pfruck_contabo.models.update_custom_image_response import UpdateCustomImageResponse from pfruck_contabo.models.update_custom_image_response_data import UpdateCustomImageResponseData +from pfruck_contabo.models.update_dns_zone_record_request import UpdateDnsZoneRecordRequest +from pfruck_contabo.models.update_ptr_record_request import UpdatePtrRecordRequest from pfruck_contabo.models.update_role_request import UpdateRoleRequest from pfruck_contabo.models.update_role_response import UpdateRoleResponse from pfruck_contabo.models.update_secret_request import UpdateSecretRequest @@ -204,3 +335,5 @@ from pfruck_contabo.models.vip_audit_response import VipAuditResponse from pfruck_contabo.models.vip_response import VipResponse from pfruck_contabo.models.vnc_response import VncResponse +from pfruck_contabo.models.zone_audit_response import ZoneAuditResponse +from pfruck_contabo.models.zone_audit_response_data import ZoneAuditResponseData diff --git a/pfruck_contabo/models/account_org_response.py b/pfruck_contabo/models/account_org_response.py new file mode 100644 index 00000000..2860176d --- /dev/null +++ b/pfruck_contabo/models/account_org_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class AccountOrgResponse(BaseModel): + """ + AccountOrgResponse + """ # noqa: E501 + created_date: datetime = Field(description="Creation date", alias="createdDate") + modified_date: datetime = Field(description="Modify date", alias="modifiedDate") + org_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Org id", alias="orgId") + account_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Account id", alias="accountId") + __properties: ClassVar[List[str]] = ["createdDate", "modifiedDate", "orgId", "accountId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AccountOrgResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AccountOrgResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdDate": obj.get("createdDate"), + "modifiedDate": obj.get("modifiedDate"), + "orgId": obj.get("orgId"), + "accountId": obj.get("accountId") + }) + return _obj + + diff --git a/pfruck_contabo/models/accounts_list_response.py b/pfruck_contabo/models/accounts_list_response.py new file mode 100644 index 00000000..357869e0 --- /dev/null +++ b/pfruck_contabo/models/accounts_list_response.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.account_org_response import AccountOrgResponse +from pfruck_contabo.models.pagination_meta import PaginationMeta +from typing import Optional, Set +from typing_extensions import Self + +class AccountsListResponse(BaseModel): + """ + AccountsListResponse + """ # noqa: E501 + pagination: PaginationMeta = Field(description="Data about pagination like how many results, pages, page size.", alias="_pagination") + data: List[AccountOrgResponse] + links: Dict[str, Any] = Field(alias="_links") + __properties: ClassVar[List[str]] = ["_pagination", "data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AccountsListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['_pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AccountsListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_pagination": PaginationMeta.from_dict(obj["_pagination"]) if obj.get("_pagination") is not None else None, + "data": [AccountOrgResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": obj.get("_links") + }) + return _obj + + diff --git a/pfruck_contabo/models/additional_ip.py b/pfruck_contabo/models/additional_ip.py index c6267b2b..51958440 100644 --- a/pfruck_contabo/models/additional_ip.py +++ b/pfruck_contabo/models/additional_ip.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from pfruck_contabo.models.ip_v4 import IpV4 +from pfruck_contabo.models.ip_v43 import IpV43 from typing import Optional, Set from typing_extensions import Self @@ -27,7 +27,7 @@ class AdditionalIp(BaseModel): """ AdditionalIp """ # noqa: E501 - v4: IpV4 + v4: IpV43 __properties: ClassVar[List[str]] = ["v4"] model_config = ConfigDict( @@ -84,7 +84,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "v4": IpV4.from_dict(obj["v4"]) if obj.get("v4") is not None else None + "v4": IpV43.from_dict(obj["v4"]) if obj.get("v4") is not None else None }) return _obj diff --git a/pfruck_contabo/models/api_bulk_delete_dns_zone_records_response.py b/pfruck_contabo/models/api_bulk_delete_dns_zone_records_response.py new file mode 100644 index 00000000..aca9da85 --- /dev/null +++ b/pfruck_contabo/models/api_bulk_delete_dns_zone_records_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.bulk_delete_result_response import BulkDeleteResultResponse +from pfruck_contabo.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class ApiBulkDeleteDnsZoneRecordsResponse(BaseModel): + """ + ApiBulkDeleteDnsZoneRecordsResponse + """ # noqa: E501 + data: List[BulkDeleteResultResponse] + links: SelfLinks = Field(alias="_links") + __properties: ClassVar[List[str]] = ["data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiBulkDeleteDnsZoneRecordsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiBulkDeleteDnsZoneRecordsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [BulkDeleteResultResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/api_dns_zone_record_response.py b/pfruck_contabo/models/api_dns_zone_record_response.py new file mode 100644 index 00000000..7d5baf39 --- /dev/null +++ b/pfruck_contabo/models/api_dns_zone_record_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.dns_zone_record_response import DnsZoneRecordResponse +from pfruck_contabo.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class ApiDnsZoneRecordResponse(BaseModel): + """ + ApiDnsZoneRecordResponse + """ # noqa: E501 + data: List[DnsZoneRecordResponse] + links: SelfLinks = Field(alias="_links") + __properties: ClassVar[List[str]] = ["data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiDnsZoneRecordResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiDnsZoneRecordResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [DnsZoneRecordResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/api_dns_zone_response.py b/pfruck_contabo/models/api_dns_zone_response.py new file mode 100644 index 00000000..fba805ca --- /dev/null +++ b/pfruck_contabo/models/api_dns_zone_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.dns_zone_response import DnsZoneResponse +from pfruck_contabo.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class ApiDnsZoneResponse(BaseModel): + """ + ApiDnsZoneResponse + """ # noqa: E501 + data: List[DnsZoneResponse] + links: SelfLinks = Field(alias="_links") + __properties: ClassVar[List[str]] = ["data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiDnsZoneResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiDnsZoneResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [DnsZoneResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/create_ticket_response.py b/pfruck_contabo/models/api_ptr_record_response.py similarity index 86% rename from pfruck_contabo/models/create_ticket_response.py rename to pfruck_contabo/models/api_ptr_record_response.py index 79a68ead..6a36f1b9 100644 --- a/pfruck_contabo/models/create_ticket_response.py +++ b/pfruck_contabo/models/api_ptr_record_response.py @@ -19,16 +19,16 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List -from pfruck_contabo.models.create_ticket_response_data import CreateTicketResponseData +from pfruck_contabo.models.ptr_record_response import PtrRecordResponse from pfruck_contabo.models.self_links import SelfLinks from typing import Optional, Set from typing_extensions import Self -class CreateTicketResponse(BaseModel): +class ApiPtrRecordResponse(BaseModel): """ - CreateTicketResponse + ApiPtrRecordResponse """ # noqa: E501 - data: List[CreateTicketResponseData] + data: List[PtrRecordResponse] links: SelfLinks = Field(alias="_links") __properties: ClassVar[List[str]] = ["data", "_links"] @@ -50,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CreateTicketResponse from a JSON string""" + """Create an instance of ApiPtrRecordResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -85,7 +85,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CreateTicketResponse from a dict""" + """Create an instance of ApiPtrRecordResponse from a dict""" if obj is None: return None @@ -93,7 +93,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "data": [CreateTicketResponseData.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "data": [PtrRecordResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None }) return _obj diff --git a/pfruck_contabo/models/application_config.py b/pfruck_contabo/models/application_config.py index f266f69a..a51ee5b7 100644 --- a/pfruck_contabo/models/application_config.py +++ b/pfruck_contabo/models/application_config.py @@ -19,6 +19,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.application_meta_data import ApplicationMetaData from typing import Optional, Set from typing_extensions import Self @@ -29,7 +30,8 @@ class ApplicationConfig(BaseModel): image_id: StrictStr = Field(description="Image ID", alias="imageId") user_data_id: StrictStr = Field(description="User Data ID", alias="userDataId") user_data: StrictStr = Field(description="[Cloud-Init](https://cloud-init.io/) Config in order to customize during start of compute instance.", alias="userData") - __properties: ClassVar[List[str]] = ["imageId", "userDataId", "userData"] + meta_data: ApplicationMetaData = Field(description="Metadata of the application configuration", alias="metaData") + __properties: ClassVar[List[str]] = ["imageId", "userDataId", "userData", "metaData"] model_config = ConfigDict( populate_by_name=True, @@ -70,6 +72,9 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of meta_data + if self.meta_data: + _dict['metaData'] = self.meta_data.to_dict() return _dict @classmethod @@ -84,7 +89,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "imageId": obj.get("imageId"), "userDataId": obj.get("userDataId"), - "userData": obj.get("userData") + "userData": obj.get("userData"), + "metaData": ApplicationMetaData.from_dict(obj["metaData"]) if obj.get("metaData") is not None else None }) return _obj diff --git a/pfruck_contabo/models/application_meta_data.py b/pfruck_contabo/models/application_meta_data.py new file mode 100644 index 00000000..01fc14ff --- /dev/null +++ b/pfruck_contabo/models/application_meta_data.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationMetaData(BaseModel): + """ + ApplicationMetaData + """ # noqa: E501 + urls: List[StrictStr] + logo_url: StrictStr = Field(alias="logoUrl") + initial_username: StrictStr = Field(alias="initialUsername") + documentation_urls: List[StrictStr] = Field(alias="documentationUrls") + requires_password_for_install: StrictBool = Field(alias="requiresPasswordForInstall") + __properties: ClassVar[List[str]] = ["urls", "logoUrl", "initialUsername", "documentationUrls", "requiresPasswordForInstall"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationMetaData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationMetaData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "urls": obj.get("urls"), + "logoUrl": obj.get("logoUrl"), + "initialUsername": obj.get("initialUsername"), + "documentationUrls": obj.get("documentationUrls"), + "requiresPasswordForInstall": obj.get("requiresPasswordForInstall") + }) + return _obj + + diff --git a/pfruck_contabo/models/assign_instance_firewall_response.py b/pfruck_contabo/models/assign_instance_firewall_response.py new file mode 100644 index 00000000..cc6454d7 --- /dev/null +++ b/pfruck_contabo/models/assign_instance_firewall_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.instance_assignment_self_links1 import InstanceAssignmentSelfLinks1 +from typing import Optional, Set +from typing_extensions import Self + +class AssignInstanceFirewallResponse(BaseModel): + """ + AssignInstanceFirewallResponse + """ # noqa: E501 + links: InstanceAssignmentSelfLinks1 = Field(description="Links for easy navigation.", alias="_links") + __properties: ClassVar[List[str]] = ["_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssignInstanceFirewallResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssignInstanceFirewallResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": InstanceAssignmentSelfLinks1.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/audit_count_response.py b/pfruck_contabo/models/audit_count_response.py new file mode 100644 index 00000000..999648f6 --- /dev/null +++ b/pfruck_contabo/models/audit_count_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class AuditCountResponse(BaseModel): + """ + AuditCountResponse + """ # noqa: E501 + created_date: datetime = Field(description="Creation date", alias="createdDate") + modified_date: datetime = Field(description="Modify date", alias="modifiedDate") + org_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Org id", alias="orgId") + account_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Account id", alias="accountId") + count: Union[StrictFloat, StrictInt] = Field(description="Audit for replay quantity") + __properties: ClassVar[List[str]] = ["createdDate", "modifiedDate", "orgId", "accountId", "count"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AuditCountResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AuditCountResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdDate": obj.get("createdDate"), + "modifiedDate": obj.get("modifiedDate"), + "orgId": obj.get("orgId"), + "accountId": obj.get("accountId"), + "count": obj.get("count") + }) + return _obj + + diff --git a/pfruck_contabo/models/base_check_collection_create_request.py b/pfruck_contabo/models/base_check_collection_create_request.py new file mode 100644 index 00000000..97f8a839 --- /dev/null +++ b/pfruck_contabo/models/base_check_collection_create_request.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class BaseCheckCollectionCreateRequest(BaseModel): + """ + BaseCheckCollectionCreateRequest + """ # noqa: E501 + object_type: StrictStr = Field(description="Object type to be handled", alias="objectType") + object_id: StrictStr = Field(description="ID of the object, to be handled", alias="objectId") + check_collection_template_id: Union[StrictFloat, StrictInt] = Field(description="Check Template for this check collection", alias="checkCollectionTemplateId") + __properties: ClassVar[List[str]] = ["objectType", "objectId", "checkCollectionTemplateId"] + + @field_validator('object_type') + def object_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['vserver']): + raise ValueError("must be one of enum values ('vserver')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BaseCheckCollectionCreateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BaseCheckCollectionCreateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "objectType": obj.get("objectType"), + "objectId": obj.get("objectId"), + "checkCollectionTemplateId": obj.get("checkCollectionTemplateId") + }) + return _obj + + diff --git a/pfruck_contabo/models/base_check_create_request.py b/pfruck_contabo/models/base_check_create_request.py new file mode 100644 index 00000000..b5614a72 --- /dev/null +++ b/pfruck_contabo/models/base_check_create_request.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class BaseCheckCreateRequest(BaseModel): + """ + BaseCheckCreateRequest + """ # noqa: E501 + object_type: StrictStr = Field(description="Object type to be handled", alias="objectType") + object_id: StrictStr = Field(description="ID of the object, to be handled", alias="objectId") + check_template_id: Union[StrictFloat, StrictInt] = Field(description="Check Template for this check", alias="checkTemplateId") + check_collection_id: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Check Collection for this check", alias="checkCollectionId") + __properties: ClassVar[List[str]] = ["objectType", "objectId", "checkTemplateId", "checkCollectionId"] + + @field_validator('object_type') + def object_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['vserver']): + raise ValueError("must be one of enum values ('vserver')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BaseCheckCreateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BaseCheckCreateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "objectType": obj.get("objectType"), + "objectId": obj.get("objectId"), + "checkTemplateId": obj.get("checkTemplateId"), + "checkCollectionId": obj.get("checkCollectionId") + }) + return _obj + + diff --git a/pfruck_contabo/models/base_remedy_create_request.py b/pfruck_contabo/models/base_remedy_create_request.py new file mode 100644 index 00000000..f9880d4a --- /dev/null +++ b/pfruck_contabo/models/base_remedy_create_request.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class BaseRemedyCreateRequest(BaseModel): + """ + BaseRemedyCreateRequest + """ # noqa: E501 + object_type: StrictStr = Field(description="Object type to be handled", alias="objectType") + object_id: StrictStr = Field(description="ID of the object, to be handled", alias="objectId") + remedy_template_id: Union[StrictFloat, StrictInt] = Field(description="Remedy Template for this remedy", alias="remedyTemplateId") + remedy_collection_id: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Remedy Collection for this remedy", alias="remedyCollectionId") + __properties: ClassVar[List[str]] = ["objectType", "objectId", "remedyTemplateId", "remedyCollectionId"] + + @field_validator('object_type') + def object_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['vserver']): + raise ValueError("must be one of enum values ('vserver')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BaseRemedyCreateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BaseRemedyCreateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "objectType": obj.get("objectType"), + "objectId": obj.get("objectId"), + "remedyTemplateId": obj.get("remedyTemplateId"), + "remedyCollectionId": obj.get("remedyCollectionId") + }) + return _obj + + diff --git a/pfruck_contabo/models/bulk_delete_dns_zone_records_request.py b/pfruck_contabo/models/bulk_delete_dns_zone_records_request.py new file mode 100644 index 00000000..ba41c372 --- /dev/null +++ b/pfruck_contabo/models/bulk_delete_dns_zone_records_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class BulkDeleteDnsZoneRecordsRequest(BaseModel): + """ + BulkDeleteDnsZoneRecordsRequest + """ # noqa: E501 + record_ids: List[StrictInt] = Field(description="List of zone record ids to delete", alias="recordIds") + __properties: ClassVar[List[str]] = ["recordIds"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BulkDeleteDnsZoneRecordsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BulkDeleteDnsZoneRecordsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "recordIds": obj.get("recordIds") + }) + return _obj + + diff --git a/pfruck_contabo/models/bulk_delete_result_response.py b/pfruck_contabo/models/bulk_delete_result_response.py new file mode 100644 index 00000000..832b755c --- /dev/null +++ b/pfruck_contabo/models/bulk_delete_result_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class BulkDeleteResultResponse(BaseModel): + """ + BulkDeleteResultResponse + """ # noqa: E501 + tenant_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Your customer tenant id", alias="tenantId") + customer_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Your customer number", alias="customerId") + failed_ids: List[StrictInt] = Field(description="Failed zone record IDs", alias="failedIds") + __properties: ClassVar[List[str]] = ["tenantId", "customerId", "failedIds"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BulkDeleteResultResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BulkDeleteResultResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tenantId": obj.get("tenantId"), + "customerId": obj.get("customerId"), + "failedIds": obj.get("failedIds") + }) + return _obj + + diff --git a/pfruck_contabo/models/cancel_domain_request.py b/pfruck_contabo/models/cancel_domain_request.py new file mode 100644 index 00000000..ef546d53 --- /dev/null +++ b/pfruck_contabo/models/cancel_domain_request.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CancelDomainRequest(BaseModel): + """ + CancelDomainRequest + """ # noqa: E501 + reason: Optional[StrictStr] = Field(default=None, description="Reason for cancelling an domain") + reason_text: Optional[StrictStr] = Field(default=None, description="Reason Text when `Other` reason got selected while cancelling an domain", alias="reasonText") + cancel_date: Optional[datetime] = Field(default=None, description="Date of cancellation", alias="cancelDate") + __properties: ClassVar[List[str]] = ["reason", "reasonText", "cancelDate"] + + @field_validator('reason') + def reason_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['Technical issues / Outages / Performance', 'Too expensive / price', 'Product not needed anymore', 'Bad customer support', 'Switch to a different Contabo product', 'Missing features', 'Other']): + raise ValueError("must be one of enum values ('Technical issues / Outages / Performance', 'Too expensive / price', 'Product not needed anymore', 'Bad customer support', 'Switch to a different Contabo product', 'Missing features', 'Other')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CancelDomainRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CancelDomainRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "reason": obj.get("reason"), + "reasonText": obj.get("reasonText"), + "cancelDate": obj.get("cancelDate") + }) + return _obj + + diff --git a/pfruck_contabo/models/cancel_instance_request.py b/pfruck_contabo/models/cancel_instance_request.py new file mode 100644 index 00000000..5ca29c1d --- /dev/null +++ b/pfruck_contabo/models/cancel_instance_request.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CancelInstanceRequest(BaseModel): + """ + CancelInstanceRequest + """ # noqa: E501 + cancel_date: Optional[datetime] = Field(default=None, description="Date of cancellation", alias="cancelDate") + __properties: ClassVar[List[str]] = ["cancelDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CancelInstanceRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CancelInstanceRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cancelDate": obj.get("cancelDate") + }) + return _obj + + diff --git a/pfruck_contabo/models/cancel_object_storage_request.py b/pfruck_contabo/models/cancel_object_storage_request.py new file mode 100644 index 00000000..fd0ecd30 --- /dev/null +++ b/pfruck_contabo/models/cancel_object_storage_request.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CancelObjectStorageRequest(BaseModel): + """ + CancelObjectStorageRequest + """ # noqa: E501 + cancel_date: Optional[datetime] = Field(default=None, description="Date of cancellation", alias="cancelDate") + __properties: ClassVar[List[str]] = ["cancelDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CancelObjectStorageRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CancelObjectStorageRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cancelDate": obj.get("cancelDate") + }) + return _obj + + diff --git a/pfruck_contabo/models/cancel_request.py b/pfruck_contabo/models/cancel_request.py new file mode 100644 index 00000000..81c9b485 --- /dev/null +++ b/pfruck_contabo/models/cancel_request.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CancelRequest(BaseModel): + """ + CancelRequest + """ # noqa: E501 + status: Optional[StrictStr] = Field(default=None, description="Status can be only set to cancelled") + __properties: ClassVar[List[str]] = ["status"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['cancelled']): + raise ValueError("must be one of enum values ('cancelled')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CancelRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CancelRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status") + }) + return _obj + + diff --git a/pfruck_contabo/models/changed_auth_code.py b/pfruck_contabo/models/changed_auth_code.py new file mode 100644 index 00000000..e3a1cd38 --- /dev/null +++ b/pfruck_contabo/models/changed_auth_code.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ChangedAuthCode(BaseModel): + """ + ChangedAuthCode + """ # noqa: E501 + changed: Optional[StrictBool] = Field(default=None, description="Flag that indicates if the auth code got changed") + var_date: Optional[datetime] = Field(default=None, description="The date when auth code got changed", alias="date") + __properties: ClassVar[List[str]] = ["changed", "date"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ChangedAuthCode from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ChangedAuthCode from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "changed": obj.get("changed"), + "date": obj.get("date") + }) + return _obj + + diff --git a/pfruck_contabo/models/changes.py b/pfruck_contabo/models/changes.py new file mode 100644 index 00000000..fd7620bf --- /dev/null +++ b/pfruck_contabo/models/changes.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class Changes(BaseModel): + """ + Changes + """ # noqa: E501 + prev: Dict[str, Any] = Field(description="Previous values of changed properties") + new: Dict[str, Any] = Field(description="New values of changed properties") + __properties: ClassVar[List[str]] = ["prev", "new"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Changes from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Changes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "prev": obj.get("prev"), + "new": obj.get("new") + }) + return _obj + + diff --git a/pfruck_contabo/models/check_collection_check_templates.py b/pfruck_contabo/models/check_collection_check_templates.py new file mode 100644 index 00000000..4d0c7cde --- /dev/null +++ b/pfruck_contabo/models/check_collection_check_templates.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class CheckCollectionCheckTemplates(BaseModel): + """ + CheckCollectionCheckTemplates + """ # noqa: E501 + check_id: Union[StrictFloat, StrictInt] = Field(description="Id of the check", alias="checkId") + check_template_id: Union[StrictFloat, StrictInt] = Field(description="Id of the check template", alias="checkTemplateId") + run_concurrent: StrictBool = Field(description="Can this check template be run in parallel with other checks", alias="runConcurrent") + ignore_errors: StrictBool = Field(description="Will errors be ignored when running this check template", alias="ignoreErrors") + check_templates: Optional[List[CheckCollectionCheckTemplates]] = Field(default=None, description="Nested check templates", alias="checkTemplates") + __properties: ClassVar[List[str]] = ["checkId", "checkTemplateId", "runConcurrent", "ignoreErrors", "checkTemplates"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CheckCollectionCheckTemplates from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in check_templates (list) + _items = [] + if self.check_templates: + for _item in self.check_templates: + if _item: + _items.append(_item.to_dict()) + _dict['checkTemplates'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CheckCollectionCheckTemplates from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "checkId": obj.get("checkId"), + "checkTemplateId": obj.get("checkTemplateId"), + "runConcurrent": obj.get("runConcurrent"), + "ignoreErrors": obj.get("ignoreErrors"), + "checkTemplates": [CheckCollectionCheckTemplates.from_dict(_item) for _item in obj["checkTemplates"]] if obj.get("checkTemplates") is not None else None + }) + return _obj + +# TODO: Rewrite to not use raise_errors +CheckCollectionCheckTemplates.model_rebuild(raise_errors=False) + diff --git a/pfruck_contabo/models/check_collection_create_request.py b/pfruck_contabo/models/check_collection_create_request.py new file mode 100644 index 00000000..ff200c35 --- /dev/null +++ b/pfruck_contabo/models/check_collection_create_request.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class CheckCollectionCreateRequest(BaseModel): + """ + CheckCollectionCreateRequest + """ # noqa: E501 + object_type: StrictStr = Field(description="Object type to be handled", alias="objectType") + object_id: StrictStr = Field(description="ID of the object, to be handled", alias="objectId") + check_collection_template_id: Union[StrictFloat, StrictInt] = Field(description="Check Template for this check collection", alias="checkCollectionTemplateId") + org_id: StrictStr = Field(description="Id of your organization, if unknown please contact us", alias="orgId") + account_id: StrictStr = Field(description="Account Id", alias="accountId") + __properties: ClassVar[List[str]] = ["objectType", "objectId", "checkCollectionTemplateId", "orgId", "accountId"] + + @field_validator('object_type') + def object_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['vserver']): + raise ValueError("must be one of enum values ('vserver')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CheckCollectionCreateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CheckCollectionCreateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "objectType": obj.get("objectType"), + "objectId": obj.get("objectId"), + "checkCollectionTemplateId": obj.get("checkCollectionTemplateId"), + "orgId": obj.get("orgId"), + "accountId": obj.get("accountId") + }) + return _obj + + diff --git a/pfruck_contabo/models/check_collection_response.py b/pfruck_contabo/models/check_collection_response.py new file mode 100644 index 00000000..5e03f28e --- /dev/null +++ b/pfruck_contabo/models/check_collection_response.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing_extensions import Annotated +from pfruck_contabo.models.check_collection_check_templates import CheckCollectionCheckTemplates +from pfruck_contabo.models.check_response import CheckResponse +from typing import Optional, Set +from typing_extensions import Self + +class CheckCollectionResponse(BaseModel): + """ + CheckCollectionResponse + """ # noqa: E501 + internal: StrictBool = Field(description="Is internal (not shown to the customer)") + status: StrictStr = Field(description="Status of the handle") + object_type: StrictStr = Field(description="Object type to be handled", alias="objectType") + object_id: StrictStr = Field(description="ID of the object, to be handled", alias="objectId") + check_collection_id: Union[StrictFloat, StrictInt] = Field(description="Check collection's id", alias="checkCollectionId") + check_collection_template_id: Union[StrictFloat, StrictInt] = Field(description="Check Collection Template for this check collection", alias="checkCollectionTemplateId") + check_templates: List[CheckCollectionCheckTemplates] = Field(description="Check templates which are part of this collection template", alias="checkTemplates") + created_date: datetime = Field(description="Creation date", alias="createdDate") + modified_date: datetime = Field(description="Modify date", alias="modifiedDate") + org_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Org id", alias="orgId") + account_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Account id", alias="accountId") + checks: List[CheckResponse] = Field(description="Checks performed in this check collection") + __properties: ClassVar[List[str]] = ["internal", "status", "objectType", "objectId", "checkCollectionId", "checkCollectionTemplateId", "checkTemplates", "createdDate", "modifiedDate", "orgId", "accountId", "checks"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['queued', 'running', 'skipped', 'cancelled', 'failed', 'warn', 'successful']): + raise ValueError("must be one of enum values ('queued', 'running', 'skipped', 'cancelled', 'failed', 'warn', 'successful')") + return value + + @field_validator('object_type') + def object_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['vserver']): + raise ValueError("must be one of enum values ('vserver')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CheckCollectionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in check_templates (list) + _items = [] + if self.check_templates: + for _item in self.check_templates: + if _item: + _items.append(_item.to_dict()) + _dict['checkTemplates'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in checks (list) + _items = [] + if self.checks: + for _item in self.checks: + if _item: + _items.append(_item.to_dict()) + _dict['checks'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CheckCollectionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "internal": obj.get("internal"), + "status": obj.get("status"), + "objectType": obj.get("objectType"), + "objectId": obj.get("objectId"), + "checkCollectionId": obj.get("checkCollectionId"), + "checkCollectionTemplateId": obj.get("checkCollectionTemplateId"), + "checkTemplates": [CheckCollectionCheckTemplates.from_dict(_item) for _item in obj["checkTemplates"]] if obj.get("checkTemplates") is not None else None, + "createdDate": obj.get("createdDate"), + "modifiedDate": obj.get("modifiedDate"), + "orgId": obj.get("orgId"), + "accountId": obj.get("accountId"), + "checks": [CheckResponse.from_dict(_item) for _item in obj["checks"]] if obj.get("checks") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/check_collection_template_response.py b/pfruck_contabo/models/check_collection_template_response.py new file mode 100644 index 00000000..88821019 --- /dev/null +++ b/pfruck_contabo/models/check_collection_template_response.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing_extensions import Annotated +from pfruck_contabo.models.check_collection_templates_check_templates import CheckCollectionTemplatesCheckTemplates +from typing import Optional, Set +from typing_extensions import Self + +class CheckCollectionTemplateResponse(BaseModel): + """ + CheckCollectionTemplateResponse + """ # noqa: E501 + check_collection_template_id: Union[StrictFloat, StrictInt] = Field(description="Check collection template's id", alias="checkCollectionTemplateId") + name: StrictStr = Field(description="Name of the check collection template") + description: StrictStr = Field(description="Description for the check collection template") + internal: StrictBool = Field(description="Is check collection only internal (not shown to the customer)") + object_type: StrictStr = Field(description="Object type for which the check collection template can be used", alias="objectType") + check_templates: List[CheckCollectionTemplatesCheckTemplates] = Field(description="Check templates which are part of this collection template", alias="checkTemplates") + created_date: datetime = Field(description="Creation date", alias="createdDate") + modified_date: datetime = Field(description="Modify date", alias="modifiedDate") + org_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Org id", alias="orgId") + account_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Account id", alias="accountId") + __properties: ClassVar[List[str]] = ["checkCollectionTemplateId", "name", "description", "internal", "objectType", "checkTemplates", "createdDate", "modifiedDate", "orgId", "accountId"] + + @field_validator('object_type') + def object_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['vserver']): + raise ValueError("must be one of enum values ('vserver')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CheckCollectionTemplateResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in check_templates (list) + _items = [] + if self.check_templates: + for _item in self.check_templates: + if _item: + _items.append(_item.to_dict()) + _dict['checkTemplates'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CheckCollectionTemplateResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "checkCollectionTemplateId": obj.get("checkCollectionTemplateId"), + "name": obj.get("name"), + "description": obj.get("description"), + "internal": obj.get("internal"), + "objectType": obj.get("objectType"), + "checkTemplates": [CheckCollectionTemplatesCheckTemplates.from_dict(_item) for _item in obj["checkTemplates"]] if obj.get("checkTemplates") is not None else None, + "createdDate": obj.get("createdDate"), + "modifiedDate": obj.get("modifiedDate"), + "orgId": obj.get("orgId"), + "accountId": obj.get("accountId") + }) + return _obj + + diff --git a/pfruck_contabo/models/check_collection_templates_check_templates.py b/pfruck_contabo/models/check_collection_templates_check_templates.py new file mode 100644 index 00000000..5d3c3ae4 --- /dev/null +++ b/pfruck_contabo/models/check_collection_templates_check_templates.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class CheckCollectionTemplatesCheckTemplates(BaseModel): + """ + CheckCollectionTemplatesCheckTemplates + """ # noqa: E501 + check_template_id: Union[StrictFloat, StrictInt] = Field(description="Id of the check template", alias="checkTemplateId") + run_concurrent: StrictBool = Field(description="Can this check template be run in parallel with other checks", alias="runConcurrent") + ignore_errors: StrictBool = Field(description="Will errors be ignored when running this check template", alias="ignoreErrors") + check_templates: Optional[List[CheckCollectionTemplatesCheckTemplates]] = Field(default=None, description="Nested check templates", alias="checkTemplates") + __properties: ClassVar[List[str]] = ["checkTemplateId", "runConcurrent", "ignoreErrors", "checkTemplates"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CheckCollectionTemplatesCheckTemplates from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in check_templates (list) + _items = [] + if self.check_templates: + for _item in self.check_templates: + if _item: + _items.append(_item.to_dict()) + _dict['checkTemplates'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CheckCollectionTemplatesCheckTemplates from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "checkTemplateId": obj.get("checkTemplateId"), + "runConcurrent": obj.get("runConcurrent"), + "ignoreErrors": obj.get("ignoreErrors"), + "checkTemplates": [CheckCollectionTemplatesCheckTemplates.from_dict(_item) for _item in obj["checkTemplates"]] if obj.get("checkTemplates") is not None else None + }) + return _obj + +# TODO: Rewrite to not use raise_errors +CheckCollectionTemplatesCheckTemplates.model_rebuild(raise_errors=False) + diff --git a/pfruck_contabo/models/check_collection_templates_get_response.py b/pfruck_contabo/models/check_collection_templates_get_response.py new file mode 100644 index 00000000..27b50bdc --- /dev/null +++ b/pfruck_contabo/models/check_collection_templates_get_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.check_collection_template_response import CheckCollectionTemplateResponse +from pfruck_contabo.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class CheckCollectionTemplatesGetResponse(BaseModel): + """ + CheckCollectionTemplatesGetResponse + """ # noqa: E501 + data: List[CheckCollectionTemplateResponse] + links: SelfLinks = Field(alias="_links") + __properties: ClassVar[List[str]] = ["data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CheckCollectionTemplatesGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CheckCollectionTemplatesGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [CheckCollectionTemplateResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/check_collection_templates_list_response.py b/pfruck_contabo/models/check_collection_templates_list_response.py new file mode 100644 index 00000000..74f4021d --- /dev/null +++ b/pfruck_contabo/models/check_collection_templates_list_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.check_collection_template_response import CheckCollectionTemplateResponse +from pfruck_contabo.models.links import Links +from pfruck_contabo.models.pagination_meta import PaginationMeta +from typing import Optional, Set +from typing_extensions import Self + +class CheckCollectionTemplatesListResponse(BaseModel): + """ + CheckCollectionTemplatesListResponse + """ # noqa: E501 + pagination: PaginationMeta = Field(description="Data about pagination like how many results, pages, page size.", alias="_pagination") + data: List[CheckCollectionTemplateResponse] + links: Links = Field(alias="_links") + __properties: ClassVar[List[str]] = ["_pagination", "data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CheckCollectionTemplatesListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['_pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CheckCollectionTemplatesListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_pagination": PaginationMeta.from_dict(obj["_pagination"]) if obj.get("_pagination") is not None else None, + "data": [CheckCollectionTemplateResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": Links.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/check_collections_audit_list_response.py b/pfruck_contabo/models/check_collections_audit_list_response.py new file mode 100644 index 00000000..4a4d8bc7 --- /dev/null +++ b/pfruck_contabo/models/check_collections_audit_list_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.check_collections_audit_response import CheckCollectionsAuditResponse +from pfruck_contabo.models.links import Links +from pfruck_contabo.models.pagination_meta import PaginationMeta +from typing import Optional, Set +from typing_extensions import Self + +class CheckCollectionsAuditListResponse(BaseModel): + """ + CheckCollectionsAuditListResponse + """ # noqa: E501 + pagination: PaginationMeta = Field(description="Data about pagination like how many results, pages, page size.", alias="_pagination") + data: List[CheckCollectionsAuditResponse] + links: Links = Field(alias="_links") + __properties: ClassVar[List[str]] = ["_pagination", "data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CheckCollectionsAuditListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['_pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CheckCollectionsAuditListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_pagination": PaginationMeta.from_dict(obj["_pagination"]) if obj.get("_pagination") is not None else None, + "data": [CheckCollectionsAuditResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": Links.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/check_collections_audit_response.py b/pfruck_contabo/models/check_collections_audit_response.py new file mode 100644 index 00000000..2bceeb54 --- /dev/null +++ b/pfruck_contabo/models/check_collections_audit_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing_extensions import Annotated +from pfruck_contabo.models.changes import Changes +from typing import Optional, Set +from typing_extensions import Self + +class CheckCollectionsAuditResponse(BaseModel): + """ + CheckCollectionsAuditResponse + """ # noqa: E501 + created_date: datetime = Field(description="Creation date", alias="createdDate") + modified_date: datetime = Field(description="Modify date", alias="modifiedDate") + org_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Org id", alias="orgId") + account_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Account id", alias="accountId") + audit_id: StrictInt = Field(description="The ID of the audit entry.", alias="auditId") + action: StrictStr = Field(description="Type of the action.") + foreign_changed_by: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Id of a foreign user (given on the api request via header) who performed the change", alias="foreignChangedBy") + foreign_username: StrictStr = Field(description="Name of the foreign user (given on the api request via header) which led to the change.", alias="foreignUsername") + changed_by: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Id of user who performed the change", alias="changedBy") + username: StrictStr = Field(description="Name of the user which led to the change.") + request_id: StrictStr = Field(description="The requestId of the API call which led to the change.", alias="requestId") + trace_id: StrictStr = Field(description="The traceId of the API call which led to the change.", alias="traceId") + changes: Changes = Field(description="List of changed properties") + check_collection_id: Union[StrictFloat, StrictInt] = Field(description="Check collection's id", alias="checkCollectionId") + __properties: ClassVar[List[str]] = ["createdDate", "modifiedDate", "orgId", "accountId", "auditId", "action", "foreignChangedBy", "foreignUsername", "changedBy", "username", "requestId", "traceId", "changes", "checkCollectionId"] + + @field_validator('action') + def action_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['CREATED', 'UPDATED', 'DELETED']): + raise ValueError("must be one of enum values ('CREATED', 'UPDATED', 'DELETED')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CheckCollectionsAuditResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of changes + if self.changes: + _dict['changes'] = self.changes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CheckCollectionsAuditResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdDate": obj.get("createdDate"), + "modifiedDate": obj.get("modifiedDate"), + "orgId": obj.get("orgId"), + "accountId": obj.get("accountId"), + "auditId": obj.get("auditId"), + "action": obj.get("action"), + "foreignChangedBy": obj.get("foreignChangedBy"), + "foreignUsername": obj.get("foreignUsername"), + "changedBy": obj.get("changedBy"), + "username": obj.get("username"), + "requestId": obj.get("requestId"), + "traceId": obj.get("traceId"), + "changes": Changes.from_dict(obj["changes"]) if obj.get("changes") is not None else None, + "checkCollectionId": obj.get("checkCollectionId") + }) + return _obj + + diff --git a/pfruck_contabo/models/check_collections_get_response.py b/pfruck_contabo/models/check_collections_get_response.py new file mode 100644 index 00000000..8c905860 --- /dev/null +++ b/pfruck_contabo/models/check_collections_get_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.check_collection_response import CheckCollectionResponse +from pfruck_contabo.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class CheckCollectionsGetResponse(BaseModel): + """ + CheckCollectionsGetResponse + """ # noqa: E501 + data: List[CheckCollectionResponse] + links: SelfLinks = Field(alias="_links") + __properties: ClassVar[List[str]] = ["data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CheckCollectionsGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CheckCollectionsGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [CheckCollectionResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/check_collections_list_response.py b/pfruck_contabo/models/check_collections_list_response.py new file mode 100644 index 00000000..d8b669f2 --- /dev/null +++ b/pfruck_contabo/models/check_collections_list_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.check_collection_response import CheckCollectionResponse +from pfruck_contabo.models.links import Links +from pfruck_contabo.models.pagination_meta import PaginationMeta +from typing import Optional, Set +from typing_extensions import Self + +class CheckCollectionsListResponse(BaseModel): + """ + CheckCollectionsListResponse + """ # noqa: E501 + pagination: PaginationMeta = Field(description="Data about pagination like how many results, pages, page size.", alias="_pagination") + data: List[CheckCollectionResponse] + links: Links = Field(alias="_links") + __properties: ClassVar[List[str]] = ["_pagination", "data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CheckCollectionsListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['_pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CheckCollectionsListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_pagination": PaginationMeta.from_dict(obj["_pagination"]) if obj.get("_pagination") is not None else None, + "data": [CheckCollectionResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": Links.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/check_collections_replay_request.py b/pfruck_contabo/models/check_collections_replay_request.py new file mode 100644 index 00000000..3749d5d5 --- /dev/null +++ b/pfruck_contabo/models/check_collections_replay_request.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class CheckCollectionsReplayRequest(BaseModel): + """ + CheckCollectionsReplayRequest + """ # noqa: E501 + org_id: StrictStr = Field(description="Id of your organization, if unknown please contact us", alias="orgId") + account_id: StrictStr = Field(description="Account Id", alias="accountId") + creation_start_time: Optional[datetime] = Field(default=None, description="Earliest creation date of changes to replay", alias="creationStartTime") + creation_end_time: Optional[datetime] = Field(default=None, description="Latest creation date of changes to replay", alias="creationEndTime") + rate: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Message publishing frequency. How many messages per second get published. Default: 20") + check_collection_ids: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="Check collection's id", alias="checkCollectionIds") + __properties: ClassVar[List[str]] = ["orgId", "accountId", "creationStartTime", "creationEndTime", "rate", "checkCollectionIds"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CheckCollectionsReplayRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CheckCollectionsReplayRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "orgId": obj.get("orgId"), + "accountId": obj.get("accountId"), + "creationStartTime": obj.get("creationStartTime"), + "creationEndTime": obj.get("creationEndTime"), + "rate": obj.get("rate"), + "checkCollectionIds": obj.get("checkCollectionIds") + }) + return _obj + + diff --git a/pfruck_contabo/models/check_create_request.py b/pfruck_contabo/models/check_create_request.py new file mode 100644 index 00000000..fd23209a --- /dev/null +++ b/pfruck_contabo/models/check_create_request.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class CheckCreateRequest(BaseModel): + """ + CheckCreateRequest + """ # noqa: E501 + object_type: StrictStr = Field(description="Object type to be handled", alias="objectType") + object_id: StrictStr = Field(description="ID of the object, to be handled", alias="objectId") + check_template_id: Union[StrictFloat, StrictInt] = Field(description="Check Template for this check", alias="checkTemplateId") + check_collection_id: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Check Collection for this check", alias="checkCollectionId") + org_id: StrictStr = Field(description="Id of your organization, if unknown please contact us", alias="orgId") + account_id: StrictStr = Field(description="Account Id", alias="accountId") + __properties: ClassVar[List[str]] = ["objectType", "objectId", "checkTemplateId", "checkCollectionId", "orgId", "accountId"] + + @field_validator('object_type') + def object_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['vserver']): + raise ValueError("must be one of enum values ('vserver')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CheckCreateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CheckCreateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "objectType": obj.get("objectType"), + "objectId": obj.get("objectId"), + "checkTemplateId": obj.get("checkTemplateId"), + "checkCollectionId": obj.get("checkCollectionId"), + "orgId": obj.get("orgId"), + "accountId": obj.get("accountId") + }) + return _obj + + diff --git a/pfruck_contabo/models/check_response.py b/pfruck_contabo/models/check_response.py new file mode 100644 index 00000000..c69b2357 --- /dev/null +++ b/pfruck_contabo/models/check_response.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class CheckResponse(BaseModel): + """ + CheckResponse + """ # noqa: E501 + internal: StrictBool = Field(description="Is internal (not shown to the customer)") + status: StrictStr = Field(description="Status of the handle") + object_type: StrictStr = Field(description="Object type to be handled", alias="objectType") + object_id: StrictStr = Field(description="ID of the object, to be handled", alias="objectId") + check_id: Union[StrictFloat, StrictInt] = Field(description="Check's id", alias="checkId") + check_collection_id: Union[StrictFloat, StrictInt] = Field(description="ID of check collection if started in scope of a collection", alias="checkCollectionId") + check_template_id: Union[StrictFloat, StrictInt] = Field(description="Check Template for this check", alias="checkTemplateId") + name: StrictStr = Field(description="Name of this check template") + note: StrictStr = Field(description="Note to be shown to the customer") + internal_note: StrictStr = Field(description="Note which is shown only internally to the agent", alias="internalNote") + duration_ms: Union[StrictFloat, StrictInt] = Field(description="Duration of the check in milliseconds", alias="durationMs") + created_date: datetime = Field(description="Creation date", alias="createdDate") + modified_date: datetime = Field(description="Modify date", alias="modifiedDate") + org_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Org id", alias="orgId") + account_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Account id", alias="accountId") + log: StrictStr = Field(description="Detailed log of the check execution") + __properties: ClassVar[List[str]] = ["internal", "status", "objectType", "objectId", "checkId", "checkCollectionId", "checkTemplateId", "name", "note", "internalNote", "durationMs", "createdDate", "modifiedDate", "orgId", "accountId", "log"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['queued', 'running', 'skipped', 'cancelled', 'failed', 'warn', 'successful']): + raise ValueError("must be one of enum values ('queued', 'running', 'skipped', 'cancelled', 'failed', 'warn', 'successful')") + return value + + @field_validator('object_type') + def object_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['vserver']): + raise ValueError("must be one of enum values ('vserver')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CheckResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CheckResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "internal": obj.get("internal"), + "status": obj.get("status"), + "objectType": obj.get("objectType"), + "objectId": obj.get("objectId"), + "checkId": obj.get("checkId"), + "checkCollectionId": obj.get("checkCollectionId"), + "checkTemplateId": obj.get("checkTemplateId"), + "name": obj.get("name"), + "note": obj.get("note"), + "internalNote": obj.get("internalNote"), + "durationMs": obj.get("durationMs"), + "createdDate": obj.get("createdDate"), + "modifiedDate": obj.get("modifiedDate"), + "orgId": obj.get("orgId"), + "accountId": obj.get("accountId"), + "log": obj.get("log") + }) + return _obj + + diff --git a/pfruck_contabo/models/check_template_response.py b/pfruck_contabo/models/check_template_response.py new file mode 100644 index 00000000..3f9ca341 --- /dev/null +++ b/pfruck_contabo/models/check_template_response.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class CheckTemplateResponse(BaseModel): + """ + CheckTemplateResponse + """ # noqa: E501 + created_date: datetime = Field(description="Creation date", alias="createdDate") + modified_date: datetime = Field(description="Modify date", alias="modifiedDate") + org_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Org id", alias="orgId") + account_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Account id", alias="accountId") + check_template_id: Union[StrictFloat, StrictInt] = Field(description="Check template's id", alias="checkTemplateId") + name: StrictStr = Field(description="Name of the check template") + description: StrictStr = Field(description="Description for the check template") + internal: StrictBool = Field(description="Is check only internal (not shown to the customer)") + object_type: StrictStr = Field(description="Object type for which the check template can be used", alias="objectType") + collector_class: StrictStr = Field(description="Class used to collect the required information for the check", alias="collectorClass") + check_class: StrictStr = Field(description="Class used to perform the check", alias="checkClass") + remedy_template_ids: List[StrictStr] = Field(description="Remedy Template IDs that are related to this remedy", alias="remedyTemplateIds") + __properties: ClassVar[List[str]] = ["createdDate", "modifiedDate", "orgId", "accountId", "checkTemplateId", "name", "description", "internal", "objectType", "collectorClass", "checkClass", "remedyTemplateIds"] + + @field_validator('object_type') + def object_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['vserver']): + raise ValueError("must be one of enum values ('vserver')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CheckTemplateResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CheckTemplateResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdDate": obj.get("createdDate"), + "modifiedDate": obj.get("modifiedDate"), + "orgId": obj.get("orgId"), + "accountId": obj.get("accountId"), + "checkTemplateId": obj.get("checkTemplateId"), + "name": obj.get("name"), + "description": obj.get("description"), + "internal": obj.get("internal"), + "objectType": obj.get("objectType"), + "collectorClass": obj.get("collectorClass"), + "checkClass": obj.get("checkClass"), + "remedyTemplateIds": obj.get("remedyTemplateIds") + }) + return _obj + + diff --git a/pfruck_contabo/models/check_templates_get_response.py b/pfruck_contabo/models/check_templates_get_response.py new file mode 100644 index 00000000..5ceb7b54 --- /dev/null +++ b/pfruck_contabo/models/check_templates_get_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.check_template_response import CheckTemplateResponse +from pfruck_contabo.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class CheckTemplatesGetResponse(BaseModel): + """ + CheckTemplatesGetResponse + """ # noqa: E501 + data: List[CheckTemplateResponse] + links: SelfLinks = Field(alias="_links") + __properties: ClassVar[List[str]] = ["data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CheckTemplatesGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CheckTemplatesGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [CheckTemplateResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/check_templates_list_response.py b/pfruck_contabo/models/check_templates_list_response.py new file mode 100644 index 00000000..2cf53d8c --- /dev/null +++ b/pfruck_contabo/models/check_templates_list_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.check_template_response import CheckTemplateResponse +from pfruck_contabo.models.links import Links +from pfruck_contabo.models.pagination_meta import PaginationMeta +from typing import Optional, Set +from typing_extensions import Self + +class CheckTemplatesListResponse(BaseModel): + """ + CheckTemplatesListResponse + """ # noqa: E501 + pagination: PaginationMeta = Field(description="Data about pagination like how many results, pages, page size.", alias="_pagination") + data: List[CheckTemplateResponse] + links: Links = Field(alias="_links") + __properties: ClassVar[List[str]] = ["_pagination", "data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CheckTemplatesListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['_pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CheckTemplatesListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_pagination": PaginationMeta.from_dict(obj["_pagination"]) if obj.get("_pagination") is not None else None, + "data": [CheckTemplateResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": Links.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/checks_audit_list_response.py b/pfruck_contabo/models/checks_audit_list_response.py new file mode 100644 index 00000000..384fb0c9 --- /dev/null +++ b/pfruck_contabo/models/checks_audit_list_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.checks_audit_response import ChecksAuditResponse +from pfruck_contabo.models.links import Links +from pfruck_contabo.models.pagination_meta import PaginationMeta +from typing import Optional, Set +from typing_extensions import Self + +class ChecksAuditListResponse(BaseModel): + """ + ChecksAuditListResponse + """ # noqa: E501 + pagination: PaginationMeta = Field(description="Data about pagination like how many results, pages, page size.", alias="_pagination") + data: List[ChecksAuditResponse] + links: Links = Field(alias="_links") + __properties: ClassVar[List[str]] = ["_pagination", "data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ChecksAuditListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['_pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ChecksAuditListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_pagination": PaginationMeta.from_dict(obj["_pagination"]) if obj.get("_pagination") is not None else None, + "data": [ChecksAuditResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": Links.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/checks_audit_response.py b/pfruck_contabo/models/checks_audit_response.py new file mode 100644 index 00000000..ae0f52ca --- /dev/null +++ b/pfruck_contabo/models/checks_audit_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing_extensions import Annotated +from pfruck_contabo.models.changes import Changes +from typing import Optional, Set +from typing_extensions import Self + +class ChecksAuditResponse(BaseModel): + """ + ChecksAuditResponse + """ # noqa: E501 + created_date: datetime = Field(description="Creation date", alias="createdDate") + modified_date: datetime = Field(description="Modify date", alias="modifiedDate") + org_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Org id", alias="orgId") + account_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Account id", alias="accountId") + audit_id: StrictInt = Field(description="The ID of the audit entry.", alias="auditId") + action: StrictStr = Field(description="Type of the action.") + foreign_changed_by: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Id of a foreign user (given on the api request via header) who performed the change", alias="foreignChangedBy") + foreign_username: StrictStr = Field(description="Name of the foreign user (given on the api request via header) which led to the change.", alias="foreignUsername") + changed_by: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Id of user who performed the change", alias="changedBy") + username: StrictStr = Field(description="Name of the user which led to the change.") + request_id: StrictStr = Field(description="The requestId of the API call which led to the change.", alias="requestId") + trace_id: StrictStr = Field(description="The traceId of the API call which led to the change.", alias="traceId") + changes: Changes = Field(description="List of changed properties") + check_id: Union[StrictFloat, StrictInt] = Field(description="Check's id", alias="checkId") + __properties: ClassVar[List[str]] = ["createdDate", "modifiedDate", "orgId", "accountId", "auditId", "action", "foreignChangedBy", "foreignUsername", "changedBy", "username", "requestId", "traceId", "changes", "checkId"] + + @field_validator('action') + def action_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['CREATED', 'UPDATED', 'DELETED']): + raise ValueError("must be one of enum values ('CREATED', 'UPDATED', 'DELETED')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ChecksAuditResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of changes + if self.changes: + _dict['changes'] = self.changes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ChecksAuditResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdDate": obj.get("createdDate"), + "modifiedDate": obj.get("modifiedDate"), + "orgId": obj.get("orgId"), + "accountId": obj.get("accountId"), + "auditId": obj.get("auditId"), + "action": obj.get("action"), + "foreignChangedBy": obj.get("foreignChangedBy"), + "foreignUsername": obj.get("foreignUsername"), + "changedBy": obj.get("changedBy"), + "username": obj.get("username"), + "requestId": obj.get("requestId"), + "traceId": obj.get("traceId"), + "changes": Changes.from_dict(obj["changes"]) if obj.get("changes") is not None else None, + "checkId": obj.get("checkId") + }) + return _obj + + diff --git a/pfruck_contabo/models/checks_get_response.py b/pfruck_contabo/models/checks_get_response.py new file mode 100644 index 00000000..23b375b4 --- /dev/null +++ b/pfruck_contabo/models/checks_get_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.check_response import CheckResponse +from pfruck_contabo.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class ChecksGetResponse(BaseModel): + """ + ChecksGetResponse + """ # noqa: E501 + data: List[CheckResponse] + links: SelfLinks = Field(alias="_links") + __properties: ClassVar[List[str]] = ["data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ChecksGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ChecksGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [CheckResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/checks_list_response.py b/pfruck_contabo/models/checks_list_response.py new file mode 100644 index 00000000..153433a3 --- /dev/null +++ b/pfruck_contabo/models/checks_list_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.check_response import CheckResponse +from pfruck_contabo.models.links import Links +from pfruck_contabo.models.pagination_meta import PaginationMeta +from typing import Optional, Set +from typing_extensions import Self + +class ChecksListResponse(BaseModel): + """ + ChecksListResponse + """ # noqa: E501 + pagination: PaginationMeta = Field(description="Data about pagination like how many results, pages, page size.", alias="_pagination") + data: List[CheckResponse] + links: Links = Field(alias="_links") + __properties: ClassVar[List[str]] = ["_pagination", "data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ChecksListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['_pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ChecksListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_pagination": PaginationMeta.from_dict(obj["_pagination"]) if obj.get("_pagination") is not None else None, + "data": [CheckResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": Links.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/checks_replay_request.py b/pfruck_contabo/models/checks_replay_request.py new file mode 100644 index 00000000..725e47f3 --- /dev/null +++ b/pfruck_contabo/models/checks_replay_request.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class ChecksReplayRequest(BaseModel): + """ + ChecksReplayRequest + """ # noqa: E501 + org_id: StrictStr = Field(description="Id of your organization, if unknown please contact us", alias="orgId") + account_id: StrictStr = Field(description="Account Id", alias="accountId") + creation_start_time: Optional[datetime] = Field(default=None, description="Earliest creation date of changes to replay", alias="creationStartTime") + creation_end_time: Optional[datetime] = Field(default=None, description="Latest creation date of changes to replay", alias="creationEndTime") + rate: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Message publishing frequency. How many messages per second get published. Default: 20") + check_ids: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="Check's id", alias="checkIds") + __properties: ClassVar[List[str]] = ["orgId", "accountId", "creationStartTime", "creationEndTime", "rate", "checkIds"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ChecksReplayRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ChecksReplayRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "orgId": obj.get("orgId"), + "accountId": obj.get("accountId"), + "creationStartTime": obj.get("creationStartTime"), + "creationEndTime": obj.get("creationEndTime"), + "rate": obj.get("rate"), + "checkIds": obj.get("checkIds") + }) + return _obj + + diff --git a/pfruck_contabo/models/create_dns_zone_record_request.py b/pfruck_contabo/models/create_dns_zone_record_request.py new file mode 100644 index 00000000..acdd0cff --- /dev/null +++ b/pfruck_contabo/models/create_dns_zone_record_request.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class CreateDnsZoneRecordRequest(BaseModel): + """ + CreateDnsZoneRecordRequest + """ # noqa: E501 + name: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="Name, if empty the zone name will be used") + type: StrictStr = Field(description="DNS record type") + ttl: Union[StrictFloat, StrictInt] = Field(description="TTL") + prio: Union[StrictFloat, StrictInt] = Field(description="Prio") + data: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Data") + port: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Port") + weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight") + flag: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Flag") + tag: Optional[StrictStr] = Field(default=None, description="Tag") + __properties: ClassVar[List[str]] = ["name", "type", "ttl", "prio", "data", "port", "weight", "flag", "tag"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['A', 'AAAA', 'CAA', 'CNAME', 'MX', 'SRV', 'TXT']): + raise ValueError("must be one of enum values ('A', 'AAAA', 'CAA', 'CNAME', 'MX', 'SRV', 'TXT')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateDnsZoneRecordRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateDnsZoneRecordRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "type": obj.get("type"), + "ttl": obj.get("ttl"), + "prio": obj.get("prio"), + "data": obj.get("data"), + "port": obj.get("port"), + "weight": obj.get("weight"), + "flag": obj.get("flag"), + "tag": obj.get("tag") + }) + return _obj + + diff --git a/pfruck_contabo/models/create_dns_zone_request.py b/pfruck_contabo/models/create_dns_zone_request.py new file mode 100644 index 00000000..dd0347c7 --- /dev/null +++ b/pfruck_contabo/models/create_dns_zone_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class CreateDnsZoneRequest(BaseModel): + """ + CreateDnsZoneRequest + """ # noqa: E501 + zone_name: StrictStr = Field(description="Zone name", alias="zoneName") + __properties: ClassVar[List[str]] = ["zoneName"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateDnsZoneRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateDnsZoneRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "zoneName": obj.get("zoneName") + }) + return _obj + + diff --git a/pfruck_contabo/models/create_firewall_request.py b/pfruck_contabo/models/create_firewall_request.py new file mode 100644 index 00000000..908c982b --- /dev/null +++ b/pfruck_contabo/models/create_firewall_request.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from pfruck_contabo.models.rules_request import RulesRequest +from typing import Optional, Set +from typing_extensions import Self + +class CreateFirewallRequest(BaseModel): + """ + CreateFirewallRequest + """ # noqa: E501 + name: Annotated[str, Field(strict=True, max_length=255)] = Field(description="The name of the firewall.") + description: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The description of the firewall.") + status: StrictStr = Field(description="The status of the firewall determines whether the rules are active or not.") + rules: Optional[RulesRequest] = None + __properties: ClassVar[List[str]] = ["name", "description", "status", "rules"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['active', 'inactive']): + raise ValueError("must be one of enum values ('active', 'inactive')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateFirewallRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of rules + if self.rules: + _dict['rules'] = self.rules.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateFirewallRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "description": obj.get("description"), + "status": obj.get("status"), + "rules": RulesRequest.from_dict(obj["rules"]) if obj.get("rules") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/create_firewall_response.py b/pfruck_contabo/models/create_firewall_response.py new file mode 100644 index 00000000..5403a1fc --- /dev/null +++ b/pfruck_contabo/models/create_firewall_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.firewall_response import FirewallResponse +from pfruck_contabo.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class CreateFirewallResponse(BaseModel): + """ + CreateFirewallResponse + """ # noqa: E501 + data: List[FirewallResponse] + links: SelfLinks = Field(alias="_links") + __properties: ClassVar[List[str]] = ["data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateFirewallResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateFirewallResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [FirewallResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/create_instance_addons.py b/pfruck_contabo/models/create_instance_addons.py index 2eedcacf..ab72db08 100644 --- a/pfruck_contabo/models/create_instance_addons.py +++ b/pfruck_contabo/models/create_instance_addons.py @@ -30,10 +30,11 @@ class CreateInstanceAddons(BaseModel): """ # noqa: E501 private_networking: Optional[Dict[str, Any]] = Field(default=None, description="Set this attribute if you want to upgrade your instance with the Private Networking addon. Please provide an empty object for the time being as value. There will be more configuration possible in the future.", alias="privateNetworking") additional_ips: Optional[Dict[str, Any]] = Field(default=None, description="Set this attribute if you want to upgrade your instance with the Additional IPs addon. Please provide an empty object for the time being as value. There will be more configuration possible in the future.", alias="additionalIps") + backup: Optional[Dict[str, Any]] = Field(default=None, description="Set this attribute if you want to upgrade your instance with the Automated backup addon. Please provide an empty object for the time being as value. There will be more configuration possible in the future.") extra_storage: Optional[ExtraStorageRequest] = Field(default=None, description="Set this attribute if you want to upgrade your instance with the Extra Storage addon.", alias="extraStorage") custom_image: Optional[Dict[str, Any]] = Field(default=None, description="Set this attribute if you want to upgrade your instance with the Custom Images addon. Please provide an empty object for the time being as value. There will be more configuration possible in the future.", alias="customImage") addons_ids: Optional[List[AddOnRequest]] = Field(default=None, alias="addonsIds") - __properties: ClassVar[List[str]] = ["privateNetworking", "additionalIps", "extraStorage", "customImage", "addonsIds"] + __properties: ClassVar[List[str]] = ["privateNetworking", "additionalIps", "backup", "extraStorage", "customImage", "addonsIds"] model_config = ConfigDict( populate_by_name=True, @@ -98,6 +99,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "privateNetworking": obj.get("privateNetworking"), "additionalIps": obj.get("additionalIps"), + "backup": obj.get("backup"), "extraStorage": ExtraStorageRequest.from_dict(obj["extraStorage"]) if obj.get("extraStorage") is not None else None, "customImage": obj.get("customImage"), "addonsIds": [AddOnRequest.from_dict(_item) for _item in obj["addonsIds"]] if obj.get("addonsIds") is not None else None diff --git a/pfruck_contabo/models/create_instance_request.py b/pfruck_contabo/models/create_instance_request.py index f7f3238c..fc81a0c6 100644 --- a/pfruck_contabo/models/create_instance_request.py +++ b/pfruck_contabo/models/create_instance_request.py @@ -29,14 +29,14 @@ class CreateInstanceRequest(BaseModel): CreateInstanceRequest """ # noqa: E501 image_id: Optional[StrictStr] = Field(default='afecbb85-e2fc-46f0-9684-b46b1faf00bb', description="ImageId to be used to setup the compute instance. Default is Ubuntu 22.04", alias="imageId") - product_id: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default='V45', description="Default is V45", alias="productId") + product_id: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default='V92', description="Default is V92", alias="productId") region: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default='EU', description="Instance Region where the compute instance should be located. Default is EU") ssh_keys: Optional[List[StrictInt]] = Field(default=None, description="Array of `secretId`s of public SSH keys for logging into as `defaultUser` with administrator/root privileges. Applies to Linux/BSD systems. Please refer to Secrets Management API.", alias="sshKeys") root_password: Optional[StrictInt] = Field(default=None, description="`secretId` of the password for the `defaultUser` with administrator/root privileges. For Linux/BSD please use SSH, for Windows RDP. Please refer to Secrets Management API.", alias="rootPassword") user_data: Optional[StrictStr] = Field(default=None, description="[Cloud-Init](https://cloud-init.io/) Config in order to customize during start of compute instance.", alias="userData") license: Optional[StrictStr] = Field(default=None, description="Additional licence in order to enhance your chosen product, mainly needed for software licenses on your product (not needed for windows).") period: StrictInt = Field(description="Initial contract period in months. Available periods are: 1, 3, 6 and 12 months. Default to 1 month") - display_name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The display name of the instance", alias="displayName") + display_name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The display name of the instance. Pass an empty string to leave it unset.", alias="displayName") default_user: Optional[StrictStr] = Field(default='admin', description="Default user name created for login during (re-)installation with administrative privileges. Allowed values for Linux/BSD are `admin` (use sudo to apply administrative privileges like root) or `root`. Allowed values for Windows are `admin` (has administrative privileges like administrator) or `administrator`.", alias="defaultUser") add_ons: Optional[CreateInstanceAddons] = Field(default=None, description="Set attributes in the addons object for the corresponding ones that need to be added to the instance", alias="addOns") application_id: Optional[StrictStr] = Field(default=None, description="Application ID", alias="applicationId") @@ -48,8 +48,8 @@ def region_validate_enum(cls, value): if value is None: return value - if value not in set(['EU', 'US-central', 'US-east', 'US-west', 'SIN', 'UK', 'AUS', 'JPN', 'SIN', 'IND']): - raise ValueError("must be one of enum values ('EU', 'US-central', 'US-east', 'US-west', 'SIN', 'UK', 'AUS', 'JPN', 'SIN', 'IND')") + if value not in set(['EU', 'US-central', 'US-east', 'US-west', 'SIN', 'UK', 'AUS', 'JPN', 'IND']): + raise ValueError("must be one of enum values ('EU', 'US-central', 'US-east', 'US-west', 'SIN', 'UK', 'AUS', 'JPN', 'IND')") return value @field_validator('license') @@ -127,7 +127,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "imageId": obj.get("imageId") if obj.get("imageId") is not None else 'afecbb85-e2fc-46f0-9684-b46b1faf00bb', - "productId": obj.get("productId") if obj.get("productId") is not None else 'V45', + "productId": obj.get("productId") if obj.get("productId") is not None else 'V92', "region": obj.get("region") if obj.get("region") is not None else 'EU', "sshKeys": obj.get("sshKeys"), "rootPassword": obj.get("rootPassword"), diff --git a/pfruck_contabo/models/create_instance_response_data.py b/pfruck_contabo/models/create_instance_response_data.py index 01b47559..216ffe51 100644 --- a/pfruck_contabo/models/create_instance_response_data.py +++ b/pfruck_contabo/models/create_instance_response_data.py @@ -39,7 +39,7 @@ class CreateInstanceResponseData(BaseModel): region: StrictStr = Field(description="Instance Region where the compute instance should be located.") add_ons: List[AddOnResponse] = Field(alias="addOns") os_type: StrictStr = Field(description="Type of operating system (OS)", alias="osType") - status: InstanceStatus + status: InstanceStatus = Field(description="Instance's status") ssh_keys: List[StrictInt] = Field(description="Array of `secretId`s of public SSH keys for logging into as `defaultUser` with administrator/root privileges. Applies to Linux/BSD systems. Please refer to Secrets Management API.", alias="sshKeys") __properties: ClassVar[List[str]] = ["tenantId", "customerId", "instanceId", "createdDate", "imageId", "productId", "region", "addOns", "osType", "status", "sshKeys"] diff --git a/pfruck_contabo/models/create_object_storage_response_data.py b/pfruck_contabo/models/create_object_storage_response_data.py index f20a75bf..11018662 100644 --- a/pfruck_contabo/models/create_object_storage_response_data.py +++ b/pfruck_contabo/models/create_object_storage_response_data.py @@ -49,8 +49,8 @@ class CreateObjectStorageResponseData(BaseModel): @field_validator('status') def status_validate_enum(cls, value): """Validates the enum""" - if value not in set(['READY', 'PROVISIONING', 'UPGRADING', 'CANCELLED', 'ERROR', 'ENABLED', 'DISABLED', 'MANUAL_PROVISIONING', 'PRODUCT_NOT_AVAILABLE', 'LIMIT_EXCEEDED', 'VERIFICATION_REQUIRED', 'COMPLETED', 'ORDER_PROCESSING', 'PENDING_PAYMENT', 'UNKNOWN']): - raise ValueError("must be one of enum values ('READY', 'PROVISIONING', 'UPGRADING', 'CANCELLED', 'ERROR', 'ENABLED', 'DISABLED', 'MANUAL_PROVISIONING', 'PRODUCT_NOT_AVAILABLE', 'LIMIT_EXCEEDED', 'VERIFICATION_REQUIRED', 'COMPLETED', 'ORDER_PROCESSING', 'PENDING_PAYMENT', 'UNKNOWN')") + if value not in set(['READY', 'PROVISIONING', 'UPGRADING', 'CANCELLED', 'ERROR', 'DISABLED', 'MANUAL_PROVISIONING', 'PRODUCT_NOT_AVAILABLE', 'LIMIT_EXCEEDED', 'VERIFICATION_REQUIRED', 'ORDER_PROCESSING', 'PENDING_PAYMENT', 'UNKNOWN']): + raise ValueError("must be one of enum values ('READY', 'PROVISIONING', 'UPGRADING', 'CANCELLED', 'ERROR', 'DISABLED', 'MANUAL_PROVISIONING', 'PRODUCT_NOT_AVAILABLE', 'LIMIT_EXCEEDED', 'VERIFICATION_REQUIRED', 'ORDER_PROCESSING', 'PENDING_PAYMENT', 'UNKNOWN')") return value model_config = ConfigDict( diff --git a/pfruck_contabo/models/create_ptr_record_request.py b/pfruck_contabo/models/create_ptr_record_request.py new file mode 100644 index 00000000..fcd58710 --- /dev/null +++ b/pfruck_contabo/models/create_ptr_record_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class CreatePtrRecordRequest(BaseModel): + """ + CreatePtrRecordRequest + """ # noqa: E501 + ptr: StrictStr = Field(description="PTR Record name") + ip: StrictStr = Field(description="IP Address") + ttl: StrictInt = Field(description="Time to live for the PTR record in seconds") + __properties: ClassVar[List[str]] = ["ptr", "ip", "ttl"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreatePtrRecordRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreatePtrRecordRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ptr": obj.get("ptr"), + "ip": obj.get("ip"), + "ttl": obj.get("ttl") + }) + return _obj + + diff --git a/pfruck_contabo/models/create_tag_request.py b/pfruck_contabo/models/create_tag_request.py index 12a533f2..9ebec036 100644 --- a/pfruck_contabo/models/create_tag_request.py +++ b/pfruck_contabo/models/create_tag_request.py @@ -17,8 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from typing import Optional, Set from typing_extensions import Self @@ -29,7 +29,8 @@ class CreateTagRequest(BaseModel): """ # noqa: E501 name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="The name of the tag. Tags may contain letters, numbers, colons, dashes, and underscores. There is a limit of 255 characters per tag.") color: Annotated[str, Field(min_length=4, strict=True, max_length=7)] = Field(description="The color of the tag. Color can be specified using hexadecimal value. Default color is #0A78C3") - __properties: ClassVar[List[str]] = ["name", "color"] + description: Optional[StrictStr] = Field(default=None, description="The description of the Tag name. ") + __properties: ClassVar[List[str]] = ["name", "color", "description"] model_config = ConfigDict( populate_by_name=True, @@ -83,7 +84,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "name": obj.get("name"), - "color": obj.get("color") if obj.get("color") is not None else '#0A78C3' + "color": obj.get("color") if obj.get("color") is not None else '#0A78C3', + "description": obj.get("description") }) return _obj diff --git a/pfruck_contabo/models/create_user_request.py b/pfruck_contabo/models/create_user_request.py index e30b670c..c407846b 100644 --- a/pfruck_contabo/models/create_user_request.py +++ b/pfruck_contabo/models/create_user_request.py @@ -32,15 +32,15 @@ class CreateUserRequest(BaseModel): email: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="The email of the user to which activation and forgot password links are being sent to. There is a limit of 255 characters per email.") enabled: StrictBool = Field(description="If user is not enabled, he can't login and thus use services any longer.") totp: StrictBool = Field(description="Enable or disable two-factor authentication (2FA) via time based OTP.") - locale: StrictStr = Field(description="The locale of the user. This can be `de-DE`, `de`, `en-US`, `en`") + locale: StrictStr = Field(description="The locale of the user. This can be `de-DE`, `de`, `en-US`, `en`, `es-ES`, `es`, `pt-BR`, `pt`.") roles: Optional[List[StrictInt]] = Field(default=None, description="The roles as list of `roleId`s of the user.") __properties: ClassVar[List[str]] = ["firstName", "lastName", "email", "enabled", "totp", "locale", "roles"] @field_validator('locale') def locale_validate_enum(cls, value): """Validates the enum""" - if value not in set(['de-DE', 'de', 'en-US', 'en']): - raise ValueError("must be one of enum values ('de-DE', 'de', 'en-US', 'en')") + if value not in set(['de-DE', 'de', 'en-US', 'en', 'es', 'es-ES', 'pt-BR', 'pt']): + raise ValueError("must be one of enum values ('de-DE', 'de', 'en-US', 'en', 'es', 'es-ES', 'pt-BR', 'pt')") return value model_config = ConfigDict( diff --git a/pfruck_contabo/models/dns_zone_record_response.py b/pfruck_contabo/models/dns_zone_record_response.py new file mode 100644 index 00000000..e09f7fac --- /dev/null +++ b/pfruck_contabo/models/dns_zone_record_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class DnsZoneRecordResponse(BaseModel): + """ + DnsZoneRecordResponse + """ # noqa: E501 + tenant_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Your customer tenant id", alias="tenantId") + customer_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Your customer number", alias="customerId") + record_id: Union[StrictFloat, StrictInt] = Field(description="RecordId", alias="recordId") + name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Name, if empty the zone name will be used") + type: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Type") + ttl: Union[StrictFloat, StrictInt] = Field(description="TTL") + prio: Union[StrictFloat, StrictInt] = Field(description="Prio") + data: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Data") + port: Union[StrictFloat, StrictInt] = Field(description="Port") + weight: Union[StrictFloat, StrictInt] = Field(description="Weight") + flag: Union[StrictFloat, StrictInt] = Field(description="Flag") + tag: StrictStr = Field(description="Tag") + __properties: ClassVar[List[str]] = ["tenantId", "customerId", "recordId", "name", "type", "ttl", "prio", "data", "port", "weight", "flag", "tag"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DnsZoneRecordResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DnsZoneRecordResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tenantId": obj.get("tenantId"), + "customerId": obj.get("customerId"), + "recordId": obj.get("recordId"), + "name": obj.get("name"), + "type": obj.get("type"), + "ttl": obj.get("ttl"), + "prio": obj.get("prio"), + "data": obj.get("data"), + "port": obj.get("port"), + "weight": obj.get("weight"), + "flag": obj.get("flag"), + "tag": obj.get("tag") + }) + return _obj + + diff --git a/pfruck_contabo/models/create_ticket_response_data.py b/pfruck_contabo/models/dns_zone_response.py similarity index 85% rename from pfruck_contabo/models/create_ticket_response_data.py rename to pfruck_contabo/models/dns_zone_response.py index be2313cf..25bc6512 100644 --- a/pfruck_contabo/models/create_ticket_response_data.py +++ b/pfruck_contabo/models/dns_zone_response.py @@ -17,19 +17,20 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List from typing_extensions import Annotated from typing import Optional, Set from typing_extensions import Self -class CreateTicketResponseData(BaseModel): +class DnsZoneResponse(BaseModel): """ - CreateTicketResponseData + DnsZoneResponse """ # noqa: E501 tenant_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Your customer tenant id", alias="tenantId") customer_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Your customer number", alias="customerId") - __properties: ClassVar[List[str]] = ["tenantId", "customerId"] + zone_name: StrictStr = Field(description="Zone name", alias="zoneName") + __properties: ClassVar[List[str]] = ["tenantId", "customerId", "zoneName"] model_config = ConfigDict( populate_by_name=True, @@ -49,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CreateTicketResponseData from a JSON string""" + """Create an instance of DnsZoneResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -74,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CreateTicketResponseData from a dict""" + """Create an instance of DnsZoneResponse from a dict""" if obj is None: return None @@ -83,7 +84,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "tenantId": obj.get("tenantId"), - "customerId": obj.get("customerId") + "customerId": obj.get("customerId"), + "zoneName": obj.get("zoneName") }) return _obj diff --git a/pfruck_contabo/models/domain_audit_response.py b/pfruck_contabo/models/domain_audit_response.py new file mode 100644 index 00000000..209b3c52 --- /dev/null +++ b/pfruck_contabo/models/domain_audit_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.domain_audit_response_data import DomainAuditResponseData +from pfruck_contabo.models.links import Links +from pfruck_contabo.models.pagination_meta import PaginationMeta +from typing import Optional, Set +from typing_extensions import Self + +class DomainAuditResponse(BaseModel): + """ + DomainAuditResponse + """ # noqa: E501 + pagination: PaginationMeta = Field(description="Data about pagination like how many results, pages, page size.", alias="_pagination") + data: List[DomainAuditResponseData] + links: Links = Field(alias="_links") + __properties: ClassVar[List[str]] = ["_pagination", "data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainAuditResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['_pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainAuditResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_pagination": PaginationMeta.from_dict(obj["_pagination"]) if obj.get("_pagination") is not None else None, + "data": [DomainAuditResponseData.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": Links.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/domain_audit_response_data.py b/pfruck_contabo/models/domain_audit_response_data.py new file mode 100644 index 00000000..5c218fa5 --- /dev/null +++ b/pfruck_contabo/models/domain_audit_response_data.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class DomainAuditResponseData(BaseModel): + """ + DomainAuditResponseData + """ # noqa: E501 + id: StrictInt = Field(description="The ID of the audit entry.") + action: StrictStr = Field(description="Type of the action.") + timestamp: datetime = Field(description="When the change took place.") + tenant_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Customer tenant id", alias="tenantId") + customer_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Customer ID", alias="customerId") + changed_by: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Id of user who performed the change", alias="changedBy") + username: StrictStr = Field(description="Name of the user which led to the change.") + request_id: StrictStr = Field(description="The requestId of the API call which led to the change.", alias="requestId") + trace_id: StrictStr = Field(description="The traceId of the API call which led to the change.", alias="traceId") + domain: StrictStr = Field(description="The identifier of the domain") + changes: Optional[Dict[str, Any]] = Field(default=None, description="List of actual changes.") + __properties: ClassVar[List[str]] = ["id", "action", "timestamp", "tenantId", "customerId", "changedBy", "username", "requestId", "traceId", "domain", "changes"] + + @field_validator('action') + def action_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['CREATED', 'UPDATED', 'DELETED']): + raise ValueError("must be one of enum values ('CREATED', 'UPDATED', 'DELETED')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainAuditResponseData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainAuditResponseData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "action": obj.get("action"), + "timestamp": obj.get("timestamp"), + "tenantId": obj.get("tenantId"), + "customerId": obj.get("customerId"), + "changedBy": obj.get("changedBy"), + "username": obj.get("username"), + "requestId": obj.get("requestId"), + "traceId": obj.get("traceId"), + "domain": obj.get("domain"), + "changes": obj.get("changes") + }) + return _obj + + diff --git a/pfruck_contabo/models/domain_auth_code_regenerate_response.py b/pfruck_contabo/models/domain_auth_code_regenerate_response.py new file mode 100644 index 00000000..92529019 --- /dev/null +++ b/pfruck_contabo/models/domain_auth_code_regenerate_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.domain_auth_code_response import DomainAuthCodeResponse +from pfruck_contabo.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class DomainAuthCodeRegenerateResponse(BaseModel): + """ + DomainAuthCodeRegenerateResponse + """ # noqa: E501 + data: List[DomainAuthCodeResponse] + links: SelfLinks = Field(alias="_links") + __properties: ClassVar[List[str]] = ["data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainAuthCodeRegenerateResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainAuthCodeRegenerateResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [DomainAuthCodeResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/domain_auth_code_response.py b/pfruck_contabo/models/domain_auth_code_response.py new file mode 100644 index 00000000..faa8bf51 --- /dev/null +++ b/pfruck_contabo/models/domain_auth_code_response.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from pfruck_contabo.models.changed_auth_code import ChangedAuthCode +from pfruck_contabo.models.domain_details import DomainDetails +from pfruck_contabo.models.domain_handles import DomainHandles +from typing import Optional, Set +from typing_extensions import Self + +class DomainAuthCodeResponse(BaseModel): + """ + DomainAuthCodeResponse + """ # noqa: E501 + tenant_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Your customer tenant id", alias="tenantId") + customer_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Your customer number", alias="customerId") + domain: StrictStr = Field(description="Domain name") + domain_details: DomainDetails = Field(description="Domain Details", alias="domainDetails") + status: StrictStr = Field(description="Domain Status") + nameservers: List[StrictStr] = Field(description="Nameservers") + handles: DomainHandles = Field(description="The handles of the domain") + registration_date: datetime = Field(description="The registration date of domain", alias="registrationDate") + renewal_date: datetime = Field(description="The renewal date of domain", alias="renewalDate") + termination_date: datetime = Field(description="The termination date of domain", alias="terminationDate") + cancel_date: datetime = Field(description="The cancel date of domain", alias="cancelDate") + dnssec_keys: List[StrictStr] = Field(description="DNSSEC keys", alias="dnssecKeys") + transfer_out_confirmation: StrictBool = Field(description="Transfer out confirmation", alias="transferOutConfirmation") + auth_code: StrictStr = Field(description="Your auth code of the domain", alias="authCode") + auth_code_changed: ChangedAuthCode = Field(description="Details if the auth code has been changed", alias="authCodeChanged") + __properties: ClassVar[List[str]] = ["tenantId", "customerId", "domain", "domainDetails", "status", "nameservers", "handles", "registrationDate", "renewalDate", "terminationDate", "cancelDate", "dnssecKeys", "transferOutConfirmation", "authCode", "authCodeChanged"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ready', 'processing', 'transferring in', 'transferring out', 'manual_task', 'transferred', 'error']): + raise ValueError("must be one of enum values ('ready', 'processing', 'transferring in', 'transferring out', 'manual_task', 'transferred', 'error')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainAuthCodeResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of domain_details + if self.domain_details: + _dict['domainDetails'] = self.domain_details.to_dict() + # override the default output from pydantic by calling `to_dict()` of handles + if self.handles: + _dict['handles'] = self.handles.to_dict() + # override the default output from pydantic by calling `to_dict()` of auth_code_changed + if self.auth_code_changed: + _dict['authCodeChanged'] = self.auth_code_changed.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainAuthCodeResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tenantId": obj.get("tenantId"), + "customerId": obj.get("customerId"), + "domain": obj.get("domain"), + "domainDetails": DomainDetails.from_dict(obj["domainDetails"]) if obj.get("domainDetails") is not None else None, + "status": obj.get("status"), + "nameservers": obj.get("nameservers"), + "handles": DomainHandles.from_dict(obj["handles"]) if obj.get("handles") is not None else None, + "registrationDate": obj.get("registrationDate"), + "renewalDate": obj.get("renewalDate"), + "terminationDate": obj.get("terminationDate"), + "cancelDate": obj.get("cancelDate"), + "dnssecKeys": obj.get("dnssecKeys"), + "transferOutConfirmation": obj.get("transferOutConfirmation"), + "authCode": obj.get("authCode"), + "authCodeChanged": ChangedAuthCode.from_dict(obj["authCodeChanged"]) if obj.get("authCodeChanged") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/domain_cancel.py b/pfruck_contabo/models/domain_cancel.py new file mode 100644 index 00000000..ceaaab10 --- /dev/null +++ b/pfruck_contabo/models/domain_cancel.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class DomainCancel(BaseModel): + """ + DomainCancel + """ # noqa: E501 + tenant_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Your customer tenant id", alias="tenantId") + customer_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Your customer number", alias="customerId") + domain: StrictStr = Field(description="Domain name") + sld: StrictStr = Field(description="Domain SLD") + tld: StrictStr = Field(description="Domain TLD") + cancel_date: datetime = Field(description="The cancel date of domain", alias="cancelDate") + __properties: ClassVar[List[str]] = ["tenantId", "customerId", "domain", "sld", "tld", "cancelDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainCancel from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainCancel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tenantId": obj.get("tenantId"), + "customerId": obj.get("customerId"), + "domain": obj.get("domain"), + "sld": obj.get("sld"), + "tld": obj.get("tld"), + "cancelDate": obj.get("cancelDate") + }) + return _obj + + diff --git a/pfruck_contabo/models/domain_cancel_response.py b/pfruck_contabo/models/domain_cancel_response.py new file mode 100644 index 00000000..e24e1e53 --- /dev/null +++ b/pfruck_contabo/models/domain_cancel_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.domain_cancel import DomainCancel +from pfruck_contabo.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class DomainCancelResponse(BaseModel): + """ + DomainCancelResponse + """ # noqa: E501 + data: List[DomainCancel] + links: SelfLinks = Field(alias="_links") + __properties: ClassVar[List[str]] = ["data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainCancelResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainCancelResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [DomainCancel.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/domain_create_request.py b/pfruck_contabo/models/domain_create_request.py new file mode 100644 index 00000000..b544f4c1 --- /dev/null +++ b/pfruck_contabo/models/domain_create_request.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from pfruck_contabo.models.domain_handles import DomainHandles +from pfruck_contabo.models.nameserver import Nameserver +from typing import Optional, Set +from typing_extensions import Self + +class DomainCreateRequest(BaseModel): + """ + DomainCreateRequest + """ # noqa: E501 + domain: StrictStr = Field(description="Domain name") + auth_code: Optional[StrictStr] = Field(default=None, description="The domain auth code", alias="authCode") + handles: DomainHandles = Field(description="The handles of the domain") + nameservers: List[Nameserver] = Field(description="Nameservers") + resource_type: Optional[StrictStr] = Field(default=None, description="The identifier of the resource type", alias="resourceType") + resource_id: Optional[StrictStr] = Field(default=None, description="The identifier of the resource id", alias="resourceId") + __properties: ClassVar[List[str]] = ["domain", "authCode", "handles", "nameservers", "resourceType", "resourceId"] + + @field_validator('resource_type') + def resource_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['instance', 'server', 'package']): + raise ValueError("must be one of enum values ('instance', 'server', 'package')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainCreateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of handles + if self.handles: + _dict['handles'] = self.handles.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in nameservers (list) + _items = [] + if self.nameservers: + for _item in self.nameservers: + if _item: + _items.append(_item.to_dict()) + _dict['nameservers'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainCreateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "domain": obj.get("domain"), + "authCode": obj.get("authCode"), + "handles": DomainHandles.from_dict(obj["handles"]) if obj.get("handles") is not None else None, + "nameservers": [Nameserver.from_dict(_item) for _item in obj["nameservers"]] if obj.get("nameservers") is not None else None, + "resourceType": obj.get("resourceType"), + "resourceId": obj.get("resourceId") + }) + return _obj + + diff --git a/pfruck_contabo/models/domain_create_response.py b/pfruck_contabo/models/domain_create_response.py new file mode 100644 index 00000000..2f29b242 --- /dev/null +++ b/pfruck_contabo/models/domain_create_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.domain_response import DomainResponse +from pfruck_contabo.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class DomainCreateResponse(BaseModel): + """ + DomainCreateResponse + """ # noqa: E501 + data: List[DomainResponse] + links: SelfLinks = Field(alias="_links") + __properties: ClassVar[List[str]] = ["data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainCreateResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainCreateResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [DomainResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/domain_details.py b/pfruck_contabo/models/domain_details.py new file mode 100644 index 00000000..24e0b935 --- /dev/null +++ b/pfruck_contabo/models/domain_details.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class DomainDetails(BaseModel): + """ + DomainDetails + """ # noqa: E501 + sld: StrictStr = Field(description="Domain SLD") + tld: StrictStr = Field(description="Domain TLD") + domain_puny: StrictStr = Field(description="Domain Puny", alias="domainPuny") + __properties: ClassVar[List[str]] = ["sld", "tld", "domainPuny"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sld": obj.get("sld"), + "tld": obj.get("tld"), + "domainPuny": obj.get("domainPuny") + }) + return _obj + + diff --git a/pfruck_contabo/models/domain_find_response.py b/pfruck_contabo/models/domain_find_response.py new file mode 100644 index 00000000..b373afde --- /dev/null +++ b/pfruck_contabo/models/domain_find_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.domain_response import DomainResponse +from pfruck_contabo.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class DomainFindResponse(BaseModel): + """ + DomainFindResponse + """ # noqa: E501 + data: List[DomainResponse] + links: SelfLinks = Field(alias="_links") + __properties: ClassVar[List[str]] = ["data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainFindResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainFindResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [DomainResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/domain_handles.py b/pfruck_contabo/models/domain_handles.py new file mode 100644 index 00000000..c877ee8c --- /dev/null +++ b/pfruck_contabo/models/domain_handles.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class DomainHandles(BaseModel): + """ + DomainHandles + """ # noqa: E501 + owner: StrictStr = Field(description="Domain's owner handle") + admin: StrictStr = Field(description="Domain's admin handle") + tech: StrictStr = Field(description="Domain's tech handle") + zone: StrictStr = Field(description="Domain's zone handle") + __properties: ClassVar[List[str]] = ["owner", "admin", "tech", "zone"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainHandles from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainHandles from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "owner": obj.get("owner"), + "admin": obj.get("admin"), + "tech": obj.get("tech"), + "zone": obj.get("zone") + }) + return _obj + + diff --git a/pfruck_contabo/models/domain_patch_request.py b/pfruck_contabo/models/domain_patch_request.py new file mode 100644 index 00000000..0cd615e8 --- /dev/null +++ b/pfruck_contabo/models/domain_patch_request.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from pfruck_contabo.models.domain_handles import DomainHandles +from pfruck_contabo.models.nameserver import Nameserver +from typing import Optional, Set +from typing_extensions import Self + +class DomainPatchRequest(BaseModel): + """ + DomainPatchRequest + """ # noqa: E501 + nameservers: Optional[List[Nameserver]] = Field(default=None, description="Nameservers") + handles: Optional[DomainHandles] = Field(default=None, description="The handles of the domain") + __properties: ClassVar[List[str]] = ["nameservers", "handles"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainPatchRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in nameservers (list) + _items = [] + if self.nameservers: + for _item in self.nameservers: + if _item: + _items.append(_item.to_dict()) + _dict['nameservers'] = _items + # override the default output from pydantic by calling `to_dict()` of handles + if self.handles: + _dict['handles'] = self.handles.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainPatchRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "nameservers": [Nameserver.from_dict(_item) for _item in obj["nameservers"]] if obj.get("nameservers") is not None else None, + "handles": DomainHandles.from_dict(obj["handles"]) if obj.get("handles") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/domain_patch_response.py b/pfruck_contabo/models/domain_patch_response.py new file mode 100644 index 00000000..af6feceb --- /dev/null +++ b/pfruck_contabo/models/domain_patch_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.domain_response import DomainResponse +from pfruck_contabo.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class DomainPatchResponse(BaseModel): + """ + DomainPatchResponse + """ # noqa: E501 + data: List[DomainResponse] + links: SelfLinks = Field(alias="_links") + __properties: ClassVar[List[str]] = ["data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainPatchResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainPatchResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [DomainResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/domain_response.py b/pfruck_contabo/models/domain_response.py new file mode 100644 index 00000000..082f0a28 --- /dev/null +++ b/pfruck_contabo/models/domain_response.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from pfruck_contabo.models.domain_details import DomainDetails +from pfruck_contabo.models.domain_handles import DomainHandles +from typing import Optional, Set +from typing_extensions import Self + +class DomainResponse(BaseModel): + """ + DomainResponse + """ # noqa: E501 + tenant_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Your customer tenant id", alias="tenantId") + customer_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Your customer number", alias="customerId") + domain: StrictStr = Field(description="Domain name") + domain_details: DomainDetails = Field(description="Domain Details", alias="domainDetails") + status: StrictStr = Field(description="Domain Status") + nameservers: List[StrictStr] = Field(description="Nameservers") + handles: DomainHandles = Field(description="The handles of the domain") + registration_date: datetime = Field(description="The registration date of domain", alias="registrationDate") + renewal_date: datetime = Field(description="The renewal date of domain", alias="renewalDate") + termination_date: datetime = Field(description="The termination date of domain", alias="terminationDate") + cancel_date: datetime = Field(description="The cancel date of domain", alias="cancelDate") + dnssec_keys: List[StrictStr] = Field(description="DNSSEC keys", alias="dnssecKeys") + transfer_out_confirmation: StrictBool = Field(description="Transfer out confirmation", alias="transferOutConfirmation") + __properties: ClassVar[List[str]] = ["tenantId", "customerId", "domain", "domainDetails", "status", "nameservers", "handles", "registrationDate", "renewalDate", "terminationDate", "cancelDate", "dnssecKeys", "transferOutConfirmation"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ready', 'processing', 'transferring in', 'transferring out', 'manual_task', 'transferred', 'error']): + raise ValueError("must be one of enum values ('ready', 'processing', 'transferring in', 'transferring out', 'manual_task', 'transferred', 'error')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of domain_details + if self.domain_details: + _dict['domainDetails'] = self.domain_details.to_dict() + # override the default output from pydantic by calling `to_dict()` of handles + if self.handles: + _dict['handles'] = self.handles.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tenantId": obj.get("tenantId"), + "customerId": obj.get("customerId"), + "domain": obj.get("domain"), + "domainDetails": DomainDetails.from_dict(obj["domainDetails"]) if obj.get("domainDetails") is not None else None, + "status": obj.get("status"), + "nameservers": obj.get("nameservers"), + "handles": DomainHandles.from_dict(obj["handles"]) if obj.get("handles") is not None else None, + "registrationDate": obj.get("registrationDate"), + "renewalDate": obj.get("renewalDate"), + "terminationDate": obj.get("terminationDate"), + "cancelDate": obj.get("cancelDate"), + "dnssecKeys": obj.get("dnssecKeys"), + "transferOutConfirmation": obj.get("transferOutConfirmation") + }) + return _obj + + diff --git a/pfruck_contabo/models/domains_list_response.py b/pfruck_contabo/models/domains_list_response.py new file mode 100644 index 00000000..3d8bf423 --- /dev/null +++ b/pfruck_contabo/models/domains_list_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.domain_response import DomainResponse +from pfruck_contabo.models.links import Links +from pfruck_contabo.models.pagination_meta import PaginationMeta +from typing import Optional, Set +from typing_extensions import Self + +class DomainsListResponse(BaseModel): + """ + DomainsListResponse + """ # noqa: E501 + pagination: PaginationMeta = Field(description="Data about pagination like how many results, pages, page size.", alias="_pagination") + data: List[DomainResponse] + links: Links = Field(alias="_links") + __properties: ClassVar[List[str]] = ["_pagination", "data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainsListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['_pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainsListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_pagination": PaginationMeta.from_dict(obj["_pagination"]) if obj.get("_pagination") is not None else None, + "data": [DomainResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": Links.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/ext_check_collection_response.py b/pfruck_contabo/models/ext_check_collection_response.py new file mode 100644 index 00000000..818cc04c --- /dev/null +++ b/pfruck_contabo/models/ext_check_collection_response.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing_extensions import Annotated +from pfruck_contabo.models.check_collection_check_templates import CheckCollectionCheckTemplates +from pfruck_contabo.models.ext_check_response import ExtCheckResponse +from typing import Optional, Set +from typing_extensions import Self + +class ExtCheckCollectionResponse(BaseModel): + """ + ExtCheckCollectionResponse + """ # noqa: E501 + internal: StrictBool = Field(description="Is internal (not shown to the customer)") + status: StrictStr = Field(description="Status of the handle") + object_type: StrictStr = Field(description="Object type to be handled", alias="objectType") + object_id: StrictStr = Field(description="ID of the object, to be handled", alias="objectId") + check_collection_id: Union[StrictFloat, StrictInt] = Field(description="Check collection's id", alias="checkCollectionId") + check_collection_template_id: Union[StrictFloat, StrictInt] = Field(description="Check Collection Template for this check collection", alias="checkCollectionTemplateId") + check_templates: List[CheckCollectionCheckTemplates] = Field(description="Check templates which are part of this collection template", alias="checkTemplates") + created_date: datetime = Field(description="Creation date", alias="createdDate") + modified_date: datetime = Field(description="Modify date", alias="modifiedDate") + tenant_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Tenant id", alias="tenantId") + customer_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Customer id", alias="customerId") + checks: List[ExtCheckResponse] = Field(description="Checks performed in this check collection") + __properties: ClassVar[List[str]] = ["internal", "status", "objectType", "objectId", "checkCollectionId", "checkCollectionTemplateId", "checkTemplates", "createdDate", "modifiedDate", "tenantId", "customerId", "checks"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['queued', 'running', 'skipped', 'cancelled', 'failed', 'warn', 'successful']): + raise ValueError("must be one of enum values ('queued', 'running', 'skipped', 'cancelled', 'failed', 'warn', 'successful')") + return value + + @field_validator('object_type') + def object_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['vserver']): + raise ValueError("must be one of enum values ('vserver')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExtCheckCollectionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in check_templates (list) + _items = [] + if self.check_templates: + for _item in self.check_templates: + if _item: + _items.append(_item.to_dict()) + _dict['checkTemplates'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in checks (list) + _items = [] + if self.checks: + for _item in self.checks: + if _item: + _items.append(_item.to_dict()) + _dict['checks'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExtCheckCollectionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "internal": obj.get("internal"), + "status": obj.get("status"), + "objectType": obj.get("objectType"), + "objectId": obj.get("objectId"), + "checkCollectionId": obj.get("checkCollectionId"), + "checkCollectionTemplateId": obj.get("checkCollectionTemplateId"), + "checkTemplates": [CheckCollectionCheckTemplates.from_dict(_item) for _item in obj["checkTemplates"]] if obj.get("checkTemplates") is not None else None, + "createdDate": obj.get("createdDate"), + "modifiedDate": obj.get("modifiedDate"), + "tenantId": obj.get("tenantId"), + "customerId": obj.get("customerId"), + "checks": [ExtCheckResponse.from_dict(_item) for _item in obj["checks"]] if obj.get("checks") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/ext_check_collection_template_response.py b/pfruck_contabo/models/ext_check_collection_template_response.py new file mode 100644 index 00000000..399f45d4 --- /dev/null +++ b/pfruck_contabo/models/ext_check_collection_template_response.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing_extensions import Annotated +from pfruck_contabo.models.check_collection_templates_check_templates import CheckCollectionTemplatesCheckTemplates +from typing import Optional, Set +from typing_extensions import Self + +class ExtCheckCollectionTemplateResponse(BaseModel): + """ + ExtCheckCollectionTemplateResponse + """ # noqa: E501 + check_collection_template_id: Union[StrictFloat, StrictInt] = Field(description="Check collection template's id", alias="checkCollectionTemplateId") + name: StrictStr = Field(description="Name of the check collection template") + description: StrictStr = Field(description="Description for the check collection template") + internal: StrictBool = Field(description="Is check collection only internal (not shown to the customer)") + object_type: StrictStr = Field(description="Object type for which the check collection template can be used", alias="objectType") + check_templates: List[CheckCollectionTemplatesCheckTemplates] = Field(description="Check templates which are part of this collection template", alias="checkTemplates") + created_date: datetime = Field(description="Creation date", alias="createdDate") + modified_date: datetime = Field(description="Modify date", alias="modifiedDate") + tenant_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Tenant id", alias="tenantId") + customer_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Customer id", alias="customerId") + __properties: ClassVar[List[str]] = ["checkCollectionTemplateId", "name", "description", "internal", "objectType", "checkTemplates", "createdDate", "modifiedDate", "tenantId", "customerId"] + + @field_validator('object_type') + def object_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['vserver']): + raise ValueError("must be one of enum values ('vserver')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExtCheckCollectionTemplateResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in check_templates (list) + _items = [] + if self.check_templates: + for _item in self.check_templates: + if _item: + _items.append(_item.to_dict()) + _dict['checkTemplates'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExtCheckCollectionTemplateResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "checkCollectionTemplateId": obj.get("checkCollectionTemplateId"), + "name": obj.get("name"), + "description": obj.get("description"), + "internal": obj.get("internal"), + "objectType": obj.get("objectType"), + "checkTemplates": [CheckCollectionTemplatesCheckTemplates.from_dict(_item) for _item in obj["checkTemplates"]] if obj.get("checkTemplates") is not None else None, + "createdDate": obj.get("createdDate"), + "modifiedDate": obj.get("modifiedDate"), + "tenantId": obj.get("tenantId"), + "customerId": obj.get("customerId") + }) + return _obj + + diff --git a/pfruck_contabo/models/ext_check_collection_templates_get_response.py b/pfruck_contabo/models/ext_check_collection_templates_get_response.py new file mode 100644 index 00000000..6bfd1486 --- /dev/null +++ b/pfruck_contabo/models/ext_check_collection_templates_get_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.ext_check_collection_template_response import ExtCheckCollectionTemplateResponse +from pfruck_contabo.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class ExtCheckCollectionTemplatesGetResponse(BaseModel): + """ + ExtCheckCollectionTemplatesGetResponse + """ # noqa: E501 + data: List[ExtCheckCollectionTemplateResponse] + links: SelfLinks = Field(alias="_links") + __properties: ClassVar[List[str]] = ["data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExtCheckCollectionTemplatesGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExtCheckCollectionTemplatesGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [ExtCheckCollectionTemplateResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/ext_check_collection_templates_list_response.py b/pfruck_contabo/models/ext_check_collection_templates_list_response.py new file mode 100644 index 00000000..10741978 --- /dev/null +++ b/pfruck_contabo/models/ext_check_collection_templates_list_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.ext_check_collection_template_response import ExtCheckCollectionTemplateResponse +from pfruck_contabo.models.links import Links +from pfruck_contabo.models.pagination_meta import PaginationMeta +from typing import Optional, Set +from typing_extensions import Self + +class ExtCheckCollectionTemplatesListResponse(BaseModel): + """ + ExtCheckCollectionTemplatesListResponse + """ # noqa: E501 + pagination: PaginationMeta = Field(description="Data about pagination like how many results, pages, page size.", alias="_pagination") + data: List[ExtCheckCollectionTemplateResponse] + links: Links = Field(alias="_links") + __properties: ClassVar[List[str]] = ["_pagination", "data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExtCheckCollectionTemplatesListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['_pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExtCheckCollectionTemplatesListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_pagination": PaginationMeta.from_dict(obj["_pagination"]) if obj.get("_pagination") is not None else None, + "data": [ExtCheckCollectionTemplateResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": Links.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/ext_check_collections_get_response.py b/pfruck_contabo/models/ext_check_collections_get_response.py new file mode 100644 index 00000000..fc9b58f3 --- /dev/null +++ b/pfruck_contabo/models/ext_check_collections_get_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.ext_check_collection_response import ExtCheckCollectionResponse +from pfruck_contabo.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class ExtCheckCollectionsGetResponse(BaseModel): + """ + ExtCheckCollectionsGetResponse + """ # noqa: E501 + data: List[ExtCheckCollectionResponse] + links: SelfLinks = Field(alias="_links") + __properties: ClassVar[List[str]] = ["data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExtCheckCollectionsGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExtCheckCollectionsGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [ExtCheckCollectionResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/ext_check_collections_list_response.py b/pfruck_contabo/models/ext_check_collections_list_response.py new file mode 100644 index 00000000..7093a1f9 --- /dev/null +++ b/pfruck_contabo/models/ext_check_collections_list_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.ext_check_collection_response import ExtCheckCollectionResponse +from pfruck_contabo.models.links import Links +from pfruck_contabo.models.pagination_meta import PaginationMeta +from typing import Optional, Set +from typing_extensions import Self + +class ExtCheckCollectionsListResponse(BaseModel): + """ + ExtCheckCollectionsListResponse + """ # noqa: E501 + pagination: PaginationMeta = Field(description="Data about pagination like how many results, pages, page size.", alias="_pagination") + data: List[ExtCheckCollectionResponse] + links: Links = Field(alias="_links") + __properties: ClassVar[List[str]] = ["_pagination", "data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExtCheckCollectionsListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['_pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExtCheckCollectionsListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_pagination": PaginationMeta.from_dict(obj["_pagination"]) if obj.get("_pagination") is not None else None, + "data": [ExtCheckCollectionResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": Links.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/ext_check_response.py b/pfruck_contabo/models/ext_check_response.py new file mode 100644 index 00000000..0ee060d8 --- /dev/null +++ b/pfruck_contabo/models/ext_check_response.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ExtCheckResponse(BaseModel): + """ + ExtCheckResponse + """ # noqa: E501 + internal: StrictBool = Field(description="Is internal (not shown to the customer)") + status: StrictStr = Field(description="Status of the handle") + object_type: StrictStr = Field(description="Object type to be handled", alias="objectType") + object_id: StrictStr = Field(description="ID of the object, to be handled", alias="objectId") + check_id: Union[StrictFloat, StrictInt] = Field(description="Check's id", alias="checkId") + check_collection_id: Union[StrictFloat, StrictInt] = Field(description="ID of check collection if started in scope of a collection", alias="checkCollectionId") + check_template_id: Union[StrictFloat, StrictInt] = Field(description="Check Template for this check", alias="checkTemplateId") + name: StrictStr = Field(description="Name of this check template") + note: StrictStr = Field(description="Note to be shown to the customer") + internal_note: StrictStr = Field(description="Note which is shown only internally to the agent", alias="internalNote") + duration_ms: Union[StrictFloat, StrictInt] = Field(description="Duration of the check in milliseconds", alias="durationMs") + created_date: datetime = Field(description="Creation date", alias="createdDate") + modified_date: datetime = Field(description="Modify date", alias="modifiedDate") + tenant_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Tenant id", alias="tenantId") + customer_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Customer id", alias="customerId") + __properties: ClassVar[List[str]] = ["internal", "status", "objectType", "objectId", "checkId", "checkCollectionId", "checkTemplateId", "name", "note", "internalNote", "durationMs", "createdDate", "modifiedDate", "tenantId", "customerId"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['queued', 'running', 'skipped', 'cancelled', 'failed', 'warn', 'successful']): + raise ValueError("must be one of enum values ('queued', 'running', 'skipped', 'cancelled', 'failed', 'warn', 'successful')") + return value + + @field_validator('object_type') + def object_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['vserver']): + raise ValueError("must be one of enum values ('vserver')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExtCheckResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExtCheckResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "internal": obj.get("internal"), + "status": obj.get("status"), + "objectType": obj.get("objectType"), + "objectId": obj.get("objectId"), + "checkId": obj.get("checkId"), + "checkCollectionId": obj.get("checkCollectionId"), + "checkTemplateId": obj.get("checkTemplateId"), + "name": obj.get("name"), + "note": obj.get("note"), + "internalNote": obj.get("internalNote"), + "durationMs": obj.get("durationMs"), + "createdDate": obj.get("createdDate"), + "modifiedDate": obj.get("modifiedDate"), + "tenantId": obj.get("tenantId"), + "customerId": obj.get("customerId") + }) + return _obj + + diff --git a/pfruck_contabo/models/ext_checks_get_response.py b/pfruck_contabo/models/ext_checks_get_response.py new file mode 100644 index 00000000..390ad601 --- /dev/null +++ b/pfruck_contabo/models/ext_checks_get_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.ext_check_response import ExtCheckResponse +from pfruck_contabo.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class ExtChecksGetResponse(BaseModel): + """ + ExtChecksGetResponse + """ # noqa: E501 + data: List[ExtCheckResponse] + links: SelfLinks = Field(alias="_links") + __properties: ClassVar[List[str]] = ["data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExtChecksGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExtChecksGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [ExtCheckResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/ext_checks_list_response.py b/pfruck_contabo/models/ext_checks_list_response.py new file mode 100644 index 00000000..74af956b --- /dev/null +++ b/pfruck_contabo/models/ext_checks_list_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.ext_check_response import ExtCheckResponse +from pfruck_contabo.models.links import Links +from pfruck_contabo.models.pagination_meta import PaginationMeta +from typing import Optional, Set +from typing_extensions import Self + +class ExtChecksListResponse(BaseModel): + """ + ExtChecksListResponse + """ # noqa: E501 + pagination: PaginationMeta = Field(description="Data about pagination like how many results, pages, page size.", alias="_pagination") + data: List[ExtCheckResponse] + links: Links = Field(alias="_links") + __properties: ClassVar[List[str]] = ["_pagination", "data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExtChecksListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['_pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExtChecksListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_pagination": PaginationMeta.from_dict(obj["_pagination"]) if obj.get("_pagination") is not None else None, + "data": [ExtCheckResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": Links.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/ext_remedies_get_response.py b/pfruck_contabo/models/ext_remedies_get_response.py new file mode 100644 index 00000000..4a499881 --- /dev/null +++ b/pfruck_contabo/models/ext_remedies_get_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.ext_remedy_response import ExtRemedyResponse +from pfruck_contabo.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class ExtRemediesGetResponse(BaseModel): + """ + ExtRemediesGetResponse + """ # noqa: E501 + data: List[ExtRemedyResponse] + links: SelfLinks = Field(alias="_links") + __properties: ClassVar[List[str]] = ["data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExtRemediesGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExtRemediesGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [ExtRemedyResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/ext_remedies_list_response.py b/pfruck_contabo/models/ext_remedies_list_response.py new file mode 100644 index 00000000..b6eabbbf --- /dev/null +++ b/pfruck_contabo/models/ext_remedies_list_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.ext_remedy_response import ExtRemedyResponse +from pfruck_contabo.models.links import Links +from pfruck_contabo.models.pagination_meta import PaginationMeta +from typing import Optional, Set +from typing_extensions import Self + +class ExtRemediesListResponse(BaseModel): + """ + ExtRemediesListResponse + """ # noqa: E501 + pagination: PaginationMeta = Field(description="Data about pagination like how many results, pages, page size.", alias="_pagination") + data: List[ExtRemedyResponse] + links: Links = Field(alias="_links") + __properties: ClassVar[List[str]] = ["_pagination", "data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExtRemediesListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['_pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExtRemediesListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_pagination": PaginationMeta.from_dict(obj["_pagination"]) if obj.get("_pagination") is not None else None, + "data": [ExtRemedyResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": Links.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/ext_remedy_response.py b/pfruck_contabo/models/ext_remedy_response.py new file mode 100644 index 00000000..fe8930dd --- /dev/null +++ b/pfruck_contabo/models/ext_remedy_response.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ExtRemedyResponse(BaseModel): + """ + ExtRemedyResponse + """ # noqa: E501 + internal: StrictBool = Field(description="Is internal (not shown to the customer)") + status: StrictStr = Field(description="Status of the handle") + object_type: StrictStr = Field(description="Object type to be handled", alias="objectType") + object_id: StrictStr = Field(description="ID of the object, to be handled", alias="objectId") + remedy_id: Union[StrictFloat, StrictInt] = Field(description="Remedy's id", alias="remedyId") + remedy_collection_id: Union[StrictFloat, StrictInt] = Field(description="ID of remedy collection if started in scope of a collection", alias="remedyCollectionId") + remedy_template_id: Union[StrictFloat, StrictInt] = Field(description="Remedy Template for this remedy", alias="remedyTemplateId") + name: StrictStr = Field(description="Name of this remedy template") + note: StrictStr = Field(description="Note to be shown to the customer") + duration_ms: Union[StrictFloat, StrictInt] = Field(description="Duration of the remedy in milliseconds", alias="durationMs") + created_date: datetime = Field(description="Creation date", alias="createdDate") + modified_date: datetime = Field(description="Modify date", alias="modifiedDate") + tenant_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Tenant id", alias="tenantId") + customer_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Customer id", alias="customerId") + __properties: ClassVar[List[str]] = ["internal", "status", "objectType", "objectId", "remedyId", "remedyCollectionId", "remedyTemplateId", "name", "note", "durationMs", "createdDate", "modifiedDate", "tenantId", "customerId"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['queued', 'running', 'skipped', 'cancelled', 'failed', 'warn', 'successful']): + raise ValueError("must be one of enum values ('queued', 'running', 'skipped', 'cancelled', 'failed', 'warn', 'successful')") + return value + + @field_validator('object_type') + def object_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['vserver']): + raise ValueError("must be one of enum values ('vserver')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExtRemedyResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExtRemedyResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "internal": obj.get("internal"), + "status": obj.get("status"), + "objectType": obj.get("objectType"), + "objectId": obj.get("objectId"), + "remedyId": obj.get("remedyId"), + "remedyCollectionId": obj.get("remedyCollectionId"), + "remedyTemplateId": obj.get("remedyTemplateId"), + "name": obj.get("name"), + "note": obj.get("note"), + "durationMs": obj.get("durationMs"), + "createdDate": obj.get("createdDate"), + "modifiedDate": obj.get("modifiedDate"), + "tenantId": obj.get("tenantId"), + "customerId": obj.get("customerId") + }) + return _obj + + diff --git a/pfruck_contabo/models/find_firewall_response.py b/pfruck_contabo/models/find_firewall_response.py new file mode 100644 index 00000000..0e7ba7e3 --- /dev/null +++ b/pfruck_contabo/models/find_firewall_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.firewall_response import FirewallResponse +from pfruck_contabo.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class FindFirewallResponse(BaseModel): + """ + FindFirewallResponse + """ # noqa: E501 + data: List[FirewallResponse] + links: SelfLinks = Field(alias="_links") + __properties: ClassVar[List[str]] = ["data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FindFirewallResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FindFirewallResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [FirewallResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/firewall_audit_response.py b/pfruck_contabo/models/firewall_audit_response.py new file mode 100644 index 00000000..f409a222 --- /dev/null +++ b/pfruck_contabo/models/firewall_audit_response.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class FirewallAuditResponse(BaseModel): + """ + FirewallAuditResponse + """ # noqa: E501 + id: StrictInt = Field(description="The identifier of the audit entry.") + firewall_id: StrictStr = Field(description="The identifier of the Firewall", alias="firewallId") + action: StrictStr = Field(description="Type of the action.") + timestamp: datetime = Field(description="When the change took place.") + tenant_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Customer tenant id", alias="tenantId") + customer_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Customer number", alias="customerId") + changed_by: Annotated[str, Field(min_length=1, strict=True)] = Field(description="User id", alias="changedBy") + username: StrictStr = Field(description="User name which did the change.") + request_id: StrictStr = Field(description="The requestId of the API call which led to the change.", alias="requestId") + trace_id: StrictStr = Field(description="The traceId of the API call which led to the change.", alias="traceId") + changes: Optional[Dict[str, Any]] = Field(default=None, description="List of actual changes.") + __properties: ClassVar[List[str]] = ["id", "firewallId", "action", "timestamp", "tenantId", "customerId", "changedBy", "username", "requestId", "traceId", "changes"] + + @field_validator('action') + def action_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['CREATED', 'DELETED', 'UPDATED']): + raise ValueError("must be one of enum values ('CREATED', 'DELETED', 'UPDATED')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FirewallAuditResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FirewallAuditResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "firewallId": obj.get("firewallId"), + "action": obj.get("action"), + "timestamp": obj.get("timestamp"), + "tenantId": obj.get("tenantId"), + "customerId": obj.get("customerId"), + "changedBy": obj.get("changedBy"), + "username": obj.get("username"), + "requestId": obj.get("requestId"), + "traceId": obj.get("traceId"), + "changes": obj.get("changes") + }) + return _obj + + diff --git a/pfruck_contabo/models/firewall_response.py b/pfruck_contabo/models/firewall_response.py new file mode 100644 index 00000000..058b9f4c --- /dev/null +++ b/pfruck_contabo/models/firewall_response.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from pfruck_contabo.models.instance_details import InstanceDetails +from pfruck_contabo.models.instance_status_representation import InstanceStatusRepresentation +from pfruck_contabo.models.rules import Rules +from typing import Optional, Set +from typing_extensions import Self + +class FirewallResponse(BaseModel): + """ + FirewallResponse + """ # noqa: E501 + tenant_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Your customer tenant id", alias="tenantId") + customer_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Your customer number", alias="customerId") + firewall_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Your firewall id.", alias="firewallId") + name: Annotated[str, Field(strict=True, max_length=255)] = Field(description="The name of the firewall.") + description: Annotated[str, Field(strict=True, max_length=255)] = Field(description="The description of the firewall.") + status: StrictStr = Field(description="Inactive status means no rules of this firewall are set for all assigned instances.") + instance_status: List[InstanceStatusRepresentation] = Field(alias="instanceStatus") + instances: List[InstanceDetails] + rules: Rules + created_date: datetime = Field(description="The creation date time for the firewall", alias="createdDate") + updated_date: datetime = Field(description="The update date time for the firewall", alias="updatedDate") + __properties: ClassVar[List[str]] = ["tenantId", "customerId", "firewallId", "name", "description", "status", "instanceStatus", "instances", "rules", "createdDate", "updatedDate"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['active', 'inactive']): + raise ValueError("must be one of enum values ('active', 'inactive')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FirewallResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in instance_status (list) + _items = [] + if self.instance_status: + for _item in self.instance_status: + if _item: + _items.append(_item.to_dict()) + _dict['instanceStatus'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in instances (list) + _items = [] + if self.instances: + for _item in self.instances: + if _item: + _items.append(_item.to_dict()) + _dict['instances'] = _items + # override the default output from pydantic by calling `to_dict()` of rules + if self.rules: + _dict['rules'] = self.rules.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FirewallResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tenantId": obj.get("tenantId"), + "customerId": obj.get("customerId"), + "firewallId": obj.get("firewallId"), + "name": obj.get("name"), + "description": obj.get("description"), + "status": obj.get("status"), + "instanceStatus": [InstanceStatusRepresentation.from_dict(_item) for _item in obj["instanceStatus"]] if obj.get("instanceStatus") is not None else None, + "instances": [InstanceDetails.from_dict(_item) for _item in obj["instances"]] if obj.get("instances") is not None else None, + "rules": Rules.from_dict(obj["rules"]) if obj.get("rules") is not None else None, + "createdDate": obj.get("createdDate"), + "updatedDate": obj.get("updatedDate") + }) + return _obj + + diff --git a/pfruck_contabo/models/firewall_rule_request.py b/pfruck_contabo/models/firewall_rule_request.py new file mode 100644 index 00000000..6071db93 --- /dev/null +++ b/pfruck_contabo/models/firewall_rule_request.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from pfruck_contabo.models.src_cidr import SrcCidr +from typing import Optional, Set +from typing_extensions import Self + +class FirewallRuleRequest(BaseModel): + """ + FirewallRuleRequest + """ # noqa: E501 + protocol: StrictStr = Field(description="Protocol for incoming traffic to be allowed. ‘tcp‘, ´udp´, ´icmp´ or ´´ empty value are allowed. Empty means any traffic.") + dest_ports: List[Annotated[str, Field(strict=True)]] = Field(description="Ports to specify allowed traffic. Not available for protocol `ICMP`. Port ranges can specified like in example.", alias="destPorts") + src_cidr: SrcCidr = Field(description="Source CIDR configuration. Use \"AnyIPv4\" to allow all IPv4 sources (0.0.0.0/0) or \"AnyIPv6\" to allow all IPv6 sources (::/0). Both can be combined to allow all IP sources. Regular CIDR notation is also supported.", alias="srcCidr") + action: StrictStr = Field(description="Currently only `accept` is supported.") + status: StrictStr = Field(description="Status of the inbound rule. An inactive rule is removed from all assigned instances.") + display_name: Optional[StrictStr] = Field(default=None, description="Display name for the firewall rule.", alias="displayName") + __properties: ClassVar[List[str]] = ["protocol", "destPorts", "srcCidr", "action", "status", "displayName"] + + @field_validator('protocol') + def protocol_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['tcp', 'udp', 'icmp', '']): + raise ValueError("must be one of enum values ('tcp', 'udp', 'icmp', '')") + return value + + @field_validator('action') + def action_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['accept', 'drop']): + raise ValueError("must be one of enum values ('accept', 'drop')") + return value + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['active', 'inactive']): + raise ValueError("must be one of enum values ('active', 'inactive')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FirewallRuleRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of src_cidr + if self.src_cidr: + _dict['srcCidr'] = self.src_cidr.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FirewallRuleRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "protocol": obj.get("protocol"), + "destPorts": obj.get("destPorts"), + "srcCidr": SrcCidr.from_dict(obj["srcCidr"]) if obj.get("srcCidr") is not None else None, + "action": obj.get("action"), + "status": obj.get("status"), + "displayName": obj.get("displayName") + }) + return _obj + + diff --git a/pfruck_contabo/models/firewall_rule_response.py b/pfruck_contabo/models/firewall_rule_response.py new file mode 100644 index 00000000..8147c11a --- /dev/null +++ b/pfruck_contabo/models/firewall_rule_response.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.src_cidr import SrcCidr +from typing import Optional, Set +from typing_extensions import Self + +class FirewallRuleResponse(BaseModel): + """ + FirewallRuleResponse + """ # noqa: E501 + protocol: StrictStr = Field(description="Protocol for incoming traffic to be allowed. ‘tcp‘, ´udp´, ´icmp´ or ´´ empty value are allowed. Empty means any traffic.") + dest_ports: List[StrictStr] = Field(description="Ports to specify allowed traffic. Not available for protocol `ICMP`. Port ranges can specified like in example.", alias="destPorts") + src_cidr: SrcCidr = Field(alias="srcCidr") + action: StrictStr = Field(description="Currently only `accept` is supported.") + status: StrictStr = Field(description="Status of the inbound rule. An inactive rule is removed from all assigned instances.") + display_name: StrictStr = Field(description="Display name for the firewall rule.", alias="displayName") + __properties: ClassVar[List[str]] = ["protocol", "destPorts", "srcCidr", "action", "status", "displayName"] + + @field_validator('protocol') + def protocol_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['tcp', 'udp', 'icmp', '']): + raise ValueError("must be one of enum values ('tcp', 'udp', 'icmp', '')") + return value + + @field_validator('action') + def action_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['accept', 'drop']): + raise ValueError("must be one of enum values ('accept', 'drop')") + return value + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['active', 'inactive']): + raise ValueError("must be one of enum values ('active', 'inactive')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FirewallRuleResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of src_cidr + if self.src_cidr: + _dict['srcCidr'] = self.src_cidr.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FirewallRuleResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "protocol": obj.get("protocol"), + "destPorts": obj.get("destPorts"), + "srcCidr": SrcCidr.from_dict(obj["srcCidr"]) if obj.get("srcCidr") is not None else None, + "action": obj.get("action"), + "status": obj.get("status"), + "displayName": obj.get("displayName") + }) + return _obj + + diff --git a/pfruck_contabo/models/handle_address.py b/pfruck_contabo/models/handle_address.py new file mode 100644 index 00000000..3299b37a --- /dev/null +++ b/pfruck_contabo/models/handle_address.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class HandleAddress(BaseModel): + """ + HandleAddress + """ # noqa: E501 + street: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="Street") + street_number: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="Street Number", alias="streetNumber") + city: Annotated[str, Field(min_length=1, strict=True, max_length=100)] = Field(description="City") + country: Annotated[str, Field(min_length=1, strict=True, max_length=100)] = Field(description="Country") + zip_code: Annotated[str, Field(min_length=1, strict=True, max_length=50)] = Field(description="ZipCode", alias="zipCode") + siret: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]] = Field(default=None, description="Siret") + region: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]] = Field(default=None, description="Region") + __properties: ClassVar[List[str]] = ["street", "streetNumber", "city", "country", "zipCode", "siret", "region"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HandleAddress from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HandleAddress from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "street": obj.get("street"), + "streetNumber": obj.get("streetNumber"), + "city": obj.get("city"), + "country": obj.get("country"), + "zipCode": obj.get("zipCode"), + "siret": obj.get("siret"), + "region": obj.get("region") + }) + return _obj + + diff --git a/pfruck_contabo/models/handle_audit_response.py b/pfruck_contabo/models/handle_audit_response.py new file mode 100644 index 00000000..6352bc16 --- /dev/null +++ b/pfruck_contabo/models/handle_audit_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.handle_audit_response_data import HandleAuditResponseData +from pfruck_contabo.models.links import Links +from pfruck_contabo.models.pagination_meta import PaginationMeta +from typing import Optional, Set +from typing_extensions import Self + +class HandleAuditResponse(BaseModel): + """ + HandleAuditResponse + """ # noqa: E501 + pagination: PaginationMeta = Field(description="Data about pagination like how many results, pages, page size.", alias="_pagination") + data: List[HandleAuditResponseData] + links: Links = Field(alias="_links") + __properties: ClassVar[List[str]] = ["_pagination", "data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HandleAuditResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['_pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HandleAuditResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_pagination": PaginationMeta.from_dict(obj["_pagination"]) if obj.get("_pagination") is not None else None, + "data": [HandleAuditResponseData.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": Links.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/handle_audit_response_data.py b/pfruck_contabo/models/handle_audit_response_data.py new file mode 100644 index 00000000..97cbd193 --- /dev/null +++ b/pfruck_contabo/models/handle_audit_response_data.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class HandleAuditResponseData(BaseModel): + """ + HandleAuditResponseData + """ # noqa: E501 + id: StrictInt = Field(description="The ID of the audit entry.") + action: StrictStr = Field(description="Type of the action.") + timestamp: datetime = Field(description="When the change took place.") + tenant_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Customer tenant id", alias="tenantId") + customer_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Customer ID", alias="customerId") + changed_by: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Id of user who performed the change", alias="changedBy") + username: StrictStr = Field(description="Name of the user which led to the change.") + request_id: StrictStr = Field(description="The requestId of the API call which led to the change.", alias="requestId") + trace_id: StrictStr = Field(description="The traceId of the API call which led to the change.", alias="traceId") + handle_id: StrictStr = Field(description="The identifier of the handle", alias="handleId") + changes: Optional[Dict[str, Any]] = Field(default=None, description="List of actual changes.") + __properties: ClassVar[List[str]] = ["id", "action", "timestamp", "tenantId", "customerId", "changedBy", "username", "requestId", "traceId", "handleId", "changes"] + + @field_validator('action') + def action_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['CREATED', 'UPDATED', 'DELETED']): + raise ValueError("must be one of enum values ('CREATED', 'UPDATED', 'DELETED')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HandleAuditResponseData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HandleAuditResponseData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "action": obj.get("action"), + "timestamp": obj.get("timestamp"), + "tenantId": obj.get("tenantId"), + "customerId": obj.get("customerId"), + "changedBy": obj.get("changedBy"), + "username": obj.get("username"), + "requestId": obj.get("requestId"), + "traceId": obj.get("traceId"), + "handleId": obj.get("handleId"), + "changes": obj.get("changes") + }) + return _obj + + diff --git a/pfruck_contabo/models/handle_birth_info.py b/pfruck_contabo/models/handle_birth_info.py new file mode 100644 index 00000000..550afdfd --- /dev/null +++ b/pfruck_contabo/models/handle_birth_info.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class HandleBirthInfo(BaseModel): + """ + HandleBirthInfo + """ # noqa: E501 + var_date: Optional[datetime] = Field(default=None, description="Date", alias="date") + city: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]] = Field(default=None, description="City") + zip_code: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=50)]] = Field(default=None, description="Zipcode", alias="zipCode") + country: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=100)]] = Field(default=None, description="Country") + __properties: ClassVar[List[str]] = ["date", "city", "zipCode", "country"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HandleBirthInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HandleBirthInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "date": obj.get("date"), + "city": obj.get("city"), + "zipCode": obj.get("zipCode"), + "country": obj.get("country") + }) + return _obj + + diff --git a/pfruck_contabo/models/handle_create_request.py b/pfruck_contabo/models/handle_create_request.py new file mode 100644 index 00000000..fadae823 --- /dev/null +++ b/pfruck_contabo/models/handle_create_request.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from pfruck_contabo.models.handle_address import HandleAddress +from pfruck_contabo.models.handle_birth_info import HandleBirthInfo +from pfruck_contabo.models.handle_phone import HandlePhone +from typing import Optional, Set +from typing_extensions import Self + +class HandleCreateRequest(BaseModel): + """ + HandleCreateRequest + """ # noqa: E501 + handle_type: StrictStr = Field(description="The type of the handle", alias="handleType") + first_name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="Handle first name", alias="firstName") + last_name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="Handle last name", alias="lastName") + organization: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]] = Field(default=None, description="The organization of the handle") + email: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="Handle email") + gender: StrictStr = Field(description="Handle gender") + birth_info: Optional[HandleBirthInfo] = Field(default=None, description="The birth info of the handle", alias="birthInfo") + address: HandleAddress = Field(description="Address details for handle") + phone: HandlePhone = Field(description="Handle phone") + fax: Optional[HandlePhone] = Field(default=None, description="Handle fax") + __properties: ClassVar[List[str]] = ["handleType", "firstName", "lastName", "organization", "email", "gender", "birthInfo", "address", "phone", "fax"] + + @field_validator('handle_type') + def handle_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['person', 'organization']): + raise ValueError("must be one of enum values ('person', 'organization')") + return value + + @field_validator('gender') + def gender_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['male', 'female', 'na']): + raise ValueError("must be one of enum values ('male', 'female', 'na')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HandleCreateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of birth_info + if self.birth_info: + _dict['birthInfo'] = self.birth_info.to_dict() + # override the default output from pydantic by calling `to_dict()` of address + if self.address: + _dict['address'] = self.address.to_dict() + # override the default output from pydantic by calling `to_dict()` of phone + if self.phone: + _dict['phone'] = self.phone.to_dict() + # override the default output from pydantic by calling `to_dict()` of fax + if self.fax: + _dict['fax'] = self.fax.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HandleCreateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "handleType": obj.get("handleType"), + "firstName": obj.get("firstName"), + "lastName": obj.get("lastName"), + "organization": obj.get("organization"), + "email": obj.get("email"), + "gender": obj.get("gender"), + "birthInfo": HandleBirthInfo.from_dict(obj["birthInfo"]) if obj.get("birthInfo") is not None else None, + "address": HandleAddress.from_dict(obj["address"]) if obj.get("address") is not None else None, + "phone": HandlePhone.from_dict(obj["phone"]) if obj.get("phone") is not None else None, + "fax": HandlePhone.from_dict(obj["fax"]) if obj.get("fax") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/handle_create_response.py b/pfruck_contabo/models/handle_create_response.py new file mode 100644 index 00000000..aaa34819 --- /dev/null +++ b/pfruck_contabo/models/handle_create_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.handle_response import HandleResponse +from pfruck_contabo.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class HandleCreateResponse(BaseModel): + """ + HandleCreateResponse + """ # noqa: E501 + data: List[HandleResponse] + links: SelfLinks = Field(alias="_links") + __properties: ClassVar[List[str]] = ["data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HandleCreateResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HandleCreateResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [HandleResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/handle_find_response.py b/pfruck_contabo/models/handle_find_response.py new file mode 100644 index 00000000..87ff7f28 --- /dev/null +++ b/pfruck_contabo/models/handle_find_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.handle_response import HandleResponse +from pfruck_contabo.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class HandleFindResponse(BaseModel): + """ + HandleFindResponse + """ # noqa: E501 + data: List[HandleResponse] + links: SelfLinks = Field(alias="_links") + __properties: ClassVar[List[str]] = ["data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HandleFindResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HandleFindResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [HandleResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/handle_list_response.py b/pfruck_contabo/models/handle_list_response.py new file mode 100644 index 00000000..e0689b86 --- /dev/null +++ b/pfruck_contabo/models/handle_list_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.handle_response import HandleResponse +from pfruck_contabo.models.links import Links +from pfruck_contabo.models.pagination_meta import PaginationMeta +from typing import Optional, Set +from typing_extensions import Self + +class HandleListResponse(BaseModel): + """ + HandleListResponse + """ # noqa: E501 + pagination: PaginationMeta = Field(description="Data about pagination like how many results, pages, page size.", alias="_pagination") + data: List[HandleResponse] + links: Links = Field(alias="_links") + __properties: ClassVar[List[str]] = ["_pagination", "data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HandleListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['_pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HandleListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_pagination": PaginationMeta.from_dict(obj["_pagination"]) if obj.get("_pagination") is not None else None, + "data": [HandleResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": Links.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/handle_patch_request.py b/pfruck_contabo/models/handle_patch_request.py new file mode 100644 index 00000000..c6ead51f --- /dev/null +++ b/pfruck_contabo/models/handle_patch_request.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from pfruck_contabo.models.handle_address import HandleAddress +from pfruck_contabo.models.handle_birth_info import HandleBirthInfo +from pfruck_contabo.models.handle_phone import HandlePhone +from typing import Optional, Set +from typing_extensions import Self + +class HandlePatchRequest(BaseModel): + """ + HandlePatchRequest + """ # noqa: E501 + email: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="Handle email") + gender: StrictStr = Field(description="Handle gender") + birth_info: Optional[HandleBirthInfo] = Field(default=None, description="The birth info of the handle", alias="birthInfo") + address: HandleAddress = Field(description="Address details for handle") + phone: HandlePhone = Field(description="Handle phone") + fax: Optional[HandlePhone] = Field(default=None, description="Handle fax") + __properties: ClassVar[List[str]] = ["email", "gender", "birthInfo", "address", "phone", "fax"] + + @field_validator('gender') + def gender_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['male', 'female', 'na']): + raise ValueError("must be one of enum values ('male', 'female', 'na')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HandlePatchRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of birth_info + if self.birth_info: + _dict['birthInfo'] = self.birth_info.to_dict() + # override the default output from pydantic by calling `to_dict()` of address + if self.address: + _dict['address'] = self.address.to_dict() + # override the default output from pydantic by calling `to_dict()` of phone + if self.phone: + _dict['phone'] = self.phone.to_dict() + # override the default output from pydantic by calling `to_dict()` of fax + if self.fax: + _dict['fax'] = self.fax.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HandlePatchRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "gender": obj.get("gender"), + "birthInfo": HandleBirthInfo.from_dict(obj["birthInfo"]) if obj.get("birthInfo") is not None else None, + "address": HandleAddress.from_dict(obj["address"]) if obj.get("address") is not None else None, + "phone": HandlePhone.from_dict(obj["phone"]) if obj.get("phone") is not None else None, + "fax": HandlePhone.from_dict(obj["fax"]) if obj.get("fax") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/handle_patch_response.py b/pfruck_contabo/models/handle_patch_response.py new file mode 100644 index 00000000..2f9ba1c0 --- /dev/null +++ b/pfruck_contabo/models/handle_patch_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.handle_response import HandleResponse +from pfruck_contabo.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class HandlePatchResponse(BaseModel): + """ + HandlePatchResponse + """ # noqa: E501 + data: List[HandleResponse] + links: SelfLinks = Field(alias="_links") + __properties: ClassVar[List[str]] = ["data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HandlePatchResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HandlePatchResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [HandleResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/create_ticket_request.py b/pfruck_contabo/models/handle_phone.py similarity index 75% rename from pfruck_contabo/models/create_ticket_request.py rename to pfruck_contabo/models/handle_phone.py index ce5c17b4..74de156d 100644 --- a/pfruck_contabo/models/create_ticket_request.py +++ b/pfruck_contabo/models/handle_phone.py @@ -23,14 +23,13 @@ from typing import Optional, Set from typing_extensions import Self -class CreateTicketRequest(BaseModel): +class HandlePhone(BaseModel): """ - CreateTicketRequest + HandlePhone """ # noqa: E501 - subject: Annotated[str, Field(min_length=1, strict=True)] = Field(description="The ticket subject") - note: Annotated[str, Field(min_length=1, strict=True)] = Field(description="The ticket note") - sender: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Customer email") - __properties: ClassVar[List[str]] = ["subject", "note", "sender"] + prefix: Annotated[str, Field(min_length=1, strict=True, max_length=5)] = Field(description="prefix") + number: Annotated[str, Field(min_length=1, strict=True, max_length=50)] = Field(description="number") + __properties: ClassVar[List[str]] = ["prefix", "number"] model_config = ConfigDict( populate_by_name=True, @@ -50,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CreateTicketRequest from a JSON string""" + """Create an instance of HandlePhone from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -75,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CreateTicketRequest from a dict""" + """Create an instance of HandlePhone from a dict""" if obj is None: return None @@ -83,9 +82,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "subject": obj.get("subject"), - "note": obj.get("note"), - "sender": obj.get("sender") + "prefix": obj.get("prefix"), + "number": obj.get("number") }) return _obj diff --git a/pfruck_contabo/models/handle_response.py b/pfruck_contabo/models/handle_response.py new file mode 100644 index 00000000..20d23c13 --- /dev/null +++ b/pfruck_contabo/models/handle_response.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from pfruck_contabo.models.handle_address import HandleAddress +from pfruck_contabo.models.handle_birth_info import HandleBirthInfo +from pfruck_contabo.models.handle_phone import HandlePhone +from typing import Optional, Set +from typing_extensions import Self + +class HandleResponse(BaseModel): + """ + HandleResponse + """ # noqa: E501 + tenant_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Your customer tenant id", alias="tenantId") + customer_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Your customer number", alias="customerId") + handle_id: StrictStr = Field(description="Handle ID", alias="handleId") + handle_type: StrictStr = Field(description="Handle Type", alias="handleType") + is_default: StrictBool = Field(description="Flag if the handle is default or not", alias="isDefault") + first_name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="Handle first name", alias="firstName") + last_name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="Handle last name", alias="lastName") + organization: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]] = Field(default=None, description="The organization of the handle") + email: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="Handle email") + gender: StrictStr = Field(description="Handle gender") + birth_info: Optional[HandleBirthInfo] = Field(default=None, description="The birth info of the handle", alias="birthInfo") + address: HandleAddress = Field(description="Address details for handle") + phone: HandlePhone = Field(description="Handle phone") + fax: Optional[HandlePhone] = Field(default=None, description="Handle fax") + __properties: ClassVar[List[str]] = ["tenantId", "customerId", "handleId", "handleType", "isDefault", "firstName", "lastName", "organization", "email", "gender", "birthInfo", "address", "phone", "fax"] + + @field_validator('handle_type') + def handle_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['person', 'organization']): + raise ValueError("must be one of enum values ('person', 'organization')") + return value + + @field_validator('gender') + def gender_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['male', 'female', 'na']): + raise ValueError("must be one of enum values ('male', 'female', 'na')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HandleResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of birth_info + if self.birth_info: + _dict['birthInfo'] = self.birth_info.to_dict() + # override the default output from pydantic by calling `to_dict()` of address + if self.address: + _dict['address'] = self.address.to_dict() + # override the default output from pydantic by calling `to_dict()` of phone + if self.phone: + _dict['phone'] = self.phone.to_dict() + # override the default output from pydantic by calling `to_dict()` of fax + if self.fax: + _dict['fax'] = self.fax.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HandleResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tenantId": obj.get("tenantId"), + "customerId": obj.get("customerId"), + "handleId": obj.get("handleId"), + "handleType": obj.get("handleType"), + "isDefault": obj.get("isDefault"), + "firstName": obj.get("firstName"), + "lastName": obj.get("lastName"), + "organization": obj.get("organization"), + "email": obj.get("email"), + "gender": obj.get("gender"), + "birthInfo": HandleBirthInfo.from_dict(obj["birthInfo"]) if obj.get("birthInfo") is not None else None, + "address": HandleAddress.from_dict(obj["address"]) if obj.get("address") is not None else None, + "phone": HandlePhone.from_dict(obj["phone"]) if obj.get("phone") is not None else None, + "fax": HandlePhone.from_dict(obj["fax"]) if obj.get("fax") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/instance_assignment_self_links1.py b/pfruck_contabo/models/instance_assignment_self_links1.py new file mode 100644 index 00000000..efb15d3f --- /dev/null +++ b/pfruck_contabo/models/instance_assignment_self_links1.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class InstanceAssignmentSelfLinks1(BaseModel): + """ + InstanceAssignmentSelfLinks1 + """ # noqa: E501 + var_self: StrictStr = Field(description="Link to current resource.", alias="self") + firewall: StrictStr = Field(description="Link to related firewall.") + instance: StrictStr = Field(description="Link to assigned instance.") + __properties: ClassVar[List[str]] = ["self", "firewall", "instance"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceAssignmentSelfLinks1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceAssignmentSelfLinks1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "self": obj.get("self"), + "firewall": obj.get("firewall"), + "instance": obj.get("instance") + }) + return _obj + + diff --git a/pfruck_contabo/models/instance_details.py b/pfruck_contabo/models/instance_details.py new file mode 100644 index 00000000..c2ef41d4 --- /dev/null +++ b/pfruck_contabo/models/instance_details.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.ip_config1 import IpConfig1 +from typing import Optional, Set +from typing_extensions import Self + +class InstanceDetails(BaseModel): + """ + InstanceDetails + """ # noqa: E501 + instance_id: StrictInt = Field(description="Instance id which is assigned to firewall", alias="instanceId") + display_name: StrictStr = Field(description="Instance display name", alias="displayName") + name: StrictStr = Field(description="Instance name") + product_id: StrictStr = Field(description="Product id", alias="productId") + ip_config: IpConfig1 = Field(alias="ipConfig") + region_slug: StrictStr = Field(description="Slug of the region where the instance is located.", alias="regionSlug") + region_name: StrictStr = Field(description="Name of the region where the instance is located.", alias="regionName") + data_center_slug: StrictStr = Field(description="Slug of the data center where the instance is located.", alias="dataCenterSlug") + data_center_name: StrictStr = Field(description="Name of the data center where the instance is located.", alias="dataCenterName") + __properties: ClassVar[List[str]] = ["instanceId", "displayName", "name", "productId", "ipConfig", "regionSlug", "regionName", "dataCenterSlug", "dataCenterName"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ip_config + if self.ip_config: + _dict['ipConfig'] = self.ip_config.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "instanceId": obj.get("instanceId"), + "displayName": obj.get("displayName"), + "name": obj.get("name"), + "productId": obj.get("productId"), + "ipConfig": IpConfig1.from_dict(obj["ipConfig"]) if obj.get("ipConfig") is not None else None, + "regionSlug": obj.get("regionSlug"), + "regionName": obj.get("regionName"), + "dataCenterSlug": obj.get("dataCenterSlug"), + "dataCenterName": obj.get("dataCenterName") + }) + return _obj + + diff --git a/pfruck_contabo/models/instance_response.py b/pfruck_contabo/models/instance_response.py index 77e20a1d..6ec7fa75 100644 --- a/pfruck_contabo/models/instance_response.py +++ b/pfruck_contabo/models/instance_response.py @@ -24,7 +24,7 @@ from pfruck_contabo.models.add_on_response import AddOnResponse from pfruck_contabo.models.additional_ip import AdditionalIp from pfruck_contabo.models.instance_status import InstanceStatus -from pfruck_contabo.models.ip_config import IpConfig +from pfruck_contabo.models.ip_config2 import IpConfig2 from typing import Optional, Set from typing_extensions import Self @@ -43,7 +43,7 @@ class InstanceResponse(BaseModel): region_name: StrictStr = Field(description="The name of the region where the instance is located.", alias="regionName") product_id: StrictStr = Field(description="Product ID", alias="productId") image_id: StrictStr = Field(description="Image's id", alias="imageId") - ip_config: IpConfig = Field(alias="ipConfig") + ip_config: IpConfig2 = Field(alias="ipConfig") mac_address: StrictStr = Field(description="MAC Address", alias="macAddress") ram_mb: Union[StrictFloat, StrictInt] = Field(description="Image RAM size in MB", alias="ramMb") cpu_cores: StrictInt = Field(description="CPU core count", alias="cpuCores") @@ -52,7 +52,7 @@ class InstanceResponse(BaseModel): ssh_keys: List[StrictInt] = Field(description="Array of `secretId`s of public SSH keys for logging into as `defaultUser` with administrator/root privileges. Applies to Linux/BSD systems. Please refer to Secrets Management API.", alias="sshKeys") created_date: datetime = Field(description="The creation date for the instance", alias="createdDate") cancel_date: date = Field(description="The date on which the instance will be cancelled", alias="cancelDate") - status: InstanceStatus + status: InstanceStatus = Field(description="Instance's status") v_host_id: StrictInt = Field(description="ID of host system", alias="vHostId") v_host_number: StrictInt = Field(description="Number of host system", alias="vHostNumber") v_host_name: StrictStr = Field(description="Name of host system", alias="vHostName") @@ -61,7 +61,8 @@ class InstanceResponse(BaseModel): product_type: StrictStr = Field(description="Instance's category depending on Product Id", alias="productType") product_name: StrictStr = Field(description="Instance's Product Name", alias="productName") default_user: Optional[StrictStr] = Field(default=None, description="Default user name created for login during (re-)installation with administrative privileges. Allowed values for Linux/BSD are `admin` (use sudo to apply administrative privileges like root) or `root`. Allowed values for Windows are `admin` (has administrative privileges like administrator) or `administrator`.", alias="defaultUser") - __properties: ClassVar[List[str]] = ["tenantId", "customerId", "additionalIps", "name", "displayName", "instanceId", "dataCenter", "region", "regionName", "productId", "imageId", "ipConfig", "macAddress", "ramMb", "cpuCores", "osType", "diskMb", "sshKeys", "createdDate", "cancelDate", "status", "vHostId", "vHostNumber", "vHostName", "addOns", "errorMessage", "productType", "productName", "defaultUser"] + application_id: StrictStr = Field(description="Application ID", alias="applicationId") + __properties: ClassVar[List[str]] = ["tenantId", "customerId", "additionalIps", "name", "displayName", "instanceId", "dataCenter", "region", "regionName", "productId", "imageId", "ipConfig", "macAddress", "ramMb", "cpuCores", "osType", "diskMb", "sshKeys", "createdDate", "cancelDate", "status", "vHostId", "vHostNumber", "vHostName", "addOns", "errorMessage", "productType", "productName", "defaultUser", "applicationId"] @field_validator('tenant_id') def tenant_id_validate_enum(cls, value): @@ -173,7 +174,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "regionName": obj.get("regionName"), "productId": obj.get("productId"), "imageId": obj.get("imageId"), - "ipConfig": IpConfig.from_dict(obj["ipConfig"]) if obj.get("ipConfig") is not None else None, + "ipConfig": IpConfig2.from_dict(obj["ipConfig"]) if obj.get("ipConfig") is not None else None, "macAddress": obj.get("macAddress"), "ramMb": obj.get("ramMb"), "cpuCores": obj.get("cpuCores"), @@ -190,7 +191,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errorMessage": obj.get("errorMessage"), "productType": obj.get("productType"), "productName": obj.get("productName"), - "defaultUser": obj.get("defaultUser") + "defaultUser": obj.get("defaultUser"), + "applicationId": obj.get("applicationId") }) return _obj diff --git a/pfruck_contabo/models/instance_status.py b/pfruck_contabo/models/instance_status.py index 7319f84d..f97e2c79 100644 --- a/pfruck_contabo/models/instance_status.py +++ b/pfruck_contabo/models/instance_status.py @@ -20,7 +20,7 @@ class InstanceStatus(str, Enum): """ - InstanceStatus + Instance's status """ """ diff --git a/pfruck_contabo/models/instance_status_representation.py b/pfruck_contabo/models/instance_status_representation.py new file mode 100644 index 00000000..4fbbd67a --- /dev/null +++ b/pfruck_contabo/models/instance_status_representation.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class InstanceStatusRepresentation(BaseModel): + """ + InstanceStatusRepresentation + """ # noqa: E501 + instance_id: StrictInt = Field(description="Instance id which is assigned to the firewall.", alias="instanceId") + status: StrictStr = Field(description="Instance status in firewall can be:
`ok` - instance was successfully assigned
`processing` - creating firewall rules
`deleting` - deleting firewall rules
`error_processing` - error occurred while creating firewall rules
`error_deleting` - error occurred while deleting firewall rules") + error_message: Optional[StrictStr] = Field(default=None, description="More detailed error message in case of error status.", alias="errorMessage") + __properties: ClassVar[List[str]] = ["instanceId", "status", "errorMessage"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ok', 'processing', 'deleting', 'error_processing', 'error_deleting']): + raise ValueError("must be one of enum values ('ok', 'processing', 'deleting', 'error_processing', 'error_deleting')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceStatusRepresentation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceStatusRepresentation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "instanceId": obj.get("instanceId"), + "status": obj.get("status"), + "errorMessage": obj.get("errorMessage") + }) + return _obj + + diff --git a/pfruck_contabo/models/ip_config.py b/pfruck_contabo/models/ip_config.py index 94fc6221..643a08d2 100644 --- a/pfruck_contabo/models/ip_config.py +++ b/pfruck_contabo/models/ip_config.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from pfruck_contabo.models.ip_v4 import IpV4 +from pfruck_contabo.models.ip_v41 import IpV41 from pfruck_contabo.models.ip_v6 import IpV6 from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class IpConfig(BaseModel): """ IpConfig """ # noqa: E501 - v4: IpV4 + v4: IpV41 v6: IpV6 __properties: ClassVar[List[str]] = ["v4", "v6"] @@ -89,7 +89,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "v4": IpV4.from_dict(obj["v4"]) if obj.get("v4") is not None else None, + "v4": IpV41.from_dict(obj["v4"]) if obj.get("v4") is not None else None, "v6": IpV6.from_dict(obj["v6"]) if obj.get("v6") is not None else None }) return _obj diff --git a/pfruck_contabo/models/ip_config1.py b/pfruck_contabo/models/ip_config1.py new file mode 100644 index 00000000..bcf4163a --- /dev/null +++ b/pfruck_contabo/models/ip_config1.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.ip_v42 import IpV42 +from pfruck_contabo.models.ip_v6 import IpV6 +from typing import Optional, Set +from typing_extensions import Self + +class IpConfig1(BaseModel): + """ + IpConfig1 + """ # noqa: E501 + v4: IpV42 + v6: IpV6 + __properties: ClassVar[List[str]] = ["v4", "v6"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IpConfig1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of v4 + if self.v4: + _dict['v4'] = self.v4.to_dict() + # override the default output from pydantic by calling `to_dict()` of v6 + if self.v6: + _dict['v6'] = self.v6.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IpConfig1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "v4": IpV42.from_dict(obj["v4"]) if obj.get("v4") is not None else None, + "v6": IpV6.from_dict(obj["v6"]) if obj.get("v6") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/ip_config2.py b/pfruck_contabo/models/ip_config2.py new file mode 100644 index 00000000..a1ed74ae --- /dev/null +++ b/pfruck_contabo/models/ip_config2.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.ip_v43 import IpV43 +from pfruck_contabo.models.ip_v6 import IpV6 +from typing import Optional, Set +from typing_extensions import Self + +class IpConfig2(BaseModel): + """ + IpConfig2 + """ # noqa: E501 + v4: IpV43 + v6: IpV6 + __properties: ClassVar[List[str]] = ["v4", "v6"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IpConfig2 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of v4 + if self.v4: + _dict['v4'] = self.v4.to_dict() + # override the default output from pydantic by calling `to_dict()` of v6 + if self.v6: + _dict['v6'] = self.v6.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IpConfig2 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "v4": IpV43.from_dict(obj["v4"]) if obj.get("v4") is not None else None, + "v6": IpV6.from_dict(obj["v6"]) if obj.get("v6") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/ip_v4.py b/pfruck_contabo/models/ip_v4.py index a68f74ae..a2a1f562 100644 --- a/pfruck_contabo/models/ip_v4.py +++ b/pfruck_contabo/models/ip_v4.py @@ -26,10 +26,12 @@ class IpV4(BaseModel): """ IpV4 """ # noqa: E501 - ip: StrictStr = Field(description="IP Address") - netmask_cidr: StrictInt = Field(description="Netmask CIDR", alias="netmaskCidr") + ip: StrictStr = Field(description="IP address") gateway: StrictStr = Field(description="Gateway") - __properties: ClassVar[List[str]] = ["ip", "netmaskCidr", "gateway"] + netmask_cidr: StrictInt = Field(description="Netmask CIDR", alias="netmaskCidr") + broadcast: StrictStr = Field(description="Broadcast address") + net: StrictStr = Field(description="Net address") + __properties: ClassVar[List[str]] = ["ip", "gateway", "netmaskCidr", "broadcast", "net"] model_config = ConfigDict( populate_by_name=True, @@ -83,8 +85,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "ip": obj.get("ip"), + "gateway": obj.get("gateway"), "netmaskCidr": obj.get("netmaskCidr"), - "gateway": obj.get("gateway") + "broadcast": obj.get("broadcast"), + "net": obj.get("net") }) return _obj diff --git a/pfruck_contabo/models/ip_v41.py b/pfruck_contabo/models/ip_v41.py index 51e6dc6f..c859b076 100644 --- a/pfruck_contabo/models/ip_v41.py +++ b/pfruck_contabo/models/ip_v41.py @@ -26,12 +26,10 @@ class IpV41(BaseModel): """ IpV41 """ # noqa: E501 - ip: StrictStr = Field(description="IP address") - gateway: StrictStr = Field(description="Gateway") + ip: StrictStr = Field(description="IP Address") netmask_cidr: StrictInt = Field(description="Netmask CIDR", alias="netmaskCidr") - broadcast: StrictStr = Field(description="Broadcast address") - net: StrictStr = Field(description="Net address") - __properties: ClassVar[List[str]] = ["ip", "gateway", "netmaskCidr", "broadcast", "net"] + gateway: StrictStr = Field(description="Gateway") + __properties: ClassVar[List[str]] = ["ip", "netmaskCidr", "gateway"] model_config = ConfigDict( populate_by_name=True, @@ -85,10 +83,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "ip": obj.get("ip"), - "gateway": obj.get("gateway"), "netmaskCidr": obj.get("netmaskCidr"), - "broadcast": obj.get("broadcast"), - "net": obj.get("net") + "gateway": obj.get("gateway") }) return _obj diff --git a/pfruck_contabo/models/ip_v42.py b/pfruck_contabo/models/ip_v42.py new file mode 100644 index 00000000..0c472a90 --- /dev/null +++ b/pfruck_contabo/models/ip_v42.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class IpV42(BaseModel): + """ + IpV42 + """ # noqa: E501 + ip: StrictStr = Field(description="IP Address") + netmask_cidr: StrictInt = Field(description="Netmask CIDR", alias="netmaskCidr") + gateway: StrictStr = Field(description="Gateway") + __properties: ClassVar[List[str]] = ["ip", "netmaskCidr", "gateway"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IpV42 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IpV42 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ip": obj.get("ip"), + "netmaskCidr": obj.get("netmaskCidr"), + "gateway": obj.get("gateway") + }) + return _obj + + diff --git a/pfruck_contabo/models/ip_v43.py b/pfruck_contabo/models/ip_v43.py new file mode 100644 index 00000000..a827b09a --- /dev/null +++ b/pfruck_contabo/models/ip_v43.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class IpV43(BaseModel): + """ + IpV43 + """ # noqa: E501 + ip: StrictStr = Field(description="IP Address") + netmask_cidr: StrictInt = Field(description="Netmask CIDR", alias="netmaskCidr") + gateway: StrictStr = Field(description="Gateway") + __properties: ClassVar[List[str]] = ["ip", "netmaskCidr", "gateway"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IpV43 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IpV43 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ip": obj.get("ip"), + "netmaskCidr": obj.get("netmaskCidr"), + "gateway": obj.get("gateway") + }) + return _obj + + diff --git a/pfruck_contabo/models/list_dns_zone_records_response.py b/pfruck_contabo/models/list_dns_zone_records_response.py new file mode 100644 index 00000000..1df47302 --- /dev/null +++ b/pfruck_contabo/models/list_dns_zone_records_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.dns_zone_record_response import DnsZoneRecordResponse +from pfruck_contabo.models.links import Links +from pfruck_contabo.models.pagination_meta import PaginationMeta +from typing import Optional, Set +from typing_extensions import Self + +class ListDnsZoneRecordsResponse(BaseModel): + """ + ListDnsZoneRecordsResponse + """ # noqa: E501 + pagination: PaginationMeta = Field(description="Data about pagination like how many results, pages, page size.", alias="_pagination") + data: List[DnsZoneRecordResponse] + links: Links = Field(alias="_links") + __properties: ClassVar[List[str]] = ["_pagination", "data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ListDnsZoneRecordsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['_pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListDnsZoneRecordsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_pagination": PaginationMeta.from_dict(obj["_pagination"]) if obj.get("_pagination") is not None else None, + "data": [DnsZoneRecordResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": Links.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/list_dns_zones_response.py b/pfruck_contabo/models/list_dns_zones_response.py new file mode 100644 index 00000000..af0a4e11 --- /dev/null +++ b/pfruck_contabo/models/list_dns_zones_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.dns_zone_response import DnsZoneResponse +from pfruck_contabo.models.links import Links +from pfruck_contabo.models.pagination_meta import PaginationMeta +from typing import Optional, Set +from typing_extensions import Self + +class ListDnsZonesResponse(BaseModel): + """ + ListDnsZonesResponse + """ # noqa: E501 + pagination: PaginationMeta = Field(description="Data about pagination like how many results, pages, page size.", alias="_pagination") + data: List[DnsZoneResponse] + links: Links = Field(alias="_links") + __properties: ClassVar[List[str]] = ["_pagination", "data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ListDnsZonesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['_pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListDnsZonesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_pagination": PaginationMeta.from_dict(obj["_pagination"]) if obj.get("_pagination") is not None else None, + "data": [DnsZoneResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": Links.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/list_firewall_audit_response.py b/pfruck_contabo/models/list_firewall_audit_response.py new file mode 100644 index 00000000..2c281124 --- /dev/null +++ b/pfruck_contabo/models/list_firewall_audit_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.firewall_audit_response import FirewallAuditResponse +from pfruck_contabo.models.links import Links +from pfruck_contabo.models.pagination_meta import PaginationMeta +from typing import Optional, Set +from typing_extensions import Self + +class ListFirewallAuditResponse(BaseModel): + """ + ListFirewallAuditResponse + """ # noqa: E501 + pagination: PaginationMeta = Field(description="Data about pagination like how many results, pages, page size.", alias="_pagination") + data: List[FirewallAuditResponse] + links: Links = Field(alias="_links") + __properties: ClassVar[List[str]] = ["_pagination", "data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ListFirewallAuditResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['_pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListFirewallAuditResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_pagination": PaginationMeta.from_dict(obj["_pagination"]) if obj.get("_pagination") is not None else None, + "data": [FirewallAuditResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": Links.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/list_firewall_response.py b/pfruck_contabo/models/list_firewall_response.py new file mode 100644 index 00000000..fcd334b4 --- /dev/null +++ b/pfruck_contabo/models/list_firewall_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.links import Links +from pfruck_contabo.models.list_firewall_response_data import ListFirewallResponseData +from pfruck_contabo.models.pagination_meta import PaginationMeta +from typing import Optional, Set +from typing_extensions import Self + +class ListFirewallResponse(BaseModel): + """ + ListFirewallResponse + """ # noqa: E501 + pagination: PaginationMeta = Field(description="Data about pagination like how many results, pages, page size.", alias="_pagination") + data: List[ListFirewallResponseData] + links: Links = Field(alias="_links") + __properties: ClassVar[List[str]] = ["_pagination", "data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ListFirewallResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['_pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListFirewallResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_pagination": PaginationMeta.from_dict(obj["_pagination"]) if obj.get("_pagination") is not None else None, + "data": [ListFirewallResponseData.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": Links.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/list_firewall_response_data.py b/pfruck_contabo/models/list_firewall_response_data.py new file mode 100644 index 00000000..cb1d667e --- /dev/null +++ b/pfruck_contabo/models/list_firewall_response_data.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from pfruck_contabo.models.instance_details import InstanceDetails +from pfruck_contabo.models.instance_status_representation import InstanceStatusRepresentation +from pfruck_contabo.models.rules import Rules +from typing import Optional, Set +from typing_extensions import Self + +class ListFirewallResponseData(BaseModel): + """ + ListFirewallResponseData + """ # noqa: E501 + tenant_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Your customer tenant id", alias="tenantId") + customer_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Your customer number", alias="customerId") + firewall_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Your firewall id.", alias="firewallId") + name: Annotated[str, Field(strict=True, max_length=255)] = Field(description="The name of the firewall.") + description: Annotated[str, Field(strict=True, max_length=255)] = Field(description="The description of the firewall.") + status: StrictStr = Field(description="Inactive status means no rules of this firewall are set for all assigned instances.") + instance_status: List[InstanceStatusRepresentation] = Field(alias="instanceStatus") + instances: List[InstanceDetails] + rules: Rules + created_date: datetime = Field(description="The creation date time for the firewall", alias="createdDate") + updated_date: datetime = Field(description="The update date time for the firewall", alias="updatedDate") + __properties: ClassVar[List[str]] = ["tenantId", "customerId", "firewallId", "name", "description", "status", "instanceStatus", "instances", "rules", "createdDate", "updatedDate"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['active', 'inactive']): + raise ValueError("must be one of enum values ('active', 'inactive')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ListFirewallResponseData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in instance_status (list) + _items = [] + if self.instance_status: + for _item in self.instance_status: + if _item: + _items.append(_item.to_dict()) + _dict['instanceStatus'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in instances (list) + _items = [] + if self.instances: + for _item in self.instances: + if _item: + _items.append(_item.to_dict()) + _dict['instances'] = _items + # override the default output from pydantic by calling `to_dict()` of rules + if self.rules: + _dict['rules'] = self.rules.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListFirewallResponseData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tenantId": obj.get("tenantId"), + "customerId": obj.get("customerId"), + "firewallId": obj.get("firewallId"), + "name": obj.get("name"), + "description": obj.get("description"), + "status": obj.get("status"), + "instanceStatus": [InstanceStatusRepresentation.from_dict(_item) for _item in obj["instanceStatus"]] if obj.get("instanceStatus") is not None else None, + "instances": [InstanceDetails.from_dict(_item) for _item in obj["instances"]] if obj.get("instances") is not None else None, + "rules": Rules.from_dict(obj["rules"]) if obj.get("rules") is not None else None, + "createdDate": obj.get("createdDate"), + "updatedDate": obj.get("updatedDate") + }) + return _obj + + diff --git a/pfruck_contabo/models/list_instances_response_data.py b/pfruck_contabo/models/list_instances_response_data.py index e252e08e..c78e5e8e 100644 --- a/pfruck_contabo/models/list_instances_response_data.py +++ b/pfruck_contabo/models/list_instances_response_data.py @@ -24,7 +24,7 @@ from pfruck_contabo.models.add_on_response import AddOnResponse from pfruck_contabo.models.additional_ip import AdditionalIp from pfruck_contabo.models.instance_status import InstanceStatus -from pfruck_contabo.models.ip_config import IpConfig +from pfruck_contabo.models.ip_config2 import IpConfig2 from typing import Optional, Set from typing_extensions import Self @@ -43,7 +43,7 @@ class ListInstancesResponseData(BaseModel): region_name: StrictStr = Field(description="The name of the region where the instance is located.", alias="regionName") product_id: StrictStr = Field(description="Product ID", alias="productId") image_id: StrictStr = Field(description="Image's id", alias="imageId") - ip_config: IpConfig = Field(alias="ipConfig") + ip_config: IpConfig2 = Field(alias="ipConfig") mac_address: StrictStr = Field(description="MAC Address", alias="macAddress") ram_mb: Union[StrictFloat, StrictInt] = Field(description="Image RAM size in MB", alias="ramMb") cpu_cores: StrictInt = Field(description="CPU core count", alias="cpuCores") @@ -52,7 +52,7 @@ class ListInstancesResponseData(BaseModel): ssh_keys: List[StrictInt] = Field(description="Array of `secretId`s of public SSH keys for logging into as `defaultUser` with administrator/root privileges. Applies to Linux/BSD systems. Please refer to Secrets Management API.", alias="sshKeys") created_date: datetime = Field(description="The creation date for the instance", alias="createdDate") cancel_date: date = Field(description="The date on which the instance will be cancelled", alias="cancelDate") - status: InstanceStatus + status: InstanceStatus = Field(description="Instance's status") v_host_id: StrictInt = Field(description="ID of host system", alias="vHostId") v_host_number: StrictInt = Field(description="Number of host system", alias="vHostNumber") v_host_name: StrictStr = Field(description="Name of host system", alias="vHostName") @@ -61,7 +61,8 @@ class ListInstancesResponseData(BaseModel): product_type: StrictStr = Field(description="Instance's category depending on Product Id", alias="productType") product_name: StrictStr = Field(description="Instance's Product Name", alias="productName") default_user: Optional[StrictStr] = Field(default=None, description="Default user name created for login during (re-)installation with administrative privileges. Allowed values for Linux/BSD are `admin` (use sudo to apply administrative privileges like root) or `root`. Allowed values for Windows are `admin` (has administrative privileges like administrator) or `administrator`.", alias="defaultUser") - __properties: ClassVar[List[str]] = ["tenantId", "customerId", "additionalIps", "name", "displayName", "instanceId", "dataCenter", "region", "regionName", "productId", "imageId", "ipConfig", "macAddress", "ramMb", "cpuCores", "osType", "diskMb", "sshKeys", "createdDate", "cancelDate", "status", "vHostId", "vHostNumber", "vHostName", "addOns", "errorMessage", "productType", "productName", "defaultUser"] + application_id: StrictStr = Field(description="Application ID", alias="applicationId") + __properties: ClassVar[List[str]] = ["tenantId", "customerId", "additionalIps", "name", "displayName", "instanceId", "dataCenter", "region", "regionName", "productId", "imageId", "ipConfig", "macAddress", "ramMb", "cpuCores", "osType", "diskMb", "sshKeys", "createdDate", "cancelDate", "status", "vHostId", "vHostNumber", "vHostName", "addOns", "errorMessage", "productType", "productName", "defaultUser", "applicationId"] @field_validator('tenant_id') def tenant_id_validate_enum(cls, value): @@ -173,7 +174,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "regionName": obj.get("regionName"), "productId": obj.get("productId"), "imageId": obj.get("imageId"), - "ipConfig": IpConfig.from_dict(obj["ipConfig"]) if obj.get("ipConfig") is not None else None, + "ipConfig": IpConfig2.from_dict(obj["ipConfig"]) if obj.get("ipConfig") is not None else None, "macAddress": obj.get("macAddress"), "ramMb": obj.get("ramMb"), "cpuCores": obj.get("cpuCores"), @@ -190,7 +191,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errorMessage": obj.get("errorMessage"), "productType": obj.get("productType"), "productName": obj.get("productName"), - "defaultUser": obj.get("defaultUser") + "defaultUser": obj.get("defaultUser"), + "applicationId": obj.get("applicationId") }) return _obj diff --git a/pfruck_contabo/models/list_preset_rules_response.py b/pfruck_contabo/models/list_preset_rules_response.py new file mode 100644 index 00000000..70824d52 --- /dev/null +++ b/pfruck_contabo/models/list_preset_rules_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.preset_rules_response import PresetRulesResponse +from pfruck_contabo.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class ListPresetRulesResponse(BaseModel): + """ + ListPresetRulesResponse + """ # noqa: E501 + data: List[PresetRulesResponse] + links: SelfLinks = Field(alias="_links") + __properties: ClassVar[List[str]] = ["data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ListPresetRulesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListPresetRulesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [PresetRulesResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/list_ptr_records_response.py b/pfruck_contabo/models/list_ptr_records_response.py new file mode 100644 index 00000000..5a1ef581 --- /dev/null +++ b/pfruck_contabo/models/list_ptr_records_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.links import Links +from pfruck_contabo.models.pagination_meta import PaginationMeta +from pfruck_contabo.models.ptr_record_response import PtrRecordResponse +from typing import Optional, Set +from typing_extensions import Self + +class ListPtrRecordsResponse(BaseModel): + """ + ListPtrRecordsResponse + """ # noqa: E501 + pagination: PaginationMeta = Field(description="Data about pagination like how many results, pages, page size.", alias="_pagination") + data: List[PtrRecordResponse] + links: Links = Field(alias="_links") + __properties: ClassVar[List[str]] = ["_pagination", "data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ListPtrRecordsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['_pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListPtrRecordsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_pagination": PaginationMeta.from_dict(obj["_pagination"]) if obj.get("_pagination") is not None else None, + "data": [PtrRecordResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": Links.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/list_vip_response_data.py b/pfruck_contabo/models/list_vip_response_data.py index f9ab7b9b..a0dd6bcf 100644 --- a/pfruck_contabo/models/list_vip_response_data.py +++ b/pfruck_contabo/models/list_vip_response_data.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from pfruck_contabo.models.ip_v41 import IpV41 +from pfruck_contabo.models.ip_v4 import IpV4 from typing import Optional, Set from typing_extensions import Self @@ -39,7 +39,7 @@ class ListVipResponseData(BaseModel): resource_display_name: StrictStr = Field(description="Resource display name.", alias="resourceDisplayName") ip_version: StrictStr = Field(description="Version of Ip.", alias="ipVersion") type: Optional[StrictStr] = Field(default=None, description="The VIP type.") - v4: Optional[IpV41] = None + v4: Optional[IpV4] = None __properties: ClassVar[List[str]] = ["tenantId", "customerId", "vipId", "dataCenter", "region", "resourceId", "resourceType", "resourceName", "resourceDisplayName", "ipVersion", "type", "v4"] @field_validator('resource_type') @@ -134,7 +134,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "resourceDisplayName": obj.get("resourceDisplayName"), "ipVersion": obj.get("ipVersion"), "type": obj.get("type"), - "v4": IpV41.from_dict(obj["v4"]) if obj.get("v4") is not None else None + "v4": IpV4.from_dict(obj["v4"]) if obj.get("v4") is not None else None }) return _obj diff --git a/pfruck_contabo/models/minimum_requirements.py b/pfruck_contabo/models/minimum_requirements.py index 299d4536..0842c4f1 100644 --- a/pfruck_contabo/models/minimum_requirements.py +++ b/pfruck_contabo/models/minimum_requirements.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union from typing import Optional, Set from typing_extensions import Self @@ -29,7 +29,8 @@ class MinimumRequirements(BaseModel): cpu_cores: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="CPU Cores Requirement", alias="cpuCores") ram_mb: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Memory Requirement in MB", alias="ramMb") disk_mb: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Storage Requirement in MB", alias="diskMb") - __properties: ClassVar[List[str]] = ["cpuCores", "ramMb", "diskMb"] + valid_product_ids: Optional[List[StrictStr]] = Field(default=None, description="Valid Product IDs for this application", alias="validProductIds") + __properties: ClassVar[List[str]] = ["cpuCores", "ramMb", "diskMb", "validProductIds"] model_config = ConfigDict( populate_by_name=True, @@ -84,7 +85,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "cpuCores": obj.get("cpuCores"), "ramMb": obj.get("ramMb"), - "diskMb": obj.get("diskMb") + "diskMb": obj.get("diskMb"), + "validProductIds": obj.get("validProductIds") }) return _obj diff --git a/pfruck_contabo/models/nameserver.py b/pfruck_contabo/models/nameserver.py new file mode 100644 index 00000000..cde0882c --- /dev/null +++ b/pfruck_contabo/models/nameserver.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class Nameserver(BaseModel): + """ + Nameserver + """ # noqa: E501 + hostname: List[StrictStr] = Field(description="Nameservers") + ip_v4: Optional[List[StrictStr]] = Field(default=None, description="IPv4 of nameserver", alias="ipV4") + ip_v6: Optional[List[StrictStr]] = Field(default=None, description="IPv6 of nameserver", alias="ipV6") + __properties: ClassVar[List[str]] = ["hostname", "ipV4", "ipV6"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Nameserver from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Nameserver from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "hostname": obj.get("hostname"), + "ipV4": obj.get("ipV4"), + "ipV6": obj.get("ipV6") + }) + return _obj + + diff --git a/pfruck_contabo/models/object_storage_response.py b/pfruck_contabo/models/object_storage_response.py index 22a3b060..123f71d5 100644 --- a/pfruck_contabo/models/object_storage_response.py +++ b/pfruck_contabo/models/object_storage_response.py @@ -47,8 +47,8 @@ class ObjectStorageResponse(BaseModel): @field_validator('status') def status_validate_enum(cls, value): """Validates the enum""" - if value not in set(['READY', 'PROVISIONING', 'UPGRADING', 'CANCELLED', 'ERROR', 'ENABLED', 'DISABLED', 'MANUAL_PROVISIONING', 'PRODUCT_NOT_AVAILABLE', 'LIMIT_EXCEEDED', 'VERIFICATION_REQUIRED', 'COMPLETED', 'ORDER_PROCESSING', 'PENDING_PAYMENT', 'UNKNOWN']): - raise ValueError("must be one of enum values ('READY', 'PROVISIONING', 'UPGRADING', 'CANCELLED', 'ERROR', 'ENABLED', 'DISABLED', 'MANUAL_PROVISIONING', 'PRODUCT_NOT_AVAILABLE', 'LIMIT_EXCEEDED', 'VERIFICATION_REQUIRED', 'COMPLETED', 'ORDER_PROCESSING', 'PENDING_PAYMENT', 'UNKNOWN')") + if value not in set(['READY', 'PROVISIONING', 'UPGRADING', 'CANCELLED', 'ERROR', 'DISABLED', 'MANUAL_PROVISIONING', 'PRODUCT_NOT_AVAILABLE', 'LIMIT_EXCEEDED', 'VERIFICATION_REQUIRED', 'ORDER_PROCESSING', 'PENDING_PAYMENT', 'UNKNOWN']): + raise ValueError("must be one of enum values ('READY', 'PROVISIONING', 'UPGRADING', 'CANCELLED', 'ERROR', 'DISABLED', 'MANUAL_PROVISIONING', 'PRODUCT_NOT_AVAILABLE', 'LIMIT_EXCEEDED', 'VERIFICATION_REQUIRED', 'ORDER_PROCESSING', 'PENDING_PAYMENT', 'UNKNOWN')") return value model_config = ConfigDict( diff --git a/pfruck_contabo/models/optimal_requirements.py b/pfruck_contabo/models/optimal_requirements.py index 9bf42b60..111dc292 100644 --- a/pfruck_contabo/models/optimal_requirements.py +++ b/pfruck_contabo/models/optimal_requirements.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union from typing import Optional, Set from typing_extensions import Self @@ -29,7 +29,8 @@ class OptimalRequirements(BaseModel): cpu_cores: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="CPU Cores Requirement", alias="cpuCores") ram_mb: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Memory Requirement in MB", alias="ramMb") disk_mb: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Storage Requirement in MB", alias="diskMb") - __properties: ClassVar[List[str]] = ["cpuCores", "ramMb", "diskMb"] + valid_product_ids: Optional[List[StrictStr]] = Field(default=None, description="Valid Product IDs for this application", alias="validProductIds") + __properties: ClassVar[List[str]] = ["cpuCores", "ramMb", "diskMb", "validProductIds"] model_config = ConfigDict( populate_by_name=True, @@ -84,7 +85,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "cpuCores": obj.get("cpuCores"), "ramMb": obj.get("ramMb"), - "diskMb": obj.get("diskMb") + "diskMb": obj.get("diskMb"), + "validProductIds": obj.get("validProductIds") }) return _obj diff --git a/pfruck_contabo/models/patch_firewall_request.py b/pfruck_contabo/models/patch_firewall_request.py new file mode 100644 index 00000000..ec108b4a --- /dev/null +++ b/pfruck_contabo/models/patch_firewall_request.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class PatchFirewallRequest(BaseModel): + """ + PatchFirewallRequest + """ # noqa: E501 + name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]] = Field(default=None, description="The name of the firewall") + status: Optional[StrictStr] = Field(default=None, description="Active status of the firewall enables all rules, thus filtering traffic. Inactive status does not filter any traffic.") + description: Optional[StrictStr] = Field(default=None, description="The description of the firewall.") + __properties: ClassVar[List[str]] = ["name", "status", "description"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['active', 'inactive']): + raise ValueError("must be one of enum values ('active', 'inactive')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PatchFirewallRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PatchFirewallRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "status": obj.get("status"), + "description": obj.get("description") + }) + return _obj + + diff --git a/pfruck_contabo/models/patch_firewall_response.py b/pfruck_contabo/models/patch_firewall_response.py new file mode 100644 index 00000000..54570a59 --- /dev/null +++ b/pfruck_contabo/models/patch_firewall_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.firewall_response import FirewallResponse +from pfruck_contabo.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class PatchFirewallResponse(BaseModel): + """ + PatchFirewallResponse + """ # noqa: E501 + data: List[FirewallResponse] + links: SelfLinks = Field(alias="_links") + __properties: ClassVar[List[str]] = ["data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PatchFirewallResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PatchFirewallResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [FirewallResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/patch_instance_request.py b/pfruck_contabo/models/patch_instance_request.py index daaea8c6..4a371e47 100644 --- a/pfruck_contabo/models/patch_instance_request.py +++ b/pfruck_contabo/models/patch_instance_request.py @@ -27,7 +27,7 @@ class PatchInstanceRequest(BaseModel): """ PatchInstanceRequest """ # noqa: E501 - display_name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The display name of the instance", alias="displayName") + display_name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The display name of the instance. Pass an empty string to clear it.", alias="displayName") __properties: ClassVar[List[str]] = ["displayName"] model_config = ConfigDict( diff --git a/pfruck_contabo/models/preset_rules_response.py b/pfruck_contabo/models/preset_rules_response.py new file mode 100644 index 00000000..82a9075b --- /dev/null +++ b/pfruck_contabo/models/preset_rules_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class PresetRulesResponse(BaseModel): + """ + PresetRulesResponse + """ # noqa: E501 + name: StrictStr = Field(description="Name of the preset rule") + macro: Dict[str, Any] = Field(description="Inbound rules options") + __properties: ClassVar[List[str]] = ["name", "macro"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PresetRulesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PresetRulesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "macro": obj.get("macro") + }) + return _obj + + diff --git a/pfruck_contabo/models/private_ip_config.py b/pfruck_contabo/models/private_ip_config.py index 90738240..a7840691 100644 --- a/pfruck_contabo/models/private_ip_config.py +++ b/pfruck_contabo/models/private_ip_config.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from pfruck_contabo.models.ip_v4 import IpV4 +from pfruck_contabo.models.ip_v41 import IpV41 from typing import Optional, Set from typing_extensions import Self @@ -27,7 +27,7 @@ class PrivateIpConfig(BaseModel): """ PrivateIpConfig """ # noqa: E501 - v4: List[IpV4] + v4: List[IpV41] __properties: ClassVar[List[str]] = ["v4"] model_config = ConfigDict( @@ -88,7 +88,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "v4": [IpV4.from_dict(_item) for _item in obj["v4"]] if obj.get("v4") is not None else None + "v4": [IpV41.from_dict(_item) for _item in obj["v4"]] if obj.get("v4") is not None else None }) return _obj diff --git a/pfruck_contabo/models/ptr_record_response.py b/pfruck_contabo/models/ptr_record_response.py new file mode 100644 index 00000000..a1388f33 --- /dev/null +++ b/pfruck_contabo/models/ptr_record_response.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class PtrRecordResponse(BaseModel): + """ + PtrRecordResponse + """ # noqa: E501 + tenant_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Your customer tenant id", alias="tenantId") + customer_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Your customer number", alias="customerId") + ip: StrictStr = Field(description="IP Address") + ttl: StrictInt = Field(description="Time to live for the PTR record in seconds") + ptr: StrictStr = Field(description="PTR") + __properties: ClassVar[List[str]] = ["tenantId", "customerId", "ip", "ttl", "ptr"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PtrRecordResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PtrRecordResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tenantId": obj.get("tenantId"), + "customerId": obj.get("customerId"), + "ip": obj.get("ip"), + "ttl": obj.get("ttl"), + "ptr": obj.get("ptr") + }) + return _obj + + diff --git a/pfruck_contabo/models/put_firewall_request.py b/pfruck_contabo/models/put_firewall_request.py new file mode 100644 index 00000000..7d949de4 --- /dev/null +++ b/pfruck_contabo/models/put_firewall_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from pfruck_contabo.models.rules_request import RulesRequest +from typing import Optional, Set +from typing_extensions import Self + +class PutFirewallRequest(BaseModel): + """ + PutFirewallRequest + """ # noqa: E501 + rules: Optional[RulesRequest] = None + __properties: ClassVar[List[str]] = ["rules"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PutFirewallRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of rules + if self.rules: + _dict['rules'] = self.rules.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PutFirewallRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rules": RulesRequest.from_dict(obj["rules"]) if obj.get("rules") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/put_firewall_response.py b/pfruck_contabo/models/put_firewall_response.py new file mode 100644 index 00000000..452d4700 --- /dev/null +++ b/pfruck_contabo/models/put_firewall_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.firewall_response import FirewallResponse +from pfruck_contabo.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class PutFirewallResponse(BaseModel): + """ + PutFirewallResponse + """ # noqa: E501 + data: List[FirewallResponse] + links: SelfLinks = Field(alias="_links") + __properties: ClassVar[List[str]] = ["data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PutFirewallResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PutFirewallResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [FirewallResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/record_audit_response.py b/pfruck_contabo/models/record_audit_response.py new file mode 100644 index 00000000..ecd99aa6 --- /dev/null +++ b/pfruck_contabo/models/record_audit_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.links import Links +from pfruck_contabo.models.pagination_meta import PaginationMeta +from pfruck_contabo.models.record_audit_response_data import RecordAuditResponseData +from typing import Optional, Set +from typing_extensions import Self + +class RecordAuditResponse(BaseModel): + """ + RecordAuditResponse + """ # noqa: E501 + pagination: PaginationMeta = Field(description="Data about pagination like how many results, pages, page size.", alias="_pagination") + data: List[RecordAuditResponseData] + links: Links = Field(alias="_links") + __properties: ClassVar[List[str]] = ["_pagination", "data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RecordAuditResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['_pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RecordAuditResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_pagination": PaginationMeta.from_dict(obj["_pagination"]) if obj.get("_pagination") is not None else None, + "data": [RecordAuditResponseData.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": Links.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/record_audit_response_data.py b/pfruck_contabo/models/record_audit_response_data.py new file mode 100644 index 00000000..5ff042f9 --- /dev/null +++ b/pfruck_contabo/models/record_audit_response_data.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class RecordAuditResponseData(BaseModel): + """ + RecordAuditResponseData + """ # noqa: E501 + id: StrictInt = Field(description="The ID of the audit entry.") + action: StrictStr = Field(description="Type of the action.") + timestamp: datetime = Field(description="When the change took place.") + tenant_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Customer tenant id", alias="tenantId") + customer_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Customer ID", alias="customerId") + changed_by: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Id of user who performed the change", alias="changedBy") + username: StrictStr = Field(description="Name of the user which led to the change.") + request_id: StrictStr = Field(description="The requestId of the API call which led to the change.", alias="requestId") + trace_id: StrictStr = Field(description="The traceId of the API call which led to the change.", alias="traceId") + record_id: Annotated[int, Field(strict=True, ge=0)] = Field(description="The identifier of the Zone recordd", alias="recordId") + zone_name: StrictStr = Field(description="DNS Zone name", alias="zoneName") + changes: Optional[Dict[str, Any]] = Field(default=None, description="List of actual changes.") + __properties: ClassVar[List[str]] = ["id", "action", "timestamp", "tenantId", "customerId", "changedBy", "username", "requestId", "traceId", "recordId", "zoneName", "changes"] + + @field_validator('action') + def action_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['CREATED', 'UPDATED', 'DELETED']): + raise ValueError("must be one of enum values ('CREATED', 'UPDATED', 'DELETED')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RecordAuditResponseData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RecordAuditResponseData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "action": obj.get("action"), + "timestamp": obj.get("timestamp"), + "tenantId": obj.get("tenantId"), + "customerId": obj.get("customerId"), + "changedBy": obj.get("changedBy"), + "username": obj.get("username"), + "requestId": obj.get("requestId"), + "traceId": obj.get("traceId"), + "recordId": obj.get("recordId"), + "zoneName": obj.get("zoneName"), + "changes": obj.get("changes") + }) + return _obj + + diff --git a/pfruck_contabo/models/reinstall_instance_request.py b/pfruck_contabo/models/reinstall_instance_request.py index d829018e..058b4887 100644 --- a/pfruck_contabo/models/reinstall_instance_request.py +++ b/pfruck_contabo/models/reinstall_instance_request.py @@ -30,7 +30,7 @@ class ReinstallInstanceRequest(BaseModel): ssh_keys: Optional[List[StrictInt]] = Field(default=None, description="Array of `secretId`s of public SSH keys for logging into as `defaultUser` with administrator/root privileges. Applies to Linux/BSD systems. Please refer to Secrets Management API.", alias="sshKeys") root_password: Optional[StrictInt] = Field(default=None, description="`secretId` of the password for the `defaultUser` with administrator/root privileges. For Linux/BSD please use SSH, for Windows RDP. Please refer to Secrets Management API.", alias="rootPassword") user_data: Optional[StrictStr] = Field(default=None, description="[Cloud-Init](https://cloud-init.io/) Config in order to customize during start of compute instance.", alias="userData") - default_user: Optional[StrictStr] = Field(default='admin', description="Default user name created for login during (re-)installation with administrative privileges. Allowed values for Linux/BSD are `admin` (use sudo to apply administrative privileges like root) or `root`. Allowed values for Windows are `admin` (has administrative privileges like administrator) or `administrator`.", alias="defaultUser") + default_user: Optional[StrictStr] = Field(default=None, description="Default user name created for login during (re-)installation with administrative privileges. Allowed values for Linux/BSD are `admin` (use sudo to apply administrative privileges like root) or `root`. Allowed values for Windows are `admin` (has administrative privileges like administrator) or `administrator`.", alias="defaultUser") application_id: Optional[StrictStr] = Field(default=None, description="Application ID", alias="applicationId") __properties: ClassVar[List[str]] = ["imageId", "sshKeys", "rootPassword", "userData", "defaultUser", "applicationId"] @@ -99,7 +99,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "sshKeys": obj.get("sshKeys"), "rootPassword": obj.get("rootPassword"), "userData": obj.get("userData"), - "defaultUser": obj.get("defaultUser") if obj.get("defaultUser") is not None else 'admin', + "defaultUser": obj.get("defaultUser"), "applicationId": obj.get("applicationId") }) return _obj diff --git a/pfruck_contabo/models/remedies_audit_list_response.py b/pfruck_contabo/models/remedies_audit_list_response.py new file mode 100644 index 00000000..6356df74 --- /dev/null +++ b/pfruck_contabo/models/remedies_audit_list_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.links import Links +from pfruck_contabo.models.pagination_meta import PaginationMeta +from pfruck_contabo.models.remedies_audit_response import RemediesAuditResponse +from typing import Optional, Set +from typing_extensions import Self + +class RemediesAuditListResponse(BaseModel): + """ + RemediesAuditListResponse + """ # noqa: E501 + pagination: PaginationMeta = Field(description="Data about pagination like how many results, pages, page size.", alias="_pagination") + data: List[RemediesAuditResponse] + links: Links = Field(alias="_links") + __properties: ClassVar[List[str]] = ["_pagination", "data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RemediesAuditListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['_pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RemediesAuditListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_pagination": PaginationMeta.from_dict(obj["_pagination"]) if obj.get("_pagination") is not None else None, + "data": [RemediesAuditResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": Links.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/remedies_audit_response.py b/pfruck_contabo/models/remedies_audit_response.py new file mode 100644 index 00000000..fb073da3 --- /dev/null +++ b/pfruck_contabo/models/remedies_audit_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing_extensions import Annotated +from pfruck_contabo.models.changes import Changes +from typing import Optional, Set +from typing_extensions import Self + +class RemediesAuditResponse(BaseModel): + """ + RemediesAuditResponse + """ # noqa: E501 + created_date: datetime = Field(description="Creation date", alias="createdDate") + modified_date: datetime = Field(description="Modify date", alias="modifiedDate") + org_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Org id", alias="orgId") + account_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Account id", alias="accountId") + audit_id: StrictInt = Field(description="The ID of the audit entry.", alias="auditId") + action: StrictStr = Field(description="Type of the action.") + foreign_changed_by: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Id of a foreign user (given on the api request via header) who performed the change", alias="foreignChangedBy") + foreign_username: StrictStr = Field(description="Name of the foreign user (given on the api request via header) which led to the change.", alias="foreignUsername") + changed_by: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Id of user who performed the change", alias="changedBy") + username: StrictStr = Field(description="Name of the user which led to the change.") + request_id: StrictStr = Field(description="The requestId of the API call which led to the change.", alias="requestId") + trace_id: StrictStr = Field(description="The traceId of the API call which led to the change.", alias="traceId") + changes: Changes = Field(description="List of changed properties") + remedy_id: Union[StrictFloat, StrictInt] = Field(description="Remedy's id", alias="remedyId") + __properties: ClassVar[List[str]] = ["createdDate", "modifiedDate", "orgId", "accountId", "auditId", "action", "foreignChangedBy", "foreignUsername", "changedBy", "username", "requestId", "traceId", "changes", "remedyId"] + + @field_validator('action') + def action_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['CREATED', 'UPDATED', 'DELETED']): + raise ValueError("must be one of enum values ('CREATED', 'UPDATED', 'DELETED')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RemediesAuditResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of changes + if self.changes: + _dict['changes'] = self.changes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RemediesAuditResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdDate": obj.get("createdDate"), + "modifiedDate": obj.get("modifiedDate"), + "orgId": obj.get("orgId"), + "accountId": obj.get("accountId"), + "auditId": obj.get("auditId"), + "action": obj.get("action"), + "foreignChangedBy": obj.get("foreignChangedBy"), + "foreignUsername": obj.get("foreignUsername"), + "changedBy": obj.get("changedBy"), + "username": obj.get("username"), + "requestId": obj.get("requestId"), + "traceId": obj.get("traceId"), + "changes": Changes.from_dict(obj["changes"]) if obj.get("changes") is not None else None, + "remedyId": obj.get("remedyId") + }) + return _obj + + diff --git a/pfruck_contabo/models/remedies_create_request.py b/pfruck_contabo/models/remedies_create_request.py new file mode 100644 index 00000000..28d9e8eb --- /dev/null +++ b/pfruck_contabo/models/remedies_create_request.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class RemediesCreateRequest(BaseModel): + """ + RemediesCreateRequest + """ # noqa: E501 + object_type: StrictStr = Field(description="Object type to be handled", alias="objectType") + object_id: StrictStr = Field(description="ID of the object, to be handled", alias="objectId") + remedy_template_id: Union[StrictFloat, StrictInt] = Field(description="Remedy Template for this remedy", alias="remedyTemplateId") + remedy_collection_id: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Remedy Collection for this remedy", alias="remedyCollectionId") + org_id: StrictStr = Field(description="Id of your organization, if unknown please contact us", alias="orgId") + account_id: StrictStr = Field(description="Account Id", alias="accountId") + __properties: ClassVar[List[str]] = ["objectType", "objectId", "remedyTemplateId", "remedyCollectionId", "orgId", "accountId"] + + @field_validator('object_type') + def object_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['vserver']): + raise ValueError("must be one of enum values ('vserver')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RemediesCreateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RemediesCreateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "objectType": obj.get("objectType"), + "objectId": obj.get("objectId"), + "remedyTemplateId": obj.get("remedyTemplateId"), + "remedyCollectionId": obj.get("remedyCollectionId"), + "orgId": obj.get("orgId"), + "accountId": obj.get("accountId") + }) + return _obj + + diff --git a/pfruck_contabo/models/remedies_get_response.py b/pfruck_contabo/models/remedies_get_response.py new file mode 100644 index 00000000..7015d043 --- /dev/null +++ b/pfruck_contabo/models/remedies_get_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.remedy_response import RemedyResponse +from pfruck_contabo.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class RemediesGetResponse(BaseModel): + """ + RemediesGetResponse + """ # noqa: E501 + data: List[RemedyResponse] + links: SelfLinks = Field(alias="_links") + __properties: ClassVar[List[str]] = ["data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RemediesGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RemediesGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [RemedyResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/remedies_list_response.py b/pfruck_contabo/models/remedies_list_response.py new file mode 100644 index 00000000..4dc72d6d --- /dev/null +++ b/pfruck_contabo/models/remedies_list_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.links import Links +from pfruck_contabo.models.pagination_meta import PaginationMeta +from pfruck_contabo.models.remedy_response import RemedyResponse +from typing import Optional, Set +from typing_extensions import Self + +class RemediesListResponse(BaseModel): + """ + RemediesListResponse + """ # noqa: E501 + pagination: PaginationMeta = Field(description="Data about pagination like how many results, pages, page size.", alias="_pagination") + data: List[RemedyResponse] + links: Links = Field(alias="_links") + __properties: ClassVar[List[str]] = ["_pagination", "data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RemediesListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['_pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RemediesListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_pagination": PaginationMeta.from_dict(obj["_pagination"]) if obj.get("_pagination") is not None else None, + "data": [RemedyResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": Links.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/remedies_replay_request.py b/pfruck_contabo/models/remedies_replay_request.py new file mode 100644 index 00000000..3914069d --- /dev/null +++ b/pfruck_contabo/models/remedies_replay_request.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class RemediesReplayRequest(BaseModel): + """ + RemediesReplayRequest + """ # noqa: E501 + org_id: StrictStr = Field(description="Id of your organization, if unknown please contact us", alias="orgId") + account_id: StrictStr = Field(description="Account Id", alias="accountId") + creation_start_time: Optional[datetime] = Field(default=None, description="Earliest creation date of changes to replay", alias="creationStartTime") + creation_end_time: Optional[datetime] = Field(default=None, description="Latest creation date of changes to replay", alias="creationEndTime") + rate: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Message publishing frequency. How many messages per second get published. Default: 20") + remedy_ids: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="Remedy's id", alias="remedyIds") + __properties: ClassVar[List[str]] = ["orgId", "accountId", "creationStartTime", "creationEndTime", "rate", "remedyIds"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RemediesReplayRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RemediesReplayRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "orgId": obj.get("orgId"), + "accountId": obj.get("accountId"), + "creationStartTime": obj.get("creationStartTime"), + "creationEndTime": obj.get("creationEndTime"), + "rate": obj.get("rate"), + "remedyIds": obj.get("remedyIds") + }) + return _obj + + diff --git a/pfruck_contabo/models/remedy_response.py b/pfruck_contabo/models/remedy_response.py new file mode 100644 index 00000000..3a95d4b3 --- /dev/null +++ b/pfruck_contabo/models/remedy_response.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class RemedyResponse(BaseModel): + """ + RemedyResponse + """ # noqa: E501 + internal: StrictBool = Field(description="Is internal (not shown to the customer)") + status: StrictStr = Field(description="Status of the handle") + object_type: StrictStr = Field(description="Object type to be handled", alias="objectType") + object_id: StrictStr = Field(description="ID of the object, to be handled", alias="objectId") + remedy_id: Union[StrictFloat, StrictInt] = Field(description="Remedy's id", alias="remedyId") + remedy_collection_id: Union[StrictFloat, StrictInt] = Field(description="ID of remedy collection if started in scope of a collection", alias="remedyCollectionId") + remedy_template_id: Union[StrictFloat, StrictInt] = Field(description="Remedy Template for this remedy", alias="remedyTemplateId") + name: StrictStr = Field(description="Name of this remedy template") + note: StrictStr = Field(description="Note to be shown to the customer") + duration_ms: Union[StrictFloat, StrictInt] = Field(description="Duration of the remedy in milliseconds", alias="durationMs") + created_date: datetime = Field(description="Creation date", alias="createdDate") + modified_date: datetime = Field(description="Modify date", alias="modifiedDate") + org_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Org id", alias="orgId") + account_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Account id", alias="accountId") + internal_note: StrictStr = Field(description="Note which is shown only internally to the agent", alias="internalNote") + log: StrictStr = Field(description="Detailed log of the check execution") + __properties: ClassVar[List[str]] = ["internal", "status", "objectType", "objectId", "remedyId", "remedyCollectionId", "remedyTemplateId", "name", "note", "durationMs", "createdDate", "modifiedDate", "orgId", "accountId", "internalNote", "log"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['queued', 'running', 'skipped', 'cancelled', 'failed', 'warn', 'successful']): + raise ValueError("must be one of enum values ('queued', 'running', 'skipped', 'cancelled', 'failed', 'warn', 'successful')") + return value + + @field_validator('object_type') + def object_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['vserver']): + raise ValueError("must be one of enum values ('vserver')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RemedyResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RemedyResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "internal": obj.get("internal"), + "status": obj.get("status"), + "objectType": obj.get("objectType"), + "objectId": obj.get("objectId"), + "remedyId": obj.get("remedyId"), + "remedyCollectionId": obj.get("remedyCollectionId"), + "remedyTemplateId": obj.get("remedyTemplateId"), + "name": obj.get("name"), + "note": obj.get("note"), + "durationMs": obj.get("durationMs"), + "createdDate": obj.get("createdDate"), + "modifiedDate": obj.get("modifiedDate"), + "orgId": obj.get("orgId"), + "accountId": obj.get("accountId"), + "internalNote": obj.get("internalNote"), + "log": obj.get("log") + }) + return _obj + + diff --git a/pfruck_contabo/models/remedy_template_response.py b/pfruck_contabo/models/remedy_template_response.py new file mode 100644 index 00000000..554533ef --- /dev/null +++ b/pfruck_contabo/models/remedy_template_response.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class RemedyTemplateResponse(BaseModel): + """ + RemedyTemplateResponse + """ # noqa: E501 + created_date: datetime = Field(description="Creation date", alias="createdDate") + modified_date: datetime = Field(description="Modify date", alias="modifiedDate") + org_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Org id", alias="orgId") + account_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Account id", alias="accountId") + remedy_template_id: Union[StrictFloat, StrictInt] = Field(description="Remedy template's id", alias="remedyTemplateId") + name: StrictStr = Field(description="Name of the remedy template") + description: StrictStr = Field(description="Description for the remedy template") + internal: StrictBool = Field(description="Is remedy only internal (not shown to the customer)") + object_type: StrictStr = Field(description="Object type for which the remedy template can be used", alias="objectType") + collector_class: StrictStr = Field(description="Class used to collect the required information for the remedy", alias="collectorClass") + remedy_class: StrictStr = Field(description="Class used to perform the remedy", alias="remedyClass") + requirements: Dict[str, Any] = Field(description="Requirements for remedy (reboot, reinstall, ...)") + check_template_ids: List[StrictStr] = Field(description="Check Template IDs that are related to this remedy", alias="checkTemplateIds") + __properties: ClassVar[List[str]] = ["createdDate", "modifiedDate", "orgId", "accountId", "remedyTemplateId", "name", "description", "internal", "objectType", "collectorClass", "remedyClass", "requirements", "checkTemplateIds"] + + @field_validator('object_type') + def object_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['vserver']): + raise ValueError("must be one of enum values ('vserver')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RemedyTemplateResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RemedyTemplateResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdDate": obj.get("createdDate"), + "modifiedDate": obj.get("modifiedDate"), + "orgId": obj.get("orgId"), + "accountId": obj.get("accountId"), + "remedyTemplateId": obj.get("remedyTemplateId"), + "name": obj.get("name"), + "description": obj.get("description"), + "internal": obj.get("internal"), + "objectType": obj.get("objectType"), + "collectorClass": obj.get("collectorClass"), + "remedyClass": obj.get("remedyClass"), + "requirements": obj.get("requirements"), + "checkTemplateIds": obj.get("checkTemplateIds") + }) + return _obj + + diff --git a/pfruck_contabo/models/remedy_templates_get_response.py b/pfruck_contabo/models/remedy_templates_get_response.py new file mode 100644 index 00000000..600cc0a5 --- /dev/null +++ b/pfruck_contabo/models/remedy_templates_get_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.remedy_template_response import RemedyTemplateResponse +from pfruck_contabo.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class RemedyTemplatesGetResponse(BaseModel): + """ + RemedyTemplatesGetResponse + """ # noqa: E501 + data: List[RemedyTemplateResponse] + links: SelfLinks = Field(alias="_links") + __properties: ClassVar[List[str]] = ["data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RemedyTemplatesGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RemedyTemplatesGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [RemedyTemplateResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/remedy_templates_list_response.py b/pfruck_contabo/models/remedy_templates_list_response.py new file mode 100644 index 00000000..f0e1af09 --- /dev/null +++ b/pfruck_contabo/models/remedy_templates_list_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.links import Links +from pfruck_contabo.models.pagination_meta import PaginationMeta +from pfruck_contabo.models.remedy_template_response import RemedyTemplateResponse +from typing import Optional, Set +from typing_extensions import Self + +class RemedyTemplatesListResponse(BaseModel): + """ + RemedyTemplatesListResponse + """ # noqa: E501 + pagination: PaginationMeta = Field(description="Data about pagination like how many results, pages, page size.", alias="_pagination") + data: List[RemedyTemplateResponse] + links: Links = Field(alias="_links") + __properties: ClassVar[List[str]] = ["_pagination", "data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RemedyTemplatesListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['_pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RemedyTemplatesListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_pagination": PaginationMeta.from_dict(obj["_pagination"]) if obj.get("_pagination") is not None else None, + "data": [RemedyTemplateResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": Links.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/replay_response.py b/pfruck_contabo/models/replay_response.py new file mode 100644 index 00000000..8fc2fbff --- /dev/null +++ b/pfruck_contabo/models/replay_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.audit_count_response import AuditCountResponse +from typing import Optional, Set +from typing_extensions import Self + +class ReplayResponse(BaseModel): + """ + ReplayResponse + """ # noqa: E501 + data: List[AuditCountResponse] + __properties: ClassVar[List[str]] = ["data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ReplayResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ReplayResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [AuditCountResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/rules.py b/pfruck_contabo/models/rules.py new file mode 100644 index 00000000..b04098c0 --- /dev/null +++ b/pfruck_contabo/models/rules.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.firewall_rule_response import FirewallRuleResponse +from typing import Optional, Set +from typing_extensions import Self + +class Rules(BaseModel): + """ + Rules + """ # noqa: E501 + inbound: List[FirewallRuleResponse] + __properties: ClassVar[List[str]] = ["inbound"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Rules from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in inbound (list) + _items = [] + if self.inbound: + for _item in self.inbound: + if _item: + _items.append(_item.to_dict()) + _dict['inbound'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Rules from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "inbound": [FirewallRuleResponse.from_dict(_item) for _item in obj["inbound"]] if obj.get("inbound") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/rules_request.py b/pfruck_contabo/models/rules_request.py new file mode 100644 index 00000000..c39f7bcc --- /dev/null +++ b/pfruck_contabo/models/rules_request.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.firewall_rule_request import FirewallRuleRequest +from typing import Optional, Set +from typing_extensions import Self + +class RulesRequest(BaseModel): + """ + RulesRequest + """ # noqa: E501 + inbound: List[FirewallRuleRequest] + __properties: ClassVar[List[str]] = ["inbound"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RulesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in inbound (list) + _items = [] + if self.inbound: + for _item in self.inbound: + if _item: + _items.append(_item.to_dict()) + _dict['inbound'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RulesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "inbound": [FirewallRuleRequest.from_dict(_item) for _item in obj["inbound"]] if obj.get("inbound") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/set_default_handle_response.py b/pfruck_contabo/models/set_default_handle_response.py new file mode 100644 index 00000000..ad54edd0 --- /dev/null +++ b/pfruck_contabo/models/set_default_handle_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.handle_response import HandleResponse +from pfruck_contabo.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class SetDefaultHandleResponse(BaseModel): + """ + SetDefaultHandleResponse + """ # noqa: E501 + data: List[HandleResponse] + links: SelfLinks = Field(alias="_links") + __properties: ClassVar[List[str]] = ["data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SetDefaultHandleResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SetDefaultHandleResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [HandleResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/src_cidr.py b/pfruck_contabo/models/src_cidr.py new file mode 100644 index 00000000..4284c0ac --- /dev/null +++ b/pfruck_contabo/models/src_cidr.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SrcCidr(BaseModel): + """ + SrcCidr + """ # noqa: E501 + ipv4: Optional[List[StrictStr]] = Field(default=None, description="IPv4 addresses in CIDR notation or \"AnyIPv4\" to allow all IPv4 sources (translates to 0.0.0.0/0)") + ipv6: Optional[List[StrictStr]] = Field(default=None, description="IPv6 addresses in CIDR notation or \"AnyIPv6\" to allow all IPv6 sources (translates to ::/0)") + __properties: ClassVar[List[str]] = ["ipv4", "ipv6"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SrcCidr from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SrcCidr from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ipv4": obj.get("ipv4"), + "ipv6": obj.get("ipv6") + }) + return _obj + + diff --git a/pfruck_contabo/models/tag_response.py b/pfruck_contabo/models/tag_response.py index a37485c2..9e5860b3 100644 --- a/pfruck_contabo/models/tag_response.py +++ b/pfruck_contabo/models/tag_response.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List from typing_extensions import Annotated from typing import Optional, Set @@ -32,7 +32,8 @@ class TagResponse(BaseModel): tag_id: StrictInt = Field(description="Tag's id", alias="tagId") name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="Tag's name") color: Annotated[str, Field(min_length=4, strict=True, max_length=7)] = Field(description="Tag's color") - __properties: ClassVar[List[str]] = ["tenantId", "customerId", "tagId", "name", "color"] + description: StrictStr = Field(description="The description of the Tag") + __properties: ClassVar[List[str]] = ["tenantId", "customerId", "tagId", "name", "color", "description"] model_config = ConfigDict( populate_by_name=True, @@ -89,7 +90,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "customerId": obj.get("customerId"), "tagId": obj.get("tagId"), "name": obj.get("name"), - "color": obj.get("color") + "color": obj.get("color"), + "description": obj.get("description") }) return _obj diff --git a/pfruck_contabo/models/unassign_instance_firewall_response.py b/pfruck_contabo/models/unassign_instance_firewall_response.py new file mode 100644 index 00000000..e4442c68 --- /dev/null +++ b/pfruck_contabo/models/unassign_instance_firewall_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.instance_assignment_self_links1 import InstanceAssignmentSelfLinks1 +from typing import Optional, Set +from typing_extensions import Self + +class UnassignInstanceFirewallResponse(BaseModel): + """ + UnassignInstanceFirewallResponse + """ # noqa: E501 + links: InstanceAssignmentSelfLinks1 = Field(description="Links for easy navigation.", alias="_links") + __properties: ClassVar[List[str]] = ["_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnassignInstanceFirewallResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UnassignInstanceFirewallResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": InstanceAssignmentSelfLinks1.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/update_dns_zone_record_request.py b/pfruck_contabo/models/update_dns_zone_record_request.py new file mode 100644 index 00000000..7d086298 --- /dev/null +++ b/pfruck_contabo/models/update_dns_zone_record_request.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class UpdateDnsZoneRecordRequest(BaseModel): + """ + UpdateDnsZoneRecordRequest + """ # noqa: E501 + ttl: Union[StrictFloat, StrictInt] = Field(description="TTL") + prio: Union[StrictFloat, StrictInt] = Field(description="Prio") + type: StrictStr = Field(description="DNS record type") + data: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Data") + port: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Port") + weight: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Weight") + flag: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Flag") + tag: Optional[StrictStr] = Field(default=None, description="Tag") + __properties: ClassVar[List[str]] = ["ttl", "prio", "type", "data", "port", "weight", "flag", "tag"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['A', 'AAAA', 'CAA', 'CNAME', 'MX', 'SRV', 'TXT']): + raise ValueError("must be one of enum values ('A', 'AAAA', 'CAA', 'CNAME', 'MX', 'SRV', 'TXT')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateDnsZoneRecordRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateDnsZoneRecordRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ttl": obj.get("ttl"), + "prio": obj.get("prio"), + "type": obj.get("type"), + "data": obj.get("data"), + "port": obj.get("port"), + "weight": obj.get("weight"), + "flag": obj.get("flag"), + "tag": obj.get("tag") + }) + return _obj + + diff --git a/pfruck_contabo/models/update_ptr_record_request.py b/pfruck_contabo/models/update_ptr_record_request.py new file mode 100644 index 00000000..d526345e --- /dev/null +++ b/pfruck_contabo/models/update_ptr_record_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class UpdatePtrRecordRequest(BaseModel): + """ + UpdatePtrRecordRequest + """ # noqa: E501 + ptr: StrictStr = Field(description="PTR Record name") + __properties: ClassVar[List[str]] = ["ptr"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdatePtrRecordRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdatePtrRecordRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ptr": obj.get("ptr") + }) + return _obj + + diff --git a/pfruck_contabo/models/update_tag_request.py b/pfruck_contabo/models/update_tag_request.py index 49e4efc4..e0a561e4 100644 --- a/pfruck_contabo/models/update_tag_request.py +++ b/pfruck_contabo/models/update_tag_request.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from typing import Optional, Set @@ -29,7 +29,8 @@ class UpdateTagRequest(BaseModel): """ # noqa: E501 name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]] = Field(default=None, description="The name of the tag. Tags may contain letters, numbers, colons, dashes, and underscores. There is a limit of 255 characters per tag.") color: Optional[Annotated[str, Field(min_length=4, strict=True, max_length=7)]] = Field(default=None, description="The color of the tag. Color can be specified using hexadecimal value. Default color is #0A78C3") - __properties: ClassVar[List[str]] = ["name", "color"] + description: Optional[StrictStr] = Field(default=None, description="The description of the Tag name. ") + __properties: ClassVar[List[str]] = ["name", "color", "description"] model_config = ConfigDict( populate_by_name=True, @@ -83,7 +84,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "name": obj.get("name"), - "color": obj.get("color") + "color": obj.get("color"), + "description": obj.get("description") }) return _obj diff --git a/pfruck_contabo/models/update_user_request.py b/pfruck_contabo/models/update_user_request.py index 39b39da2..24656be8 100644 --- a/pfruck_contabo/models/update_user_request.py +++ b/pfruck_contabo/models/update_user_request.py @@ -32,7 +32,7 @@ class UpdateUserRequest(BaseModel): email: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]] = Field(default=None, description="The email of the user to which activation and forgot password links are being sent to. There is a limit of 255 characters per email.") enabled: Optional[StrictBool] = Field(default=None, description="If user is not enabled, he can't login and thus use services any longer.") totp: Optional[StrictBool] = Field(default=None, description="Enable or disable two-factor authentication (2FA) via time based OTP.") - locale: Optional[StrictStr] = Field(default=None, description="The locale of the user. This can be `de-DE`, `de`, `en-US`, `en`") + locale: Optional[StrictStr] = Field(default=None, description="The locale of the user. This can be `de-DE`, `de`, `en-US`, `en`, `es-ES`, `es`, `pt-BR`, `pt`.") roles: Optional[List[StrictInt]] = Field(default=None, description="The roles as list of `roleId`s of the user.") __properties: ClassVar[List[str]] = ["firstName", "lastName", "email", "enabled", "totp", "locale", "roles"] @@ -42,8 +42,8 @@ def locale_validate_enum(cls, value): if value is None: return value - if value not in set(['de-DE', 'de', 'en-US', 'en']): - raise ValueError("must be one of enum values ('de-DE', 'de', 'en-US', 'en')") + if value not in set(['de-DE', 'de', 'en-US', 'en', 'es', 'es-ES', 'pt-BR', 'pt']): + raise ValueError("must be one of enum values ('de-DE', 'de', 'en-US', 'en', 'es', 'es-ES', 'pt-BR', 'pt')") return value model_config = ConfigDict( diff --git a/pfruck_contabo/models/upgrade_instance_request.py b/pfruck_contabo/models/upgrade_instance_request.py index b6b874c3..58db2bb2 100644 --- a/pfruck_contabo/models/upgrade_instance_request.py +++ b/pfruck_contabo/models/upgrade_instance_request.py @@ -27,7 +27,8 @@ class UpgradeInstanceRequest(BaseModel): UpgradeInstanceRequest """ # noqa: E501 private_networking: Optional[Dict[str, Any]] = Field(default=None, description="Set this attribute if you want to upgrade your instance with the Private Networking addon. Please provide an empty object for the time being as value. There will be more configuration possible in the future.", alias="privateNetworking") - __properties: ClassVar[List[str]] = ["privateNetworking"] + backup: Optional[Dict[str, Any]] = Field(default=None, description="Set this attribute if you want to upgrade your instance with the Automated Backup addon. Please provide an empty object for the time being as value. There will be more configuration possible in the future.") + __properties: ClassVar[List[str]] = ["privateNetworking", "backup"] model_config = ConfigDict( populate_by_name=True, @@ -80,7 +81,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "privateNetworking": obj.get("privateNetworking") + "privateNetworking": obj.get("privateNetworking"), + "backup": obj.get("backup") }) return _obj diff --git a/pfruck_contabo/models/upgrade_object_storage_response_data.py b/pfruck_contabo/models/upgrade_object_storage_response_data.py index 801a7a59..ab94c6d3 100644 --- a/pfruck_contabo/models/upgrade_object_storage_response_data.py +++ b/pfruck_contabo/models/upgrade_object_storage_response_data.py @@ -44,8 +44,8 @@ class UpgradeObjectStorageResponseData(BaseModel): @field_validator('status') def status_validate_enum(cls, value): """Validates the enum""" - if value not in set(['READY', 'PROVISIONING', 'UPGRADING', 'CANCELLED', 'ERROR', 'ENABLED', 'DISABLED', 'MANUAL_PROVISIONING', 'PRODUCT_NOT_AVAILABLE', 'LIMIT_EXCEEDED', 'VERIFICATION_REQUIRED', 'COMPLETED', 'ORDER_PROCESSING', 'PENDING_PAYMENT', 'UNKNOWN']): - raise ValueError("must be one of enum values ('READY', 'PROVISIONING', 'UPGRADING', 'CANCELLED', 'ERROR', 'ENABLED', 'DISABLED', 'MANUAL_PROVISIONING', 'PRODUCT_NOT_AVAILABLE', 'LIMIT_EXCEEDED', 'VERIFICATION_REQUIRED', 'COMPLETED', 'ORDER_PROCESSING', 'PENDING_PAYMENT', 'UNKNOWN')") + if value not in set(['READY', 'PROVISIONING', 'UPGRADING', 'CANCELLED', 'ERROR', 'DISABLED', 'MANUAL_PROVISIONING', 'PRODUCT_NOT_AVAILABLE', 'LIMIT_EXCEEDED', 'VERIFICATION_REQUIRED', 'ORDER_PROCESSING', 'PENDING_PAYMENT', 'UNKNOWN']): + raise ValueError("must be one of enum values ('READY', 'PROVISIONING', 'UPGRADING', 'CANCELLED', 'ERROR', 'DISABLED', 'MANUAL_PROVISIONING', 'PRODUCT_NOT_AVAILABLE', 'LIMIT_EXCEEDED', 'VERIFICATION_REQUIRED', 'ORDER_PROCESSING', 'PENDING_PAYMENT', 'UNKNOWN')") return value model_config = ConfigDict( diff --git a/pfruck_contabo/models/user_response.py b/pfruck_contabo/models/user_response.py index 5e6f254a..9847af17 100644 --- a/pfruck_contabo/models/user_response.py +++ b/pfruck_contabo/models/user_response.py @@ -37,7 +37,7 @@ class UserResponse(BaseModel): email_verified: StrictBool = Field(description="User email verification status.", alias="emailVerified") enabled: StrictBool = Field(description="If uses is not enabled, he can't login and thus use services any longer.") totp: StrictBool = Field(description="Enable or disable two-factor authentication (2FA) via time based OTP.") - locale: StrictStr = Field(description="The locale of the user. This can be `de-DE`, `de`, `en-US`, `en`") + locale: StrictStr = Field(description="The locale of the user. This can be `de-DE`, `de`, `en-US`, `en`, `es-ES`, `es`, `pt-BR`, `pt`.") roles: List[RoleResponse] = Field(description="The roles as list of `roleId`s of the user.") owner: StrictBool = Field(description="If user is owner he will have permissions to all API endpoints and resources. Enabling this will superseed all role definitions and `accessAllResources`.") __properties: ClassVar[List[str]] = ["tenantId", "customerId", "userId", "firstName", "lastName", "email", "emailVerified", "enabled", "totp", "locale", "roles", "owner"] @@ -45,8 +45,8 @@ class UserResponse(BaseModel): @field_validator('locale') def locale_validate_enum(cls, value): """Validates the enum""" - if value not in set(['de-DE', 'de', 'en-US', 'en']): - raise ValueError("must be one of enum values ('de-DE', 'de', 'en-US', 'en')") + if value not in set(['de-DE', 'de', 'en-US', 'en', 'es', 'es-ES', 'pt-BR', 'pt']): + raise ValueError("must be one of enum values ('de-DE', 'de', 'en-US', 'en', 'es', 'es-ES', 'pt-BR', 'pt')") return value model_config = ConfigDict( diff --git a/pfruck_contabo/models/vip_response.py b/pfruck_contabo/models/vip_response.py index 0ddda31b..7a186e8a 100644 --- a/pfruck_contabo/models/vip_response.py +++ b/pfruck_contabo/models/vip_response.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from pfruck_contabo.models.ip_v41 import IpV41 +from pfruck_contabo.models.ip_v4 import IpV4 from typing import Optional, Set from typing_extensions import Self @@ -39,7 +39,7 @@ class VipResponse(BaseModel): resource_display_name: StrictStr = Field(description="Resource display name.", alias="resourceDisplayName") ip_version: StrictStr = Field(description="Version of Ip.", alias="ipVersion") type: Optional[StrictStr] = Field(default=None, description="The VIP type.") - v4: Optional[IpV41] = None + v4: Optional[IpV4] = None __properties: ClassVar[List[str]] = ["tenantId", "customerId", "vipId", "dataCenter", "region", "resourceId", "resourceType", "resourceName", "resourceDisplayName", "ipVersion", "type", "v4"] @field_validator('resource_type') @@ -134,7 +134,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "resourceDisplayName": obj.get("resourceDisplayName"), "ipVersion": obj.get("ipVersion"), "type": obj.get("type"), - "v4": IpV41.from_dict(obj["v4"]) if obj.get("v4") is not None else None + "v4": IpV4.from_dict(obj["v4"]) if obj.get("v4") is not None else None }) return _obj diff --git a/pfruck_contabo/models/zone_audit_response.py b/pfruck_contabo/models/zone_audit_response.py new file mode 100644 index 00000000..d60ee74b --- /dev/null +++ b/pfruck_contabo/models/zone_audit_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from pfruck_contabo.models.links import Links +from pfruck_contabo.models.pagination_meta import PaginationMeta +from pfruck_contabo.models.zone_audit_response_data import ZoneAuditResponseData +from typing import Optional, Set +from typing_extensions import Self + +class ZoneAuditResponse(BaseModel): + """ + ZoneAuditResponse + """ # noqa: E501 + pagination: PaginationMeta = Field(description="Data about pagination like how many results, pages, page size.", alias="_pagination") + data: List[ZoneAuditResponseData] + links: Links = Field(alias="_links") + __properties: ClassVar[List[str]] = ["_pagination", "data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ZoneAuditResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['_pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ZoneAuditResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_pagination": PaginationMeta.from_dict(obj["_pagination"]) if obj.get("_pagination") is not None else None, + "data": [ZoneAuditResponseData.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "_links": Links.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/pfruck_contabo/models/zone_audit_response_data.py b/pfruck_contabo/models/zone_audit_response_data.py new file mode 100644 index 00000000..12d3fc2b --- /dev/null +++ b/pfruck_contabo/models/zone_audit_response_data.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ZoneAuditResponseData(BaseModel): + """ + ZoneAuditResponseData + """ # noqa: E501 + id: StrictInt = Field(description="The ID of the audit entry.") + action: StrictStr = Field(description="Type of the action.") + timestamp: datetime = Field(description="When the change took place.") + tenant_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Customer tenant id", alias="tenantId") + customer_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Customer ID", alias="customerId") + changed_by: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Id of user who performed the change", alias="changedBy") + username: StrictStr = Field(description="Name of the user which led to the change.") + request_id: StrictStr = Field(description="The requestId of the API call which led to the change.", alias="requestId") + trace_id: StrictStr = Field(description="The traceId of the API call which led to the change.", alias="traceId") + name: StrictStr = Field(description="DNS Zone name") + changes: Optional[Dict[str, Any]] = Field(default=None, description="List of actual changes.") + __properties: ClassVar[List[str]] = ["id", "action", "timestamp", "tenantId", "customerId", "changedBy", "username", "requestId", "traceId", "name", "changes"] + + @field_validator('action') + def action_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['CREATED', 'UPDATED', 'DELETED']): + raise ValueError("must be one of enum values ('CREATED', 'UPDATED', 'DELETED')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ZoneAuditResponseData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ZoneAuditResponseData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "action": obj.get("action"), + "timestamp": obj.get("timestamp"), + "tenantId": obj.get("tenantId"), + "customerId": obj.get("customerId"), + "changedBy": obj.get("changedBy"), + "username": obj.get("username"), + "requestId": obj.get("requestId"), + "traceId": obj.get("traceId"), + "name": obj.get("name"), + "changes": obj.get("changes") + }) + return _obj + + diff --git a/setup.py b/setup.py index 9d058fce..1b4bc7fd 100644 --- a/setup.py +++ b/setup.py @@ -119,18 +119,18 @@ # Enter a context with an instance of the API client with pfruck_contabo.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = pfruck_contabo.ImagesApi(api_client) + api_instance = pfruck_contabo.CheckCollectionTemplatesApi(api_client) x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually. - create_custom_image_request = pfruck_contabo.CreateCustomImageRequest() # CreateCustomImageRequest | + check_collection_template_id = 12345 # float | Check collection template's id x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional) try: - # Provide a custom image - api_response = api_instance.create_custom_image(x_request_id, create_custom_image_request, x_trace_id=x_trace_id) - print("The response of ImagesApi->create_custom_image:\\n") + # Get check + api_response = api_instance.get_ext_check_collection_template(x_request_id, check_collection_template_id, x_trace_id=x_trace_id) + print("The response of CheckCollectionTemplatesApi->get_ext_check_collection_template:\\n") pprint(api_response) except ApiException as e: - print("Exception when calling ImagesApi->create_custom_image: %s\\n" % e) + print("Exception when calling CheckCollectionTemplatesApi->get_ext_check_collection_template: %s\\n" % e) ``` @@ -140,6 +140,62 @@ Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*CheckCollectionTemplatesApi* | [**get_ext_check_collection_template**](https://github.com/p-fruck/python-contabo/blob/main/docs/CheckCollectionTemplatesApi.md#get_ext_check_collection_template) | **GET** /v1/troubleshooting/check-collection-templates/{checkCollectionTemplateId} | Get check +*CheckCollectionTemplatesApi* | [**list_ext_check_collection_templates**](https://github.com/p-fruck/python-contabo/blob/main/docs/CheckCollectionTemplatesApi.md#list_ext_check_collection_templates) | **GET** /v1/troubleshooting/check-collection-templates | List check collection templates +*CheckCollectionsApi* | [**cancel_ext_check_collection**](https://github.com/p-fruck/python-contabo/blob/main/docs/CheckCollectionsApi.md#cancel_ext_check_collection) | **PATCH** /v1/troubleshooting/check-collections/{checkCollectionId} | Cancel check collection +*CheckCollectionsApi* | [**get_ext_check_collection**](https://github.com/p-fruck/python-contabo/blob/main/docs/CheckCollectionsApi.md#get_ext_check_collection) | **GET** /v1/troubleshooting/check-collections/{checkCollectionId} | Get check collection +*CheckCollectionsApi* | [**list_ext_check_collections**](https://github.com/p-fruck/python-contabo/blob/main/docs/CheckCollectionsApi.md#list_ext_check_collections) | **GET** /v1/troubleshooting/check-collections | List check collections +*CheckCollectionsApi* | [**start_ext_check_collection**](https://github.com/p-fruck/python-contabo/blob/main/docs/CheckCollectionsApi.md#start_ext_check_collection) | **POST** /v1/troubleshooting/check-collections | Start check collection +*ChecksApi* | [**cancel_ext_check**](https://github.com/p-fruck/python-contabo/blob/main/docs/ChecksApi.md#cancel_ext_check) | **PATCH** /v1/troubleshooting/checks/{checkId} | Cancel check +*ChecksApi* | [**get_ext_check**](https://github.com/p-fruck/python-contabo/blob/main/docs/ChecksApi.md#get_ext_check) | **GET** /v1/troubleshooting/checks/{checkId} | Get check +*ChecksApi* | [**list_ext_checks**](https://github.com/p-fruck/python-contabo/blob/main/docs/ChecksApi.md#list_ext_checks) | **GET** /v1/troubleshooting/checks | List check +*ChecksApi* | [**start_ext_check**](https://github.com/p-fruck/python-contabo/blob/main/docs/ChecksApi.md#start_ext_check) | **POST** /v1/troubleshooting/checks | Start check +*DNSApi* | [**bulk_delete_dns_zone_records**](https://github.com/p-fruck/python-contabo/blob/main/docs/DNSApi.md#bulk_delete_dns_zone_records) | **DELETE** /v1/dns/zones/{zoneName}/records/bulk | Bulk delete DNS zone records +*DNSApi* | [**create_dns_zone**](https://github.com/p-fruck/python-contabo/blob/main/docs/DNSApi.md#create_dns_zone) | **POST** /v1/dns/zones | Create DNS zone +*DNSApi* | [**create_dns_zone_record**](https://github.com/p-fruck/python-contabo/blob/main/docs/DNSApi.md#create_dns_zone_record) | **POST** /v1/dns/zones/{zoneName}/records | Create DNS zone record +*DNSApi* | [**create_ptr_record**](https://github.com/p-fruck/python-contabo/blob/main/docs/DNSApi.md#create_ptr_record) | **POST** /v1/dns/ptrs | Create a new PTR Record using ip address +*DNSApi* | [**delete_dns_zone**](https://github.com/p-fruck/python-contabo/blob/main/docs/DNSApi.md#delete_dns_zone) | **DELETE** /v1/dns/zones/{zoneName} | Delete a DNS zone. +*DNSApi* | [**delete_dns_zone_record**](https://github.com/p-fruck/python-contabo/blob/main/docs/DNSApi.md#delete_dns_zone_record) | **DELETE** /v1/dns/zones/{zoneName}/records/{recordId} | Delete a DNS zone record +*DNSApi* | [**delete_ptr_record**](https://github.com/p-fruck/python-contabo/blob/main/docs/DNSApi.md#delete_ptr_record) | **DELETE** /v1/dns/ptrs/{ipAddress} | Delete a PTR Record using ip address +*DNSApi* | [**retrieve_dns_zone**](https://github.com/p-fruck/python-contabo/blob/main/docs/DNSApi.md#retrieve_dns_zone) | **GET** /v1/dns/zones/{zoneName} | Retrieve a DNS Zone by zone name +*DNSApi* | [**retrieve_dns_zone_records_list**](https://github.com/p-fruck/python-contabo/blob/main/docs/DNSApi.md#retrieve_dns_zone_records_list) | **GET** /v1/dns/zones/{zoneName}/records | List a DNS Zone's records +*DNSApi* | [**retrieve_dns_zones_list**](https://github.com/p-fruck/python-contabo/blob/main/docs/DNSApi.md#retrieve_dns_zones_list) | **GET** /v1/dns/zones | List DNS zones +*DNSApi* | [**retrieve_ptr_record**](https://github.com/p-fruck/python-contabo/blob/main/docs/DNSApi.md#retrieve_ptr_record) | **GET** /v1/dns/ptrs/{ipAddress} | Retrieve a PTR Record by ip address +*DNSApi* | [**retrieve_ptr_records_list**](https://github.com/p-fruck/python-contabo/blob/main/docs/DNSApi.md#retrieve_ptr_records_list) | **GET** /v1/dns/ptrs | List PTR records +*DNSApi* | [**update_dns_zone_record**](https://github.com/p-fruck/python-contabo/blob/main/docs/DNSApi.md#update_dns_zone_record) | **PATCH** /v1/dns/zones/{zoneName}/records/{recordId} | Update DNS zone record +*DNSApi* | [**update_ptr_record**](https://github.com/p-fruck/python-contabo/blob/main/docs/DNSApi.md#update_ptr_record) | **PUT** /v1/dns/ptrs/{ipAddress} | Edit a PTR Record by ip address +*DNSAuditsApi* | [**retrieve_dns_audits_list**](https://github.com/p-fruck/python-contabo/blob/main/docs/DNSAuditsApi.md#retrieve_dns_audits_list) | **GET** /v1/dns/zones/audits | List history about your DNS Zones (audit) +*DNSAuditsApi* | [**retrieve_record_audits_list**](https://github.com/p-fruck/python-contabo/blob/main/docs/DNSAuditsApi.md#retrieve_record_audits_list) | **GET** /v1/dns/records/audits | List history about your DNS Records (audit) +*DomainsApi* | [**cancel_domain**](https://github.com/p-fruck/python-contabo/blob/main/docs/DomainsApi.md#cancel_domain) | **POST** /v1/domains/{domain}/cancel | Cancel a specific domain +*DomainsApi* | [**confirm_domain_transfer_out**](https://github.com/p-fruck/python-contabo/blob/main/docs/DomainsApi.md#confirm_domain_transfer_out) | **POST** /v1/domains/{domain}/transfer-out | Confirm transfer out for a domain +*DomainsApi* | [**confirm_domain_transfer_out_0**](https://github.com/p-fruck/python-contabo/blob/main/docs/DomainsApi.md#confirm_domain_transfer_out_0) | **POST** /v1/domains/{domain}/transfer-out | Confirm transfer out for a domain +*DomainsApi* | [**get_auth_code**](https://github.com/p-fruck/python-contabo/blob/main/docs/DomainsApi.md#get_auth_code) | **POST** /v1/domains/{domain}/generate-auth-code | Get auth code for a domain +*DomainsApi* | [**list_domains**](https://github.com/p-fruck/python-contabo/blob/main/docs/DomainsApi.md#list_domains) | **GET** /v1/domains | List all domains +*DomainsApi* | [**order_domain**](https://github.com/p-fruck/python-contabo/blob/main/docs/DomainsApi.md#order_domain) | **POST** /v1/domains | Create or transfer a domain +*DomainsApi* | [**retrieve_domain**](https://github.com/p-fruck/python-contabo/blob/main/docs/DomainsApi.md#retrieve_domain) | **GET** /v1/domains/{domain} | List specific domain +*DomainsApi* | [**revoke_cancel_domain**](https://github.com/p-fruck/python-contabo/blob/main/docs/DomainsApi.md#revoke_cancel_domain) | **POST** /v1/domains/{domain}/revoke-cancellation | Revoke cancellation for a specific domain +*DomainsApi* | [**revoke_domain_transfer_out**](https://github.com/p-fruck/python-contabo/blob/main/docs/DomainsApi.md#revoke_domain_transfer_out) | **DELETE** /v1/domains/{domain}/transfer-out | Revoke transfer out for a domain +*DomainsApi* | [**revoke_domain_transfer_out_0**](https://github.com/p-fruck/python-contabo/blob/main/docs/DomainsApi.md#revoke_domain_transfer_out_0) | **DELETE** /v1/domains/{domain}/transfer-out | Revoke transfer out for a domain +*DomainsApi* | [**update_domain**](https://github.com/p-fruck/python-contabo/blob/main/docs/DomainsApi.md#update_domain) | **PATCH** /v1/domains/{domain} | Update a specific domain +*DomainsApi* | [**validate_domain_availability**](https://github.com/p-fruck/python-contabo/blob/main/docs/DomainsApi.md#validate_domain_availability) | **POST** /v1/registries-domains/{domain}/check-availability | Check domain availablility +*DomainsAuditsApi* | [**retrieve_domains_audits_list**](https://github.com/p-fruck/python-contabo/blob/main/docs/DomainsAuditsApi.md#retrieve_domains_audits_list) | **GET** /v1/domains/audits | List history about your Domains (audit) +*FirewallsApi* | [**assign_instance_firewall**](https://github.com/p-fruck/python-contabo/blob/main/docs/FirewallsApi.md#assign_instance_firewall) | **POST** /v1/firewalls/{firewallId}/instances/{instanceId} | Add instance to a firewall +*FirewallsApi* | [**create_firewall**](https://github.com/p-fruck/python-contabo/blob/main/docs/FirewallsApi.md#create_firewall) | **POST** /v1/firewalls | Create a new firewall definition +*FirewallsApi* | [**delete_firewall**](https://github.com/p-fruck/python-contabo/blob/main/docs/FirewallsApi.md#delete_firewall) | **DELETE** /v1/firewalls/{firewallId} | Delete existing firewall by id +*FirewallsApi* | [**patch_firewall**](https://github.com/p-fruck/python-contabo/blob/main/docs/FirewallsApi.md#patch_firewall) | **PATCH** /v1/firewalls/{firewallId} | Update a firewall by id +*FirewallsApi* | [**put_firewall**](https://github.com/p-fruck/python-contabo/blob/main/docs/FirewallsApi.md#put_firewall) | **PUT** /v1/firewalls/{firewallId} | Update specific firewall rules +*FirewallsApi* | [**retrieve_firewall**](https://github.com/p-fruck/python-contabo/blob/main/docs/FirewallsApi.md#retrieve_firewall) | **GET** /v1/firewalls/{firewallId} | Get specific firewall by its id +*FirewallsApi* | [**retrieve_firewall_list**](https://github.com/p-fruck/python-contabo/blob/main/docs/FirewallsApi.md#retrieve_firewall_list) | **GET** /v1/firewalls | List all firewalls +*FirewallsApi* | [**retrieve_preset_rules**](https://github.com/p-fruck/python-contabo/blob/main/docs/FirewallsApi.md#retrieve_preset_rules) | **GET** /v1/firewalls/preset-rules | Get all preset rules +*FirewallsApi* | [**unassign_instance_firewall**](https://github.com/p-fruck/python-contabo/blob/main/docs/FirewallsApi.md#unassign_instance_firewall) | **DELETE** /v1/firewalls/{firewallId}/instances/{instanceId} | Remove instance from a firewall +*FirewallsAuditsApi* | [**retrieve_firewall_audits_list**](https://github.com/p-fruck/python-contabo/blob/main/docs/FirewallsAuditsApi.md#retrieve_firewall_audits_list) | **GET** /v1/firewalls/audits | List history about your Firewalls (audit) +*HandlesApi* | [**create_handle**](https://github.com/p-fruck/python-contabo/blob/main/docs/HandlesApi.md#create_handle) | **POST** /v1/domains/handles | Create specific handle +*HandlesApi* | [**list_handles**](https://github.com/p-fruck/python-contabo/blob/main/docs/HandlesApi.md#list_handles) | **GET** /v1/domains/handles | List all handles +*HandlesApi* | [**remove_handle**](https://github.com/p-fruck/python-contabo/blob/main/docs/HandlesApi.md#remove_handle) | **DELETE** /v1/domains/handles/{handleId} | Remove specific handle +*HandlesApi* | [**retrieve_handle**](https://github.com/p-fruck/python-contabo/blob/main/docs/HandlesApi.md#retrieve_handle) | **GET** /v1/domains/handles/{handleId} | Get specific handle +*HandlesApi* | [**set_default_handle**](https://github.com/p-fruck/python-contabo/blob/main/docs/HandlesApi.md#set_default_handle) | **PATCH** /v1/domains/handles/{handleId}/default | Set default handle +*HandlesApi* | [**update_handle**](https://github.com/p-fruck/python-contabo/blob/main/docs/HandlesApi.md#update_handle) | **PUT** /v1/domains/handles/{handleId} | Update specific handle +*HandlesAuditsApi* | [**retrieve_handles_audits_list**](https://github.com/p-fruck/python-contabo/blob/main/docs/HandlesAuditsApi.md#retrieve_handles_audits_list) | **GET** /v1/domains/handles/audits | List history about your handles (audit) *ImagesApi* | [**create_custom_image**](https://github.com/p-fruck/python-contabo/blob/main/docs/ImagesApi.md#create_custom_image) | **POST** /v1/compute/images | Provide a custom image *ImagesApi* | [**delete_image**](https://github.com/p-fruck/python-contabo/blob/main/docs/ImagesApi.md#delete_image) | **DELETE** /v1/compute/images/{imageId} | Delete an uploaded custom image by its id *ImagesApi* | [**retrieve_custom_images_stats**](https://github.com/p-fruck/python-contabo/blob/main/docs/ImagesApi.md#retrieve_custom_images_stats) | **GET** /v1/compute/images/stats | List statistics regarding the customer's custom images @@ -162,8 +218,30 @@ *InstancesApi* | [**retrieve_instances_list**](https://github.com/p-fruck/python-contabo/blob/main/docs/InstancesApi.md#retrieve_instances_list) | **GET** /v1/compute/instances | List instances *InstancesApi* | [**upgrade_instance**](https://github.com/p-fruck/python-contabo/blob/main/docs/InstancesApi.md#upgrade_instance) | **POST** /v1/compute/instances/{instanceId}/upgrade | Upgrading instance capabilities *InstancesAuditsApi* | [**retrieve_instances_audits_list**](https://github.com/p-fruck/python-contabo/blob/main/docs/InstancesAuditsApi.md#retrieve_instances_audits_list) | **GET** /v1/compute/instances/audits | List history about your instances (audit) -*InternalApi* | [**create_ticket**](https://github.com/p-fruck/python-contabo/blob/main/docs/InternalApi.md#create_ticket) | **POST** /v1/create-ticket | Create a new support ticket -*InternalApi* | [**retrieve_user_is_password_set**](https://github.com/p-fruck/python-contabo/blob/main/docs/InternalApi.md#retrieve_user_is_password_set) | **GET** /v1/users/is-password-set | Get user is password set status +*InternalCheckAuditsApi* | [**retrieve_checks_audits_list**](https://github.com/p-fruck/python-contabo/blob/main/docs/InternalCheckAuditsApi.md#retrieve_checks_audits_list) | **GET** /internal/v1/troubleshooting/checks/audits | List history about your Data (audit) +*InternalCheckCollectionAuditsApi* | [**retrieve_check_collections_audits_list**](https://github.com/p-fruck/python-contabo/blob/main/docs/InternalCheckCollectionAuditsApi.md#retrieve_check_collections_audits_list) | **GET** /internal/v1/troubleshooting/check-collections/audits | List history about your Data (audit) +*InternalCheckCollectionReplayApi* | [**replay_check_collection**](https://github.com/p-fruck/python-contabo/blob/main/docs/InternalCheckCollectionReplayApi.md#replay_check_collection) | **POST** /internal/v1/troubleshooting/check-collections/replays | Replay changes for Check +*InternalCheckCollectionTemplatesApi* | [**get_check_collection_template**](https://github.com/p-fruck/python-contabo/blob/main/docs/InternalCheckCollectionTemplatesApi.md#get_check_collection_template) | **GET** /internal/v1/troubleshooting/check-collection-templates/{orgId}/{checkCollectionTemplateId} | Get check +*InternalCheckCollectionTemplatesApi* | [**list_check_collection_templates**](https://github.com/p-fruck/python-contabo/blob/main/docs/InternalCheckCollectionTemplatesApi.md#list_check_collection_templates) | **GET** /internal/v1/troubleshooting/check-collection-templates | List check collection templates +*InternalCheckCollectionsApi* | [**cancel_check_collection**](https://github.com/p-fruck/python-contabo/blob/main/docs/InternalCheckCollectionsApi.md#cancel_check_collection) | **PATCH** /internal/v1/troubleshooting/check-collections/{orgId}/{checkCollectionId} | Cancel check collection +*InternalCheckCollectionsApi* | [**get_check_collection**](https://github.com/p-fruck/python-contabo/blob/main/docs/InternalCheckCollectionsApi.md#get_check_collection) | **GET** /internal/v1/troubleshooting/check-collections/{orgId}/{checkCollectionId} | Get check collection +*InternalCheckCollectionsApi* | [**list_check_collections**](https://github.com/p-fruck/python-contabo/blob/main/docs/InternalCheckCollectionsApi.md#list_check_collections) | **GET** /internal/v1/troubleshooting/check-collections | List check collections +*InternalCheckCollectionsApi* | [**start_check_collection**](https://github.com/p-fruck/python-contabo/blob/main/docs/InternalCheckCollectionsApi.md#start_check_collection) | **POST** /internal/v1/troubleshooting/check-collections | Start check collection +*InternalCheckReplayApi* | [**replay_check**](https://github.com/p-fruck/python-contabo/blob/main/docs/InternalCheckReplayApi.md#replay_check) | **POST** /internal/v1/troubleshooting/checks/replays | Replay changes for Check +*InternalCheckTemplatesApi* | [**get_check_template**](https://github.com/p-fruck/python-contabo/blob/main/docs/InternalCheckTemplatesApi.md#get_check_template) | **GET** /internal/v1/troubleshooting/check-templates/{orgId}/{checkTemplateId} | Get check +*InternalCheckTemplatesApi* | [**list_check_templates**](https://github.com/p-fruck/python-contabo/blob/main/docs/InternalCheckTemplatesApi.md#list_check_templates) | **GET** /internal/v1/troubleshooting/check-templates | List check templates +*InternalChecksApi* | [**cancel_check**](https://github.com/p-fruck/python-contabo/blob/main/docs/InternalChecksApi.md#cancel_check) | **PATCH** /internal/v1/troubleshooting/checks/{orgId}/{checkId} | Cancel check +*InternalChecksApi* | [**get_check**](https://github.com/p-fruck/python-contabo/blob/main/docs/InternalChecksApi.md#get_check) | **GET** /internal/v1/troubleshooting/checks/{orgId}/{checkId} | Get check +*InternalChecksApi* | [**list_checks**](https://github.com/p-fruck/python-contabo/blob/main/docs/InternalChecksApi.md#list_checks) | **GET** /internal/v1/troubleshooting/checks | List check +*InternalChecksApi* | [**start_check**](https://github.com/p-fruck/python-contabo/blob/main/docs/InternalChecksApi.md#start_check) | **POST** /internal/v1/troubleshooting/checks | Start check +*InternalRemediesApi* | [**cancel_remedy**](https://github.com/p-fruck/python-contabo/blob/main/docs/InternalRemediesApi.md#cancel_remedy) | **PATCH** /internal/v1/troubleshooting/remedies/{orgId}/{remedyId} | Cancel remedy +*InternalRemediesApi* | [**get_remedy**](https://github.com/p-fruck/python-contabo/blob/main/docs/InternalRemediesApi.md#get_remedy) | **GET** /internal/v1/troubleshooting/remedies/{orgId}/{remedyId} | Get remedy +*InternalRemediesApi* | [**list_remedies**](https://github.com/p-fruck/python-contabo/blob/main/docs/InternalRemediesApi.md#list_remedies) | **GET** /internal/v1/troubleshooting/remedies | List remedy +*InternalRemediesApi* | [**start_remedy**](https://github.com/p-fruck/python-contabo/blob/main/docs/InternalRemediesApi.md#start_remedy) | **POST** /internal/v1/troubleshooting/remedies | Start remedy +*InternalRemedyAuditsApi* | [**retrieve_remedies_audits_list**](https://github.com/p-fruck/python-contabo/blob/main/docs/InternalRemedyAuditsApi.md#retrieve_remedies_audits_list) | **GET** /internal/v1/troubleshooting/remedies/audits | List history about your Data (audit) +*InternalRemedyReplayApi* | [**replay_remedy**](https://github.com/p-fruck/python-contabo/blob/main/docs/InternalRemedyReplayApi.md#replay_remedy) | **POST** /internal/v1/troubleshooting/remedies/replays | Replay changes for Remedy +*InternalRemedyTemplatesApi* | [**get_remedy_template**](https://github.com/p-fruck/python-contabo/blob/main/docs/InternalRemedyTemplatesApi.md#get_remedy_template) | **GET** /internal/v1/troubleshooting/remedy-templates/{orgId}/{remedyTemplateId} | Get remedy +*InternalRemedyTemplatesApi* | [**list_remedy_templates**](https://github.com/p-fruck/python-contabo/blob/main/docs/InternalRemedyTemplatesApi.md#list_remedy_templates) | **GET** /internal/v1/troubleshooting/remedy-templates | List remedy templates *ObjectStoragesApi* | [**cancel_object_storage**](https://github.com/p-fruck/python-contabo/blob/main/docs/ObjectStoragesApi.md#cancel_object_storage) | **PATCH** /v1/object-storages/{objectStorageId}/cancel | Cancels the specified object storage at the next possible date *ObjectStoragesApi* | [**create_object_storage**](https://github.com/p-fruck/python-contabo/blob/main/docs/ObjectStoragesApi.md#create_object_storage) | **POST** /v1/object-storages | Create a new object storage *ObjectStoragesApi* | [**retrieve_data_center_list**](https://github.com/p-fruck/python-contabo/blob/main/docs/ObjectStoragesApi.md#retrieve_data_center_list) | **GET** /v1/data-centers | List data centers @@ -181,6 +259,10 @@ *PrivateNetworksApi* | [**retrieve_private_network_list**](https://github.com/p-fruck/python-contabo/blob/main/docs/PrivateNetworksApi.md#retrieve_private_network_list) | **GET** /v1/private-networks | List Private Networks *PrivateNetworksApi* | [**unassign_instance_private_network**](https://github.com/p-fruck/python-contabo/blob/main/docs/PrivateNetworksApi.md#unassign_instance_private_network) | **DELETE** /v1/private-networks/{privateNetworkId}/instances/{instanceId} | Remove instance from a Private Network *PrivateNetworksAuditsApi* | [**retrieve_private_network_audits_list**](https://github.com/p-fruck/python-contabo/blob/main/docs/PrivateNetworksAuditsApi.md#retrieve_private_network_audits_list) | **GET** /v1/private-networks/audits | List history about your Private Networks (audit) +*RemediesApi* | [**cancel_ext_remedy**](https://github.com/p-fruck/python-contabo/blob/main/docs/RemediesApi.md#cancel_ext_remedy) | **PATCH** /v1/troubleshooting/remedies/{remedyId} | Cancel remedy +*RemediesApi* | [**get_ext_remedy**](https://github.com/p-fruck/python-contabo/blob/main/docs/RemediesApi.md#get_ext_remedy) | **GET** /v1/troubleshooting/remedies/{remedyId} | Get remedy +*RemediesApi* | [**list_ext_remedies**](https://github.com/p-fruck/python-contabo/blob/main/docs/RemediesApi.md#list_ext_remedies) | **GET** /v1/troubleshooting/remedies | List remedy +*RemediesApi* | [**start_ext_remedy**](https://github.com/p-fruck/python-contabo/blob/main/docs/RemediesApi.md#start_ext_remedy) | **POST** /v1/troubleshooting/remedies | Start remedy *RolesApi* | [**create_role**](https://github.com/p-fruck/python-contabo/blob/main/docs/RolesApi.md#create_role) | **POST** /v1/roles | Create a new role *RolesApi* | [**delete_role**](https://github.com/p-fruck/python-contabo/blob/main/docs/RolesApi.md#delete_role) | **DELETE** /v1/roles/{roleId} | Delete existing role by id *RolesApi* | [**retrieve_api_permissions_list**](https://github.com/p-fruck/python-contabo/blob/main/docs/RolesApi.md#retrieve_api_permissions_list) | **GET** /v1/roles/api-permissions | List of API permissions @@ -215,16 +297,17 @@ *UsersApi* | [**create_user**](https://github.com/p-fruck/python-contabo/blob/main/docs/UsersApi.md#create_user) | **POST** /v1/users | Create a new user *UsersApi* | [**delete_user**](https://github.com/p-fruck/python-contabo/blob/main/docs/UsersApi.md#delete_user) | **DELETE** /v1/users/{userId} | Delete existing user by id *UsersApi* | [**generate_client_secret**](https://github.com/p-fruck/python-contabo/blob/main/docs/UsersApi.md#generate_client_secret) | **PUT** /v1/users/client/secret | Generate new client secret -*UsersApi* | [**get_object_storage_credentials**](https://github.com/p-fruck/python-contabo/blob/main/docs/UsersApi.md#get_object_storage_credentials) | **GET** /v1/users/{userId}/object-storages/{objectStorageId}/credentials/{credentialId} | Get S3 compatible object storage credentials. -*UsersApi* | [**list_object_storage_credentials**](https://github.com/p-fruck/python-contabo/blob/main/docs/UsersApi.md#list_object_storage_credentials) | **GET** /v1/users/{userId}/object-storages/credentials | Get list of S3 compatible object storage credentials for user. -*UsersApi* | [**regenerate_object_storage_credentials**](https://github.com/p-fruck/python-contabo/blob/main/docs/UsersApi.md#regenerate_object_storage_credentials) | **PATCH** /v1/users/{userId}/object-storages/{objectStorageId}/credentials/{credentialId} | Regenerates secret key of specified user for the S3 compatible object storages. *UsersApi* | [**resend_email_verification**](https://github.com/p-fruck/python-contabo/blob/main/docs/UsersApi.md#resend_email_verification) | **POST** /v1/users/{userId}/resend-email-verification | Resend email verification *UsersApi* | [**reset_password**](https://github.com/p-fruck/python-contabo/blob/main/docs/UsersApi.md#reset_password) | **POST** /v1/users/{userId}/reset-password | Send reset password email *UsersApi* | [**retrieve_user**](https://github.com/p-fruck/python-contabo/blob/main/docs/UsersApi.md#retrieve_user) | **GET** /v1/users/{userId} | Get specific user by id *UsersApi* | [**retrieve_user_client**](https://github.com/p-fruck/python-contabo/blob/main/docs/UsersApi.md#retrieve_user_client) | **GET** /v1/users/client | Get client +*UsersApi* | [**retrieve_user_is_password_set**](https://github.com/p-fruck/python-contabo/blob/main/docs/UsersApi.md#retrieve_user_is_password_set) | **GET** /v1/users/is-password-set | Get user is password set status *UsersApi* | [**retrieve_user_list**](https://github.com/p-fruck/python-contabo/blob/main/docs/UsersApi.md#retrieve_user_list) | **GET** /v1/users | List users *UsersApi* | [**update_user**](https://github.com/p-fruck/python-contabo/blob/main/docs/UsersApi.md#update_user) | **PATCH** /v1/users/{userId} | Update specific user by id *UsersAuditsApi* | [**retrieve_user_audits_list**](https://github.com/p-fruck/python-contabo/blob/main/docs/UsersAuditsApi.md#retrieve_user_audits_list) | **GET** /v1/users/audits | List history about your users (audit) +*UsersObjectStorageCredentialsApi* | [**get_object_storage_credentials**](https://github.com/p-fruck/python-contabo/blob/main/docs/UsersObjectStorageCredentialsApi.md#get_object_storage_credentials) | **GET** /v1/users/{userId}/object-storages/{objectStorageId}/credentials/{credentialId} | Get S3 compatible object storage credentials. +*UsersObjectStorageCredentialsApi* | [**list_object_storage_credentials**](https://github.com/p-fruck/python-contabo/blob/main/docs/UsersObjectStorageCredentialsApi.md#list_object_storage_credentials) | **GET** /v1/users/{userId}/object-storages/credentials | Get list of S3 compatible object storage credentials for user. +*UsersObjectStorageCredentialsApi* | [**regenerate_object_storage_credentials**](https://github.com/p-fruck/python-contabo/blob/main/docs/UsersObjectStorageCredentialsApi.md#regenerate_object_storage_credentials) | **PATCH** /v1/users/{userId}/object-storages/{objectStorageId}/credentials/{credentialId} | Regenerates secret key of specified user for the S3 compatible object storages. *VIPApi* | [**assign_ip**](https://github.com/p-fruck/python-contabo/blob/main/docs/VIPApi.md#assign_ip) | **POST** /v1/vips/{ip}/{resourceType}/{resourceId} | Assign a VIP to an VPS/VDS/Bare Metal *VIPApi* | [**retrieve_vip**](https://github.com/p-fruck/python-contabo/blob/main/docs/VIPApi.md#retrieve_vip) | **GET** /v1/vips/{ip} | Get specific VIP by ip *VIPApi* | [**retrieve_vip_list**](https://github.com/p-fruck/python-contabo/blob/main/docs/VIPApi.md#retrieve_vip_list) | **GET** /v1/vips | List VIPs @@ -234,25 +317,67 @@ ## Documentation For Models + - [AccountOrgResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/AccountOrgResponse.md) + - [AccountsListResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/AccountsListResponse.md) - [AddOnQuantityRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/AddOnQuantityRequest.md) - [AddOnRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/AddOnRequest.md) - [AddOnResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/AddOnResponse.md) - [AdditionalIp](https://github.com/p-fruck/python-contabo/blob/main/docs/AdditionalIp.md) + - [ApiBulkDeleteDnsZoneRecordsResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ApiBulkDeleteDnsZoneRecordsResponse.md) + - [ApiDnsZoneRecordResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ApiDnsZoneRecordResponse.md) + - [ApiDnsZoneResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ApiDnsZoneResponse.md) - [ApiPermissionsResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ApiPermissionsResponse.md) + - [ApiPtrRecordResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ApiPtrRecordResponse.md) - [ApplicationConfig](https://github.com/p-fruck/python-contabo/blob/main/docs/ApplicationConfig.md) + - [ApplicationMetaData](https://github.com/p-fruck/python-contabo/blob/main/docs/ApplicationMetaData.md) - [ApplicationRequirements](https://github.com/p-fruck/python-contabo/blob/main/docs/ApplicationRequirements.md) - [ApplicationResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ApplicationResponse.md) + - [AssignInstanceFirewallResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/AssignInstanceFirewallResponse.md) - [AssignInstancePrivateNetworkResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/AssignInstancePrivateNetworkResponse.md) - [AssignVipResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/AssignVipResponse.md) - [AssignedTagResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/AssignedTagResponse.md) - [AssignmentAuditResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/AssignmentAuditResponse.md) - [AssignmentResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/AssignmentResponse.md) + - [AuditCountResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/AuditCountResponse.md) - [AutoScalingTypeRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/AutoScalingTypeRequest.md) - [AutoScalingTypeResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/AutoScalingTypeResponse.md) + - [BaseCheckCollectionCreateRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/BaseCheckCollectionCreateRequest.md) + - [BaseCheckCreateRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/BaseCheckCreateRequest.md) + - [BaseRemedyCreateRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/BaseRemedyCreateRequest.md) + - [BulkDeleteDnsZoneRecordsRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/BulkDeleteDnsZoneRecordsRequest.md) + - [BulkDeleteResultResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/BulkDeleteResultResponse.md) + - [CancelDomainRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/CancelDomainRequest.md) + - [CancelInstanceRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/CancelInstanceRequest.md) - [CancelInstanceResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/CancelInstanceResponse.md) - [CancelInstanceResponseData](https://github.com/p-fruck/python-contabo/blob/main/docs/CancelInstanceResponseData.md) + - [CancelObjectStorageRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/CancelObjectStorageRequest.md) - [CancelObjectStorageResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/CancelObjectStorageResponse.md) - [CancelObjectStorageResponseData](https://github.com/p-fruck/python-contabo/blob/main/docs/CancelObjectStorageResponseData.md) + - [CancelRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/CancelRequest.md) + - [ChangedAuthCode](https://github.com/p-fruck/python-contabo/blob/main/docs/ChangedAuthCode.md) + - [Changes](https://github.com/p-fruck/python-contabo/blob/main/docs/Changes.md) + - [CheckCollectionCheckTemplates](https://github.com/p-fruck/python-contabo/blob/main/docs/CheckCollectionCheckTemplates.md) + - [CheckCollectionCreateRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/CheckCollectionCreateRequest.md) + - [CheckCollectionResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/CheckCollectionResponse.md) + - [CheckCollectionTemplateResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/CheckCollectionTemplateResponse.md) + - [CheckCollectionTemplatesCheckTemplates](https://github.com/p-fruck/python-contabo/blob/main/docs/CheckCollectionTemplatesCheckTemplates.md) + - [CheckCollectionTemplatesGetResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/CheckCollectionTemplatesGetResponse.md) + - [CheckCollectionTemplatesListResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/CheckCollectionTemplatesListResponse.md) + - [CheckCollectionsAuditListResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/CheckCollectionsAuditListResponse.md) + - [CheckCollectionsAuditResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/CheckCollectionsAuditResponse.md) + - [CheckCollectionsGetResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/CheckCollectionsGetResponse.md) + - [CheckCollectionsListResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/CheckCollectionsListResponse.md) + - [CheckCollectionsReplayRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/CheckCollectionsReplayRequest.md) + - [CheckCreateRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/CheckCreateRequest.md) + - [CheckResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/CheckResponse.md) + - [CheckTemplateResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/CheckTemplateResponse.md) + - [CheckTemplatesGetResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/CheckTemplatesGetResponse.md) + - [CheckTemplatesListResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/CheckTemplatesListResponse.md) + - [ChecksAuditListResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ChecksAuditListResponse.md) + - [ChecksAuditResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ChecksAuditResponse.md) + - [ChecksGetResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ChecksGetResponse.md) + - [ChecksListResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ChecksListResponse.md) + - [ChecksReplayRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/ChecksReplayRequest.md) - [ClientResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ClientResponse.md) - [ClientSecretResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ClientSecretResponse.md) - [CreateAssignmentResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/CreateAssignmentResponse.md) @@ -260,6 +385,10 @@ - [CreateCustomImageRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/CreateCustomImageRequest.md) - [CreateCustomImageResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/CreateCustomImageResponse.md) - [CreateCustomImageResponseData](https://github.com/p-fruck/python-contabo/blob/main/docs/CreateCustomImageResponseData.md) + - [CreateDnsZoneRecordRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/CreateDnsZoneRecordRequest.md) + - [CreateDnsZoneRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/CreateDnsZoneRequest.md) + - [CreateFirewallRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/CreateFirewallRequest.md) + - [CreateFirewallResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/CreateFirewallResponse.md) - [CreateInstanceAddons](https://github.com/p-fruck/python-contabo/blob/main/docs/CreateInstanceAddons.md) - [CreateInstanceRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/CreateInstanceRequest.md) - [CreateInstanceResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/CreateInstanceResponse.md) @@ -269,6 +398,7 @@ - [CreateObjectStorageResponseData](https://github.com/p-fruck/python-contabo/blob/main/docs/CreateObjectStorageResponseData.md) - [CreatePrivateNetworkRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/CreatePrivateNetworkRequest.md) - [CreatePrivateNetworkResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/CreatePrivateNetworkResponse.md) + - [CreatePtrRecordRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/CreatePtrRecordRequest.md) - [CreateRoleRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/CreateRoleRequest.md) - [CreateRoleResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/CreateRoleResponse.md) - [CreateRoleResponseData](https://github.com/p-fruck/python-contabo/blob/main/docs/CreateRoleResponseData.md) @@ -279,9 +409,6 @@ - [CreateTagRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/CreateTagRequest.md) - [CreateTagResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/CreateTagResponse.md) - [CreateTagResponseData](https://github.com/p-fruck/python-contabo/blob/main/docs/CreateTagResponseData.md) - - [CreateTicketRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/CreateTicketRequest.md) - - [CreateTicketResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/CreateTicketResponse.md) - - [CreateTicketResponseData](https://github.com/p-fruck/python-contabo/blob/main/docs/CreateTicketResponseData.md) - [CreateUserRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/CreateUserRequest.md) - [CreateUserResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/CreateUserResponse.md) - [CreateUserResponseData](https://github.com/p-fruck/python-contabo/blob/main/docs/CreateUserResponseData.md) @@ -289,10 +416,40 @@ - [CustomImagesStatsResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/CustomImagesStatsResponse.md) - [CustomImagesStatsResponseData](https://github.com/p-fruck/python-contabo/blob/main/docs/CustomImagesStatsResponseData.md) - [DataCenterResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/DataCenterResponse.md) + - [DnsZoneRecordResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/DnsZoneRecordResponse.md) + - [DnsZoneResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/DnsZoneResponse.md) + - [DomainAuditResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/DomainAuditResponse.md) + - [DomainAuditResponseData](https://github.com/p-fruck/python-contabo/blob/main/docs/DomainAuditResponseData.md) + - [DomainAuthCodeRegenerateResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/DomainAuthCodeRegenerateResponse.md) + - [DomainAuthCodeResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/DomainAuthCodeResponse.md) + - [DomainCancel](https://github.com/p-fruck/python-contabo/blob/main/docs/DomainCancel.md) + - [DomainCancelResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/DomainCancelResponse.md) + - [DomainCreateRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/DomainCreateRequest.md) + - [DomainCreateResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/DomainCreateResponse.md) + - [DomainDetails](https://github.com/p-fruck/python-contabo/blob/main/docs/DomainDetails.md) + - [DomainFindResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/DomainFindResponse.md) + - [DomainHandles](https://github.com/p-fruck/python-contabo/blob/main/docs/DomainHandles.md) + - [DomainPatchRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/DomainPatchRequest.md) + - [DomainPatchResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/DomainPatchResponse.md) + - [DomainResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/DomainResponse.md) + - [DomainsListResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/DomainsListResponse.md) + - [ExtCheckCollectionResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ExtCheckCollectionResponse.md) + - [ExtCheckCollectionTemplateResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ExtCheckCollectionTemplateResponse.md) + - [ExtCheckCollectionTemplatesGetResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ExtCheckCollectionTemplatesGetResponse.md) + - [ExtCheckCollectionTemplatesListResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ExtCheckCollectionTemplatesListResponse.md) + - [ExtCheckCollectionsGetResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ExtCheckCollectionsGetResponse.md) + - [ExtCheckCollectionsListResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ExtCheckCollectionsListResponse.md) + - [ExtCheckResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ExtCheckResponse.md) + - [ExtChecksGetResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ExtChecksGetResponse.md) + - [ExtChecksListResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ExtChecksListResponse.md) + - [ExtRemediesGetResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ExtRemediesGetResponse.md) + - [ExtRemediesListResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ExtRemediesListResponse.md) + - [ExtRemedyResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ExtRemedyResponse.md) - [ExtraStorageRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/ExtraStorageRequest.md) - [FindAssignmentResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/FindAssignmentResponse.md) - [FindClientResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/FindClientResponse.md) - [FindCredentialResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/FindCredentialResponse.md) + - [FindFirewallResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/FindFirewallResponse.md) - [FindImageResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/FindImageResponse.md) - [FindInstanceResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/FindInstanceResponse.md) - [FindObjectStorageResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/FindObjectStorageResponse.md) @@ -305,12 +462,30 @@ - [FindUserResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/FindUserResponse.md) - [FindVipResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/FindVipResponse.md) - [FindVncResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/FindVncResponse.md) + - [FirewallAuditResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/FirewallAuditResponse.md) + - [FirewallResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/FirewallResponse.md) + - [FirewallRuleRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/FirewallRuleRequest.md) + - [FirewallRuleResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/FirewallRuleResponse.md) - [FirewallingUpgradeRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/FirewallingUpgradeRequest.md) - [GenerateClientSecretResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/GenerateClientSecretResponse.md) + - [HandleAddress](https://github.com/p-fruck/python-contabo/blob/main/docs/HandleAddress.md) + - [HandleAuditResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/HandleAuditResponse.md) + - [HandleAuditResponseData](https://github.com/p-fruck/python-contabo/blob/main/docs/HandleAuditResponseData.md) + - [HandleBirthInfo](https://github.com/p-fruck/python-contabo/blob/main/docs/HandleBirthInfo.md) + - [HandleCreateRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/HandleCreateRequest.md) + - [HandleCreateResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/HandleCreateResponse.md) + - [HandleFindResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/HandleFindResponse.md) + - [HandleListResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/HandleListResponse.md) + - [HandlePatchRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/HandlePatchRequest.md) + - [HandlePatchResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/HandlePatchResponse.md) + - [HandlePhone](https://github.com/p-fruck/python-contabo/blob/main/docs/HandlePhone.md) + - [HandleResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/HandleResponse.md) - [ImageAuditResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ImageAuditResponse.md) - [ImageAuditResponseData](https://github.com/p-fruck/python-contabo/blob/main/docs/ImageAuditResponseData.md) - [ImageResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ImageResponse.md) - [InstanceAssignmentSelfLinks](https://github.com/p-fruck/python-contabo/blob/main/docs/InstanceAssignmentSelfLinks.md) + - [InstanceAssignmentSelfLinks1](https://github.com/p-fruck/python-contabo/blob/main/docs/InstanceAssignmentSelfLinks1.md) + - [InstanceDetails](https://github.com/p-fruck/python-contabo/blob/main/docs/InstanceDetails.md) - [InstanceRescueActionResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/InstanceRescueActionResponse.md) - [InstanceRescueActionResponseData](https://github.com/p-fruck/python-contabo/blob/main/docs/InstanceRescueActionResponseData.md) - [InstanceResetPasswordActionResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/InstanceResetPasswordActionResponse.md) @@ -323,6 +498,7 @@ - [InstanceStartActionResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/InstanceStartActionResponse.md) - [InstanceStartActionResponseData](https://github.com/p-fruck/python-contabo/blob/main/docs/InstanceStartActionResponseData.md) - [InstanceStatus](https://github.com/p-fruck/python-contabo/blob/main/docs/InstanceStatus.md) + - [InstanceStatusRepresentation](https://github.com/p-fruck/python-contabo/blob/main/docs/InstanceStatusRepresentation.md) - [InstanceStopActionResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/InstanceStopActionResponse.md) - [InstanceStopActionResponseData](https://github.com/p-fruck/python-contabo/blob/main/docs/InstanceStopActionResponseData.md) - [Instances](https://github.com/p-fruck/python-contabo/blob/main/docs/Instances.md) @@ -331,8 +507,12 @@ - [InstancesAuditResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/InstancesAuditResponse.md) - [InstancesResetPasswordActionsRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/InstancesResetPasswordActionsRequest.md) - [IpConfig](https://github.com/p-fruck/python-contabo/blob/main/docs/IpConfig.md) + - [IpConfig1](https://github.com/p-fruck/python-contabo/blob/main/docs/IpConfig1.md) + - [IpConfig2](https://github.com/p-fruck/python-contabo/blob/main/docs/IpConfig2.md) - [IpV4](https://github.com/p-fruck/python-contabo/blob/main/docs/IpV4.md) - [IpV41](https://github.com/p-fruck/python-contabo/blob/main/docs/IpV41.md) + - [IpV42](https://github.com/p-fruck/python-contabo/blob/main/docs/IpV42.md) + - [IpV43](https://github.com/p-fruck/python-contabo/blob/main/docs/IpV43.md) - [IpV6](https://github.com/p-fruck/python-contabo/blob/main/docs/IpV6.md) - [Links](https://github.com/p-fruck/python-contabo/blob/main/docs/Links.md) - [ListApiPermissionResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ListApiPermissionResponse.md) @@ -341,6 +521,11 @@ - [ListAssignmentResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ListAssignmentResponse.md) - [ListCredentialResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ListCredentialResponse.md) - [ListDataCenterResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ListDataCenterResponse.md) + - [ListDnsZoneRecordsResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ListDnsZoneRecordsResponse.md) + - [ListDnsZonesResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ListDnsZonesResponse.md) + - [ListFirewallAuditResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ListFirewallAuditResponse.md) + - [ListFirewallResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ListFirewallResponse.md) + - [ListFirewallResponseData](https://github.com/p-fruck/python-contabo/blob/main/docs/ListFirewallResponseData.md) - [ListImageResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ListImageResponse.md) - [ListImageResponseData](https://github.com/p-fruck/python-contabo/blob/main/docs/ListImageResponseData.md) - [ListInstancesActionsAuditResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ListInstancesActionsAuditResponse.md) @@ -349,9 +534,11 @@ - [ListInstancesResponseData](https://github.com/p-fruck/python-contabo/blob/main/docs/ListInstancesResponseData.md) - [ListObjectStorageAuditResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ListObjectStorageAuditResponse.md) - [ListObjectStorageResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ListObjectStorageResponse.md) + - [ListPresetRulesResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ListPresetRulesResponse.md) - [ListPrivateNetworkAuditResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ListPrivateNetworkAuditResponse.md) - [ListPrivateNetworkResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ListPrivateNetworkResponse.md) - [ListPrivateNetworkResponseData](https://github.com/p-fruck/python-contabo/blob/main/docs/ListPrivateNetworkResponseData.md) + - [ListPtrRecordsResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ListPtrRecordsResponse.md) - [ListRoleAuditResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ListRoleAuditResponse.md) - [ListRoleResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ListRoleResponse.md) - [ListSecretAuditResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ListSecretAuditResponse.md) @@ -366,12 +553,15 @@ - [ListVipResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ListVipResponse.md) - [ListVipResponseData](https://github.com/p-fruck/python-contabo/blob/main/docs/ListVipResponseData.md) - [MinimumRequirements](https://github.com/p-fruck/python-contabo/blob/main/docs/MinimumRequirements.md) + - [Nameserver](https://github.com/p-fruck/python-contabo/blob/main/docs/Nameserver.md) - [ObjectStorageAuditResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ObjectStorageAuditResponse.md) - [ObjectStorageResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ObjectStorageResponse.md) - [ObjectStoragesStatsResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ObjectStoragesStatsResponse.md) - [ObjectStoragesStatsResponseData](https://github.com/p-fruck/python-contabo/blob/main/docs/ObjectStoragesStatsResponseData.md) - [OptimalRequirements](https://github.com/p-fruck/python-contabo/blob/main/docs/OptimalRequirements.md) - [PaginationMeta](https://github.com/p-fruck/python-contabo/blob/main/docs/PaginationMeta.md) + - [PatchFirewallRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/PatchFirewallRequest.md) + - [PatchFirewallResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/PatchFirewallResponse.md) - [PatchInstanceRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/PatchInstanceRequest.md) - [PatchInstanceResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/PatchInstanceResponse.md) - [PatchInstanceResponseData](https://github.com/p-fruck/python-contabo/blob/main/docs/PatchInstanceResponseData.md) @@ -381,28 +571,52 @@ - [PatchVncRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/PatchVncRequest.md) - [PermissionRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/PermissionRequest.md) - [PermissionResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/PermissionResponse.md) + - [PresetRulesResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/PresetRulesResponse.md) - [PrivateIpConfig](https://github.com/p-fruck/python-contabo/blob/main/docs/PrivateIpConfig.md) - [PrivateNetworkAuditResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/PrivateNetworkAuditResponse.md) - [PrivateNetworkResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/PrivateNetworkResponse.md) + - [PtrRecordResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/PtrRecordResponse.md) + - [PutFirewallRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/PutFirewallRequest.md) + - [PutFirewallResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/PutFirewallResponse.md) + - [RecordAuditResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/RecordAuditResponse.md) + - [RecordAuditResponseData](https://github.com/p-fruck/python-contabo/blob/main/docs/RecordAuditResponseData.md) - [ReinstallInstanceRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/ReinstallInstanceRequest.md) - [ReinstallInstanceResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ReinstallInstanceResponse.md) - [ReinstallInstanceResponseData](https://github.com/p-fruck/python-contabo/blob/main/docs/ReinstallInstanceResponseData.md) + - [RemediesAuditListResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/RemediesAuditListResponse.md) + - [RemediesAuditResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/RemediesAuditResponse.md) + - [RemediesCreateRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/RemediesCreateRequest.md) + - [RemediesGetResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/RemediesGetResponse.md) + - [RemediesListResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/RemediesListResponse.md) + - [RemediesReplayRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/RemediesReplayRequest.md) + - [RemedyResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/RemedyResponse.md) + - [RemedyTemplateResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/RemedyTemplateResponse.md) + - [RemedyTemplatesGetResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/RemedyTemplatesGetResponse.md) + - [RemedyTemplatesListResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/RemedyTemplatesListResponse.md) + - [ReplayResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ReplayResponse.md) - [ResourcePermissionsResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ResourcePermissionsResponse.md) - [RoleAuditResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/RoleAuditResponse.md) - [RoleResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/RoleResponse.md) - [RollbackSnapshotResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/RollbackSnapshotResponse.md) + - [Rules](https://github.com/p-fruck/python-contabo/blob/main/docs/Rules.md) + - [RulesRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/RulesRequest.md) - [SecretAuditResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/SecretAuditResponse.md) - [SecretResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/SecretResponse.md) - [SelfLinks](https://github.com/p-fruck/python-contabo/blob/main/docs/SelfLinks.md) + - [SetDefaultHandleResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/SetDefaultHandleResponse.md) - [SnapshotResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/SnapshotResponse.md) - [SnapshotsAuditResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/SnapshotsAuditResponse.md) + - [SrcCidr](https://github.com/p-fruck/python-contabo/blob/main/docs/SrcCidr.md) - [TagAssignmentSelfLinks](https://github.com/p-fruck/python-contabo/blob/main/docs/TagAssignmentSelfLinks.md) - [TagAuditResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/TagAuditResponse.md) - [TagResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/TagResponse.md) + - [UnassignInstanceFirewallResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/UnassignInstanceFirewallResponse.md) - [UnassignInstancePrivateNetworkResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/UnassignInstancePrivateNetworkResponse.md) - [UpdateCustomImageRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/UpdateCustomImageRequest.md) - [UpdateCustomImageResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/UpdateCustomImageResponse.md) - [UpdateCustomImageResponseData](https://github.com/p-fruck/python-contabo/blob/main/docs/UpdateCustomImageResponseData.md) + - [UpdateDnsZoneRecordRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/UpdateDnsZoneRecordRequest.md) + - [UpdatePtrRecordRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/UpdatePtrRecordRequest.md) - [UpdateRoleRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/UpdateRoleRequest.md) - [UpdateRoleResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/UpdateRoleResponse.md) - [UpdateSecretRequest](https://github.com/p-fruck/python-contabo/blob/main/docs/UpdateSecretRequest.md) @@ -424,6 +638,8 @@ - [VipAuditResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/VipAuditResponse.md) - [VipResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/VipResponse.md) - [VncResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/VncResponse.md) + - [ZoneAuditResponse](https://github.com/p-fruck/python-contabo/blob/main/docs/ZoneAuditResponse.md) + - [ZoneAuditResponseData](https://github.com/p-fruck/python-contabo/blob/main/docs/ZoneAuditResponseData.md) diff --git a/test/test_account_org_response.py b/test/test_account_org_response.py new file mode 100644 index 00000000..32ee2137 --- /dev/null +++ b/test/test_account_org_response.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.account_org_response import AccountOrgResponse + +class TestAccountOrgResponse(unittest.TestCase): + """AccountOrgResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AccountOrgResponse: + """Test AccountOrgResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AccountOrgResponse` + """ + model = AccountOrgResponse() + if include_optional: + return AccountOrgResponse( + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f' + ) + else: + return AccountOrgResponse( + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + ) + """ + + def testAccountOrgResponse(self): + """Test AccountOrgResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_accounts_list_response.py b/test/test_accounts_list_response.py new file mode 100644 index 00000000..4513cc85 --- /dev/null +++ b/test/test_accounts_list_response.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.accounts_list_response import AccountsListResponse + +class TestAccountsListResponse(unittest.TestCase): + """AccountsListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AccountsListResponse: + """Test AccountsListResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AccountsListResponse` + """ + model = AccountsListResponse() + if include_optional: + return AccountsListResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.account_org_response.AccountOrgResponse( + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', ) + ], + links = None + ) + else: + return AccountsListResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.account_org_response.AccountOrgResponse( + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', ) + ], + links = None, + ) + """ + + def testAccountsListResponse(self): + """Test AccountsListResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_additional_ip.py b/test/test_additional_ip.py index aef498fc..4022cc3b 100644 --- a/test/test_additional_ip.py +++ b/test/test_additional_ip.py @@ -35,14 +35,14 @@ def make_instance(self, include_optional) -> AdditionalIp: model = AdditionalIp() if include_optional: return AdditionalIp( - v4 = pfruck_contabo.models.ip_v4.IpV4( + v4 = pfruck_contabo.models.ip_v43.IpV43( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ) ) else: return AdditionalIp( - v4 = pfruck_contabo.models.ip_v4.IpV4( + v4 = pfruck_contabo.models.ip_v43.IpV43( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ), diff --git a/test/test_api_bulk_delete_dns_zone_records_response.py b/test/test_api_bulk_delete_dns_zone_records_response.py new file mode 100644 index 00000000..d99673de --- /dev/null +++ b/test/test_api_bulk_delete_dns_zone_records_response.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.api_bulk_delete_dns_zone_records_response import ApiBulkDeleteDnsZoneRecordsResponse + +class TestApiBulkDeleteDnsZoneRecordsResponse(unittest.TestCase): + """ApiBulkDeleteDnsZoneRecordsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiBulkDeleteDnsZoneRecordsResponse: + """Test ApiBulkDeleteDnsZoneRecordsResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiBulkDeleteDnsZoneRecordsResponse` + """ + model = ApiBulkDeleteDnsZoneRecordsResponse() + if include_optional: + return ApiBulkDeleteDnsZoneRecordsResponse( + data = [ + pfruck_contabo.models.bulk_delete_result_response.BulkDeleteResultResponse( + tenant_id = 'DE', + customer_id = '54321', + failed_ids = [103], ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ) + ) + else: + return ApiBulkDeleteDnsZoneRecordsResponse( + data = [ + pfruck_contabo.models.bulk_delete_result_response.BulkDeleteResultResponse( + tenant_id = 'DE', + customer_id = '54321', + failed_ids = [103], ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ), + ) + """ + + def testApiBulkDeleteDnsZoneRecordsResponse(self): + """Test ApiBulkDeleteDnsZoneRecordsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_api_dns_zone_record_response.py b/test/test_api_dns_zone_record_response.py new file mode 100644 index 00000000..47d8c213 --- /dev/null +++ b/test/test_api_dns_zone_record_response.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.api_dns_zone_record_response import ApiDnsZoneRecordResponse + +class TestApiDnsZoneRecordResponse(unittest.TestCase): + """ApiDnsZoneRecordResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiDnsZoneRecordResponse: + """Test ApiDnsZoneRecordResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiDnsZoneRecordResponse` + """ + model = ApiDnsZoneRecordResponse() + if include_optional: + return ApiDnsZoneRecordResponse( + data = [ + pfruck_contabo.models.dns_zone_record_response.DnsZoneRecordResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + record_id = 1122, + name = 'example.com', + type = 'A', + ttl = 86400, + prio = 0, + data = '10.0.0.1', + port = 1234, + weight = 1, + flag = 1, + tag = 'issue', ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ) + ) + else: + return ApiDnsZoneRecordResponse( + data = [ + pfruck_contabo.models.dns_zone_record_response.DnsZoneRecordResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + record_id = 1122, + name = 'example.com', + type = 'A', + ttl = 86400, + prio = 0, + data = '10.0.0.1', + port = 1234, + weight = 1, + flag = 1, + tag = 'issue', ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ), + ) + """ + + def testApiDnsZoneRecordResponse(self): + """Test ApiDnsZoneRecordResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_ticket_response.py b/test/test_api_dns_zone_response.py similarity index 55% rename from test/test_create_ticket_response.py rename to test/test_api_dns_zone_response.py index db2e1f14..08d9d570 100644 --- a/test/test_create_ticket_response.py +++ b/test/test_api_dns_zone_response.py @@ -14,10 +14,10 @@ import unittest -from pfruck_contabo.models.create_ticket_response import CreateTicketResponse +from pfruck_contabo.models.api_dns_zone_response import ApiDnsZoneResponse -class TestCreateTicketResponse(unittest.TestCase): - """CreateTicketResponse unit test stubs""" +class TestApiDnsZoneResponse(unittest.TestCase): + """ApiDnsZoneResponse unit test stubs""" def setUp(self): pass @@ -25,38 +25,40 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> CreateTicketResponse: - """Test CreateTicketResponse + def make_instance(self, include_optional) -> ApiDnsZoneResponse: + """Test ApiDnsZoneResponse include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `CreateTicketResponse` + # uncomment below to create an instance of `ApiDnsZoneResponse` """ - model = CreateTicketResponse() + model = ApiDnsZoneResponse() if include_optional: - return CreateTicketResponse( + return ApiDnsZoneResponse( data = [ - pfruck_contabo.models.create_ticket_response_data.CreateTicketResponseData( + pfruck_contabo.models.dns_zone_response.DnsZoneResponse( tenant_id = 'DE', - customer_id = '54321', ) + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + zone_name = 'abcdefg', ) ], links = pfruck_contabo.models.self_links.SelfLinks( self = '', ) ) else: - return CreateTicketResponse( + return ApiDnsZoneResponse( data = [ - pfruck_contabo.models.create_ticket_response_data.CreateTicketResponseData( + pfruck_contabo.models.dns_zone_response.DnsZoneResponse( tenant_id = 'DE', - customer_id = '54321', ) + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + zone_name = 'abcdefg', ) ], links = pfruck_contabo.models.self_links.SelfLinks( self = '', ), ) """ - def testCreateTicketResponse(self): - """Test CreateTicketResponse""" + def testApiDnsZoneResponse(self): + """Test ApiDnsZoneResponse""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_api_ptr_record_response.py b/test/test_api_ptr_record_response.py new file mode 100644 index 00000000..eb59e2df --- /dev/null +++ b/test/test_api_ptr_record_response.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.api_ptr_record_response import ApiPtrRecordResponse + +class TestApiPtrRecordResponse(unittest.TestCase): + """ApiPtrRecordResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiPtrRecordResponse: + """Test ApiPtrRecordResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiPtrRecordResponse` + """ + model = ApiPtrRecordResponse() + if include_optional: + return ApiPtrRecordResponse( + data = [ + pfruck_contabo.models.ptr_record_response.PtrRecordResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + ip = '1.2.3.4', + ttl = 86400, + ptr = 'vmd1027177.server.net', ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ) + ) + else: + return ApiPtrRecordResponse( + data = [ + pfruck_contabo.models.ptr_record_response.PtrRecordResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + ip = '1.2.3.4', + ttl = 86400, + ptr = 'vmd1027177.server.net', ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ), + ) + """ + + def testApiPtrRecordResponse(self): + """Test ApiPtrRecordResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_config.py b/test/test_application_config.py index cad7ad46..b8a188a5 100644 --- a/test/test_application_config.py +++ b/test/test_application_config.py @@ -41,7 +41,17 @@ def make_instance(self, include_optional) -> ApplicationConfig: user: admin timezone: Europe/Berlin chpasswd: - expire: False' + expire: False', + meta_data = pfruck_contabo.models.application_meta_data.ApplicationMetaData( + urls = [ + '' + ], + logo_url = '', + initial_username = '', + documentation_urls = [ + '' + ], + requires_password_for_install = True, ) ) else: return ApplicationConfig( @@ -52,6 +62,16 @@ def make_instance(self, include_optional) -> ApplicationConfig: timezone: Europe/Berlin chpasswd: expire: False', + meta_data = pfruck_contabo.models.application_meta_data.ApplicationMetaData( + urls = [ + '' + ], + logo_url = '', + initial_username = '', + documentation_urls = [ + '' + ], + requires_password_for_install = True, ), ) """ diff --git a/test/test_application_meta_data.py b/test/test_application_meta_data.py new file mode 100644 index 00000000..ab8bef4e --- /dev/null +++ b/test/test_application_meta_data.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.application_meta_data import ApplicationMetaData + +class TestApplicationMetaData(unittest.TestCase): + """ApplicationMetaData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationMetaData: + """Test ApplicationMetaData + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationMetaData` + """ + model = ApplicationMetaData() + if include_optional: + return ApplicationMetaData( + urls = [ + '' + ], + logo_url = '', + initial_username = '', + documentation_urls = [ + '' + ], + requires_password_for_install = True + ) + else: + return ApplicationMetaData( + urls = [ + '' + ], + logo_url = '', + initial_username = '', + documentation_urls = [ + '' + ], + requires_password_for_install = True, + ) + """ + + def testApplicationMetaData(self): + """Test ApplicationMetaData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_requirements.py b/test/test_application_requirements.py index f21c0167..8dfcd7ae 100644 --- a/test/test_application_requirements.py +++ b/test/test_application_requirements.py @@ -38,11 +38,13 @@ def make_instance(self, include_optional) -> ApplicationRequirements: minimum = pfruck_contabo.models.minimum_requirements.MinimumRequirements( cpu_cores = 2, ram_mb = 100, - disk_mb = 500, ), + disk_mb = 500, + valid_product_ids = ["V13","V15"], ), optimal = pfruck_contabo.models.optimal_requirements.OptimalRequirements( cpu_cores = 2, ram_mb = 100, - disk_mb = 500, ) + disk_mb = 500, + valid_product_ids = ["V13","V15"], ) ) else: return ApplicationRequirements( diff --git a/test/test_application_response.py b/test/test_application_response.py index c2b7b01b..41b2c716 100644 --- a/test/test_application_response.py +++ b/test/test_application_response.py @@ -49,7 +49,8 @@ def make_instance(self, include_optional) -> ApplicationResponse: user: admin timezone: Europe/Berlin chpasswd: - expire: False', ) + expire: False', + meta_data = null, ) ], requirements = pfruck_contabo.models.application_requirements.ApplicationRequirements( minimum = null, @@ -71,7 +72,8 @@ def make_instance(self, include_optional) -> ApplicationResponse: user: admin timezone: Europe/Berlin chpasswd: - expire: False', ) + expire: False', + meta_data = null, ) ], requirements = pfruck_contabo.models.application_requirements.ApplicationRequirements( minimum = null, diff --git a/test/test_assign_instance_firewall_response.py b/test/test_assign_instance_firewall_response.py new file mode 100644 index 00000000..c9f38b21 --- /dev/null +++ b/test/test_assign_instance_firewall_response.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.assign_instance_firewall_response import AssignInstanceFirewallResponse + +class TestAssignInstanceFirewallResponse(unittest.TestCase): + """AssignInstanceFirewallResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AssignInstanceFirewallResponse: + """Test AssignInstanceFirewallResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AssignInstanceFirewallResponse` + """ + model = AssignInstanceFirewallResponse() + if include_optional: + return AssignInstanceFirewallResponse( + links = pfruck_contabo.models.instance_assignment_self_links1.InstanceAssignmentSelfLinks1( + self = '', + firewall = '', + instance = '', ) + ) + else: + return AssignInstanceFirewallResponse( + links = pfruck_contabo.models.instance_assignment_self_links1.InstanceAssignmentSelfLinks1( + self = '', + firewall = '', + instance = '', ), + ) + """ + + def testAssignInstanceFirewallResponse(self): + """Test AssignInstanceFirewallResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_assign_vip_response.py b/test/test_assign_vip_response.py index 0db1af3e..48214eb3 100644 --- a/test/test_assign_vip_response.py +++ b/test/test_assign_vip_response.py @@ -48,7 +48,7 @@ def make_instance(self, include_optional) -> AssignVipResponse: resource_display_name = 'My Instance 12', ip_version = 'v4', type = 'additional', - v4 = pfruck_contabo.models.ip_v41.IpV41( + v4 = pfruck_contabo.models.ip_v4.IpV4( ip = '195.123.123.1', gateway = '255.255.255.1', netmask_cidr = 24, @@ -73,7 +73,7 @@ def make_instance(self, include_optional) -> AssignVipResponse: resource_display_name = 'My Instance 12', ip_version = 'v4', type = 'additional', - v4 = pfruck_contabo.models.ip_v41.IpV41( + v4 = pfruck_contabo.models.ip_v4.IpV4( ip = '195.123.123.1', gateway = '255.255.255.1', netmask_cidr = 24, diff --git a/test/test_audit_count_response.py b/test/test_audit_count_response.py new file mode 100644 index 00000000..91e25237 --- /dev/null +++ b/test/test_audit_count_response.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.audit_count_response import AuditCountResponse + +class TestAuditCountResponse(unittest.TestCase): + """AuditCountResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AuditCountResponse: + """Test AuditCountResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AuditCountResponse` + """ + model = AuditCountResponse() + if include_optional: + return AuditCountResponse( + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + count = 5 + ) + else: + return AuditCountResponse( + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + count = 5, + ) + """ + + def testAuditCountResponse(self): + """Test AuditCountResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_base_check_collection_create_request.py b/test/test_base_check_collection_create_request.py new file mode 100644 index 00000000..8354f8af --- /dev/null +++ b/test/test_base_check_collection_create_request.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.base_check_collection_create_request import BaseCheckCollectionCreateRequest + +class TestBaseCheckCollectionCreateRequest(unittest.TestCase): + """BaseCheckCollectionCreateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseCheckCollectionCreateRequest: + """Test BaseCheckCollectionCreateRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseCheckCollectionCreateRequest` + """ + model = BaseCheckCollectionCreateRequest() + if include_optional: + return BaseCheckCollectionCreateRequest( + object_type = 'vserver', + object_id = '4711', + check_collection_template_id = 12345 + ) + else: + return BaseCheckCollectionCreateRequest( + object_type = 'vserver', + object_id = '4711', + check_collection_template_id = 12345, + ) + """ + + def testBaseCheckCollectionCreateRequest(self): + """Test BaseCheckCollectionCreateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_base_check_create_request.py b/test/test_base_check_create_request.py new file mode 100644 index 00000000..a84bf2c5 --- /dev/null +++ b/test/test_base_check_create_request.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.base_check_create_request import BaseCheckCreateRequest + +class TestBaseCheckCreateRequest(unittest.TestCase): + """BaseCheckCreateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseCheckCreateRequest: + """Test BaseCheckCreateRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseCheckCreateRequest` + """ + model = BaseCheckCreateRequest() + if include_optional: + return BaseCheckCreateRequest( + object_type = 'vserver', + object_id = '4711', + check_template_id = 12345, + check_collection_id = 12345 + ) + else: + return BaseCheckCreateRequest( + object_type = 'vserver', + object_id = '4711', + check_template_id = 12345, + ) + """ + + def testBaseCheckCreateRequest(self): + """Test BaseCheckCreateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_base_remedy_create_request.py b/test/test_base_remedy_create_request.py new file mode 100644 index 00000000..ad6875c3 --- /dev/null +++ b/test/test_base_remedy_create_request.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.base_remedy_create_request import BaseRemedyCreateRequest + +class TestBaseRemedyCreateRequest(unittest.TestCase): + """BaseRemedyCreateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseRemedyCreateRequest: + """Test BaseRemedyCreateRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseRemedyCreateRequest` + """ + model = BaseRemedyCreateRequest() + if include_optional: + return BaseRemedyCreateRequest( + object_type = 'vserver', + object_id = '4711', + remedy_template_id = 12345, + remedy_collection_id = 12345 + ) + else: + return BaseRemedyCreateRequest( + object_type = 'vserver', + object_id = '4711', + remedy_template_id = 12345, + ) + """ + + def testBaseRemedyCreateRequest(self): + """Test BaseRemedyCreateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_bulk_delete_dns_zone_records_request.py b/test/test_bulk_delete_dns_zone_records_request.py new file mode 100644 index 00000000..8993c91b --- /dev/null +++ b/test/test_bulk_delete_dns_zone_records_request.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.bulk_delete_dns_zone_records_request import BulkDeleteDnsZoneRecordsRequest + +class TestBulkDeleteDnsZoneRecordsRequest(unittest.TestCase): + """BulkDeleteDnsZoneRecordsRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BulkDeleteDnsZoneRecordsRequest: + """Test BulkDeleteDnsZoneRecordsRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BulkDeleteDnsZoneRecordsRequest` + """ + model = BulkDeleteDnsZoneRecordsRequest() + if include_optional: + return BulkDeleteDnsZoneRecordsRequest( + record_ids = [10111,10211,10311] + ) + else: + return BulkDeleteDnsZoneRecordsRequest( + record_ids = [10111,10211,10311], + ) + """ + + def testBulkDeleteDnsZoneRecordsRequest(self): + """Test BulkDeleteDnsZoneRecordsRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_ticket_response_data.py b/test/test_bulk_delete_result_response.py similarity index 55% rename from test/test_create_ticket_response_data.py rename to test/test_bulk_delete_result_response.py index cefd6b9b..db13729e 100644 --- a/test/test_create_ticket_response_data.py +++ b/test/test_bulk_delete_result_response.py @@ -14,10 +14,10 @@ import unittest -from pfruck_contabo.models.create_ticket_response_data import CreateTicketResponseData +from pfruck_contabo.models.bulk_delete_result_response import BulkDeleteResultResponse -class TestCreateTicketResponseData(unittest.TestCase): - """CreateTicketResponseData unit test stubs""" +class TestBulkDeleteResultResponse(unittest.TestCase): + """BulkDeleteResultResponse unit test stubs""" def setUp(self): pass @@ -25,28 +25,30 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> CreateTicketResponseData: - """Test CreateTicketResponseData + def make_instance(self, include_optional) -> BulkDeleteResultResponse: + """Test BulkDeleteResultResponse include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `CreateTicketResponseData` + # uncomment below to create an instance of `BulkDeleteResultResponse` """ - model = CreateTicketResponseData() + model = BulkDeleteResultResponse() if include_optional: - return CreateTicketResponseData( + return BulkDeleteResultResponse( tenant_id = 'DE', - customer_id = '54321' + customer_id = '54321', + failed_ids = [103] ) else: - return CreateTicketResponseData( + return BulkDeleteResultResponse( tenant_id = 'DE', customer_id = '54321', + failed_ids = [103], ) """ - def testCreateTicketResponseData(self): - """Test CreateTicketResponseData""" + def testBulkDeleteResultResponse(self): + """Test BulkDeleteResultResponse""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_create_ticket_request.py b/test/test_cancel_domain_request.py similarity index 51% rename from test/test_create_ticket_request.py rename to test/test_cancel_domain_request.py index 8b619020..d67aba72 100644 --- a/test/test_create_ticket_request.py +++ b/test/test_cancel_domain_request.py @@ -14,10 +14,10 @@ import unittest -from pfruck_contabo.models.create_ticket_request import CreateTicketRequest +from pfruck_contabo.models.cancel_domain_request import CancelDomainRequest -class TestCreateTicketRequest(unittest.TestCase): - """CreateTicketRequest unit test stubs""" +class TestCancelDomainRequest(unittest.TestCase): + """CancelDomainRequest unit test stubs""" def setUp(self): pass @@ -25,30 +25,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> CreateTicketRequest: - """Test CreateTicketRequest + def make_instance(self, include_optional) -> CancelDomainRequest: + """Test CancelDomainRequest include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `CreateTicketRequest` + # uncomment below to create an instance of `CancelDomainRequest` """ - model = CreateTicketRequest() + model = CancelDomainRequest() if include_optional: - return CreateTicketRequest( - subject = 'Subject', - note = 'Note', - sender = 'your@mail.com' + return CancelDomainRequest( + reason = 'Product not needed anymore', + reason_text = 'Not satisfied with the service.', + cancel_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') ) else: - return CreateTicketRequest( - subject = 'Subject', - note = 'Note', - sender = 'your@mail.com', + return CancelDomainRequest( ) """ - def testCreateTicketRequest(self): - """Test CreateTicketRequest""" + def testCancelDomainRequest(self): + """Test CancelDomainRequest""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_cancel_instance_request.py b/test/test_cancel_instance_request.py new file mode 100644 index 00000000..408f6db6 --- /dev/null +++ b/test/test_cancel_instance_request.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.cancel_instance_request import CancelInstanceRequest + +class TestCancelInstanceRequest(unittest.TestCase): + """CancelInstanceRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CancelInstanceRequest: + """Test CancelInstanceRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CancelInstanceRequest` + """ + model = CancelInstanceRequest() + if include_optional: + return CancelInstanceRequest( + cancel_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return CancelInstanceRequest( + ) + """ + + def testCancelInstanceRequest(self): + """Test CancelInstanceRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cancel_object_storage_request.py b/test/test_cancel_object_storage_request.py new file mode 100644 index 00000000..a01d2139 --- /dev/null +++ b/test/test_cancel_object_storage_request.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.cancel_object_storage_request import CancelObjectStorageRequest + +class TestCancelObjectStorageRequest(unittest.TestCase): + """CancelObjectStorageRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CancelObjectStorageRequest: + """Test CancelObjectStorageRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CancelObjectStorageRequest` + """ + model = CancelObjectStorageRequest() + if include_optional: + return CancelObjectStorageRequest( + cancel_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return CancelObjectStorageRequest( + ) + """ + + def testCancelObjectStorageRequest(self): + """Test CancelObjectStorageRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cancel_request.py b/test/test_cancel_request.py new file mode 100644 index 00000000..df1f1093 --- /dev/null +++ b/test/test_cancel_request.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.cancel_request import CancelRequest + +class TestCancelRequest(unittest.TestCase): + """CancelRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CancelRequest: + """Test CancelRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CancelRequest` + """ + model = CancelRequest() + if include_optional: + return CancelRequest( + status = 'cancelled' + ) + else: + return CancelRequest( + ) + """ + + def testCancelRequest(self): + """Test CancelRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_changed_auth_code.py b/test/test_changed_auth_code.py new file mode 100644 index 00000000..c0b9ffeb --- /dev/null +++ b/test/test_changed_auth_code.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.changed_auth_code import ChangedAuthCode + +class TestChangedAuthCode(unittest.TestCase): + """ChangedAuthCode unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ChangedAuthCode: + """Test ChangedAuthCode + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ChangedAuthCode` + """ + model = ChangedAuthCode() + if include_optional: + return ChangedAuthCode( + changed = True, + var_date = '2021-06-03T06:27:12Z' + ) + else: + return ChangedAuthCode( + ) + """ + + def testChangedAuthCode(self): + """Test ChangedAuthCode""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_changes.py b/test/test_changes.py new file mode 100644 index 00000000..a967968d --- /dev/null +++ b/test/test_changes.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.changes import Changes + +class TestChanges(unittest.TestCase): + """Changes unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Changes: + """Test Changes + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Changes` + """ + model = Changes() + if include_optional: + return Changes( + prev = {"property":"foo"}, + new = {"property":"bar"} + ) + else: + return Changes( + prev = {"property":"foo"}, + new = {"property":"bar"}, + ) + """ + + def testChanges(self): + """Test Changes""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_check_collection_check_templates.py b/test/test_check_collection_check_templates.py new file mode 100644 index 00000000..ca4e86c2 --- /dev/null +++ b/test/test_check_collection_check_templates.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.check_collection_check_templates import CheckCollectionCheckTemplates + +class TestCheckCollectionCheckTemplates(unittest.TestCase): + """CheckCollectionCheckTemplates unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CheckCollectionCheckTemplates: + """Test CheckCollectionCheckTemplates + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CheckCollectionCheckTemplates` + """ + model = CheckCollectionCheckTemplates() + if include_optional: + return CheckCollectionCheckTemplates( + check_id = 1234, + check_template_id = 1234, + run_concurrent = True, + ignore_errors = True, + check_templates = [ + pfruck_contabo.models.check_collection_check_templates.CheckCollectionCheckTemplates( + check_id = 1234, + check_template_id = 1234, + run_concurrent = True, + ignore_errors = True, + check_templates = [ + pfruck_contabo.models.check_collection_check_templates.CheckCollectionCheckTemplates( + check_id = 1234, + check_template_id = 1234, + run_concurrent = True, + ignore_errors = True, ) + ], ) + ] + ) + else: + return CheckCollectionCheckTemplates( + check_id = 1234, + check_template_id = 1234, + run_concurrent = True, + ignore_errors = True, + ) + """ + + def testCheckCollectionCheckTemplates(self): + """Test CheckCollectionCheckTemplates""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_check_collection_create_request.py b/test/test_check_collection_create_request.py new file mode 100644 index 00000000..29077ae3 --- /dev/null +++ b/test/test_check_collection_create_request.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.check_collection_create_request import CheckCollectionCreateRequest + +class TestCheckCollectionCreateRequest(unittest.TestCase): + """CheckCollectionCreateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CheckCollectionCreateRequest: + """Test CheckCollectionCreateRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CheckCollectionCreateRequest` + """ + model = CheckCollectionCreateRequest() + if include_optional: + return CheckCollectionCreateRequest( + object_type = 'vserver', + object_id = '4711', + check_collection_template_id = 12345, + org_id = 'cntb', + account_id = 'DE-123' + ) + else: + return CheckCollectionCreateRequest( + object_type = 'vserver', + object_id = '4711', + check_collection_template_id = 12345, + org_id = 'cntb', + account_id = 'DE-123', + ) + """ + + def testCheckCollectionCreateRequest(self): + """Test CheckCollectionCreateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_check_collection_response.py b/test/test_check_collection_response.py new file mode 100644 index 00000000..ad1eb051 --- /dev/null +++ b/test/test_check_collection_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.check_collection_response import CheckCollectionResponse + +class TestCheckCollectionResponse(unittest.TestCase): + """CheckCollectionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CheckCollectionResponse: + """Test CheckCollectionResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CheckCollectionResponse` + """ + model = CheckCollectionResponse() + if include_optional: + return CheckCollectionResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + check_collection_id = 12345, + check_collection_template_id = 12345, + check_templates = [{"checkId":1,"checkTemplateId":2,"runConcurrent":false,"ignoreErrors":false,"checkTemplates":[{"checkId":2,"checkTemplateId":3,"runConcurrent":true,"ignoreErrors":false},{"checkId":3,"checkTemplateId":4,"runConcurrent":true,"ignoreErrors":true}]}], + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + checks = [ + pfruck_contabo.models.check_response.CheckResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + check_id = 12345, + check_collection_id = 12345, + check_template_id = 12345, + name = 'Ping check', + note = 'Ping failed with timeout, please check the firewall rules and connectivity', + internal_note = 'Ping failed with error code 123, could be an issue with the route server settings', + duration_ms = 4711, + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + log = '6 packets transmitted, 0 received, 100% packet loss, time 5107ms', ) + ] + ) + else: + return CheckCollectionResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + check_collection_id = 12345, + check_collection_template_id = 12345, + check_templates = [{"checkId":1,"checkTemplateId":2,"runConcurrent":false,"ignoreErrors":false,"checkTemplates":[{"checkId":2,"checkTemplateId":3,"runConcurrent":true,"ignoreErrors":false},{"checkId":3,"checkTemplateId":4,"runConcurrent":true,"ignoreErrors":true}]}], + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + checks = [ + pfruck_contabo.models.check_response.CheckResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + check_id = 12345, + check_collection_id = 12345, + check_template_id = 12345, + name = 'Ping check', + note = 'Ping failed with timeout, please check the firewall rules and connectivity', + internal_note = 'Ping failed with error code 123, could be an issue with the route server settings', + duration_ms = 4711, + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + log = '6 packets transmitted, 0 received, 100% packet loss, time 5107ms', ) + ], + ) + """ + + def testCheckCollectionResponse(self): + """Test CheckCollectionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_check_collection_template_response.py b/test/test_check_collection_template_response.py new file mode 100644 index 00000000..fe44cd87 --- /dev/null +++ b/test/test_check_collection_template_response.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.check_collection_template_response import CheckCollectionTemplateResponse + +class TestCheckCollectionTemplateResponse(unittest.TestCase): + """CheckCollectionTemplateResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CheckCollectionTemplateResponse: + """Test CheckCollectionTemplateResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CheckCollectionTemplateResponse` + """ + model = CheckCollectionTemplateResponse() + if include_optional: + return CheckCollectionTemplateResponse( + check_collection_template_id = 12345, + name = 'Instance checks', + description = 'Performs all checks for an instance', + internal = False, + object_type = 'vserver', + check_templates = [{"checkTemplateId":2,"runConcurrent":false,"ignoreErrors":false,"checkTemplates":[{"checkTemplateId":3,"runConcurrent":true,"ignoreErrors":false},{"checkTemplateId":4,"runConcurrent":true,"ignoreErrors":true}]}], + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f' + ) + else: + return CheckCollectionTemplateResponse( + check_collection_template_id = 12345, + name = 'Instance checks', + description = 'Performs all checks for an instance', + internal = False, + object_type = 'vserver', + check_templates = [{"checkTemplateId":2,"runConcurrent":false,"ignoreErrors":false,"checkTemplates":[{"checkTemplateId":3,"runConcurrent":true,"ignoreErrors":false},{"checkTemplateId":4,"runConcurrent":true,"ignoreErrors":true}]}], + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + ) + """ + + def testCheckCollectionTemplateResponse(self): + """Test CheckCollectionTemplateResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_check_collection_templates_api.py b/test/test_check_collection_templates_api.py new file mode 100644 index 00000000..e8b127dd --- /dev/null +++ b/test/test_check_collection_templates_api.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.api.check_collection_templates_api import CheckCollectionTemplatesApi + + +class TestCheckCollectionTemplatesApi(unittest.TestCase): + """CheckCollectionTemplatesApi unit test stubs""" + + def setUp(self) -> None: + self.api = CheckCollectionTemplatesApi() + + def tearDown(self) -> None: + pass + + def test_get_ext_check_collection_template(self) -> None: + """Test case for get_ext_check_collection_template + + Get check + """ + pass + + def test_list_ext_check_collection_templates(self) -> None: + """Test case for list_ext_check_collection_templates + + List check collection templates + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_check_collection_templates_check_templates.py b/test/test_check_collection_templates_check_templates.py new file mode 100644 index 00000000..ebbd9749 --- /dev/null +++ b/test/test_check_collection_templates_check_templates.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.check_collection_templates_check_templates import CheckCollectionTemplatesCheckTemplates + +class TestCheckCollectionTemplatesCheckTemplates(unittest.TestCase): + """CheckCollectionTemplatesCheckTemplates unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CheckCollectionTemplatesCheckTemplates: + """Test CheckCollectionTemplatesCheckTemplates + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CheckCollectionTemplatesCheckTemplates` + """ + model = CheckCollectionTemplatesCheckTemplates() + if include_optional: + return CheckCollectionTemplatesCheckTemplates( + check_template_id = 1234, + run_concurrent = True, + ignore_errors = True, + check_templates = [ + pfruck_contabo.models.check_collection_templates_check_templates.CheckCollectionTemplatesCheckTemplates( + check_template_id = 1234, + run_concurrent = True, + ignore_errors = True, + check_templates = [ + pfruck_contabo.models.check_collection_templates_check_templates.CheckCollectionTemplatesCheckTemplates( + check_template_id = 1234, + run_concurrent = True, + ignore_errors = True, ) + ], ) + ] + ) + else: + return CheckCollectionTemplatesCheckTemplates( + check_template_id = 1234, + run_concurrent = True, + ignore_errors = True, + ) + """ + + def testCheckCollectionTemplatesCheckTemplates(self): + """Test CheckCollectionTemplatesCheckTemplates""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_check_collection_templates_get_response.py b/test/test_check_collection_templates_get_response.py new file mode 100644 index 00000000..d27ccb43 --- /dev/null +++ b/test/test_check_collection_templates_get_response.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.check_collection_templates_get_response import CheckCollectionTemplatesGetResponse + +class TestCheckCollectionTemplatesGetResponse(unittest.TestCase): + """CheckCollectionTemplatesGetResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CheckCollectionTemplatesGetResponse: + """Test CheckCollectionTemplatesGetResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CheckCollectionTemplatesGetResponse` + """ + model = CheckCollectionTemplatesGetResponse() + if include_optional: + return CheckCollectionTemplatesGetResponse( + data = [ + pfruck_contabo.models.check_collection_template_response.CheckCollectionTemplateResponse( + check_collection_template_id = 12345, + name = 'Instance checks', + description = 'Performs all checks for an instance', + internal = False, + object_type = 'vserver', + check_templates = [{"checkTemplateId":2,"runConcurrent":false,"ignoreErrors":false,"checkTemplates":[{"checkTemplateId":3,"runConcurrent":true,"ignoreErrors":false},{"checkTemplateId":4,"runConcurrent":true,"ignoreErrors":true}]}], + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ) + ) + else: + return CheckCollectionTemplatesGetResponse( + data = [ + pfruck_contabo.models.check_collection_template_response.CheckCollectionTemplateResponse( + check_collection_template_id = 12345, + name = 'Instance checks', + description = 'Performs all checks for an instance', + internal = False, + object_type = 'vserver', + check_templates = [{"checkTemplateId":2,"runConcurrent":false,"ignoreErrors":false,"checkTemplates":[{"checkTemplateId":3,"runConcurrent":true,"ignoreErrors":false},{"checkTemplateId":4,"runConcurrent":true,"ignoreErrors":true}]}], + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ), + ) + """ + + def testCheckCollectionTemplatesGetResponse(self): + """Test CheckCollectionTemplatesGetResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_check_collection_templates_list_response.py b/test/test_check_collection_templates_list_response.py new file mode 100644 index 00000000..6cb8fa70 --- /dev/null +++ b/test/test_check_collection_templates_list_response.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.check_collection_templates_list_response import CheckCollectionTemplatesListResponse + +class TestCheckCollectionTemplatesListResponse(unittest.TestCase): + """CheckCollectionTemplatesListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CheckCollectionTemplatesListResponse: + """Test CheckCollectionTemplatesListResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CheckCollectionTemplatesListResponse` + """ + model = CheckCollectionTemplatesListResponse() + if include_optional: + return CheckCollectionTemplatesListResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.check_collection_template_response.CheckCollectionTemplateResponse( + check_collection_template_id = 12345, + name = 'Instance checks', + description = 'Performs all checks for an instance', + internal = False, + object_type = 'vserver', + check_templates = [{"checkTemplateId":2,"runConcurrent":false,"ignoreErrors":false,"checkTemplates":[{"checkTemplateId":3,"runConcurrent":true,"ignoreErrors":false},{"checkTemplateId":4,"runConcurrent":true,"ignoreErrors":true}]}], + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ) + ) + else: + return CheckCollectionTemplatesListResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.check_collection_template_response.CheckCollectionTemplateResponse( + check_collection_template_id = 12345, + name = 'Instance checks', + description = 'Performs all checks for an instance', + internal = False, + object_type = 'vserver', + check_templates = [{"checkTemplateId":2,"runConcurrent":false,"ignoreErrors":false,"checkTemplates":[{"checkTemplateId":3,"runConcurrent":true,"ignoreErrors":false},{"checkTemplateId":4,"runConcurrent":true,"ignoreErrors":true}]}], + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ), + ) + """ + + def testCheckCollectionTemplatesListResponse(self): + """Test CheckCollectionTemplatesListResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_check_collections_api.py b/test/test_check_collections_api.py new file mode 100644 index 00000000..7b3f53c9 --- /dev/null +++ b/test/test_check_collections_api.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.api.check_collections_api import CheckCollectionsApi + + +class TestCheckCollectionsApi(unittest.TestCase): + """CheckCollectionsApi unit test stubs""" + + def setUp(self) -> None: + self.api = CheckCollectionsApi() + + def tearDown(self) -> None: + pass + + def test_cancel_ext_check_collection(self) -> None: + """Test case for cancel_ext_check_collection + + Cancel check collection + """ + pass + + def test_get_ext_check_collection(self) -> None: + """Test case for get_ext_check_collection + + Get check collection + """ + pass + + def test_list_ext_check_collections(self) -> None: + """Test case for list_ext_check_collections + + List check collections + """ + pass + + def test_start_ext_check_collection(self) -> None: + """Test case for start_ext_check_collection + + Start check collection + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_check_collections_audit_list_response.py b/test/test_check_collections_audit_list_response.py new file mode 100644 index 00000000..d6191518 --- /dev/null +++ b/test/test_check_collections_audit_list_response.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.check_collections_audit_list_response import CheckCollectionsAuditListResponse + +class TestCheckCollectionsAuditListResponse(unittest.TestCase): + """CheckCollectionsAuditListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CheckCollectionsAuditListResponse: + """Test CheckCollectionsAuditListResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CheckCollectionsAuditListResponse` + """ + model = CheckCollectionsAuditListResponse() + if include_optional: + return CheckCollectionsAuditListResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.check_collections_audit_response.CheckCollectionsAuditResponse( + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + audit_id = 12345, + action = 'CREATED', + foreign_changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + foreign_username = 'John.Doe', + changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + username = 'John.Doe', + request_id = 'A2F56FAF-18N0-4893-11HG-R312M1E4FEC5', + trace_id = '78E9A428-94E9-4A2A-92F5-26038C6884F', + changes = null, + check_collection_id = 12345, ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ) + ) + else: + return CheckCollectionsAuditListResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.check_collections_audit_response.CheckCollectionsAuditResponse( + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + audit_id = 12345, + action = 'CREATED', + foreign_changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + foreign_username = 'John.Doe', + changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + username = 'John.Doe', + request_id = 'A2F56FAF-18N0-4893-11HG-R312M1E4FEC5', + trace_id = '78E9A428-94E9-4A2A-92F5-26038C6884F', + changes = null, + check_collection_id = 12345, ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ), + ) + """ + + def testCheckCollectionsAuditListResponse(self): + """Test CheckCollectionsAuditListResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_check_collections_audit_response.py b/test/test_check_collections_audit_response.py new file mode 100644 index 00000000..509bec72 --- /dev/null +++ b/test/test_check_collections_audit_response.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.check_collections_audit_response import CheckCollectionsAuditResponse + +class TestCheckCollectionsAuditResponse(unittest.TestCase): + """CheckCollectionsAuditResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CheckCollectionsAuditResponse: + """Test CheckCollectionsAuditResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CheckCollectionsAuditResponse` + """ + model = CheckCollectionsAuditResponse() + if include_optional: + return CheckCollectionsAuditResponse( + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + audit_id = 12345, + action = 'CREATED', + foreign_changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + foreign_username = 'John.Doe', + changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + username = 'John.Doe', + request_id = 'A2F56FAF-18N0-4893-11HG-R312M1E4FEC5', + trace_id = '78E9A428-94E9-4A2A-92F5-26038C6884F', + changes = pfruck_contabo.models.changes.Changes( + prev = {"property":"foo"}, + new = {"property":"bar"}, ), + check_collection_id = 12345 + ) + else: + return CheckCollectionsAuditResponse( + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + audit_id = 12345, + action = 'CREATED', + foreign_changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + foreign_username = 'John.Doe', + changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + username = 'John.Doe', + request_id = 'A2F56FAF-18N0-4893-11HG-R312M1E4FEC5', + trace_id = '78E9A428-94E9-4A2A-92F5-26038C6884F', + changes = pfruck_contabo.models.changes.Changes( + prev = {"property":"foo"}, + new = {"property":"bar"}, ), + check_collection_id = 12345, + ) + """ + + def testCheckCollectionsAuditResponse(self): + """Test CheckCollectionsAuditResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_check_collections_get_response.py b/test/test_check_collections_get_response.py new file mode 100644 index 00000000..6d93c1f2 --- /dev/null +++ b/test/test_check_collections_get_response.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.check_collections_get_response import CheckCollectionsGetResponse + +class TestCheckCollectionsGetResponse(unittest.TestCase): + """CheckCollectionsGetResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CheckCollectionsGetResponse: + """Test CheckCollectionsGetResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CheckCollectionsGetResponse` + """ + model = CheckCollectionsGetResponse() + if include_optional: + return CheckCollectionsGetResponse( + data = [ + pfruck_contabo.models.check_collection_response.CheckCollectionResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + check_collection_id = 12345, + check_collection_template_id = 12345, + check_templates = [{"checkId":1,"checkTemplateId":2,"runConcurrent":false,"ignoreErrors":false,"checkTemplates":[{"checkId":2,"checkTemplateId":3,"runConcurrent":true,"ignoreErrors":false},{"checkId":3,"checkTemplateId":4,"runConcurrent":true,"ignoreErrors":true}]}], + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + checks = [ + pfruck_contabo.models.check_response.CheckResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + check_id = 12345, + check_collection_id = 12345, + check_template_id = 12345, + name = 'Ping check', + note = 'Ping failed with timeout, please check the firewall rules and connectivity', + internal_note = 'Ping failed with error code 123, could be an issue with the route server settings', + duration_ms = 4711, + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + log = '6 packets transmitted, 0 received, 100% packet loss, time 5107ms', ) + ], ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ) + ) + else: + return CheckCollectionsGetResponse( + data = [ + pfruck_contabo.models.check_collection_response.CheckCollectionResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + check_collection_id = 12345, + check_collection_template_id = 12345, + check_templates = [{"checkId":1,"checkTemplateId":2,"runConcurrent":false,"ignoreErrors":false,"checkTemplates":[{"checkId":2,"checkTemplateId":3,"runConcurrent":true,"ignoreErrors":false},{"checkId":3,"checkTemplateId":4,"runConcurrent":true,"ignoreErrors":true}]}], + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + checks = [ + pfruck_contabo.models.check_response.CheckResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + check_id = 12345, + check_collection_id = 12345, + check_template_id = 12345, + name = 'Ping check', + note = 'Ping failed with timeout, please check the firewall rules and connectivity', + internal_note = 'Ping failed with error code 123, could be an issue with the route server settings', + duration_ms = 4711, + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + log = '6 packets transmitted, 0 received, 100% packet loss, time 5107ms', ) + ], ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ), + ) + """ + + def testCheckCollectionsGetResponse(self): + """Test CheckCollectionsGetResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_check_collections_list_response.py b/test/test_check_collections_list_response.py new file mode 100644 index 00000000..12bf3a8e --- /dev/null +++ b/test/test_check_collections_list_response.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.check_collections_list_response import CheckCollectionsListResponse + +class TestCheckCollectionsListResponse(unittest.TestCase): + """CheckCollectionsListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CheckCollectionsListResponse: + """Test CheckCollectionsListResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CheckCollectionsListResponse` + """ + model = CheckCollectionsListResponse() + if include_optional: + return CheckCollectionsListResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.check_collection_response.CheckCollectionResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + check_collection_id = 12345, + check_collection_template_id = 12345, + check_templates = [{"checkId":1,"checkTemplateId":2,"runConcurrent":false,"ignoreErrors":false,"checkTemplates":[{"checkId":2,"checkTemplateId":3,"runConcurrent":true,"ignoreErrors":false},{"checkId":3,"checkTemplateId":4,"runConcurrent":true,"ignoreErrors":true}]}], + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + checks = [ + pfruck_contabo.models.check_response.CheckResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + check_id = 12345, + check_collection_id = 12345, + check_template_id = 12345, + name = 'Ping check', + note = 'Ping failed with timeout, please check the firewall rules and connectivity', + internal_note = 'Ping failed with error code 123, could be an issue with the route server settings', + duration_ms = 4711, + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + log = '6 packets transmitted, 0 received, 100% packet loss, time 5107ms', ) + ], ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ) + ) + else: + return CheckCollectionsListResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.check_collection_response.CheckCollectionResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + check_collection_id = 12345, + check_collection_template_id = 12345, + check_templates = [{"checkId":1,"checkTemplateId":2,"runConcurrent":false,"ignoreErrors":false,"checkTemplates":[{"checkId":2,"checkTemplateId":3,"runConcurrent":true,"ignoreErrors":false},{"checkId":3,"checkTemplateId":4,"runConcurrent":true,"ignoreErrors":true}]}], + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + checks = [ + pfruck_contabo.models.check_response.CheckResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + check_id = 12345, + check_collection_id = 12345, + check_template_id = 12345, + name = 'Ping check', + note = 'Ping failed with timeout, please check the firewall rules and connectivity', + internal_note = 'Ping failed with error code 123, could be an issue with the route server settings', + duration_ms = 4711, + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + log = '6 packets transmitted, 0 received, 100% packet loss, time 5107ms', ) + ], ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ), + ) + """ + + def testCheckCollectionsListResponse(self): + """Test CheckCollectionsListResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_check_collections_replay_request.py b/test/test_check_collections_replay_request.py new file mode 100644 index 00000000..e6254530 --- /dev/null +++ b/test/test_check_collections_replay_request.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.check_collections_replay_request import CheckCollectionsReplayRequest + +class TestCheckCollectionsReplayRequest(unittest.TestCase): + """CheckCollectionsReplayRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CheckCollectionsReplayRequest: + """Test CheckCollectionsReplayRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CheckCollectionsReplayRequest` + """ + model = CheckCollectionsReplayRequest() + if include_optional: + return CheckCollectionsReplayRequest( + org_id = 'cntb', + account_id = 'DE-123', + creation_start_time = '2021-06-03T06:27:12Z', + creation_end_time = '2021-06-03T10:27:12Z', + rate = 10, + check_collection_ids = [12345,23456] + ) + else: + return CheckCollectionsReplayRequest( + org_id = 'cntb', + account_id = 'DE-123', + ) + """ + + def testCheckCollectionsReplayRequest(self): + """Test CheckCollectionsReplayRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_check_create_request.py b/test/test_check_create_request.py new file mode 100644 index 00000000..148059f4 --- /dev/null +++ b/test/test_check_create_request.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.check_create_request import CheckCreateRequest + +class TestCheckCreateRequest(unittest.TestCase): + """CheckCreateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CheckCreateRequest: + """Test CheckCreateRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CheckCreateRequest` + """ + model = CheckCreateRequest() + if include_optional: + return CheckCreateRequest( + object_type = 'vserver', + object_id = '4711', + check_template_id = 12345, + check_collection_id = 12345, + org_id = 'cntb', + account_id = 'DE-123' + ) + else: + return CheckCreateRequest( + object_type = 'vserver', + object_id = '4711', + check_template_id = 12345, + org_id = 'cntb', + account_id = 'DE-123', + ) + """ + + def testCheckCreateRequest(self): + """Test CheckCreateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_check_response.py b/test/test_check_response.py new file mode 100644 index 00000000..15b08e13 --- /dev/null +++ b/test/test_check_response.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.check_response import CheckResponse + +class TestCheckResponse(unittest.TestCase): + """CheckResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CheckResponse: + """Test CheckResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CheckResponse` + """ + model = CheckResponse() + if include_optional: + return CheckResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + check_id = 12345, + check_collection_id = 12345, + check_template_id = 12345, + name = 'Ping check', + note = 'Ping failed with timeout, please check the firewall rules and connectivity', + internal_note = 'Ping failed with error code 123, could be an issue with the route server settings', + duration_ms = 4711, + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + log = '6 packets transmitted, 0 received, 100% packet loss, time 5107ms' + ) + else: + return CheckResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + check_id = 12345, + check_collection_id = 12345, + check_template_id = 12345, + name = 'Ping check', + note = 'Ping failed with timeout, please check the firewall rules and connectivity', + internal_note = 'Ping failed with error code 123, could be an issue with the route server settings', + duration_ms = 4711, + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + log = '6 packets transmitted, 0 received, 100% packet loss, time 5107ms', + ) + """ + + def testCheckResponse(self): + """Test CheckResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_check_template_response.py b/test/test_check_template_response.py new file mode 100644 index 00000000..dffba047 --- /dev/null +++ b/test/test_check_template_response.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.check_template_response import CheckTemplateResponse + +class TestCheckTemplateResponse(unittest.TestCase): + """CheckTemplateResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CheckTemplateResponse: + """Test CheckTemplateResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CheckTemplateResponse` + """ + model = CheckTemplateResponse() + if include_optional: + return CheckTemplateResponse( + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + check_template_id = 12345, + name = 'Ping check instance', + description = 'Performs a ping check on an instance', + internal = False, + object_type = 'vserver', + collector_class = 'InstanceCollector.ts', + check_class = 'PingCheck.ts', + remedy_template_ids = 1, 2, ... + ) + else: + return CheckTemplateResponse( + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + check_template_id = 12345, + name = 'Ping check instance', + description = 'Performs a ping check on an instance', + internal = False, + object_type = 'vserver', + collector_class = 'InstanceCollector.ts', + check_class = 'PingCheck.ts', + remedy_template_ids = 1, 2, ..., + ) + """ + + def testCheckTemplateResponse(self): + """Test CheckTemplateResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_check_templates_get_response.py b/test/test_check_templates_get_response.py new file mode 100644 index 00000000..a56c7dd8 --- /dev/null +++ b/test/test_check_templates_get_response.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.check_templates_get_response import CheckTemplatesGetResponse + +class TestCheckTemplatesGetResponse(unittest.TestCase): + """CheckTemplatesGetResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CheckTemplatesGetResponse: + """Test CheckTemplatesGetResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CheckTemplatesGetResponse` + """ + model = CheckTemplatesGetResponse() + if include_optional: + return CheckTemplatesGetResponse( + data = [ + pfruck_contabo.models.check_template_response.CheckTemplateResponse( + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + check_template_id = 12345, + name = 'Ping check instance', + description = 'Performs a ping check on an instance', + internal = False, + object_type = 'vserver', + collector_class = 'InstanceCollector.ts', + check_class = 'PingCheck.ts', + remedy_template_ids = 1, 2, ..., ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ) + ) + else: + return CheckTemplatesGetResponse( + data = [ + pfruck_contabo.models.check_template_response.CheckTemplateResponse( + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + check_template_id = 12345, + name = 'Ping check instance', + description = 'Performs a ping check on an instance', + internal = False, + object_type = 'vserver', + collector_class = 'InstanceCollector.ts', + check_class = 'PingCheck.ts', + remedy_template_ids = 1, 2, ..., ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ), + ) + """ + + def testCheckTemplatesGetResponse(self): + """Test CheckTemplatesGetResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_check_templates_list_response.py b/test/test_check_templates_list_response.py new file mode 100644 index 00000000..d0e52863 --- /dev/null +++ b/test/test_check_templates_list_response.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.check_templates_list_response import CheckTemplatesListResponse + +class TestCheckTemplatesListResponse(unittest.TestCase): + """CheckTemplatesListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CheckTemplatesListResponse: + """Test CheckTemplatesListResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CheckTemplatesListResponse` + """ + model = CheckTemplatesListResponse() + if include_optional: + return CheckTemplatesListResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.check_template_response.CheckTemplateResponse( + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + check_template_id = 12345, + name = 'Ping check instance', + description = 'Performs a ping check on an instance', + internal = False, + object_type = 'vserver', + collector_class = 'InstanceCollector.ts', + check_class = 'PingCheck.ts', + remedy_template_ids = 1, 2, ..., ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ) + ) + else: + return CheckTemplatesListResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.check_template_response.CheckTemplateResponse( + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + check_template_id = 12345, + name = 'Ping check instance', + description = 'Performs a ping check on an instance', + internal = False, + object_type = 'vserver', + collector_class = 'InstanceCollector.ts', + check_class = 'PingCheck.ts', + remedy_template_ids = 1, 2, ..., ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ), + ) + """ + + def testCheckTemplatesListResponse(self): + """Test CheckTemplatesListResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_checks_api.py b/test/test_checks_api.py new file mode 100644 index 00000000..f8baab88 --- /dev/null +++ b/test/test_checks_api.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.api.checks_api import ChecksApi + + +class TestChecksApi(unittest.TestCase): + """ChecksApi unit test stubs""" + + def setUp(self) -> None: + self.api = ChecksApi() + + def tearDown(self) -> None: + pass + + def test_cancel_ext_check(self) -> None: + """Test case for cancel_ext_check + + Cancel check + """ + pass + + def test_get_ext_check(self) -> None: + """Test case for get_ext_check + + Get check + """ + pass + + def test_list_ext_checks(self) -> None: + """Test case for list_ext_checks + + List check + """ + pass + + def test_start_ext_check(self) -> None: + """Test case for start_ext_check + + Start check + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_checks_audit_list_response.py b/test/test_checks_audit_list_response.py new file mode 100644 index 00000000..e484cf15 --- /dev/null +++ b/test/test_checks_audit_list_response.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.checks_audit_list_response import ChecksAuditListResponse + +class TestChecksAuditListResponse(unittest.TestCase): + """ChecksAuditListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ChecksAuditListResponse: + """Test ChecksAuditListResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ChecksAuditListResponse` + """ + model = ChecksAuditListResponse() + if include_optional: + return ChecksAuditListResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.checks_audit_response.ChecksAuditResponse( + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + audit_id = 12345, + action = 'CREATED', + foreign_changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + foreign_username = 'John.Doe', + changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + username = 'John.Doe', + request_id = 'A2F56FAF-18N0-4893-11HG-R312M1E4FEC5', + trace_id = '78E9A428-94E9-4A2A-92F5-26038C6884F', + changes = null, + check_id = 12345, ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ) + ) + else: + return ChecksAuditListResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.checks_audit_response.ChecksAuditResponse( + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + audit_id = 12345, + action = 'CREATED', + foreign_changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + foreign_username = 'John.Doe', + changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + username = 'John.Doe', + request_id = 'A2F56FAF-18N0-4893-11HG-R312M1E4FEC5', + trace_id = '78E9A428-94E9-4A2A-92F5-26038C6884F', + changes = null, + check_id = 12345, ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ), + ) + """ + + def testChecksAuditListResponse(self): + """Test ChecksAuditListResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_checks_audit_response.py b/test/test_checks_audit_response.py new file mode 100644 index 00000000..91dbeb50 --- /dev/null +++ b/test/test_checks_audit_response.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.checks_audit_response import ChecksAuditResponse + +class TestChecksAuditResponse(unittest.TestCase): + """ChecksAuditResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ChecksAuditResponse: + """Test ChecksAuditResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ChecksAuditResponse` + """ + model = ChecksAuditResponse() + if include_optional: + return ChecksAuditResponse( + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + audit_id = 12345, + action = 'CREATED', + foreign_changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + foreign_username = 'John.Doe', + changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + username = 'John.Doe', + request_id = 'A2F56FAF-18N0-4893-11HG-R312M1E4FEC5', + trace_id = '78E9A428-94E9-4A2A-92F5-26038C6884F', + changes = pfruck_contabo.models.changes.Changes( + prev = {"property":"foo"}, + new = {"property":"bar"}, ), + check_id = 12345 + ) + else: + return ChecksAuditResponse( + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + audit_id = 12345, + action = 'CREATED', + foreign_changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + foreign_username = 'John.Doe', + changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + username = 'John.Doe', + request_id = 'A2F56FAF-18N0-4893-11HG-R312M1E4FEC5', + trace_id = '78E9A428-94E9-4A2A-92F5-26038C6884F', + changes = pfruck_contabo.models.changes.Changes( + prev = {"property":"foo"}, + new = {"property":"bar"}, ), + check_id = 12345, + ) + """ + + def testChecksAuditResponse(self): + """Test ChecksAuditResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_checks_get_response.py b/test/test_checks_get_response.py new file mode 100644 index 00000000..7acbb1c5 --- /dev/null +++ b/test/test_checks_get_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.checks_get_response import ChecksGetResponse + +class TestChecksGetResponse(unittest.TestCase): + """ChecksGetResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ChecksGetResponse: + """Test ChecksGetResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ChecksGetResponse` + """ + model = ChecksGetResponse() + if include_optional: + return ChecksGetResponse( + data = [ + pfruck_contabo.models.check_response.CheckResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + check_id = 12345, + check_collection_id = 12345, + check_template_id = 12345, + name = 'Ping check', + note = 'Ping failed with timeout, please check the firewall rules and connectivity', + internal_note = 'Ping failed with error code 123, could be an issue with the route server settings', + duration_ms = 4711, + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + log = '6 packets transmitted, 0 received, 100% packet loss, time 5107ms', ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ) + ) + else: + return ChecksGetResponse( + data = [ + pfruck_contabo.models.check_response.CheckResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + check_id = 12345, + check_collection_id = 12345, + check_template_id = 12345, + name = 'Ping check', + note = 'Ping failed with timeout, please check the firewall rules and connectivity', + internal_note = 'Ping failed with error code 123, could be an issue with the route server settings', + duration_ms = 4711, + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + log = '6 packets transmitted, 0 received, 100% packet loss, time 5107ms', ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ), + ) + """ + + def testChecksGetResponse(self): + """Test ChecksGetResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_checks_list_response.py b/test/test_checks_list_response.py new file mode 100644 index 00000000..a4fa44c7 --- /dev/null +++ b/test/test_checks_list_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.checks_list_response import ChecksListResponse + +class TestChecksListResponse(unittest.TestCase): + """ChecksListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ChecksListResponse: + """Test ChecksListResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ChecksListResponse` + """ + model = ChecksListResponse() + if include_optional: + return ChecksListResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.check_response.CheckResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + check_id = 12345, + check_collection_id = 12345, + check_template_id = 12345, + name = 'Ping check', + note = 'Ping failed with timeout, please check the firewall rules and connectivity', + internal_note = 'Ping failed with error code 123, could be an issue with the route server settings', + duration_ms = 4711, + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + log = '6 packets transmitted, 0 received, 100% packet loss, time 5107ms', ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ) + ) + else: + return ChecksListResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.check_response.CheckResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + check_id = 12345, + check_collection_id = 12345, + check_template_id = 12345, + name = 'Ping check', + note = 'Ping failed with timeout, please check the firewall rules and connectivity', + internal_note = 'Ping failed with error code 123, could be an issue with the route server settings', + duration_ms = 4711, + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + log = '6 packets transmitted, 0 received, 100% packet loss, time 5107ms', ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ), + ) + """ + + def testChecksListResponse(self): + """Test ChecksListResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_checks_replay_request.py b/test/test_checks_replay_request.py new file mode 100644 index 00000000..21a64b71 --- /dev/null +++ b/test/test_checks_replay_request.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.checks_replay_request import ChecksReplayRequest + +class TestChecksReplayRequest(unittest.TestCase): + """ChecksReplayRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ChecksReplayRequest: + """Test ChecksReplayRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ChecksReplayRequest` + """ + model = ChecksReplayRequest() + if include_optional: + return ChecksReplayRequest( + org_id = 'cntb', + account_id = 'DE-123', + creation_start_time = '2021-06-03T06:27:12Z', + creation_end_time = '2021-06-03T10:27:12Z', + rate = 10, + check_ids = [12345,23456] + ) + else: + return ChecksReplayRequest( + org_id = 'cntb', + account_id = 'DE-123', + ) + """ + + def testChecksReplayRequest(self): + """Test ChecksReplayRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_dns_zone_record_request.py b/test/test_create_dns_zone_record_request.py new file mode 100644 index 00000000..8a342c8f --- /dev/null +++ b/test/test_create_dns_zone_record_request.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.create_dns_zone_record_request import CreateDnsZoneRecordRequest + +class TestCreateDnsZoneRecordRequest(unittest.TestCase): + """CreateDnsZoneRecordRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateDnsZoneRecordRequest: + """Test CreateDnsZoneRecordRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateDnsZoneRecordRequest` + """ + model = CreateDnsZoneRecordRequest() + if include_optional: + return CreateDnsZoneRecordRequest( + name = 'test', + type = 'A', + ttl = 86400, + prio = 0, + data = '10.0.0.1', + port = 1.337, + weight = 1.337, + flag = 1.337, + tag = '' + ) + else: + return CreateDnsZoneRecordRequest( + type = 'A', + ttl = 86400, + prio = 0, + data = '10.0.0.1', + ) + """ + + def testCreateDnsZoneRecordRequest(self): + """Test CreateDnsZoneRecordRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_dns_zone_request.py b/test/test_create_dns_zone_request.py new file mode 100644 index 00000000..51ea35ea --- /dev/null +++ b/test/test_create_dns_zone_request.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.create_dns_zone_request import CreateDnsZoneRequest + +class TestCreateDnsZoneRequest(unittest.TestCase): + """CreateDnsZoneRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateDnsZoneRequest: + """Test CreateDnsZoneRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateDnsZoneRequest` + """ + model = CreateDnsZoneRequest() + if include_optional: + return CreateDnsZoneRequest( + zone_name = 'example.com' + ) + else: + return CreateDnsZoneRequest( + zone_name = 'example.com', + ) + """ + + def testCreateDnsZoneRequest(self): + """Test CreateDnsZoneRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_firewall_request.py b/test/test_create_firewall_request.py new file mode 100644 index 00000000..8adc8de9 --- /dev/null +++ b/test/test_create_firewall_request.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.create_firewall_request import CreateFirewallRequest + +class TestCreateFirewallRequest(unittest.TestCase): + """CreateFirewallRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateFirewallRequest: + """Test CreateFirewallRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateFirewallRequest` + """ + model = CreateFirewallRequest() + if include_optional: + return CreateFirewallRequest( + name = 'My Firewall', + description = 'Allowing incoming HTTP traffic.', + status = 'active', + rules = pfruck_contabo.models.rules_request.RulesRequest( + inbound = [ + pfruck_contabo.models.firewall_rule_request.FirewallRuleRequest( + protocol = 'tcp', + dest_ports = ["80", "80-90"], + src_cidr = null, + action = 'accept', + status = 'active', + display_name = 'Allow HTTP Traffic', ) + ], ) + ) + else: + return CreateFirewallRequest( + name = 'My Firewall', + status = 'active', + ) + """ + + def testCreateFirewallRequest(self): + """Test CreateFirewallRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_firewall_response.py b/test/test_create_firewall_response.py new file mode 100644 index 00000000..0ddcb055 --- /dev/null +++ b/test/test_create_firewall_response.py @@ -0,0 +1,152 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.create_firewall_response import CreateFirewallResponse + +class TestCreateFirewallResponse(unittest.TestCase): + """CreateFirewallResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateFirewallResponse: + """Test CreateFirewallResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateFirewallResponse` + """ + model = CreateFirewallResponse() + if include_optional: + return CreateFirewallResponse( + data = [ + pfruck_contabo.models.firewall_response.FirewallResponse( + tenant_id = 'DE', + customer_id = '54321', + firewall_id = 'b943b25a-c8b5-4570-9135-4bbaa7615b81', + name = 'My Firewall', + description = 'Allowing incoming HTTP traffic.', + status = 'active', + instance_status = [ + pfruck_contabo.models.instance_status_representation.InstanceStatusRepresentation( + instance_id = 100, + status = 'ok', + error_message = 'Failed to assign instance to firewall', ) + ], + instances = [ + pfruck_contabo.models.instance_details.InstanceDetails( + instance_id = 100, + display_name = 'Instance', + name = 'vmd12345', + product_id = 'V1', + ip_config = pfruck_contabo.models.ip_config1.IpConfig1( + v4 = pfruck_contabo.models.ip_v42.IpV42( + ip = '192.168.0.1', + netmask_cidr = 19, + gateway = '1.1.1.1', ), + v6 = pfruck_contabo.models.ip_v6.IpV6( + ip = '1:2:3:4:5:6:7:8', + netmask_cidr = 64, + gateway = '1:2:3:4:5:6:7:8', ), ), + region_slug = 'EU', + region_name = 'European Union (Germany)', + data_center_slug = 'EU1', + data_center_name = 'European Union (Germany) 1', ) + ], + rules = pfruck_contabo.models.rules.Rules( + inbound = [ + pfruck_contabo.models.firewall_rule_response.FirewallRuleResponse( + protocol = 'tcp', + dest_ports = ["80", "80-90"], + src_cidr = pfruck_contabo.models.src_cidr.SrcCidr( + ipv4 = ["192.168.0.1/24","AnyIPv4"], + ipv6 = ["1:2:3:4:5:6:7:8/64","AnyIPv6"], ), + action = 'accept', + status = 'active', + display_name = 'Allow HTTP Traffic', ) + ], ), + created_date = '2021-06-03T06:27:12Z', + updated_date = '2021-06-13T06:27:12Z', ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ) + ) + else: + return CreateFirewallResponse( + data = [ + pfruck_contabo.models.firewall_response.FirewallResponse( + tenant_id = 'DE', + customer_id = '54321', + firewall_id = 'b943b25a-c8b5-4570-9135-4bbaa7615b81', + name = 'My Firewall', + description = 'Allowing incoming HTTP traffic.', + status = 'active', + instance_status = [ + pfruck_contabo.models.instance_status_representation.InstanceStatusRepresentation( + instance_id = 100, + status = 'ok', + error_message = 'Failed to assign instance to firewall', ) + ], + instances = [ + pfruck_contabo.models.instance_details.InstanceDetails( + instance_id = 100, + display_name = 'Instance', + name = 'vmd12345', + product_id = 'V1', + ip_config = pfruck_contabo.models.ip_config1.IpConfig1( + v4 = pfruck_contabo.models.ip_v42.IpV42( + ip = '192.168.0.1', + netmask_cidr = 19, + gateway = '1.1.1.1', ), + v6 = pfruck_contabo.models.ip_v6.IpV6( + ip = '1:2:3:4:5:6:7:8', + netmask_cidr = 64, + gateway = '1:2:3:4:5:6:7:8', ), ), + region_slug = 'EU', + region_name = 'European Union (Germany)', + data_center_slug = 'EU1', + data_center_name = 'European Union (Germany) 1', ) + ], + rules = pfruck_contabo.models.rules.Rules( + inbound = [ + pfruck_contabo.models.firewall_rule_response.FirewallRuleResponse( + protocol = 'tcp', + dest_ports = ["80", "80-90"], + src_cidr = pfruck_contabo.models.src_cidr.SrcCidr( + ipv4 = ["192.168.0.1/24","AnyIPv4"], + ipv6 = ["1:2:3:4:5:6:7:8/64","AnyIPv6"], ), + action = 'accept', + status = 'active', + display_name = 'Allow HTTP Traffic', ) + ], ), + created_date = '2021-06-03T06:27:12Z', + updated_date = '2021-06-13T06:27:12Z', ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ), + ) + """ + + def testCreateFirewallResponse(self): + """Test CreateFirewallResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_instance_addons.py b/test/test_create_instance_addons.py index 91ffa31c..11750568 100644 --- a/test/test_create_instance_addons.py +++ b/test/test_create_instance_addons.py @@ -37,6 +37,7 @@ def make_instance(self, include_optional) -> CreateInstanceAddons: return CreateInstanceAddons( private_networking = {}, additional_ips = {}, + backup = {}, extra_storage = pfruck_contabo.models.extra_storage_request.ExtraStorageRequest( ssd = [ '' diff --git a/test/test_create_instance_request.py b/test/test_create_instance_request.py index 5eb67492..0a818ec0 100644 --- a/test/test_create_instance_request.py +++ b/test/test_create_instance_request.py @@ -36,7 +36,7 @@ def make_instance(self, include_optional) -> CreateInstanceRequest: if include_optional: return CreateInstanceRequest( image_id = 'afecbb85-e2fc-46f0-9684-b46b1faf00bb', - product_id = 'V45', + product_id = 'V92', region = 'EU', ssh_keys = [123, 125], root_password = 1, @@ -52,6 +52,7 @@ def make_instance(self, include_optional) -> CreateInstanceRequest: add_ons = pfruck_contabo.models.create_instance_addons.CreateInstanceAddons( private_networking = {}, additional_ips = {}, + backup = {}, extra_storage = {}, custom_image = {}, addons_ids = [ diff --git a/test/test_create_instance_response.py b/test/test_create_instance_response.py index 139a60f3..b4d49f0f 100644 --- a/test/test_create_instance_response.py +++ b/test/test_create_instance_response.py @@ -42,7 +42,7 @@ def make_instance(self, include_optional) -> CreateInstanceResponse: instance_id = 12345, created_date = '2021-06-02T12:32:03.363Z', image_id = '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d', - product_id = 'V45', + product_id = 'V92', region = 'EU', add_ons = [ pfruck_contabo.models.add_on_response.AddOnResponse( @@ -50,7 +50,7 @@ def make_instance(self, include_optional) -> CreateInstanceResponse: quantity = 4, ) ], os_type = 'Linux', - status = 'provisioning', + status = running, ssh_keys = [123,125], ) ], links = pfruck_contabo.models.self_links.SelfLinks( @@ -65,7 +65,7 @@ def make_instance(self, include_optional) -> CreateInstanceResponse: instance_id = 12345, created_date = '2021-06-02T12:32:03.363Z', image_id = '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d', - product_id = 'V45', + product_id = 'V92', region = 'EU', add_ons = [ pfruck_contabo.models.add_on_response.AddOnResponse( @@ -73,7 +73,7 @@ def make_instance(self, include_optional) -> CreateInstanceResponse: quantity = 4, ) ], os_type = 'Linux', - status = 'provisioning', + status = running, ssh_keys = [123,125], ) ], links = pfruck_contabo.models.self_links.SelfLinks( diff --git a/test/test_create_instance_response_data.py b/test/test_create_instance_response_data.py index c84081d4..6f35d8ed 100644 --- a/test/test_create_instance_response_data.py +++ b/test/test_create_instance_response_data.py @@ -40,7 +40,7 @@ def make_instance(self, include_optional) -> CreateInstanceResponseData: instance_id = 12345, created_date = '2021-06-02T12:32:03.363Z', image_id = '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d', - product_id = 'V45', + product_id = 'V92', region = 'EU', add_ons = [ pfruck_contabo.models.add_on_response.AddOnResponse( @@ -58,7 +58,7 @@ def make_instance(self, include_optional) -> CreateInstanceResponseData: instance_id = 12345, created_date = '2021-06-02T12:32:03.363Z', image_id = '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d', - product_id = 'V45', + product_id = 'V92', region = 'EU', add_ons = [ pfruck_contabo.models.add_on_response.AddOnResponse( diff --git a/test/test_create_private_network_response.py b/test/test_create_private_network_response.py index 0237483d..21ca8f14 100644 --- a/test/test_create_private_network_response.py +++ b/test/test_create_private_network_response.py @@ -56,13 +56,13 @@ def make_instance(self, include_optional) -> CreatePrivateNetworkResponse: product_id = 'V1', private_ip_config = pfruck_contabo.models.private_ip_config.PrivateIpConfig( v4 = [ - pfruck_contabo.models.ip_v4.IpV4( + pfruck_contabo.models.ip_v41.IpV41( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ) ], ), ip_config = pfruck_contabo.models.ip_config.IpConfig( - v4 = pfruck_contabo.models.ip_v4.IpV4( + v4 = pfruck_contabo.models.ip_v41.IpV41( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ), @@ -100,13 +100,13 @@ def make_instance(self, include_optional) -> CreatePrivateNetworkResponse: product_id = 'V1', private_ip_config = pfruck_contabo.models.private_ip_config.PrivateIpConfig( v4 = [ - pfruck_contabo.models.ip_v4.IpV4( + pfruck_contabo.models.ip_v41.IpV41( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ) ], ), ip_config = pfruck_contabo.models.ip_config.IpConfig( - v4 = pfruck_contabo.models.ip_v4.IpV4( + v4 = pfruck_contabo.models.ip_v41.IpV41( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ), diff --git a/test/test_create_ptr_record_request.py b/test/test_create_ptr_record_request.py new file mode 100644 index 00000000..1d34a1de --- /dev/null +++ b/test/test_create_ptr_record_request.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.create_ptr_record_request import CreatePtrRecordRequest + +class TestCreatePtrRecordRequest(unittest.TestCase): + """CreatePtrRecordRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreatePtrRecordRequest: + """Test CreatePtrRecordRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreatePtrRecordRequest` + """ + model = CreatePtrRecordRequest() + if include_optional: + return CreatePtrRecordRequest( + ptr = 'vmd1027177.server.net', + ip = '1:2:3:4:5:6:7:8', + ttl = 86400 + ) + else: + return CreatePtrRecordRequest( + ptr = 'vmd1027177.server.net', + ip = '1:2:3:4:5:6:7:8', + ttl = 86400, + ) + """ + + def testCreatePtrRecordRequest(self): + """Test CreatePtrRecordRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_tag_request.py b/test/test_create_tag_request.py index 2a3c2002..01c440ba 100644 --- a/test/test_create_tag_request.py +++ b/test/test_create_tag_request.py @@ -36,7 +36,8 @@ def make_instance(self, include_optional) -> CreateTagRequest: if include_optional: return CreateTagRequest( name = 'Web-Server', - color = '#0A78C3' + color = '#0A78C3', + description = 'Tag to differenciate the bad vhosts' ) else: return CreateTagRequest( diff --git a/test/test_dns_api.py b/test/test_dns_api.py new file mode 100644 index 00000000..bb56255c --- /dev/null +++ b/test/test_dns_api.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.api.dns_api import DNSApi + + +class TestDNSApi(unittest.TestCase): + """DNSApi unit test stubs""" + + def setUp(self) -> None: + self.api = DNSApi() + + def tearDown(self) -> None: + pass + + def test_bulk_delete_dns_zone_records(self) -> None: + """Test case for bulk_delete_dns_zone_records + + Bulk delete DNS zone records + """ + pass + + def test_create_dns_zone(self) -> None: + """Test case for create_dns_zone + + Create DNS zone + """ + pass + + def test_create_dns_zone_record(self) -> None: + """Test case for create_dns_zone_record + + Create DNS zone record + """ + pass + + def test_create_ptr_record(self) -> None: + """Test case for create_ptr_record + + Create a new PTR Record using ip address + """ + pass + + def test_delete_dns_zone(self) -> None: + """Test case for delete_dns_zone + + Delete a DNS zone. + """ + pass + + def test_delete_dns_zone_record(self) -> None: + """Test case for delete_dns_zone_record + + Delete a DNS zone record + """ + pass + + def test_delete_ptr_record(self) -> None: + """Test case for delete_ptr_record + + Delete a PTR Record using ip address + """ + pass + + def test_retrieve_dns_zone(self) -> None: + """Test case for retrieve_dns_zone + + Retrieve a DNS Zone by zone name + """ + pass + + def test_retrieve_dns_zone_records_list(self) -> None: + """Test case for retrieve_dns_zone_records_list + + List a DNS Zone's records + """ + pass + + def test_retrieve_dns_zones_list(self) -> None: + """Test case for retrieve_dns_zones_list + + List DNS zones + """ + pass + + def test_retrieve_ptr_record(self) -> None: + """Test case for retrieve_ptr_record + + Retrieve a PTR Record by ip address + """ + pass + + def test_retrieve_ptr_records_list(self) -> None: + """Test case for retrieve_ptr_records_list + + List PTR records + """ + pass + + def test_update_dns_zone_record(self) -> None: + """Test case for update_dns_zone_record + + Update DNS zone record + """ + pass + + def test_update_ptr_record(self) -> None: + """Test case for update_ptr_record + + Edit a PTR Record by ip address + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_dns_audits_api.py b/test/test_dns_audits_api.py new file mode 100644 index 00000000..a1a94e51 --- /dev/null +++ b/test/test_dns_audits_api.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.api.dns_audits_api import DNSAuditsApi + + +class TestDNSAuditsApi(unittest.TestCase): + """DNSAuditsApi unit test stubs""" + + def setUp(self) -> None: + self.api = DNSAuditsApi() + + def tearDown(self) -> None: + pass + + def test_retrieve_dns_audits_list(self) -> None: + """Test case for retrieve_dns_audits_list + + List history about your DNS Zones (audit) + """ + pass + + def test_retrieve_record_audits_list(self) -> None: + """Test case for retrieve_record_audits_list + + List history about your DNS Records (audit) + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_dns_zone_record_response.py b/test/test_dns_zone_record_response.py new file mode 100644 index 00000000..c52c5fee --- /dev/null +++ b/test/test_dns_zone_record_response.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.dns_zone_record_response import DnsZoneRecordResponse + +class TestDnsZoneRecordResponse(unittest.TestCase): + """DnsZoneRecordResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DnsZoneRecordResponse: + """Test DnsZoneRecordResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DnsZoneRecordResponse` + """ + model = DnsZoneRecordResponse() + if include_optional: + return DnsZoneRecordResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + record_id = 1122, + name = 'example.com', + type = 'A', + ttl = 86400, + prio = 0, + data = '10.0.0.1', + port = 1234, + weight = 1, + flag = 1, + tag = 'issue' + ) + else: + return DnsZoneRecordResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + record_id = 1122, + name = 'example.com', + type = 'A', + ttl = 86400, + prio = 0, + data = '10.0.0.1', + port = 1234, + weight = 1, + flag = 1, + tag = 'issue', + ) + """ + + def testDnsZoneRecordResponse(self): + """Test DnsZoneRecordResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_dns_zone_response.py b/test/test_dns_zone_response.py new file mode 100644 index 00000000..c58f0f74 --- /dev/null +++ b/test/test_dns_zone_response.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.dns_zone_response import DnsZoneResponse + +class TestDnsZoneResponse(unittest.TestCase): + """DnsZoneResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DnsZoneResponse: + """Test DnsZoneResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DnsZoneResponse` + """ + model = DnsZoneResponse() + if include_optional: + return DnsZoneResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + zone_name = 'abcdefg' + ) + else: + return DnsZoneResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + zone_name = 'abcdefg', + ) + """ + + def testDnsZoneResponse(self): + """Test DnsZoneResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_audit_response.py b/test/test_domain_audit_response.py new file mode 100644 index 00000000..058bf9c8 --- /dev/null +++ b/test/test_domain_audit_response.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.domain_audit_response import DomainAuditResponse + +class TestDomainAuditResponse(unittest.TestCase): + """DomainAuditResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainAuditResponse: + """Test DomainAuditResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainAuditResponse` + """ + model = DomainAuditResponse() + if include_optional: + return DomainAuditResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.domain_audit_response_data.DomainAuditResponseData( + id = 12345, + action = 'CREATED', + timestamp = '2021-03-30T11:35:06.177Z', + tenant_id = 'DE', + customer_id = '54321', + changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + username = 'John.Doe', + request_id = 'A2F56FAF-18N0-4893-11HG-R312M1E4FEC5', + trace_id = '78E9A428-94E9-4A2A-92F5-26038C6884F', + domain = 'testDom.com', + changes = {"prev":{"sld":"com"},"new":{"sld":"de"}}, ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ) + ) + else: + return DomainAuditResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.domain_audit_response_data.DomainAuditResponseData( + id = 12345, + action = 'CREATED', + timestamp = '2021-03-30T11:35:06.177Z', + tenant_id = 'DE', + customer_id = '54321', + changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + username = 'John.Doe', + request_id = 'A2F56FAF-18N0-4893-11HG-R312M1E4FEC5', + trace_id = '78E9A428-94E9-4A2A-92F5-26038C6884F', + domain = 'testDom.com', + changes = {"prev":{"sld":"com"},"new":{"sld":"de"}}, ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ), + ) + """ + + def testDomainAuditResponse(self): + """Test DomainAuditResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_audit_response_data.py b/test/test_domain_audit_response_data.py new file mode 100644 index 00000000..08826b25 --- /dev/null +++ b/test/test_domain_audit_response_data.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.domain_audit_response_data import DomainAuditResponseData + +class TestDomainAuditResponseData(unittest.TestCase): + """DomainAuditResponseData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainAuditResponseData: + """Test DomainAuditResponseData + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainAuditResponseData` + """ + model = DomainAuditResponseData() + if include_optional: + return DomainAuditResponseData( + id = 12345, + action = 'CREATED', + timestamp = '2021-03-30T11:35:06.177Z', + tenant_id = 'DE', + customer_id = '54321', + changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + username = 'John.Doe', + request_id = 'A2F56FAF-18N0-4893-11HG-R312M1E4FEC5', + trace_id = '78E9A428-94E9-4A2A-92F5-26038C6884F', + domain = 'testDom.com', + changes = {"prev":{"sld":"com"},"new":{"sld":"de"}} + ) + else: + return DomainAuditResponseData( + id = 12345, + action = 'CREATED', + timestamp = '2021-03-30T11:35:06.177Z', + tenant_id = 'DE', + customer_id = '54321', + changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + username = 'John.Doe', + request_id = 'A2F56FAF-18N0-4893-11HG-R312M1E4FEC5', + trace_id = '78E9A428-94E9-4A2A-92F5-26038C6884F', + domain = 'testDom.com', + ) + """ + + def testDomainAuditResponseData(self): + """Test DomainAuditResponseData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_auth_code_regenerate_response.py b/test/test_domain_auth_code_regenerate_response.py new file mode 100644 index 00000000..8bce0f55 --- /dev/null +++ b/test/test_domain_auth_code_regenerate_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.domain_auth_code_regenerate_response import DomainAuthCodeRegenerateResponse + +class TestDomainAuthCodeRegenerateResponse(unittest.TestCase): + """DomainAuthCodeRegenerateResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainAuthCodeRegenerateResponse: + """Test DomainAuthCodeRegenerateResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainAuthCodeRegenerateResponse` + """ + model = DomainAuthCodeRegenerateResponse() + if include_optional: + return DomainAuthCodeRegenerateResponse( + data = [ + pfruck_contabo.models.domain_auth_code_response.DomainAuthCodeResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + domain = 'testDomain.com', + domain_details = null, + status = 'ready', + nameservers = ["a1.test.com", "a2.test.com", "a3.test.com"], + handles = null, + registration_date = '2021-06-03T06:27:12Z', + renewal_date = '2021-07-03T06:27:12Z', + termination_date = '2021-07-03T06:27:12Z', + cancel_date = '2021-07-03T06:27:12Z', + dnssec_keys = ["test-secdns.org. 3600 IN DNSKEY 256 3 8 AwEAAb7eE4c6PFpHI0IyM1U23Dimgjt6YlafZlzOkKf42tIlArvGu1lf iSLnzyGvkJlwfzZ4tkpSgKkLiQ6vgKptM7Ij6iCA/fQYRwK0vizWmE5+ pZ0DfBBz+9MU3bGkVhVe4T8YggQvXmQ6gYrYfLHMDJaE2v7bn5VZFMCY ESxFbS/h"], + transfer_out_confirmation = True, + auth_code = 'XXXX-AAAA-BBBB-CCCC', + auth_code_changed = null, ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ) + ) + else: + return DomainAuthCodeRegenerateResponse( + data = [ + pfruck_contabo.models.domain_auth_code_response.DomainAuthCodeResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + domain = 'testDomain.com', + domain_details = null, + status = 'ready', + nameservers = ["a1.test.com", "a2.test.com", "a3.test.com"], + handles = null, + registration_date = '2021-06-03T06:27:12Z', + renewal_date = '2021-07-03T06:27:12Z', + termination_date = '2021-07-03T06:27:12Z', + cancel_date = '2021-07-03T06:27:12Z', + dnssec_keys = ["test-secdns.org. 3600 IN DNSKEY 256 3 8 AwEAAb7eE4c6PFpHI0IyM1U23Dimgjt6YlafZlzOkKf42tIlArvGu1lf iSLnzyGvkJlwfzZ4tkpSgKkLiQ6vgKptM7Ij6iCA/fQYRwK0vizWmE5+ pZ0DfBBz+9MU3bGkVhVe4T8YggQvXmQ6gYrYfLHMDJaE2v7bn5VZFMCY ESxFbS/h"], + transfer_out_confirmation = True, + auth_code = 'XXXX-AAAA-BBBB-CCCC', + auth_code_changed = null, ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ), + ) + """ + + def testDomainAuthCodeRegenerateResponse(self): + """Test DomainAuthCodeRegenerateResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_auth_code_response.py b/test/test_domain_auth_code_response.py new file mode 100644 index 00000000..235311e2 --- /dev/null +++ b/test/test_domain_auth_code_response.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.domain_auth_code_response import DomainAuthCodeResponse + +class TestDomainAuthCodeResponse(unittest.TestCase): + """DomainAuthCodeResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainAuthCodeResponse: + """Test DomainAuthCodeResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainAuthCodeResponse` + """ + model = DomainAuthCodeResponse() + if include_optional: + return DomainAuthCodeResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + domain = 'testDomain.com', + domain_details = pfruck_contabo.models.domain_details.DomainDetails( + sld = 'testDomain', + tld = 'com', + domain_puny = 'xn--testdomain-6r6y', ), + status = 'ready', + nameservers = ["a1.test.com", "a2.test.com", "a3.test.com"], + handles = pfruck_contabo.models.domain_handles.DomainHandles( + owner = 'CA1423255', + admin = 'CA1423222', + tech = 'CA1223122', + zone = 'CA3655838', ), + registration_date = '2021-06-03T06:27:12Z', + renewal_date = '2021-07-03T06:27:12Z', + termination_date = '2021-07-03T06:27:12Z', + cancel_date = '2021-07-03T06:27:12Z', + dnssec_keys = ["test-secdns.org. 3600 IN DNSKEY 256 3 8 AwEAAb7eE4c6PFpHI0IyM1U23Dimgjt6YlafZlzOkKf42tIlArvGu1lf iSLnzyGvkJlwfzZ4tkpSgKkLiQ6vgKptM7Ij6iCA/fQYRwK0vizWmE5+ pZ0DfBBz+9MU3bGkVhVe4T8YggQvXmQ6gYrYfLHMDJaE2v7bn5VZFMCY ESxFbS/h"], + transfer_out_confirmation = True, + auth_code = 'XXXX-AAAA-BBBB-CCCC', + auth_code_changed = pfruck_contabo.models.changed_auth_code.ChangedAuthCode( + changed = True, + date = '2021-06-03T06:27:12Z', ) + ) + else: + return DomainAuthCodeResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + domain = 'testDomain.com', + domain_details = pfruck_contabo.models.domain_details.DomainDetails( + sld = 'testDomain', + tld = 'com', + domain_puny = 'xn--testdomain-6r6y', ), + status = 'ready', + nameservers = ["a1.test.com", "a2.test.com", "a3.test.com"], + handles = pfruck_contabo.models.domain_handles.DomainHandles( + owner = 'CA1423255', + admin = 'CA1423222', + tech = 'CA1223122', + zone = 'CA3655838', ), + registration_date = '2021-06-03T06:27:12Z', + renewal_date = '2021-07-03T06:27:12Z', + termination_date = '2021-07-03T06:27:12Z', + cancel_date = '2021-07-03T06:27:12Z', + dnssec_keys = ["test-secdns.org. 3600 IN DNSKEY 256 3 8 AwEAAb7eE4c6PFpHI0IyM1U23Dimgjt6YlafZlzOkKf42tIlArvGu1lf iSLnzyGvkJlwfzZ4tkpSgKkLiQ6vgKptM7Ij6iCA/fQYRwK0vizWmE5+ pZ0DfBBz+9MU3bGkVhVe4T8YggQvXmQ6gYrYfLHMDJaE2v7bn5VZFMCY ESxFbS/h"], + transfer_out_confirmation = True, + auth_code = 'XXXX-AAAA-BBBB-CCCC', + auth_code_changed = pfruck_contabo.models.changed_auth_code.ChangedAuthCode( + changed = True, + date = '2021-06-03T06:27:12Z', ), + ) + """ + + def testDomainAuthCodeResponse(self): + """Test DomainAuthCodeResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_cancel.py b/test/test_domain_cancel.py new file mode 100644 index 00000000..a773aeb9 --- /dev/null +++ b/test/test_domain_cancel.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.domain_cancel import DomainCancel + +class TestDomainCancel(unittest.TestCase): + """DomainCancel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainCancel: + """Test DomainCancel + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainCancel` + """ + model = DomainCancel() + if include_optional: + return DomainCancel( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + domain = 'testDomain.com', + sld = 'testDomain', + tld = 'com', + cancel_date = '2021-07-03T06:27:12Z' + ) + else: + return DomainCancel( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + domain = 'testDomain.com', + sld = 'testDomain', + tld = 'com', + cancel_date = '2021-07-03T06:27:12Z', + ) + """ + + def testDomainCancel(self): + """Test DomainCancel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_cancel_response.py b/test/test_domain_cancel_response.py new file mode 100644 index 00000000..fc5140c8 --- /dev/null +++ b/test/test_domain_cancel_response.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.domain_cancel_response import DomainCancelResponse + +class TestDomainCancelResponse(unittest.TestCase): + """DomainCancelResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainCancelResponse: + """Test DomainCancelResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainCancelResponse` + """ + model = DomainCancelResponse() + if include_optional: + return DomainCancelResponse( + data = [ + pfruck_contabo.models.domain_cancel.DomainCancel( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + domain = 'testDomain.com', + sld = 'testDomain', + tld = 'com', + cancel_date = '2021-07-03T06:27:12Z', ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ) + ) + else: + return DomainCancelResponse( + data = [ + pfruck_contabo.models.domain_cancel.DomainCancel( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + domain = 'testDomain.com', + sld = 'testDomain', + tld = 'com', + cancel_date = '2021-07-03T06:27:12Z', ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ), + ) + """ + + def testDomainCancelResponse(self): + """Test DomainCancelResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_create_request.py b/test/test_domain_create_request.py new file mode 100644 index 00000000..1371aa05 --- /dev/null +++ b/test/test_domain_create_request.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.domain_create_request import DomainCreateRequest + +class TestDomainCreateRequest(unittest.TestCase): + """DomainCreateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainCreateRequest: + """Test DomainCreateRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainCreateRequest` + """ + model = DomainCreateRequest() + if include_optional: + return DomainCreateRequest( + domain = 'testDomain.com', + auth_code = '1234', + handles = pfruck_contabo.models.domain_handles.DomainHandles( + owner = 'CA1423255', + admin = 'CA1423222', + tech = 'CA1223122', + zone = 'CA3655838', ), + nameservers = [ + pfruck_contabo.models.nameserver.Nameserver( + hostname = ns1.example.com, + ip_v4 = 132.1.1.1, + ip_v6 = 2001:db8:85a3::8a2e:370:7334, ) + ], + resource_type = 'instance', + resource_id = '1234' + ) + else: + return DomainCreateRequest( + domain = 'testDomain.com', + handles = pfruck_contabo.models.domain_handles.DomainHandles( + owner = 'CA1423255', + admin = 'CA1423222', + tech = 'CA1223122', + zone = 'CA3655838', ), + nameservers = [ + pfruck_contabo.models.nameserver.Nameserver( + hostname = ns1.example.com, + ip_v4 = 132.1.1.1, + ip_v6 = 2001:db8:85a3::8a2e:370:7334, ) + ], + ) + """ + + def testDomainCreateRequest(self): + """Test DomainCreateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_create_response.py b/test/test_domain_create_response.py new file mode 100644 index 00000000..f30c64ae --- /dev/null +++ b/test/test_domain_create_response.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.domain_create_response import DomainCreateResponse + +class TestDomainCreateResponse(unittest.TestCase): + """DomainCreateResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainCreateResponse: + """Test DomainCreateResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainCreateResponse` + """ + model = DomainCreateResponse() + if include_optional: + return DomainCreateResponse( + data = [ + pfruck_contabo.models.domain_response.DomainResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + domain = 'testDomain.com', + domain_details = null, + status = 'ready', + nameservers = ["a1.test.com", "a2.test.com", "a3.test.com"], + handles = null, + registration_date = '2021-06-03T06:27:12Z', + renewal_date = '2021-07-03T06:27:12Z', + termination_date = '2021-07-03T06:27:12Z', + cancel_date = '2021-07-03T06:27:12Z', + dnssec_keys = ["test-secdns.org. 3600 IN DNSKEY 256 3 8 AwEAAb7eE4c6PFpHI0IyM1U23Dimgjt6YlafZlzOkKf42tIlArvGu1lf iSLnzyGvkJlwfzZ4tkpSgKkLiQ6vgKptM7Ij6iCA/fQYRwK0vizWmE5+ pZ0DfBBz+9MU3bGkVhVe4T8YggQvXmQ6gYrYfLHMDJaE2v7bn5VZFMCY ESxFbS/h"], + transfer_out_confirmation = True, ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ) + ) + else: + return DomainCreateResponse( + data = [ + pfruck_contabo.models.domain_response.DomainResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + domain = 'testDomain.com', + domain_details = null, + status = 'ready', + nameservers = ["a1.test.com", "a2.test.com", "a3.test.com"], + handles = null, + registration_date = '2021-06-03T06:27:12Z', + renewal_date = '2021-07-03T06:27:12Z', + termination_date = '2021-07-03T06:27:12Z', + cancel_date = '2021-07-03T06:27:12Z', + dnssec_keys = ["test-secdns.org. 3600 IN DNSKEY 256 3 8 AwEAAb7eE4c6PFpHI0IyM1U23Dimgjt6YlafZlzOkKf42tIlArvGu1lf iSLnzyGvkJlwfzZ4tkpSgKkLiQ6vgKptM7Ij6iCA/fQYRwK0vizWmE5+ pZ0DfBBz+9MU3bGkVhVe4T8YggQvXmQ6gYrYfLHMDJaE2v7bn5VZFMCY ESxFbS/h"], + transfer_out_confirmation = True, ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ), + ) + """ + + def testDomainCreateResponse(self): + """Test DomainCreateResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_details.py b/test/test_domain_details.py new file mode 100644 index 00000000..2b295008 --- /dev/null +++ b/test/test_domain_details.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.domain_details import DomainDetails + +class TestDomainDetails(unittest.TestCase): + """DomainDetails unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainDetails: + """Test DomainDetails + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainDetails` + """ + model = DomainDetails() + if include_optional: + return DomainDetails( + sld = 'testDomain', + tld = 'com', + domain_puny = 'xn--testdomain-6r6y' + ) + else: + return DomainDetails( + sld = 'testDomain', + tld = 'com', + domain_puny = 'xn--testdomain-6r6y', + ) + """ + + def testDomainDetails(self): + """Test DomainDetails""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_find_response.py b/test/test_domain_find_response.py new file mode 100644 index 00000000..b7c02fc7 --- /dev/null +++ b/test/test_domain_find_response.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.domain_find_response import DomainFindResponse + +class TestDomainFindResponse(unittest.TestCase): + """DomainFindResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainFindResponse: + """Test DomainFindResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainFindResponse` + """ + model = DomainFindResponse() + if include_optional: + return DomainFindResponse( + data = [ + pfruck_contabo.models.domain_response.DomainResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + domain = 'testDomain.com', + domain_details = null, + status = 'ready', + nameservers = ["a1.test.com", "a2.test.com", "a3.test.com"], + handles = null, + registration_date = '2021-06-03T06:27:12Z', + renewal_date = '2021-07-03T06:27:12Z', + termination_date = '2021-07-03T06:27:12Z', + cancel_date = '2021-07-03T06:27:12Z', + dnssec_keys = ["test-secdns.org. 3600 IN DNSKEY 256 3 8 AwEAAb7eE4c6PFpHI0IyM1U23Dimgjt6YlafZlzOkKf42tIlArvGu1lf iSLnzyGvkJlwfzZ4tkpSgKkLiQ6vgKptM7Ij6iCA/fQYRwK0vizWmE5+ pZ0DfBBz+9MU3bGkVhVe4T8YggQvXmQ6gYrYfLHMDJaE2v7bn5VZFMCY ESxFbS/h"], + transfer_out_confirmation = True, ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ) + ) + else: + return DomainFindResponse( + data = [ + pfruck_contabo.models.domain_response.DomainResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + domain = 'testDomain.com', + domain_details = null, + status = 'ready', + nameservers = ["a1.test.com", "a2.test.com", "a3.test.com"], + handles = null, + registration_date = '2021-06-03T06:27:12Z', + renewal_date = '2021-07-03T06:27:12Z', + termination_date = '2021-07-03T06:27:12Z', + cancel_date = '2021-07-03T06:27:12Z', + dnssec_keys = ["test-secdns.org. 3600 IN DNSKEY 256 3 8 AwEAAb7eE4c6PFpHI0IyM1U23Dimgjt6YlafZlzOkKf42tIlArvGu1lf iSLnzyGvkJlwfzZ4tkpSgKkLiQ6vgKptM7Ij6iCA/fQYRwK0vizWmE5+ pZ0DfBBz+9MU3bGkVhVe4T8YggQvXmQ6gYrYfLHMDJaE2v7bn5VZFMCY ESxFbS/h"], + transfer_out_confirmation = True, ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ), + ) + """ + + def testDomainFindResponse(self): + """Test DomainFindResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_handles.py b/test/test_domain_handles.py new file mode 100644 index 00000000..3fff9c7a --- /dev/null +++ b/test/test_domain_handles.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.domain_handles import DomainHandles + +class TestDomainHandles(unittest.TestCase): + """DomainHandles unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainHandles: + """Test DomainHandles + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainHandles` + """ + model = DomainHandles() + if include_optional: + return DomainHandles( + owner = 'CA1423255', + admin = 'CA1423222', + tech = 'CA1223122', + zone = 'CA3655838' + ) + else: + return DomainHandles( + owner = 'CA1423255', + admin = 'CA1423222', + tech = 'CA1223122', + zone = 'CA3655838', + ) + """ + + def testDomainHandles(self): + """Test DomainHandles""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_patch_request.py b/test/test_domain_patch_request.py new file mode 100644 index 00000000..bc05a43c --- /dev/null +++ b/test/test_domain_patch_request.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.domain_patch_request import DomainPatchRequest + +class TestDomainPatchRequest(unittest.TestCase): + """DomainPatchRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainPatchRequest: + """Test DomainPatchRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainPatchRequest` + """ + model = DomainPatchRequest() + if include_optional: + return DomainPatchRequest( + nameservers = [ + pfruck_contabo.models.nameserver.Nameserver( + hostname = ns1.example.com, + ip_v4 = 132.1.1.1, + ip_v6 = 2001:db8:85a3::8a2e:370:7334, ) + ], + handles = pfruck_contabo.models.domain_handles.DomainHandles( + owner = 'CA1423255', + admin = 'CA1423222', + tech = 'CA1223122', + zone = 'CA3655838', ) + ) + else: + return DomainPatchRequest( + ) + """ + + def testDomainPatchRequest(self): + """Test DomainPatchRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_patch_response.py b/test/test_domain_patch_response.py new file mode 100644 index 00000000..a89051a0 --- /dev/null +++ b/test/test_domain_patch_response.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.domain_patch_response import DomainPatchResponse + +class TestDomainPatchResponse(unittest.TestCase): + """DomainPatchResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainPatchResponse: + """Test DomainPatchResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainPatchResponse` + """ + model = DomainPatchResponse() + if include_optional: + return DomainPatchResponse( + data = [ + pfruck_contabo.models.domain_response.DomainResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + domain = 'testDomain.com', + domain_details = null, + status = 'ready', + nameservers = ["a1.test.com", "a2.test.com", "a3.test.com"], + handles = null, + registration_date = '2021-06-03T06:27:12Z', + renewal_date = '2021-07-03T06:27:12Z', + termination_date = '2021-07-03T06:27:12Z', + cancel_date = '2021-07-03T06:27:12Z', + dnssec_keys = ["test-secdns.org. 3600 IN DNSKEY 256 3 8 AwEAAb7eE4c6PFpHI0IyM1U23Dimgjt6YlafZlzOkKf42tIlArvGu1lf iSLnzyGvkJlwfzZ4tkpSgKkLiQ6vgKptM7Ij6iCA/fQYRwK0vizWmE5+ pZ0DfBBz+9MU3bGkVhVe4T8YggQvXmQ6gYrYfLHMDJaE2v7bn5VZFMCY ESxFbS/h"], + transfer_out_confirmation = True, ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ) + ) + else: + return DomainPatchResponse( + data = [ + pfruck_contabo.models.domain_response.DomainResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + domain = 'testDomain.com', + domain_details = null, + status = 'ready', + nameservers = ["a1.test.com", "a2.test.com", "a3.test.com"], + handles = null, + registration_date = '2021-06-03T06:27:12Z', + renewal_date = '2021-07-03T06:27:12Z', + termination_date = '2021-07-03T06:27:12Z', + cancel_date = '2021-07-03T06:27:12Z', + dnssec_keys = ["test-secdns.org. 3600 IN DNSKEY 256 3 8 AwEAAb7eE4c6PFpHI0IyM1U23Dimgjt6YlafZlzOkKf42tIlArvGu1lf iSLnzyGvkJlwfzZ4tkpSgKkLiQ6vgKptM7Ij6iCA/fQYRwK0vizWmE5+ pZ0DfBBz+9MU3bGkVhVe4T8YggQvXmQ6gYrYfLHMDJaE2v7bn5VZFMCY ESxFbS/h"], + transfer_out_confirmation = True, ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ), + ) + """ + + def testDomainPatchResponse(self): + """Test DomainPatchResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_response.py b/test/test_domain_response.py new file mode 100644 index 00000000..77e7fbb7 --- /dev/null +++ b/test/test_domain_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.domain_response import DomainResponse + +class TestDomainResponse(unittest.TestCase): + """DomainResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainResponse: + """Test DomainResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainResponse` + """ + model = DomainResponse() + if include_optional: + return DomainResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + domain = 'testDomain.com', + domain_details = pfruck_contabo.models.domain_details.DomainDetails( + sld = 'testDomain', + tld = 'com', + domain_puny = 'xn--testdomain-6r6y', ), + status = 'ready', + nameservers = ["a1.test.com", "a2.test.com", "a3.test.com"], + handles = pfruck_contabo.models.domain_handles.DomainHandles( + owner = 'CA1423255', + admin = 'CA1423222', + tech = 'CA1223122', + zone = 'CA3655838', ), + registration_date = '2021-06-03T06:27:12Z', + renewal_date = '2021-07-03T06:27:12Z', + termination_date = '2021-07-03T06:27:12Z', + cancel_date = '2021-07-03T06:27:12Z', + dnssec_keys = ["test-secdns.org. 3600 IN DNSKEY 256 3 8 AwEAAb7eE4c6PFpHI0IyM1U23Dimgjt6YlafZlzOkKf42tIlArvGu1lf iSLnzyGvkJlwfzZ4tkpSgKkLiQ6vgKptM7Ij6iCA/fQYRwK0vizWmE5+ pZ0DfBBz+9MU3bGkVhVe4T8YggQvXmQ6gYrYfLHMDJaE2v7bn5VZFMCY ESxFbS/h"], + transfer_out_confirmation = True + ) + else: + return DomainResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + domain = 'testDomain.com', + domain_details = pfruck_contabo.models.domain_details.DomainDetails( + sld = 'testDomain', + tld = 'com', + domain_puny = 'xn--testdomain-6r6y', ), + status = 'ready', + nameservers = ["a1.test.com", "a2.test.com", "a3.test.com"], + handles = pfruck_contabo.models.domain_handles.DomainHandles( + owner = 'CA1423255', + admin = 'CA1423222', + tech = 'CA1223122', + zone = 'CA3655838', ), + registration_date = '2021-06-03T06:27:12Z', + renewal_date = '2021-07-03T06:27:12Z', + termination_date = '2021-07-03T06:27:12Z', + cancel_date = '2021-07-03T06:27:12Z', + dnssec_keys = ["test-secdns.org. 3600 IN DNSKEY 256 3 8 AwEAAb7eE4c6PFpHI0IyM1U23Dimgjt6YlafZlzOkKf42tIlArvGu1lf iSLnzyGvkJlwfzZ4tkpSgKkLiQ6vgKptM7Ij6iCA/fQYRwK0vizWmE5+ pZ0DfBBz+9MU3bGkVhVe4T8YggQvXmQ6gYrYfLHMDJaE2v7bn5VZFMCY ESxFbS/h"], + transfer_out_confirmation = True, + ) + """ + + def testDomainResponse(self): + """Test DomainResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domains_api.py b/test/test_domains_api.py new file mode 100644 index 00000000..f247ebaa --- /dev/null +++ b/test/test_domains_api.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.api.domains_api import DomainsApi + + +class TestDomainsApi(unittest.TestCase): + """DomainsApi unit test stubs""" + + def setUp(self) -> None: + self.api = DomainsApi() + + def tearDown(self) -> None: + pass + + def test_cancel_domain(self) -> None: + """Test case for cancel_domain + + Cancel a specific domain + """ + pass + + def test_confirm_domain_transfer_out(self) -> None: + """Test case for confirm_domain_transfer_out + + Confirm transfer out for a domain + """ + pass + + def test_confirm_domain_transfer_out_0(self) -> None: + """Test case for confirm_domain_transfer_out_0 + + Confirm transfer out for a domain + """ + pass + + def test_get_auth_code(self) -> None: + """Test case for get_auth_code + + Get auth code for a domain + """ + pass + + def test_list_domains(self) -> None: + """Test case for list_domains + + List all domains + """ + pass + + def test_order_domain(self) -> None: + """Test case for order_domain + + Create or transfer a domain + """ + pass + + def test_retrieve_domain(self) -> None: + """Test case for retrieve_domain + + List specific domain + """ + pass + + def test_revoke_cancel_domain(self) -> None: + """Test case for revoke_cancel_domain + + Revoke cancellation for a specific domain + """ + pass + + def test_revoke_domain_transfer_out(self) -> None: + """Test case for revoke_domain_transfer_out + + Revoke transfer out for a domain + """ + pass + + def test_revoke_domain_transfer_out_0(self) -> None: + """Test case for revoke_domain_transfer_out_0 + + Revoke transfer out for a domain + """ + pass + + def test_update_domain(self) -> None: + """Test case for update_domain + + Update a specific domain + """ + pass + + def test_validate_domain_availability(self) -> None: + """Test case for validate_domain_availability + + Check domain availablility + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domains_audits_api.py b/test/test_domains_audits_api.py new file mode 100644 index 00000000..ac91d933 --- /dev/null +++ b/test/test_domains_audits_api.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.api.domains_audits_api import DomainsAuditsApi + + +class TestDomainsAuditsApi(unittest.TestCase): + """DomainsAuditsApi unit test stubs""" + + def setUp(self) -> None: + self.api = DomainsAuditsApi() + + def tearDown(self) -> None: + pass + + def test_retrieve_domains_audits_list(self) -> None: + """Test case for retrieve_domains_audits_list + + List history about your Domains (audit) + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domains_list_response.py b/test/test_domains_list_response.py new file mode 100644 index 00000000..fa3a4ada --- /dev/null +++ b/test/test_domains_list_response.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.domains_list_response import DomainsListResponse + +class TestDomainsListResponse(unittest.TestCase): + """DomainsListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainsListResponse: + """Test DomainsListResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainsListResponse` + """ + model = DomainsListResponse() + if include_optional: + return DomainsListResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.domain_response.DomainResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + domain = 'testDomain.com', + domain_details = null, + status = 'ready', + nameservers = ["a1.test.com", "a2.test.com", "a3.test.com"], + handles = null, + registration_date = '2021-06-03T06:27:12Z', + renewal_date = '2021-07-03T06:27:12Z', + termination_date = '2021-07-03T06:27:12Z', + cancel_date = '2021-07-03T06:27:12Z', + dnssec_keys = ["test-secdns.org. 3600 IN DNSKEY 256 3 8 AwEAAb7eE4c6PFpHI0IyM1U23Dimgjt6YlafZlzOkKf42tIlArvGu1lf iSLnzyGvkJlwfzZ4tkpSgKkLiQ6vgKptM7Ij6iCA/fQYRwK0vizWmE5+ pZ0DfBBz+9MU3bGkVhVe4T8YggQvXmQ6gYrYfLHMDJaE2v7bn5VZFMCY ESxFbS/h"], + transfer_out_confirmation = True, ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ) + ) + else: + return DomainsListResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.domain_response.DomainResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + domain = 'testDomain.com', + domain_details = null, + status = 'ready', + nameservers = ["a1.test.com", "a2.test.com", "a3.test.com"], + handles = null, + registration_date = '2021-06-03T06:27:12Z', + renewal_date = '2021-07-03T06:27:12Z', + termination_date = '2021-07-03T06:27:12Z', + cancel_date = '2021-07-03T06:27:12Z', + dnssec_keys = ["test-secdns.org. 3600 IN DNSKEY 256 3 8 AwEAAb7eE4c6PFpHI0IyM1U23Dimgjt6YlafZlzOkKf42tIlArvGu1lf iSLnzyGvkJlwfzZ4tkpSgKkLiQ6vgKptM7Ij6iCA/fQYRwK0vizWmE5+ pZ0DfBBz+9MU3bGkVhVe4T8YggQvXmQ6gYrYfLHMDJaE2v7bn5VZFMCY ESxFbS/h"], + transfer_out_confirmation = True, ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ), + ) + """ + + def testDomainsListResponse(self): + """Test DomainsListResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ext_check_collection_response.py b/test/test_ext_check_collection_response.py new file mode 100644 index 00000000..42fff269 --- /dev/null +++ b/test/test_ext_check_collection_response.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.ext_check_collection_response import ExtCheckCollectionResponse + +class TestExtCheckCollectionResponse(unittest.TestCase): + """ExtCheckCollectionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExtCheckCollectionResponse: + """Test ExtCheckCollectionResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ExtCheckCollectionResponse` + """ + model = ExtCheckCollectionResponse() + if include_optional: + return ExtCheckCollectionResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + check_collection_id = 12345, + check_collection_template_id = 12345, + check_templates = [{"checkId":1,"checkTemplateId":2,"runConcurrent":false,"ignoreErrors":false,"checkTemplates":[{"checkId":2,"checkTemplateId":3,"runConcurrent":true,"ignoreErrors":false},{"checkId":3,"checkTemplateId":4,"runConcurrent":true,"ignoreErrors":true}]}], + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + tenant_id = 'DE', + customer_id = '123456', + checks = [{"tenantId":"DE","customerId":"12345","createdDate":"2026-01-01T01:00:00.973Z","modifiedDate":"2026-01-01T01:00:00.928Z","checkId":666,"checkCollectionId":1,"checkTemplateId":1,"status":"successful","note":"Check successful","durationMs":null,"objectType":"vserver","objectId":"42"}] + ) + else: + return ExtCheckCollectionResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + check_collection_id = 12345, + check_collection_template_id = 12345, + check_templates = [{"checkId":1,"checkTemplateId":2,"runConcurrent":false,"ignoreErrors":false,"checkTemplates":[{"checkId":2,"checkTemplateId":3,"runConcurrent":true,"ignoreErrors":false},{"checkId":3,"checkTemplateId":4,"runConcurrent":true,"ignoreErrors":true}]}], + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + tenant_id = 'DE', + customer_id = '123456', + checks = [{"tenantId":"DE","customerId":"12345","createdDate":"2026-01-01T01:00:00.973Z","modifiedDate":"2026-01-01T01:00:00.928Z","checkId":666,"checkCollectionId":1,"checkTemplateId":1,"status":"successful","note":"Check successful","durationMs":null,"objectType":"vserver","objectId":"42"}], + ) + """ + + def testExtCheckCollectionResponse(self): + """Test ExtCheckCollectionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ext_check_collection_template_response.py b/test/test_ext_check_collection_template_response.py new file mode 100644 index 00000000..c915c485 --- /dev/null +++ b/test/test_ext_check_collection_template_response.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.ext_check_collection_template_response import ExtCheckCollectionTemplateResponse + +class TestExtCheckCollectionTemplateResponse(unittest.TestCase): + """ExtCheckCollectionTemplateResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExtCheckCollectionTemplateResponse: + """Test ExtCheckCollectionTemplateResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ExtCheckCollectionTemplateResponse` + """ + model = ExtCheckCollectionTemplateResponse() + if include_optional: + return ExtCheckCollectionTemplateResponse( + check_collection_template_id = 12345, + name = 'Instance checks', + description = 'Performs all checks for an instance', + internal = False, + object_type = 'vserver', + check_templates = [{"checkTemplateId":2,"runConcurrent":false,"ignoreErrors":false,"checkTemplates":[{"checkTemplateId":3,"runConcurrent":true,"ignoreErrors":false},{"checkTemplateId":4,"runConcurrent":true,"ignoreErrors":true}]}], + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + tenant_id = 'DE', + customer_id = '123456' + ) + else: + return ExtCheckCollectionTemplateResponse( + check_collection_template_id = 12345, + name = 'Instance checks', + description = 'Performs all checks for an instance', + internal = False, + object_type = 'vserver', + check_templates = [{"checkTemplateId":2,"runConcurrent":false,"ignoreErrors":false,"checkTemplates":[{"checkTemplateId":3,"runConcurrent":true,"ignoreErrors":false},{"checkTemplateId":4,"runConcurrent":true,"ignoreErrors":true}]}], + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + tenant_id = 'DE', + customer_id = '123456', + ) + """ + + def testExtCheckCollectionTemplateResponse(self): + """Test ExtCheckCollectionTemplateResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ext_check_collection_templates_get_response.py b/test/test_ext_check_collection_templates_get_response.py new file mode 100644 index 00000000..cf6a7740 --- /dev/null +++ b/test/test_ext_check_collection_templates_get_response.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.ext_check_collection_templates_get_response import ExtCheckCollectionTemplatesGetResponse + +class TestExtCheckCollectionTemplatesGetResponse(unittest.TestCase): + """ExtCheckCollectionTemplatesGetResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExtCheckCollectionTemplatesGetResponse: + """Test ExtCheckCollectionTemplatesGetResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ExtCheckCollectionTemplatesGetResponse` + """ + model = ExtCheckCollectionTemplatesGetResponse() + if include_optional: + return ExtCheckCollectionTemplatesGetResponse( + data = [ + pfruck_contabo.models.ext_check_collection_template_response.ExtCheckCollectionTemplateResponse( + check_collection_template_id = 12345, + name = 'Instance checks', + description = 'Performs all checks for an instance', + internal = False, + object_type = 'vserver', + check_templates = [{"checkTemplateId":2,"runConcurrent":false,"ignoreErrors":false,"checkTemplates":[{"checkTemplateId":3,"runConcurrent":true,"ignoreErrors":false},{"checkTemplateId":4,"runConcurrent":true,"ignoreErrors":true}]}], + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + tenant_id = 'DE', + customer_id = '123456', ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ) + ) + else: + return ExtCheckCollectionTemplatesGetResponse( + data = [ + pfruck_contabo.models.ext_check_collection_template_response.ExtCheckCollectionTemplateResponse( + check_collection_template_id = 12345, + name = 'Instance checks', + description = 'Performs all checks for an instance', + internal = False, + object_type = 'vserver', + check_templates = [{"checkTemplateId":2,"runConcurrent":false,"ignoreErrors":false,"checkTemplates":[{"checkTemplateId":3,"runConcurrent":true,"ignoreErrors":false},{"checkTemplateId":4,"runConcurrent":true,"ignoreErrors":true}]}], + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + tenant_id = 'DE', + customer_id = '123456', ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ), + ) + """ + + def testExtCheckCollectionTemplatesGetResponse(self): + """Test ExtCheckCollectionTemplatesGetResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ext_check_collection_templates_list_response.py b/test/test_ext_check_collection_templates_list_response.py new file mode 100644 index 00000000..497fbcf5 --- /dev/null +++ b/test/test_ext_check_collection_templates_list_response.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.ext_check_collection_templates_list_response import ExtCheckCollectionTemplatesListResponse + +class TestExtCheckCollectionTemplatesListResponse(unittest.TestCase): + """ExtCheckCollectionTemplatesListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExtCheckCollectionTemplatesListResponse: + """Test ExtCheckCollectionTemplatesListResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ExtCheckCollectionTemplatesListResponse` + """ + model = ExtCheckCollectionTemplatesListResponse() + if include_optional: + return ExtCheckCollectionTemplatesListResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.ext_check_collection_template_response.ExtCheckCollectionTemplateResponse( + check_collection_template_id = 12345, + name = 'Instance checks', + description = 'Performs all checks for an instance', + internal = False, + object_type = 'vserver', + check_templates = [{"checkTemplateId":2,"runConcurrent":false,"ignoreErrors":false,"checkTemplates":[{"checkTemplateId":3,"runConcurrent":true,"ignoreErrors":false},{"checkTemplateId":4,"runConcurrent":true,"ignoreErrors":true}]}], + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + tenant_id = 'DE', + customer_id = '123456', ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ) + ) + else: + return ExtCheckCollectionTemplatesListResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.ext_check_collection_template_response.ExtCheckCollectionTemplateResponse( + check_collection_template_id = 12345, + name = 'Instance checks', + description = 'Performs all checks for an instance', + internal = False, + object_type = 'vserver', + check_templates = [{"checkTemplateId":2,"runConcurrent":false,"ignoreErrors":false,"checkTemplates":[{"checkTemplateId":3,"runConcurrent":true,"ignoreErrors":false},{"checkTemplateId":4,"runConcurrent":true,"ignoreErrors":true}]}], + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + tenant_id = 'DE', + customer_id = '123456', ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ), + ) + """ + + def testExtCheckCollectionTemplatesListResponse(self): + """Test ExtCheckCollectionTemplatesListResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ext_check_collections_get_response.py b/test/test_ext_check_collections_get_response.py new file mode 100644 index 00000000..b53c6172 --- /dev/null +++ b/test/test_ext_check_collections_get_response.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.ext_check_collections_get_response import ExtCheckCollectionsGetResponse + +class TestExtCheckCollectionsGetResponse(unittest.TestCase): + """ExtCheckCollectionsGetResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExtCheckCollectionsGetResponse: + """Test ExtCheckCollectionsGetResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ExtCheckCollectionsGetResponse` + """ + model = ExtCheckCollectionsGetResponse() + if include_optional: + return ExtCheckCollectionsGetResponse( + data = [ + pfruck_contabo.models.ext_check_collection_response.ExtCheckCollectionResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + check_collection_id = 12345, + check_collection_template_id = 12345, + check_templates = [{"checkId":1,"checkTemplateId":2,"runConcurrent":false,"ignoreErrors":false,"checkTemplates":[{"checkId":2,"checkTemplateId":3,"runConcurrent":true,"ignoreErrors":false},{"checkId":3,"checkTemplateId":4,"runConcurrent":true,"ignoreErrors":true}]}], + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + tenant_id = 'DE', + customer_id = '123456', + checks = [{"tenantId":"DE","customerId":"12345","createdDate":"2026-01-01T01:00:00.973Z","modifiedDate":"2026-01-01T01:00:00.928Z","checkId":666,"checkCollectionId":1,"checkTemplateId":1,"status":"successful","note":"Check successful","durationMs":null,"objectType":"vserver","objectId":"42"}], ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ) + ) + else: + return ExtCheckCollectionsGetResponse( + data = [ + pfruck_contabo.models.ext_check_collection_response.ExtCheckCollectionResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + check_collection_id = 12345, + check_collection_template_id = 12345, + check_templates = [{"checkId":1,"checkTemplateId":2,"runConcurrent":false,"ignoreErrors":false,"checkTemplates":[{"checkId":2,"checkTemplateId":3,"runConcurrent":true,"ignoreErrors":false},{"checkId":3,"checkTemplateId":4,"runConcurrent":true,"ignoreErrors":true}]}], + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + tenant_id = 'DE', + customer_id = '123456', + checks = [{"tenantId":"DE","customerId":"12345","createdDate":"2026-01-01T01:00:00.973Z","modifiedDate":"2026-01-01T01:00:00.928Z","checkId":666,"checkCollectionId":1,"checkTemplateId":1,"status":"successful","note":"Check successful","durationMs":null,"objectType":"vserver","objectId":"42"}], ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ), + ) + """ + + def testExtCheckCollectionsGetResponse(self): + """Test ExtCheckCollectionsGetResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ext_check_collections_list_response.py b/test/test_ext_check_collections_list_response.py new file mode 100644 index 00000000..4ed1d54c --- /dev/null +++ b/test/test_ext_check_collections_list_response.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.ext_check_collections_list_response import ExtCheckCollectionsListResponse + +class TestExtCheckCollectionsListResponse(unittest.TestCase): + """ExtCheckCollectionsListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExtCheckCollectionsListResponse: + """Test ExtCheckCollectionsListResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ExtCheckCollectionsListResponse` + """ + model = ExtCheckCollectionsListResponse() + if include_optional: + return ExtCheckCollectionsListResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.ext_check_collection_response.ExtCheckCollectionResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + check_collection_id = 12345, + check_collection_template_id = 12345, + check_templates = [{"checkId":1,"checkTemplateId":2,"runConcurrent":false,"ignoreErrors":false,"checkTemplates":[{"checkId":2,"checkTemplateId":3,"runConcurrent":true,"ignoreErrors":false},{"checkId":3,"checkTemplateId":4,"runConcurrent":true,"ignoreErrors":true}]}], + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + tenant_id = 'DE', + customer_id = '123456', + checks = [{"tenantId":"DE","customerId":"12345","createdDate":"2026-01-01T01:00:00.973Z","modifiedDate":"2026-01-01T01:00:00.928Z","checkId":666,"checkCollectionId":1,"checkTemplateId":1,"status":"successful","note":"Check successful","durationMs":null,"objectType":"vserver","objectId":"42"}], ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ) + ) + else: + return ExtCheckCollectionsListResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.ext_check_collection_response.ExtCheckCollectionResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + check_collection_id = 12345, + check_collection_template_id = 12345, + check_templates = [{"checkId":1,"checkTemplateId":2,"runConcurrent":false,"ignoreErrors":false,"checkTemplates":[{"checkId":2,"checkTemplateId":3,"runConcurrent":true,"ignoreErrors":false},{"checkId":3,"checkTemplateId":4,"runConcurrent":true,"ignoreErrors":true}]}], + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + tenant_id = 'DE', + customer_id = '123456', + checks = [{"tenantId":"DE","customerId":"12345","createdDate":"2026-01-01T01:00:00.973Z","modifiedDate":"2026-01-01T01:00:00.928Z","checkId":666,"checkCollectionId":1,"checkTemplateId":1,"status":"successful","note":"Check successful","durationMs":null,"objectType":"vserver","objectId":"42"}], ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ), + ) + """ + + def testExtCheckCollectionsListResponse(self): + """Test ExtCheckCollectionsListResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ext_check_response.py b/test/test_ext_check_response.py new file mode 100644 index 00000000..6035f759 --- /dev/null +++ b/test/test_ext_check_response.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.ext_check_response import ExtCheckResponse + +class TestExtCheckResponse(unittest.TestCase): + """ExtCheckResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExtCheckResponse: + """Test ExtCheckResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ExtCheckResponse` + """ + model = ExtCheckResponse() + if include_optional: + return ExtCheckResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + check_id = 12345, + check_collection_id = 12345, + check_template_id = 12345, + name = 'Ping check', + note = 'Ping failed with timeout, please check the firewall rules and connectivity', + internal_note = 'Ping failed with error code 123, could be an issue with the route server settings', + duration_ms = 4711, + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + tenant_id = 'DE', + customer_id = '123456' + ) + else: + return ExtCheckResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + check_id = 12345, + check_collection_id = 12345, + check_template_id = 12345, + name = 'Ping check', + note = 'Ping failed with timeout, please check the firewall rules and connectivity', + internal_note = 'Ping failed with error code 123, could be an issue with the route server settings', + duration_ms = 4711, + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + tenant_id = 'DE', + customer_id = '123456', + ) + """ + + def testExtCheckResponse(self): + """Test ExtCheckResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ext_checks_get_response.py b/test/test_ext_checks_get_response.py new file mode 100644 index 00000000..e3ff290f --- /dev/null +++ b/test/test_ext_checks_get_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.ext_checks_get_response import ExtChecksGetResponse + +class TestExtChecksGetResponse(unittest.TestCase): + """ExtChecksGetResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExtChecksGetResponse: + """Test ExtChecksGetResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ExtChecksGetResponse` + """ + model = ExtChecksGetResponse() + if include_optional: + return ExtChecksGetResponse( + data = [ + pfruck_contabo.models.ext_check_response.ExtCheckResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + check_id = 12345, + check_collection_id = 12345, + check_template_id = 12345, + name = 'Ping check', + note = 'Ping failed with timeout, please check the firewall rules and connectivity', + internal_note = 'Ping failed with error code 123, could be an issue with the route server settings', + duration_ms = 4711, + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + tenant_id = 'DE', + customer_id = '123456', ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ) + ) + else: + return ExtChecksGetResponse( + data = [ + pfruck_contabo.models.ext_check_response.ExtCheckResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + check_id = 12345, + check_collection_id = 12345, + check_template_id = 12345, + name = 'Ping check', + note = 'Ping failed with timeout, please check the firewall rules and connectivity', + internal_note = 'Ping failed with error code 123, could be an issue with the route server settings', + duration_ms = 4711, + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + tenant_id = 'DE', + customer_id = '123456', ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ), + ) + """ + + def testExtChecksGetResponse(self): + """Test ExtChecksGetResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ext_checks_list_response.py b/test/test_ext_checks_list_response.py new file mode 100644 index 00000000..5548e314 --- /dev/null +++ b/test/test_ext_checks_list_response.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.ext_checks_list_response import ExtChecksListResponse + +class TestExtChecksListResponse(unittest.TestCase): + """ExtChecksListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExtChecksListResponse: + """Test ExtChecksListResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ExtChecksListResponse` + """ + model = ExtChecksListResponse() + if include_optional: + return ExtChecksListResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.ext_check_response.ExtCheckResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + check_id = 12345, + check_collection_id = 12345, + check_template_id = 12345, + name = 'Ping check', + note = 'Ping failed with timeout, please check the firewall rules and connectivity', + internal_note = 'Ping failed with error code 123, could be an issue with the route server settings', + duration_ms = 4711, + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + tenant_id = 'DE', + customer_id = '123456', ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ) + ) + else: + return ExtChecksListResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.ext_check_response.ExtCheckResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + check_id = 12345, + check_collection_id = 12345, + check_template_id = 12345, + name = 'Ping check', + note = 'Ping failed with timeout, please check the firewall rules and connectivity', + internal_note = 'Ping failed with error code 123, could be an issue with the route server settings', + duration_ms = 4711, + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + tenant_id = 'DE', + customer_id = '123456', ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ), + ) + """ + + def testExtChecksListResponse(self): + """Test ExtChecksListResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ext_remedies_get_response.py b/test/test_ext_remedies_get_response.py new file mode 100644 index 00000000..556d54d7 --- /dev/null +++ b/test/test_ext_remedies_get_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.ext_remedies_get_response import ExtRemediesGetResponse + +class TestExtRemediesGetResponse(unittest.TestCase): + """ExtRemediesGetResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExtRemediesGetResponse: + """Test ExtRemediesGetResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ExtRemediesGetResponse` + """ + model = ExtRemediesGetResponse() + if include_optional: + return ExtRemediesGetResponse( + data = [ + pfruck_contabo.models.ext_remedy_response.ExtRemedyResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + remedy_id = 12345, + remedy_collection_id = 12345, + remedy_template_id = 12345, + name = 'Ping remedy', + note = 'Remedy failed with timeout, please check the firewall rules and connectivity', + duration_ms = 4711, + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + tenant_id = 'DE', + customer_id = '123456', ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ) + ) + else: + return ExtRemediesGetResponse( + data = [ + pfruck_contabo.models.ext_remedy_response.ExtRemedyResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + remedy_id = 12345, + remedy_collection_id = 12345, + remedy_template_id = 12345, + name = 'Ping remedy', + note = 'Remedy failed with timeout, please check the firewall rules and connectivity', + duration_ms = 4711, + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + tenant_id = 'DE', + customer_id = '123456', ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ), + ) + """ + + def testExtRemediesGetResponse(self): + """Test ExtRemediesGetResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ext_remedies_list_response.py b/test/test_ext_remedies_list_response.py new file mode 100644 index 00000000..8521fded --- /dev/null +++ b/test/test_ext_remedies_list_response.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.ext_remedies_list_response import ExtRemediesListResponse + +class TestExtRemediesListResponse(unittest.TestCase): + """ExtRemediesListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExtRemediesListResponse: + """Test ExtRemediesListResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ExtRemediesListResponse` + """ + model = ExtRemediesListResponse() + if include_optional: + return ExtRemediesListResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.ext_remedy_response.ExtRemedyResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + remedy_id = 12345, + remedy_collection_id = 12345, + remedy_template_id = 12345, + name = 'Ping remedy', + note = 'Remedy failed with timeout, please check the firewall rules and connectivity', + duration_ms = 4711, + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + tenant_id = 'DE', + customer_id = '123456', ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ) + ) + else: + return ExtRemediesListResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.ext_remedy_response.ExtRemedyResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + remedy_id = 12345, + remedy_collection_id = 12345, + remedy_template_id = 12345, + name = 'Ping remedy', + note = 'Remedy failed with timeout, please check the firewall rules and connectivity', + duration_ms = 4711, + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + tenant_id = 'DE', + customer_id = '123456', ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ), + ) + """ + + def testExtRemediesListResponse(self): + """Test ExtRemediesListResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ext_remedy_response.py b/test/test_ext_remedy_response.py new file mode 100644 index 00000000..1f556bd1 --- /dev/null +++ b/test/test_ext_remedy_response.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.ext_remedy_response import ExtRemedyResponse + +class TestExtRemedyResponse(unittest.TestCase): + """ExtRemedyResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExtRemedyResponse: + """Test ExtRemedyResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ExtRemedyResponse` + """ + model = ExtRemedyResponse() + if include_optional: + return ExtRemedyResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + remedy_id = 12345, + remedy_collection_id = 12345, + remedy_template_id = 12345, + name = 'Ping remedy', + note = 'Remedy failed with timeout, please check the firewall rules and connectivity', + duration_ms = 4711, + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + tenant_id = 'DE', + customer_id = '123456' + ) + else: + return ExtRemedyResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + remedy_id = 12345, + remedy_collection_id = 12345, + remedy_template_id = 12345, + name = 'Ping remedy', + note = 'Remedy failed with timeout, please check the firewall rules and connectivity', + duration_ms = 4711, + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + tenant_id = 'DE', + customer_id = '123456', + ) + """ + + def testExtRemedyResponse(self): + """Test ExtRemedyResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_find_firewall_response.py b/test/test_find_firewall_response.py new file mode 100644 index 00000000..4dbc24d5 --- /dev/null +++ b/test/test_find_firewall_response.py @@ -0,0 +1,152 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.find_firewall_response import FindFirewallResponse + +class TestFindFirewallResponse(unittest.TestCase): + """FindFirewallResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FindFirewallResponse: + """Test FindFirewallResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FindFirewallResponse` + """ + model = FindFirewallResponse() + if include_optional: + return FindFirewallResponse( + data = [ + pfruck_contabo.models.firewall_response.FirewallResponse( + tenant_id = 'DE', + customer_id = '54321', + firewall_id = 'b943b25a-c8b5-4570-9135-4bbaa7615b81', + name = 'My Firewall', + description = 'Allowing incoming HTTP traffic.', + status = 'active', + instance_status = [ + pfruck_contabo.models.instance_status_representation.InstanceStatusRepresentation( + instance_id = 100, + status = 'ok', + error_message = 'Failed to assign instance to firewall', ) + ], + instances = [ + pfruck_contabo.models.instance_details.InstanceDetails( + instance_id = 100, + display_name = 'Instance', + name = 'vmd12345', + product_id = 'V1', + ip_config = pfruck_contabo.models.ip_config1.IpConfig1( + v4 = pfruck_contabo.models.ip_v42.IpV42( + ip = '192.168.0.1', + netmask_cidr = 19, + gateway = '1.1.1.1', ), + v6 = pfruck_contabo.models.ip_v6.IpV6( + ip = '1:2:3:4:5:6:7:8', + netmask_cidr = 64, + gateway = '1:2:3:4:5:6:7:8', ), ), + region_slug = 'EU', + region_name = 'European Union (Germany)', + data_center_slug = 'EU1', + data_center_name = 'European Union (Germany) 1', ) + ], + rules = pfruck_contabo.models.rules.Rules( + inbound = [ + pfruck_contabo.models.firewall_rule_response.FirewallRuleResponse( + protocol = 'tcp', + dest_ports = ["80", "80-90"], + src_cidr = pfruck_contabo.models.src_cidr.SrcCidr( + ipv4 = ["192.168.0.1/24","AnyIPv4"], + ipv6 = ["1:2:3:4:5:6:7:8/64","AnyIPv6"], ), + action = 'accept', + status = 'active', + display_name = 'Allow HTTP Traffic', ) + ], ), + created_date = '2021-06-03T06:27:12Z', + updated_date = '2021-06-13T06:27:12Z', ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ) + ) + else: + return FindFirewallResponse( + data = [ + pfruck_contabo.models.firewall_response.FirewallResponse( + tenant_id = 'DE', + customer_id = '54321', + firewall_id = 'b943b25a-c8b5-4570-9135-4bbaa7615b81', + name = 'My Firewall', + description = 'Allowing incoming HTTP traffic.', + status = 'active', + instance_status = [ + pfruck_contabo.models.instance_status_representation.InstanceStatusRepresentation( + instance_id = 100, + status = 'ok', + error_message = 'Failed to assign instance to firewall', ) + ], + instances = [ + pfruck_contabo.models.instance_details.InstanceDetails( + instance_id = 100, + display_name = 'Instance', + name = 'vmd12345', + product_id = 'V1', + ip_config = pfruck_contabo.models.ip_config1.IpConfig1( + v4 = pfruck_contabo.models.ip_v42.IpV42( + ip = '192.168.0.1', + netmask_cidr = 19, + gateway = '1.1.1.1', ), + v6 = pfruck_contabo.models.ip_v6.IpV6( + ip = '1:2:3:4:5:6:7:8', + netmask_cidr = 64, + gateway = '1:2:3:4:5:6:7:8', ), ), + region_slug = 'EU', + region_name = 'European Union (Germany)', + data_center_slug = 'EU1', + data_center_name = 'European Union (Germany) 1', ) + ], + rules = pfruck_contabo.models.rules.Rules( + inbound = [ + pfruck_contabo.models.firewall_rule_response.FirewallRuleResponse( + protocol = 'tcp', + dest_ports = ["80", "80-90"], + src_cidr = pfruck_contabo.models.src_cidr.SrcCidr( + ipv4 = ["192.168.0.1/24","AnyIPv4"], + ipv6 = ["1:2:3:4:5:6:7:8/64","AnyIPv6"], ), + action = 'accept', + status = 'active', + display_name = 'Allow HTTP Traffic', ) + ], ), + created_date = '2021-06-03T06:27:12Z', + updated_date = '2021-06-13T06:27:12Z', ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ), + ) + """ + + def testFindFirewallResponse(self): + """Test FindFirewallResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_find_instance_response.py b/test/test_find_instance_response.py index f0e99591..f019f6f9 100644 --- a/test/test_find_instance_response.py +++ b/test/test_find_instance_response.py @@ -41,7 +41,7 @@ def make_instance(self, include_optional) -> FindInstanceResponse: customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', additional_ips = [ pfruck_contabo.models.additional_ip.AdditionalIp( - v4 = pfruck_contabo.models.ip_v4.IpV4( + v4 = pfruck_contabo.models.ip_v43.IpV43( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ), ) @@ -54,8 +54,8 @@ def make_instance(self, include_optional) -> FindInstanceResponse: region_name = 'European Union', product_id = 'V5', image_id = '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d', - ip_config = pfruck_contabo.models.ip_config.IpConfig( - v4 = pfruck_contabo.models.ip_v4.IpV4( + ip_config = pfruck_contabo.models.ip_config2.IpConfig2( + v4 = pfruck_contabo.models.ip_v43.IpV43( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ), @@ -71,7 +71,7 @@ def make_instance(self, include_optional) -> FindInstanceResponse: ssh_keys = [123,125], created_date = '2021-06-03T06:27:12Z', cancel_date = 'Thu Jun 03 00:00:00 UTC 2021', - status = 'provisioning', + status = running, v_host_id = 73395, v_host_number = 1001, v_host_name = 'm1000', @@ -83,7 +83,8 @@ def make_instance(self, include_optional) -> FindInstanceResponse: error_message = '', product_type = 'ssd', product_name = 'VPS M', - default_user = 'root', ) + default_user = 'root', + application_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', ) ], links = pfruck_contabo.models.self_links.SelfLinks( self = '', ) @@ -96,7 +97,7 @@ def make_instance(self, include_optional) -> FindInstanceResponse: customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', additional_ips = [ pfruck_contabo.models.additional_ip.AdditionalIp( - v4 = pfruck_contabo.models.ip_v4.IpV4( + v4 = pfruck_contabo.models.ip_v43.IpV43( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ), ) @@ -109,8 +110,8 @@ def make_instance(self, include_optional) -> FindInstanceResponse: region_name = 'European Union', product_id = 'V5', image_id = '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d', - ip_config = pfruck_contabo.models.ip_config.IpConfig( - v4 = pfruck_contabo.models.ip_v4.IpV4( + ip_config = pfruck_contabo.models.ip_config2.IpConfig2( + v4 = pfruck_contabo.models.ip_v43.IpV43( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ), @@ -126,7 +127,7 @@ def make_instance(self, include_optional) -> FindInstanceResponse: ssh_keys = [123,125], created_date = '2021-06-03T06:27:12Z', cancel_date = 'Thu Jun 03 00:00:00 UTC 2021', - status = 'provisioning', + status = running, v_host_id = 73395, v_host_number = 1001, v_host_name = 'm1000', @@ -138,7 +139,8 @@ def make_instance(self, include_optional) -> FindInstanceResponse: error_message = '', product_type = 'ssd', product_name = 'VPS M', - default_user = 'root', ) + default_user = 'root', + application_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', ) ], links = pfruck_contabo.models.self_links.SelfLinks( self = '', ), diff --git a/test/test_find_private_network_response.py b/test/test_find_private_network_response.py index 7c34bf3f..a7ff8d7d 100644 --- a/test/test_find_private_network_response.py +++ b/test/test_find_private_network_response.py @@ -56,13 +56,13 @@ def make_instance(self, include_optional) -> FindPrivateNetworkResponse: product_id = 'V1', private_ip_config = pfruck_contabo.models.private_ip_config.PrivateIpConfig( v4 = [ - pfruck_contabo.models.ip_v4.IpV4( + pfruck_contabo.models.ip_v41.IpV41( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ) ], ), ip_config = pfruck_contabo.models.ip_config.IpConfig( - v4 = pfruck_contabo.models.ip_v4.IpV4( + v4 = pfruck_contabo.models.ip_v41.IpV41( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ), @@ -100,13 +100,13 @@ def make_instance(self, include_optional) -> FindPrivateNetworkResponse: product_id = 'V1', private_ip_config = pfruck_contabo.models.private_ip_config.PrivateIpConfig( v4 = [ - pfruck_contabo.models.ip_v4.IpV4( + pfruck_contabo.models.ip_v41.IpV41( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ) ], ), ip_config = pfruck_contabo.models.ip_config.IpConfig( - v4 = pfruck_contabo.models.ip_v4.IpV4( + v4 = pfruck_contabo.models.ip_v41.IpV41( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ), diff --git a/test/test_find_tag_response.py b/test/test_find_tag_response.py index d47c9dc4..bf68c93c 100644 --- a/test/test_find_tag_response.py +++ b/test/test_find_tag_response.py @@ -41,7 +41,8 @@ def make_instance(self, include_optional) -> FindTagResponse: customer_id = '54321', tag_id = 12345, name = 'Web-Server', - color = '#0A78C3', ) + color = '#0A78C3', + description = 'Tag Description', ) ], links = pfruck_contabo.models.self_links.SelfLinks( self = '', ) @@ -54,7 +55,8 @@ def make_instance(self, include_optional) -> FindTagResponse: customer_id = '54321', tag_id = 12345, name = 'Web-Server', - color = '#0A78C3', ) + color = '#0A78C3', + description = 'Tag Description', ) ], links = pfruck_contabo.models.self_links.SelfLinks( self = '', ), diff --git a/test/test_find_vip_response.py b/test/test_find_vip_response.py index 3b5fdfff..42e9aec7 100644 --- a/test/test_find_vip_response.py +++ b/test/test_find_vip_response.py @@ -48,7 +48,7 @@ def make_instance(self, include_optional) -> FindVipResponse: resource_display_name = 'My Instance 12', ip_version = 'v4', type = 'additional', - v4 = pfruck_contabo.models.ip_v41.IpV41( + v4 = pfruck_contabo.models.ip_v4.IpV4( ip = '195.123.123.1', gateway = '255.255.255.1', netmask_cidr = 24, @@ -73,7 +73,7 @@ def make_instance(self, include_optional) -> FindVipResponse: resource_display_name = 'My Instance 12', ip_version = 'v4', type = 'additional', - v4 = pfruck_contabo.models.ip_v41.IpV41( + v4 = pfruck_contabo.models.ip_v4.IpV4( ip = '195.123.123.1', gateway = '255.255.255.1', netmask_cidr = 24, diff --git a/test/test_firewall_audit_response.py b/test/test_firewall_audit_response.py new file mode 100644 index 00000000..c35c02ff --- /dev/null +++ b/test/test_firewall_audit_response.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.firewall_audit_response import FirewallAuditResponse + +class TestFirewallAuditResponse(unittest.TestCase): + """FirewallAuditResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FirewallAuditResponse: + """Test FirewallAuditResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FirewallAuditResponse` + """ + model = FirewallAuditResponse() + if include_optional: + return FirewallAuditResponse( + id = 12345, + firewall_id = 'b943b25a-c8b5-4570-9135-4bbaa7615b81', + action = 'CREATED', + timestamp = '2021-03-30T11:35:06.177Z', + tenant_id = 'DE', + customer_id = '54321', + changed_by = '54321', + username = 'John Doe', + request_id = 'A2F56FAF-18N0-4893-11HG-R312M1E4FEC5', + trace_id = '78E9A428-94E9-4A2A-92F5-26038C6884F', + changes = {"prev":{"name":"test"},"new":{"name":"test1"}} + ) + else: + return FirewallAuditResponse( + id = 12345, + firewall_id = 'b943b25a-c8b5-4570-9135-4bbaa7615b81', + action = 'CREATED', + timestamp = '2021-03-30T11:35:06.177Z', + tenant_id = 'DE', + customer_id = '54321', + changed_by = '54321', + username = 'John Doe', + request_id = 'A2F56FAF-18N0-4893-11HG-R312M1E4FEC5', + trace_id = '78E9A428-94E9-4A2A-92F5-26038C6884F', + ) + """ + + def testFirewallAuditResponse(self): + """Test FirewallAuditResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_firewall_response.py b/test/test_firewall_response.py new file mode 100644 index 00000000..f3d2aa2d --- /dev/null +++ b/test/test_firewall_response.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.firewall_response import FirewallResponse + +class TestFirewallResponse(unittest.TestCase): + """FirewallResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FirewallResponse: + """Test FirewallResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FirewallResponse` + """ + model = FirewallResponse() + if include_optional: + return FirewallResponse( + tenant_id = 'DE', + customer_id = '54321', + firewall_id = 'b943b25a-c8b5-4570-9135-4bbaa7615b81', + name = 'My Firewall', + description = 'Allowing incoming HTTP traffic.', + status = 'active', + instance_status = [ + pfruck_contabo.models.instance_status_representation.InstanceStatusRepresentation( + instance_id = 100, + status = 'ok', + error_message = 'Failed to assign instance to firewall', ) + ], + instances = [ + pfruck_contabo.models.instance_details.InstanceDetails( + instance_id = 100, + display_name = 'Instance', + name = 'vmd12345', + product_id = 'V1', + ip_config = pfruck_contabo.models.ip_config1.IpConfig1( + v4 = pfruck_contabo.models.ip_v42.IpV42( + ip = '192.168.0.1', + netmask_cidr = 19, + gateway = '1.1.1.1', ), + v6 = pfruck_contabo.models.ip_v6.IpV6( + ip = '1:2:3:4:5:6:7:8', + netmask_cidr = 64, + gateway = '1:2:3:4:5:6:7:8', ), ), + region_slug = 'EU', + region_name = 'European Union (Germany)', + data_center_slug = 'EU1', + data_center_name = 'European Union (Germany) 1', ) + ], + rules = pfruck_contabo.models.rules.Rules( + inbound = [ + pfruck_contabo.models.firewall_rule_response.FirewallRuleResponse( + protocol = 'tcp', + dest_ports = ["80", "80-90"], + src_cidr = pfruck_contabo.models.src_cidr.SrcCidr( + ipv4 = ["192.168.0.1/24","AnyIPv4"], + ipv6 = ["1:2:3:4:5:6:7:8/64","AnyIPv6"], ), + action = 'accept', + status = 'active', + display_name = 'Allow HTTP Traffic', ) + ], ), + created_date = '2021-06-03T06:27:12Z', + updated_date = '2021-06-13T06:27:12Z' + ) + else: + return FirewallResponse( + tenant_id = 'DE', + customer_id = '54321', + firewall_id = 'b943b25a-c8b5-4570-9135-4bbaa7615b81', + name = 'My Firewall', + description = 'Allowing incoming HTTP traffic.', + status = 'active', + instance_status = [ + pfruck_contabo.models.instance_status_representation.InstanceStatusRepresentation( + instance_id = 100, + status = 'ok', + error_message = 'Failed to assign instance to firewall', ) + ], + instances = [ + pfruck_contabo.models.instance_details.InstanceDetails( + instance_id = 100, + display_name = 'Instance', + name = 'vmd12345', + product_id = 'V1', + ip_config = pfruck_contabo.models.ip_config1.IpConfig1( + v4 = pfruck_contabo.models.ip_v42.IpV42( + ip = '192.168.0.1', + netmask_cidr = 19, + gateway = '1.1.1.1', ), + v6 = pfruck_contabo.models.ip_v6.IpV6( + ip = '1:2:3:4:5:6:7:8', + netmask_cidr = 64, + gateway = '1:2:3:4:5:6:7:8', ), ), + region_slug = 'EU', + region_name = 'European Union (Germany)', + data_center_slug = 'EU1', + data_center_name = 'European Union (Germany) 1', ) + ], + rules = pfruck_contabo.models.rules.Rules( + inbound = [ + pfruck_contabo.models.firewall_rule_response.FirewallRuleResponse( + protocol = 'tcp', + dest_ports = ["80", "80-90"], + src_cidr = pfruck_contabo.models.src_cidr.SrcCidr( + ipv4 = ["192.168.0.1/24","AnyIPv4"], + ipv6 = ["1:2:3:4:5:6:7:8/64","AnyIPv6"], ), + action = 'accept', + status = 'active', + display_name = 'Allow HTTP Traffic', ) + ], ), + created_date = '2021-06-03T06:27:12Z', + updated_date = '2021-06-13T06:27:12Z', + ) + """ + + def testFirewallResponse(self): + """Test FirewallResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_firewall_rule_request.py b/test/test_firewall_rule_request.py new file mode 100644 index 00000000..24449114 --- /dev/null +++ b/test/test_firewall_rule_request.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.firewall_rule_request import FirewallRuleRequest + +class TestFirewallRuleRequest(unittest.TestCase): + """FirewallRuleRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FirewallRuleRequest: + """Test FirewallRuleRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FirewallRuleRequest` + """ + model = FirewallRuleRequest() + if include_optional: + return FirewallRuleRequest( + protocol = 'tcp', + dest_ports = ["80", "80-90"], + src_cidr = pfruck_contabo.models.src_cidr.SrcCidr( + ipv4 = ["192.168.0.1/24","AnyIPv4"], + ipv6 = ["1:2:3:4:5:6:7:8/64","AnyIPv6"], ), + action = 'accept', + status = 'active', + display_name = 'Allow HTTP Traffic' + ) + else: + return FirewallRuleRequest( + protocol = 'tcp', + dest_ports = ["80", "80-90"], + src_cidr = pfruck_contabo.models.src_cidr.SrcCidr( + ipv4 = ["192.168.0.1/24","AnyIPv4"], + ipv6 = ["1:2:3:4:5:6:7:8/64","AnyIPv6"], ), + action = 'accept', + status = 'active', + ) + """ + + def testFirewallRuleRequest(self): + """Test FirewallRuleRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_firewall_rule_response.py b/test/test_firewall_rule_response.py new file mode 100644 index 00000000..751e074b --- /dev/null +++ b/test/test_firewall_rule_response.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.firewall_rule_response import FirewallRuleResponse + +class TestFirewallRuleResponse(unittest.TestCase): + """FirewallRuleResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FirewallRuleResponse: + """Test FirewallRuleResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FirewallRuleResponse` + """ + model = FirewallRuleResponse() + if include_optional: + return FirewallRuleResponse( + protocol = 'tcp', + dest_ports = ["80", "80-90"], + src_cidr = pfruck_contabo.models.src_cidr.SrcCidr( + ipv4 = ["192.168.0.1/24","AnyIPv4"], + ipv6 = ["1:2:3:4:5:6:7:8/64","AnyIPv6"], ), + action = 'accept', + status = 'active', + display_name = 'Allow HTTP Traffic' + ) + else: + return FirewallRuleResponse( + protocol = 'tcp', + dest_ports = ["80", "80-90"], + src_cidr = pfruck_contabo.models.src_cidr.SrcCidr( + ipv4 = ["192.168.0.1/24","AnyIPv4"], + ipv6 = ["1:2:3:4:5:6:7:8/64","AnyIPv6"], ), + action = 'accept', + status = 'active', + display_name = 'Allow HTTP Traffic', + ) + """ + + def testFirewallRuleResponse(self): + """Test FirewallRuleResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_firewalls_api.py b/test/test_firewalls_api.py new file mode 100644 index 00000000..3911616e --- /dev/null +++ b/test/test_firewalls_api.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.api.firewalls_api import FirewallsApi + + +class TestFirewallsApi(unittest.TestCase): + """FirewallsApi unit test stubs""" + + def setUp(self) -> None: + self.api = FirewallsApi() + + def tearDown(self) -> None: + pass + + def test_assign_instance_firewall(self) -> None: + """Test case for assign_instance_firewall + + Add instance to a firewall + """ + pass + + def test_create_firewall(self) -> None: + """Test case for create_firewall + + Create a new firewall definition + """ + pass + + def test_delete_firewall(self) -> None: + """Test case for delete_firewall + + Delete existing firewall by id + """ + pass + + def test_patch_firewall(self) -> None: + """Test case for patch_firewall + + Update a firewall by id + """ + pass + + def test_put_firewall(self) -> None: + """Test case for put_firewall + + Update specific firewall rules + """ + pass + + def test_retrieve_firewall(self) -> None: + """Test case for retrieve_firewall + + Get specific firewall by its id + """ + pass + + def test_retrieve_firewall_list(self) -> None: + """Test case for retrieve_firewall_list + + List all firewalls + """ + pass + + def test_retrieve_preset_rules(self) -> None: + """Test case for retrieve_preset_rules + + Get all preset rules + """ + pass + + def test_unassign_instance_firewall(self) -> None: + """Test case for unassign_instance_firewall + + Remove instance from a firewall + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_firewalls_audits_api.py b/test/test_firewalls_audits_api.py new file mode 100644 index 00000000..96ee4e5c --- /dev/null +++ b/test/test_firewalls_audits_api.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.api.firewalls_audits_api import FirewallsAuditsApi + + +class TestFirewallsAuditsApi(unittest.TestCase): + """FirewallsAuditsApi unit test stubs""" + + def setUp(self) -> None: + self.api = FirewallsAuditsApi() + + def tearDown(self) -> None: + pass + + def test_retrieve_firewall_audits_list(self) -> None: + """Test case for retrieve_firewall_audits_list + + List history about your Firewalls (audit) + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_handle_address.py b/test/test_handle_address.py new file mode 100644 index 00000000..4d1468fd --- /dev/null +++ b/test/test_handle_address.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.handle_address import HandleAddress + +class TestHandleAddress(unittest.TestCase): + """HandleAddress unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> HandleAddress: + """Test HandleAddress + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `HandleAddress` + """ + model = HandleAddress() + if include_optional: + return HandleAddress( + street = 'My Street', + street_number = '12', + city = 'Munich', + country = 'DE', + zip_code = '12345', + siret = '12345', + region = 'region' + ) + else: + return HandleAddress( + street = 'My Street', + street_number = '12', + city = 'Munich', + country = 'DE', + zip_code = '12345', + ) + """ + + def testHandleAddress(self): + """Test HandleAddress""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_handle_audit_response.py b/test/test_handle_audit_response.py new file mode 100644 index 00000000..67129d81 --- /dev/null +++ b/test/test_handle_audit_response.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.handle_audit_response import HandleAuditResponse + +class TestHandleAuditResponse(unittest.TestCase): + """HandleAuditResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> HandleAuditResponse: + """Test HandleAuditResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `HandleAuditResponse` + """ + model = HandleAuditResponse() + if include_optional: + return HandleAuditResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.handle_audit_response_data.HandleAuditResponseData( + id = 12345, + action = 'CREATED', + timestamp = '2021-03-30T11:35:06.177Z', + tenant_id = 'DE', + customer_id = '54321', + changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + username = 'John.Doe', + request_id = 'A2F56FAF-18N0-4893-11HG-R312M1E4FEC5', + trace_id = '78E9A428-94E9-4A2A-92F5-26038C6884F', + handle_id = 'CA123O1', + changes = {"prev":{"firstName":"test"},"new":{"firstName":"test1"}}, ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ) + ) + else: + return HandleAuditResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.handle_audit_response_data.HandleAuditResponseData( + id = 12345, + action = 'CREATED', + timestamp = '2021-03-30T11:35:06.177Z', + tenant_id = 'DE', + customer_id = '54321', + changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + username = 'John.Doe', + request_id = 'A2F56FAF-18N0-4893-11HG-R312M1E4FEC5', + trace_id = '78E9A428-94E9-4A2A-92F5-26038C6884F', + handle_id = 'CA123O1', + changes = {"prev":{"firstName":"test"},"new":{"firstName":"test1"}}, ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ), + ) + """ + + def testHandleAuditResponse(self): + """Test HandleAuditResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_handle_audit_response_data.py b/test/test_handle_audit_response_data.py new file mode 100644 index 00000000..c5e46e25 --- /dev/null +++ b/test/test_handle_audit_response_data.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.handle_audit_response_data import HandleAuditResponseData + +class TestHandleAuditResponseData(unittest.TestCase): + """HandleAuditResponseData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> HandleAuditResponseData: + """Test HandleAuditResponseData + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `HandleAuditResponseData` + """ + model = HandleAuditResponseData() + if include_optional: + return HandleAuditResponseData( + id = 12345, + action = 'CREATED', + timestamp = '2021-03-30T11:35:06.177Z', + tenant_id = 'DE', + customer_id = '54321', + changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + username = 'John.Doe', + request_id = 'A2F56FAF-18N0-4893-11HG-R312M1E4FEC5', + trace_id = '78E9A428-94E9-4A2A-92F5-26038C6884F', + handle_id = 'CA123O1', + changes = {"prev":{"firstName":"test"},"new":{"firstName":"test1"}} + ) + else: + return HandleAuditResponseData( + id = 12345, + action = 'CREATED', + timestamp = '2021-03-30T11:35:06.177Z', + tenant_id = 'DE', + customer_id = '54321', + changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + username = 'John.Doe', + request_id = 'A2F56FAF-18N0-4893-11HG-R312M1E4FEC5', + trace_id = '78E9A428-94E9-4A2A-92F5-26038C6884F', + handle_id = 'CA123O1', + ) + """ + + def testHandleAuditResponseData(self): + """Test HandleAuditResponseData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_handle_birth_info.py b/test/test_handle_birth_info.py new file mode 100644 index 00000000..141681e5 --- /dev/null +++ b/test/test_handle_birth_info.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.handle_birth_info import HandleBirthInfo + +class TestHandleBirthInfo(unittest.TestCase): + """HandleBirthInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> HandleBirthInfo: + """Test HandleBirthInfo + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `HandleBirthInfo` + """ + model = HandleBirthInfo() + if include_optional: + return HandleBirthInfo( + var_date = '2023-03-03T12:32:03.363Z', + city = 'Munich', + zip_code = '12345', + country = 'DE' + ) + else: + return HandleBirthInfo( + ) + """ + + def testHandleBirthInfo(self): + """Test HandleBirthInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_handle_create_request.py b/test/test_handle_create_request.py new file mode 100644 index 00000000..fb0e16c7 --- /dev/null +++ b/test/test_handle_create_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.handle_create_request import HandleCreateRequest + +class TestHandleCreateRequest(unittest.TestCase): + """HandleCreateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> HandleCreateRequest: + """Test HandleCreateRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `HandleCreateRequest` + """ + model = HandleCreateRequest() + if include_optional: + return HandleCreateRequest( + handle_type = 'organization', + first_name = 'John', + last_name = 'Doe', + organization = 'Test Organization', + email = 'john.doe@test.com', + gender = 'male', + birth_info = pfruck_contabo.models.handle_birth_info.HandleBirthInfo( + date = '2023-03-03T12:32:03.363Z', + city = 'Munich', + zip_code = '12345', + country = 'DE', ), + address = pfruck_contabo.models.handle_address.HandleAddress( + street = 'My Street', + street_number = '12', + city = 'Munich', + country = 'DE', + zip_code = '12345', + siret = '12345', + region = 'region', ), + phone = pfruck_contabo.models.handle_phone.HandlePhone( + prefix = '+40', + number = '123456789', ), + fax = pfruck_contabo.models.handle_phone.HandlePhone( + prefix = '+40', + number = '123456789', ) + ) + else: + return HandleCreateRequest( + handle_type = 'organization', + first_name = 'John', + last_name = 'Doe', + email = 'john.doe@test.com', + gender = 'male', + address = pfruck_contabo.models.handle_address.HandleAddress( + street = 'My Street', + street_number = '12', + city = 'Munich', + country = 'DE', + zip_code = '12345', + siret = '12345', + region = 'region', ), + phone = pfruck_contabo.models.handle_phone.HandlePhone( + prefix = '+40', + number = '123456789', ), + ) + """ + + def testHandleCreateRequest(self): + """Test HandleCreateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_handle_create_response.py b/test/test_handle_create_response.py new file mode 100644 index 00000000..22ec5b9b --- /dev/null +++ b/test/test_handle_create_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.handle_create_response import HandleCreateResponse + +class TestHandleCreateResponse(unittest.TestCase): + """HandleCreateResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> HandleCreateResponse: + """Test HandleCreateResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `HandleCreateResponse` + """ + model = HandleCreateResponse() + if include_optional: + return HandleCreateResponse( + data = [ + pfruck_contabo.models.handle_response.HandleResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + handle_id = 'CA1234O1', + handle_type = 'person', + is_default = True, + first_name = 'John', + last_name = 'Doe', + organization = 'Test Organization', + email = 'john.doe@test.com', + gender = 'male', + birth_info = null, + address = null, + phone = null, + fax = null, ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ) + ) + else: + return HandleCreateResponse( + data = [ + pfruck_contabo.models.handle_response.HandleResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + handle_id = 'CA1234O1', + handle_type = 'person', + is_default = True, + first_name = 'John', + last_name = 'Doe', + organization = 'Test Organization', + email = 'john.doe@test.com', + gender = 'male', + birth_info = null, + address = null, + phone = null, + fax = null, ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ), + ) + """ + + def testHandleCreateResponse(self): + """Test HandleCreateResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_handle_find_response.py b/test/test_handle_find_response.py new file mode 100644 index 00000000..09e27495 --- /dev/null +++ b/test/test_handle_find_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.handle_find_response import HandleFindResponse + +class TestHandleFindResponse(unittest.TestCase): + """HandleFindResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> HandleFindResponse: + """Test HandleFindResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `HandleFindResponse` + """ + model = HandleFindResponse() + if include_optional: + return HandleFindResponse( + data = [ + pfruck_contabo.models.handle_response.HandleResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + handle_id = 'CA1234O1', + handle_type = 'person', + is_default = True, + first_name = 'John', + last_name = 'Doe', + organization = 'Test Organization', + email = 'john.doe@test.com', + gender = 'male', + birth_info = null, + address = null, + phone = null, + fax = null, ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ) + ) + else: + return HandleFindResponse( + data = [ + pfruck_contabo.models.handle_response.HandleResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + handle_id = 'CA1234O1', + handle_type = 'person', + is_default = True, + first_name = 'John', + last_name = 'Doe', + organization = 'Test Organization', + email = 'john.doe@test.com', + gender = 'male', + birth_info = null, + address = null, + phone = null, + fax = null, ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ), + ) + """ + + def testHandleFindResponse(self): + """Test HandleFindResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_handle_list_response.py b/test/test_handle_list_response.py new file mode 100644 index 00000000..a1068a84 --- /dev/null +++ b/test/test_handle_list_response.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.handle_list_response import HandleListResponse + +class TestHandleListResponse(unittest.TestCase): + """HandleListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> HandleListResponse: + """Test HandleListResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `HandleListResponse` + """ + model = HandleListResponse() + if include_optional: + return HandleListResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.handle_response.HandleResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + handle_id = 'CA1234O1', + handle_type = 'person', + is_default = True, + first_name = 'John', + last_name = 'Doe', + organization = 'Test Organization', + email = 'john.doe@test.com', + gender = 'male', + birth_info = null, + address = null, + phone = null, + fax = null, ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ) + ) + else: + return HandleListResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.handle_response.HandleResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + handle_id = 'CA1234O1', + handle_type = 'person', + is_default = True, + first_name = 'John', + last_name = 'Doe', + organization = 'Test Organization', + email = 'john.doe@test.com', + gender = 'male', + birth_info = null, + address = null, + phone = null, + fax = null, ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ), + ) + """ + + def testHandleListResponse(self): + """Test HandleListResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_handle_patch_request.py b/test/test_handle_patch_request.py new file mode 100644 index 00000000..06a6c5d3 --- /dev/null +++ b/test/test_handle_patch_request.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.handle_patch_request import HandlePatchRequest + +class TestHandlePatchRequest(unittest.TestCase): + """HandlePatchRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> HandlePatchRequest: + """Test HandlePatchRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `HandlePatchRequest` + """ + model = HandlePatchRequest() + if include_optional: + return HandlePatchRequest( + email = 'john.doe@test.com', + gender = 'male', + birth_info = pfruck_contabo.models.handle_birth_info.HandleBirthInfo( + date = '2023-03-03T12:32:03.363Z', + city = 'Munich', + zip_code = '12345', + country = 'DE', ), + address = pfruck_contabo.models.handle_address.HandleAddress( + street = 'My Street', + street_number = '12', + city = 'Munich', + country = 'DE', + zip_code = '12345', + siret = '12345', + region = 'region', ), + phone = pfruck_contabo.models.handle_phone.HandlePhone( + prefix = '+40', + number = '123456789', ), + fax = pfruck_contabo.models.handle_phone.HandlePhone( + prefix = '+40', + number = '123456789', ) + ) + else: + return HandlePatchRequest( + email = 'john.doe@test.com', + gender = 'male', + address = pfruck_contabo.models.handle_address.HandleAddress( + street = 'My Street', + street_number = '12', + city = 'Munich', + country = 'DE', + zip_code = '12345', + siret = '12345', + region = 'region', ), + phone = pfruck_contabo.models.handle_phone.HandlePhone( + prefix = '+40', + number = '123456789', ), + ) + """ + + def testHandlePatchRequest(self): + """Test HandlePatchRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_handle_patch_response.py b/test/test_handle_patch_response.py new file mode 100644 index 00000000..acbe9fbf --- /dev/null +++ b/test/test_handle_patch_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.handle_patch_response import HandlePatchResponse + +class TestHandlePatchResponse(unittest.TestCase): + """HandlePatchResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> HandlePatchResponse: + """Test HandlePatchResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `HandlePatchResponse` + """ + model = HandlePatchResponse() + if include_optional: + return HandlePatchResponse( + data = [ + pfruck_contabo.models.handle_response.HandleResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + handle_id = 'CA1234O1', + handle_type = 'person', + is_default = True, + first_name = 'John', + last_name = 'Doe', + organization = 'Test Organization', + email = 'john.doe@test.com', + gender = 'male', + birth_info = null, + address = null, + phone = null, + fax = null, ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ) + ) + else: + return HandlePatchResponse( + data = [ + pfruck_contabo.models.handle_response.HandleResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + handle_id = 'CA1234O1', + handle_type = 'person', + is_default = True, + first_name = 'John', + last_name = 'Doe', + organization = 'Test Organization', + email = 'john.doe@test.com', + gender = 'male', + birth_info = null, + address = null, + phone = null, + fax = null, ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ), + ) + """ + + def testHandlePatchResponse(self): + """Test HandlePatchResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_handle_phone.py b/test/test_handle_phone.py new file mode 100644 index 00000000..faf70bc8 --- /dev/null +++ b/test/test_handle_phone.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.handle_phone import HandlePhone + +class TestHandlePhone(unittest.TestCase): + """HandlePhone unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> HandlePhone: + """Test HandlePhone + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `HandlePhone` + """ + model = HandlePhone() + if include_optional: + return HandlePhone( + prefix = '+40', + number = '123456789' + ) + else: + return HandlePhone( + prefix = '+40', + number = '123456789', + ) + """ + + def testHandlePhone(self): + """Test HandlePhone""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_handle_response.py b/test/test_handle_response.py new file mode 100644 index 00000000..23644160 --- /dev/null +++ b/test/test_handle_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.handle_response import HandleResponse + +class TestHandleResponse(unittest.TestCase): + """HandleResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> HandleResponse: + """Test HandleResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `HandleResponse` + """ + model = HandleResponse() + if include_optional: + return HandleResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + handle_id = 'CA1234O1', + handle_type = 'person', + is_default = True, + first_name = 'John', + last_name = 'Doe', + organization = 'Test Organization', + email = 'john.doe@test.com', + gender = 'male', + birth_info = pfruck_contabo.models.handle_birth_info.HandleBirthInfo( + date = '2023-03-03T12:32:03.363Z', + city = 'Munich', + zip_code = '12345', + country = 'DE', ), + address = pfruck_contabo.models.handle_address.HandleAddress( + street = 'My Street', + street_number = '12', + city = 'Munich', + country = 'DE', + zip_code = '12345', + siret = '12345', + region = 'region', ), + phone = pfruck_contabo.models.handle_phone.HandlePhone( + prefix = '+40', + number = '123456789', ), + fax = pfruck_contabo.models.handle_phone.HandlePhone( + prefix = '+40', + number = '123456789', ) + ) + else: + return HandleResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + handle_id = 'CA1234O1', + handle_type = 'person', + is_default = True, + first_name = 'John', + last_name = 'Doe', + email = 'john.doe@test.com', + gender = 'male', + address = pfruck_contabo.models.handle_address.HandleAddress( + street = 'My Street', + street_number = '12', + city = 'Munich', + country = 'DE', + zip_code = '12345', + siret = '12345', + region = 'region', ), + phone = pfruck_contabo.models.handle_phone.HandlePhone( + prefix = '+40', + number = '123456789', ), + ) + """ + + def testHandleResponse(self): + """Test HandleResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_handles_api.py b/test/test_handles_api.py new file mode 100644 index 00000000..f84338c9 --- /dev/null +++ b/test/test_handles_api.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.api.handles_api import HandlesApi + + +class TestHandlesApi(unittest.TestCase): + """HandlesApi unit test stubs""" + + def setUp(self) -> None: + self.api = HandlesApi() + + def tearDown(self) -> None: + pass + + def test_create_handle(self) -> None: + """Test case for create_handle + + Create specific handle + """ + pass + + def test_list_handles(self) -> None: + """Test case for list_handles + + List all handles + """ + pass + + def test_remove_handle(self) -> None: + """Test case for remove_handle + + Remove specific handle + """ + pass + + def test_retrieve_handle(self) -> None: + """Test case for retrieve_handle + + Get specific handle + """ + pass + + def test_set_default_handle(self) -> None: + """Test case for set_default_handle + + Set default handle + """ + pass + + def test_update_handle(self) -> None: + """Test case for update_handle + + Update specific handle + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_handles_audits_api.py b/test/test_handles_audits_api.py new file mode 100644 index 00000000..994ff8c2 --- /dev/null +++ b/test/test_handles_audits_api.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.api.handles_audits_api import HandlesAuditsApi + + +class TestHandlesAuditsApi(unittest.TestCase): + """HandlesAuditsApi unit test stubs""" + + def setUp(self) -> None: + self.api = HandlesAuditsApi() + + def tearDown(self) -> None: + pass + + def test_retrieve_handles_audits_list(self) -> None: + """Test case for retrieve_handles_audits_list + + List history about your handles (audit) + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_assignment_self_links1.py b/test/test_instance_assignment_self_links1.py new file mode 100644 index 00000000..0d462e0e --- /dev/null +++ b/test/test_instance_assignment_self_links1.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.instance_assignment_self_links1 import InstanceAssignmentSelfLinks1 + +class TestInstanceAssignmentSelfLinks1(unittest.TestCase): + """InstanceAssignmentSelfLinks1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceAssignmentSelfLinks1: + """Test InstanceAssignmentSelfLinks1 + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceAssignmentSelfLinks1` + """ + model = InstanceAssignmentSelfLinks1() + if include_optional: + return InstanceAssignmentSelfLinks1( + var_self = '', + firewall = '', + instance = '' + ) + else: + return InstanceAssignmentSelfLinks1( + var_self = '', + firewall = '', + instance = '', + ) + """ + + def testInstanceAssignmentSelfLinks1(self): + """Test InstanceAssignmentSelfLinks1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_details.py b/test/test_instance_details.py new file mode 100644 index 00000000..ed18c996 --- /dev/null +++ b/test/test_instance_details.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.instance_details import InstanceDetails + +class TestInstanceDetails(unittest.TestCase): + """InstanceDetails unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceDetails: + """Test InstanceDetails + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceDetails` + """ + model = InstanceDetails() + if include_optional: + return InstanceDetails( + instance_id = 100, + display_name = 'Instance', + name = 'vmd12345', + product_id = 'V1', + ip_config = pfruck_contabo.models.ip_config1.IpConfig1( + v4 = pfruck_contabo.models.ip_v42.IpV42( + ip = '192.168.0.1', + netmask_cidr = 19, + gateway = '1.1.1.1', ), + v6 = pfruck_contabo.models.ip_v6.IpV6( + ip = '1:2:3:4:5:6:7:8', + netmask_cidr = 64, + gateway = '1:2:3:4:5:6:7:8', ), ), + region_slug = 'EU', + region_name = 'European Union (Germany)', + data_center_slug = 'EU1', + data_center_name = 'European Union (Germany) 1' + ) + else: + return InstanceDetails( + instance_id = 100, + display_name = 'Instance', + name = 'vmd12345', + product_id = 'V1', + ip_config = pfruck_contabo.models.ip_config1.IpConfig1( + v4 = pfruck_contabo.models.ip_v42.IpV42( + ip = '192.168.0.1', + netmask_cidr = 19, + gateway = '1.1.1.1', ), + v6 = pfruck_contabo.models.ip_v6.IpV6( + ip = '1:2:3:4:5:6:7:8', + netmask_cidr = 64, + gateway = '1:2:3:4:5:6:7:8', ), ), + region_slug = 'EU', + region_name = 'European Union (Germany)', + data_center_slug = 'EU1', + data_center_name = 'European Union (Germany) 1', + ) + """ + + def testInstanceDetails(self): + """Test InstanceDetails""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_response.py b/test/test_instance_response.py index 9e1e663c..aae57726 100644 --- a/test/test_instance_response.py +++ b/test/test_instance_response.py @@ -39,7 +39,7 @@ def make_instance(self, include_optional) -> InstanceResponse: customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', additional_ips = [ pfruck_contabo.models.additional_ip.AdditionalIp( - v4 = pfruck_contabo.models.ip_v4.IpV4( + v4 = pfruck_contabo.models.ip_v43.IpV43( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ), ) @@ -52,8 +52,8 @@ def make_instance(self, include_optional) -> InstanceResponse: region_name = 'European Union', product_id = 'V5', image_id = '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d', - ip_config = pfruck_contabo.models.ip_config.IpConfig( - v4 = pfruck_contabo.models.ip_v4.IpV4( + ip_config = pfruck_contabo.models.ip_config2.IpConfig2( + v4 = pfruck_contabo.models.ip_v43.IpV43( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ), @@ -81,7 +81,8 @@ def make_instance(self, include_optional) -> InstanceResponse: error_message = '', product_type = 'ssd', product_name = 'VPS M', - default_user = 'root' + default_user = 'root', + application_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752' ) else: return InstanceResponse( @@ -89,7 +90,7 @@ def make_instance(self, include_optional) -> InstanceResponse: customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', additional_ips = [ pfruck_contabo.models.additional_ip.AdditionalIp( - v4 = pfruck_contabo.models.ip_v4.IpV4( + v4 = pfruck_contabo.models.ip_v43.IpV43( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ), ) @@ -102,8 +103,8 @@ def make_instance(self, include_optional) -> InstanceResponse: region_name = 'European Union', product_id = 'V5', image_id = '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d', - ip_config = pfruck_contabo.models.ip_config.IpConfig( - v4 = pfruck_contabo.models.ip_v4.IpV4( + ip_config = pfruck_contabo.models.ip_config2.IpConfig2( + v4 = pfruck_contabo.models.ip_v43.IpV43( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ), @@ -130,6 +131,7 @@ def make_instance(self, include_optional) -> InstanceResponse: ], product_type = 'ssd', product_name = 'VPS M', + application_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', ) """ diff --git a/test/test_instance_status_representation.py b/test/test_instance_status_representation.py new file mode 100644 index 00000000..db60d3f3 --- /dev/null +++ b/test/test_instance_status_representation.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.instance_status_representation import InstanceStatusRepresentation + +class TestInstanceStatusRepresentation(unittest.TestCase): + """InstanceStatusRepresentation unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceStatusRepresentation: + """Test InstanceStatusRepresentation + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceStatusRepresentation` + """ + model = InstanceStatusRepresentation() + if include_optional: + return InstanceStatusRepresentation( + instance_id = 100, + status = 'ok', + error_message = 'Failed to assign instance to firewall' + ) + else: + return InstanceStatusRepresentation( + instance_id = 100, + status = 'ok', + ) + """ + + def testInstanceStatusRepresentation(self): + """Test InstanceStatusRepresentation""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instances.py b/test/test_instances.py index 828e740a..fba71c5a 100644 --- a/test/test_instances.py +++ b/test/test_instances.py @@ -41,13 +41,13 @@ def make_instance(self, include_optional) -> Instances: product_id = 'V1', private_ip_config = pfruck_contabo.models.private_ip_config.PrivateIpConfig( v4 = [ - pfruck_contabo.models.ip_v4.IpV4( + pfruck_contabo.models.ip_v41.IpV41( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ) ], ), ip_config = pfruck_contabo.models.ip_config.IpConfig( - v4 = pfruck_contabo.models.ip_v4.IpV4( + v4 = pfruck_contabo.models.ip_v41.IpV41( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ), @@ -66,13 +66,13 @@ def make_instance(self, include_optional) -> Instances: product_id = 'V1', private_ip_config = pfruck_contabo.models.private_ip_config.PrivateIpConfig( v4 = [ - pfruck_contabo.models.ip_v4.IpV4( + pfruck_contabo.models.ip_v41.IpV41( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ) ], ), ip_config = pfruck_contabo.models.ip_config.IpConfig( - v4 = pfruck_contabo.models.ip_v4.IpV4( + v4 = pfruck_contabo.models.ip_v41.IpV41( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ), diff --git a/test/test_internal_api.py b/test/test_internal_api.py deleted file mode 100644 index 9acb17be..00000000 --- a/test/test_internal_api.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Contabo API - - - The version of the OpenAPI document: 1.0.0 - Contact: support@contabo.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from pfruck_contabo.api.internal_api import InternalApi - - -class TestInternalApi(unittest.TestCase): - """InternalApi unit test stubs""" - - def setUp(self) -> None: - self.api = InternalApi() - - def tearDown(self) -> None: - pass - - def test_create_ticket(self) -> None: - """Test case for create_ticket - - Create a new support ticket - """ - pass - - def test_retrieve_user_is_password_set(self) -> None: - """Test case for retrieve_user_is_password_set - - Get user is password set status - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_internal_check_audits_api.py b/test/test_internal_check_audits_api.py new file mode 100644 index 00000000..78b508e7 --- /dev/null +++ b/test/test_internal_check_audits_api.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.api.internal_check_audits_api import InternalCheckAuditsApi + + +class TestInternalCheckAuditsApi(unittest.TestCase): + """InternalCheckAuditsApi unit test stubs""" + + def setUp(self) -> None: + self.api = InternalCheckAuditsApi() + + def tearDown(self) -> None: + pass + + def test_retrieve_checks_audits_list(self) -> None: + """Test case for retrieve_checks_audits_list + + List history about your Data (audit) + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_internal_check_collection_audits_api.py b/test/test_internal_check_collection_audits_api.py new file mode 100644 index 00000000..0ed10ce9 --- /dev/null +++ b/test/test_internal_check_collection_audits_api.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.api.internal_check_collection_audits_api import InternalCheckCollectionAuditsApi + + +class TestInternalCheckCollectionAuditsApi(unittest.TestCase): + """InternalCheckCollectionAuditsApi unit test stubs""" + + def setUp(self) -> None: + self.api = InternalCheckCollectionAuditsApi() + + def tearDown(self) -> None: + pass + + def test_retrieve_check_collections_audits_list(self) -> None: + """Test case for retrieve_check_collections_audits_list + + List history about your Data (audit) + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_internal_check_collection_replay_api.py b/test/test_internal_check_collection_replay_api.py new file mode 100644 index 00000000..1e4a45cc --- /dev/null +++ b/test/test_internal_check_collection_replay_api.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.api.internal_check_collection_replay_api import InternalCheckCollectionReplayApi + + +class TestInternalCheckCollectionReplayApi(unittest.TestCase): + """InternalCheckCollectionReplayApi unit test stubs""" + + def setUp(self) -> None: + self.api = InternalCheckCollectionReplayApi() + + def tearDown(self) -> None: + pass + + def test_replay_check_collection(self) -> None: + """Test case for replay_check_collection + + Replay changes for Check + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_internal_check_collection_templates_api.py b/test/test_internal_check_collection_templates_api.py new file mode 100644 index 00000000..4f0b8807 --- /dev/null +++ b/test/test_internal_check_collection_templates_api.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.api.internal_check_collection_templates_api import InternalCheckCollectionTemplatesApi + + +class TestInternalCheckCollectionTemplatesApi(unittest.TestCase): + """InternalCheckCollectionTemplatesApi unit test stubs""" + + def setUp(self) -> None: + self.api = InternalCheckCollectionTemplatesApi() + + def tearDown(self) -> None: + pass + + def test_get_check_collection_template(self) -> None: + """Test case for get_check_collection_template + + Get check + """ + pass + + def test_list_check_collection_templates(self) -> None: + """Test case for list_check_collection_templates + + List check collection templates + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_internal_check_collections_api.py b/test/test_internal_check_collections_api.py new file mode 100644 index 00000000..df9c2e88 --- /dev/null +++ b/test/test_internal_check_collections_api.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.api.internal_check_collections_api import InternalCheckCollectionsApi + + +class TestInternalCheckCollectionsApi(unittest.TestCase): + """InternalCheckCollectionsApi unit test stubs""" + + def setUp(self) -> None: + self.api = InternalCheckCollectionsApi() + + def tearDown(self) -> None: + pass + + def test_cancel_check_collection(self) -> None: + """Test case for cancel_check_collection + + Cancel check collection + """ + pass + + def test_get_check_collection(self) -> None: + """Test case for get_check_collection + + Get check collection + """ + pass + + def test_list_check_collections(self) -> None: + """Test case for list_check_collections + + List check collections + """ + pass + + def test_start_check_collection(self) -> None: + """Test case for start_check_collection + + Start check collection + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_internal_check_replay_api.py b/test/test_internal_check_replay_api.py new file mode 100644 index 00000000..c747c82a --- /dev/null +++ b/test/test_internal_check_replay_api.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.api.internal_check_replay_api import InternalCheckReplayApi + + +class TestInternalCheckReplayApi(unittest.TestCase): + """InternalCheckReplayApi unit test stubs""" + + def setUp(self) -> None: + self.api = InternalCheckReplayApi() + + def tearDown(self) -> None: + pass + + def test_replay_check(self) -> None: + """Test case for replay_check + + Replay changes for Check + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_internal_check_templates_api.py b/test/test_internal_check_templates_api.py new file mode 100644 index 00000000..9c79f3f7 --- /dev/null +++ b/test/test_internal_check_templates_api.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.api.internal_check_templates_api import InternalCheckTemplatesApi + + +class TestInternalCheckTemplatesApi(unittest.TestCase): + """InternalCheckTemplatesApi unit test stubs""" + + def setUp(self) -> None: + self.api = InternalCheckTemplatesApi() + + def tearDown(self) -> None: + pass + + def test_get_check_template(self) -> None: + """Test case for get_check_template + + Get check + """ + pass + + def test_list_check_templates(self) -> None: + """Test case for list_check_templates + + List check templates + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_internal_checks_api.py b/test/test_internal_checks_api.py new file mode 100644 index 00000000..b04aceb9 --- /dev/null +++ b/test/test_internal_checks_api.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.api.internal_checks_api import InternalChecksApi + + +class TestInternalChecksApi(unittest.TestCase): + """InternalChecksApi unit test stubs""" + + def setUp(self) -> None: + self.api = InternalChecksApi() + + def tearDown(self) -> None: + pass + + def test_cancel_check(self) -> None: + """Test case for cancel_check + + Cancel check + """ + pass + + def test_get_check(self) -> None: + """Test case for get_check + + Get check + """ + pass + + def test_list_checks(self) -> None: + """Test case for list_checks + + List check + """ + pass + + def test_start_check(self) -> None: + """Test case for start_check + + Start check + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_internal_remedies_api.py b/test/test_internal_remedies_api.py new file mode 100644 index 00000000..9a18be03 --- /dev/null +++ b/test/test_internal_remedies_api.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.api.internal_remedies_api import InternalRemediesApi + + +class TestInternalRemediesApi(unittest.TestCase): + """InternalRemediesApi unit test stubs""" + + def setUp(self) -> None: + self.api = InternalRemediesApi() + + def tearDown(self) -> None: + pass + + def test_cancel_remedy(self) -> None: + """Test case for cancel_remedy + + Cancel remedy + """ + pass + + def test_get_remedy(self) -> None: + """Test case for get_remedy + + Get remedy + """ + pass + + def test_list_remedies(self) -> None: + """Test case for list_remedies + + List remedy + """ + pass + + def test_start_remedy(self) -> None: + """Test case for start_remedy + + Start remedy + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_internal_remedy_audits_api.py b/test/test_internal_remedy_audits_api.py new file mode 100644 index 00000000..55c7e90d --- /dev/null +++ b/test/test_internal_remedy_audits_api.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.api.internal_remedy_audits_api import InternalRemedyAuditsApi + + +class TestInternalRemedyAuditsApi(unittest.TestCase): + """InternalRemedyAuditsApi unit test stubs""" + + def setUp(self) -> None: + self.api = InternalRemedyAuditsApi() + + def tearDown(self) -> None: + pass + + def test_retrieve_remedies_audits_list(self) -> None: + """Test case for retrieve_remedies_audits_list + + List history about your Data (audit) + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_internal_remedy_replay_api.py b/test/test_internal_remedy_replay_api.py new file mode 100644 index 00000000..490d6b41 --- /dev/null +++ b/test/test_internal_remedy_replay_api.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.api.internal_remedy_replay_api import InternalRemedyReplayApi + + +class TestInternalRemedyReplayApi(unittest.TestCase): + """InternalRemedyReplayApi unit test stubs""" + + def setUp(self) -> None: + self.api = InternalRemedyReplayApi() + + def tearDown(self) -> None: + pass + + def test_replay_remedy(self) -> None: + """Test case for replay_remedy + + Replay changes for Remedy + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_internal_remedy_templates_api.py b/test/test_internal_remedy_templates_api.py new file mode 100644 index 00000000..744f0bcf --- /dev/null +++ b/test/test_internal_remedy_templates_api.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.api.internal_remedy_templates_api import InternalRemedyTemplatesApi + + +class TestInternalRemedyTemplatesApi(unittest.TestCase): + """InternalRemedyTemplatesApi unit test stubs""" + + def setUp(self) -> None: + self.api = InternalRemedyTemplatesApi() + + def tearDown(self) -> None: + pass + + def test_get_remedy_template(self) -> None: + """Test case for get_remedy_template + + Get remedy + """ + pass + + def test_list_remedy_templates(self) -> None: + """Test case for list_remedy_templates + + List remedy templates + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ip_config.py b/test/test_ip_config.py index 208c0c90..a89eaf16 100644 --- a/test/test_ip_config.py +++ b/test/test_ip_config.py @@ -35,7 +35,7 @@ def make_instance(self, include_optional) -> IpConfig: model = IpConfig() if include_optional: return IpConfig( - v4 = pfruck_contabo.models.ip_v4.IpV4( + v4 = pfruck_contabo.models.ip_v41.IpV41( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ), @@ -46,7 +46,7 @@ def make_instance(self, include_optional) -> IpConfig: ) else: return IpConfig( - v4 = pfruck_contabo.models.ip_v4.IpV4( + v4 = pfruck_contabo.models.ip_v41.IpV41( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ), diff --git a/test/test_ip_config1.py b/test/test_ip_config1.py new file mode 100644 index 00000000..964a3da6 --- /dev/null +++ b/test/test_ip_config1.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.ip_config1 import IpConfig1 + +class TestIpConfig1(unittest.TestCase): + """IpConfig1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> IpConfig1: + """Test IpConfig1 + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `IpConfig1` + """ + model = IpConfig1() + if include_optional: + return IpConfig1( + v4 = pfruck_contabo.models.ip_v42.IpV42( + ip = '192.168.0.1', + netmask_cidr = 19, + gateway = '1.1.1.1', ), + v6 = pfruck_contabo.models.ip_v6.IpV6( + ip = '1:2:3:4:5:6:7:8', + netmask_cidr = 64, + gateway = '1:2:3:4:5:6:7:8', ) + ) + else: + return IpConfig1( + v4 = pfruck_contabo.models.ip_v42.IpV42( + ip = '192.168.0.1', + netmask_cidr = 19, + gateway = '1.1.1.1', ), + v6 = pfruck_contabo.models.ip_v6.IpV6( + ip = '1:2:3:4:5:6:7:8', + netmask_cidr = 64, + gateway = '1:2:3:4:5:6:7:8', ), + ) + """ + + def testIpConfig1(self): + """Test IpConfig1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ip_config2.py b/test/test_ip_config2.py new file mode 100644 index 00000000..268f5ac7 --- /dev/null +++ b/test/test_ip_config2.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.ip_config2 import IpConfig2 + +class TestIpConfig2(unittest.TestCase): + """IpConfig2 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> IpConfig2: + """Test IpConfig2 + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `IpConfig2` + """ + model = IpConfig2() + if include_optional: + return IpConfig2( + v4 = pfruck_contabo.models.ip_v43.IpV43( + ip = '192.168.0.1', + netmask_cidr = 19, + gateway = '1.1.1.1', ), + v6 = pfruck_contabo.models.ip_v6.IpV6( + ip = '1:2:3:4:5:6:7:8', + netmask_cidr = 64, + gateway = '1:2:3:4:5:6:7:8', ) + ) + else: + return IpConfig2( + v4 = pfruck_contabo.models.ip_v43.IpV43( + ip = '192.168.0.1', + netmask_cidr = 19, + gateway = '1.1.1.1', ), + v6 = pfruck_contabo.models.ip_v6.IpV6( + ip = '1:2:3:4:5:6:7:8', + netmask_cidr = 64, + gateway = '1:2:3:4:5:6:7:8', ), + ) + """ + + def testIpConfig2(self): + """Test IpConfig2""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ip_v4.py b/test/test_ip_v4.py index 2c90ba32..fc78b221 100644 --- a/test/test_ip_v4.py +++ b/test/test_ip_v4.py @@ -35,15 +35,19 @@ def make_instance(self, include_optional) -> IpV4: model = IpV4() if include_optional: return IpV4( - ip = '192.168.0.1', - netmask_cidr = 19, - gateway = '1.1.1.1' + ip = '195.123.123.1', + gateway = '255.255.255.1', + netmask_cidr = 24, + broadcast = '195.123.123.255', + net = '195.123.123.0/24' ) else: return IpV4( - ip = '192.168.0.1', - netmask_cidr = 19, - gateway = '1.1.1.1', + ip = '195.123.123.1', + gateway = '255.255.255.1', + netmask_cidr = 24, + broadcast = '195.123.123.255', + net = '195.123.123.0/24', ) """ diff --git a/test/test_ip_v41.py b/test/test_ip_v41.py index c56be3c5..4beb395c 100644 --- a/test/test_ip_v41.py +++ b/test/test_ip_v41.py @@ -35,19 +35,15 @@ def make_instance(self, include_optional) -> IpV41: model = IpV41() if include_optional: return IpV41( - ip = '195.123.123.1', - gateway = '255.255.255.1', - netmask_cidr = 24, - broadcast = '195.123.123.255', - net = '195.123.123.0/24' + ip = '192.168.0.1', + netmask_cidr = 19, + gateway = '1.1.1.1' ) else: return IpV41( - ip = '195.123.123.1', - gateway = '255.255.255.1', - netmask_cidr = 24, - broadcast = '195.123.123.255', - net = '195.123.123.0/24', + ip = '192.168.0.1', + netmask_cidr = 19, + gateway = '1.1.1.1', ) """ diff --git a/test/test_ip_v42.py b/test/test_ip_v42.py new file mode 100644 index 00000000..546b0b73 --- /dev/null +++ b/test/test_ip_v42.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.ip_v42 import IpV42 + +class TestIpV42(unittest.TestCase): + """IpV42 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> IpV42: + """Test IpV42 + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `IpV42` + """ + model = IpV42() + if include_optional: + return IpV42( + ip = '192.168.0.1', + netmask_cidr = 19, + gateway = '1.1.1.1' + ) + else: + return IpV42( + ip = '192.168.0.1', + netmask_cidr = 19, + gateway = '1.1.1.1', + ) + """ + + def testIpV42(self): + """Test IpV42""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ip_v43.py b/test/test_ip_v43.py new file mode 100644 index 00000000..e1ed987a --- /dev/null +++ b/test/test_ip_v43.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.ip_v43 import IpV43 + +class TestIpV43(unittest.TestCase): + """IpV43 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> IpV43: + """Test IpV43 + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `IpV43` + """ + model = IpV43() + if include_optional: + return IpV43( + ip = '192.168.0.1', + netmask_cidr = 19, + gateway = '1.1.1.1' + ) + else: + return IpV43( + ip = '192.168.0.1', + netmask_cidr = 19, + gateway = '1.1.1.1', + ) + """ + + def testIpV43(self): + """Test IpV43""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_list_applications_response.py b/test/test_list_applications_response.py index 217766e4..060d800a 100644 --- a/test/test_list_applications_response.py +++ b/test/test_list_applications_response.py @@ -56,7 +56,8 @@ def make_instance(self, include_optional) -> ListApplicationsResponse: user: admin timezone: Europe/Berlin chpasswd: - expire: False', ) + expire: False', + meta_data = null, ) ], requirements = null, ) ], @@ -90,7 +91,8 @@ def make_instance(self, include_optional) -> ListApplicationsResponse: user: admin timezone: Europe/Berlin chpasswd: - expire: False', ) + expire: False', + meta_data = null, ) ], requirements = null, ) ], diff --git a/test/test_list_dns_zone_records_response.py b/test/test_list_dns_zone_records_response.py new file mode 100644 index 00000000..41913406 --- /dev/null +++ b/test/test_list_dns_zone_records_response.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.list_dns_zone_records_response import ListDnsZoneRecordsResponse + +class TestListDnsZoneRecordsResponse(unittest.TestCase): + """ListDnsZoneRecordsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListDnsZoneRecordsResponse: + """Test ListDnsZoneRecordsResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListDnsZoneRecordsResponse` + """ + model = ListDnsZoneRecordsResponse() + if include_optional: + return ListDnsZoneRecordsResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.dns_zone_record_response.DnsZoneRecordResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + record_id = 1122, + name = 'example.com', + type = 'A', + ttl = 86400, + prio = 0, + data = '10.0.0.1', + port = 1234, + weight = 1, + flag = 1, + tag = 'issue', ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ) + ) + else: + return ListDnsZoneRecordsResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.dns_zone_record_response.DnsZoneRecordResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + record_id = 1122, + name = 'example.com', + type = 'A', + ttl = 86400, + prio = 0, + data = '10.0.0.1', + port = 1234, + weight = 1, + flag = 1, + tag = 'issue', ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ), + ) + """ + + def testListDnsZoneRecordsResponse(self): + """Test ListDnsZoneRecordsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_list_dns_zones_response.py b/test/test_list_dns_zones_response.py new file mode 100644 index 00000000..ed800986 --- /dev/null +++ b/test/test_list_dns_zones_response.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.list_dns_zones_response import ListDnsZonesResponse + +class TestListDnsZonesResponse(unittest.TestCase): + """ListDnsZonesResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListDnsZonesResponse: + """Test ListDnsZonesResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListDnsZonesResponse` + """ + model = ListDnsZonesResponse() + if include_optional: + return ListDnsZonesResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.dns_zone_response.DnsZoneResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + zone_name = 'abcdefg', ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ) + ) + else: + return ListDnsZonesResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.dns_zone_response.DnsZoneResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + zone_name = 'abcdefg', ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ), + ) + """ + + def testListDnsZonesResponse(self): + """Test ListDnsZonesResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_list_firewall_audit_response.py b/test/test_list_firewall_audit_response.py new file mode 100644 index 00000000..b5d4ad8b --- /dev/null +++ b/test/test_list_firewall_audit_response.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.list_firewall_audit_response import ListFirewallAuditResponse + +class TestListFirewallAuditResponse(unittest.TestCase): + """ListFirewallAuditResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListFirewallAuditResponse: + """Test ListFirewallAuditResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListFirewallAuditResponse` + """ + model = ListFirewallAuditResponse() + if include_optional: + return ListFirewallAuditResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.firewall_audit_response.FirewallAuditResponse( + id = 12345, + firewall_id = 'b943b25a-c8b5-4570-9135-4bbaa7615b81', + action = 'CREATED', + timestamp = '2021-03-30T11:35:06.177Z', + tenant_id = 'DE', + customer_id = '54321', + changed_by = '54321', + username = 'John Doe', + request_id = 'A2F56FAF-18N0-4893-11HG-R312M1E4FEC5', + trace_id = '78E9A428-94E9-4A2A-92F5-26038C6884F', + changes = {"prev":{"name":"test"},"new":{"name":"test1"}}, ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ) + ) + else: + return ListFirewallAuditResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.firewall_audit_response.FirewallAuditResponse( + id = 12345, + firewall_id = 'b943b25a-c8b5-4570-9135-4bbaa7615b81', + action = 'CREATED', + timestamp = '2021-03-30T11:35:06.177Z', + tenant_id = 'DE', + customer_id = '54321', + changed_by = '54321', + username = 'John Doe', + request_id = 'A2F56FAF-18N0-4893-11HG-R312M1E4FEC5', + trace_id = '78E9A428-94E9-4A2A-92F5-26038C6884F', + changes = {"prev":{"name":"test"},"new":{"name":"test1"}}, ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ), + ) + """ + + def testListFirewallAuditResponse(self): + """Test ListFirewallAuditResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_list_firewall_response.py b/test/test_list_firewall_response.py new file mode 100644 index 00000000..ab6ac7d4 --- /dev/null +++ b/test/test_list_firewall_response.py @@ -0,0 +1,170 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.list_firewall_response import ListFirewallResponse + +class TestListFirewallResponse(unittest.TestCase): + """ListFirewallResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListFirewallResponse: + """Test ListFirewallResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListFirewallResponse` + """ + model = ListFirewallResponse() + if include_optional: + return ListFirewallResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.list_firewall_response_data.ListFirewallResponseData( + tenant_id = 'DE', + customer_id = '54321', + firewall_id = 'b943b25a-c8b5-4570-9135-4bbaa7615b81', + name = 'My Firewall', + description = 'Allowing incoming HTTP traffic.', + status = 'active', + instance_status = [ + pfruck_contabo.models.instance_status_representation.InstanceStatusRepresentation( + instance_id = 100, + status = 'ok', + error_message = 'Failed to assign instance to firewall', ) + ], + instances = [ + pfruck_contabo.models.instance_details.InstanceDetails( + instance_id = 100, + display_name = 'Instance', + name = 'vmd12345', + product_id = 'V1', + ip_config = pfruck_contabo.models.ip_config1.IpConfig1( + v4 = pfruck_contabo.models.ip_v42.IpV42( + ip = '192.168.0.1', + netmask_cidr = 19, + gateway = '1.1.1.1', ), + v6 = pfruck_contabo.models.ip_v6.IpV6( + ip = '1:2:3:4:5:6:7:8', + netmask_cidr = 64, + gateway = '1:2:3:4:5:6:7:8', ), ), + region_slug = 'EU', + region_name = 'European Union (Germany)', + data_center_slug = 'EU1', + data_center_name = 'European Union (Germany) 1', ) + ], + rules = pfruck_contabo.models.rules.Rules( + inbound = [ + pfruck_contabo.models.firewall_rule_response.FirewallRuleResponse( + protocol = 'tcp', + dest_ports = ["80", "80-90"], + src_cidr = pfruck_contabo.models.src_cidr.SrcCidr( + ipv4 = ["192.168.0.1/24","AnyIPv4"], + ipv6 = ["1:2:3:4:5:6:7:8/64","AnyIPv6"], ), + action = 'accept', + status = 'active', + display_name = 'Allow HTTP Traffic', ) + ], ), + created_date = '2021-06-03T06:27:12Z', + updated_date = '2021-06-13T06:27:12Z', ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ) + ) + else: + return ListFirewallResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.list_firewall_response_data.ListFirewallResponseData( + tenant_id = 'DE', + customer_id = '54321', + firewall_id = 'b943b25a-c8b5-4570-9135-4bbaa7615b81', + name = 'My Firewall', + description = 'Allowing incoming HTTP traffic.', + status = 'active', + instance_status = [ + pfruck_contabo.models.instance_status_representation.InstanceStatusRepresentation( + instance_id = 100, + status = 'ok', + error_message = 'Failed to assign instance to firewall', ) + ], + instances = [ + pfruck_contabo.models.instance_details.InstanceDetails( + instance_id = 100, + display_name = 'Instance', + name = 'vmd12345', + product_id = 'V1', + ip_config = pfruck_contabo.models.ip_config1.IpConfig1( + v4 = pfruck_contabo.models.ip_v42.IpV42( + ip = '192.168.0.1', + netmask_cidr = 19, + gateway = '1.1.1.1', ), + v6 = pfruck_contabo.models.ip_v6.IpV6( + ip = '1:2:3:4:5:6:7:8', + netmask_cidr = 64, + gateway = '1:2:3:4:5:6:7:8', ), ), + region_slug = 'EU', + region_name = 'European Union (Germany)', + data_center_slug = 'EU1', + data_center_name = 'European Union (Germany) 1', ) + ], + rules = pfruck_contabo.models.rules.Rules( + inbound = [ + pfruck_contabo.models.firewall_rule_response.FirewallRuleResponse( + protocol = 'tcp', + dest_ports = ["80", "80-90"], + src_cidr = pfruck_contabo.models.src_cidr.SrcCidr( + ipv4 = ["192.168.0.1/24","AnyIPv4"], + ipv6 = ["1:2:3:4:5:6:7:8/64","AnyIPv6"], ), + action = 'accept', + status = 'active', + display_name = 'Allow HTTP Traffic', ) + ], ), + created_date = '2021-06-03T06:27:12Z', + updated_date = '2021-06-13T06:27:12Z', ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ), + ) + """ + + def testListFirewallResponse(self): + """Test ListFirewallResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_list_firewall_response_data.py b/test/test_list_firewall_response_data.py new file mode 100644 index 00000000..ee8f3bfb --- /dev/null +++ b/test/test_list_firewall_response_data.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.list_firewall_response_data import ListFirewallResponseData + +class TestListFirewallResponseData(unittest.TestCase): + """ListFirewallResponseData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListFirewallResponseData: + """Test ListFirewallResponseData + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListFirewallResponseData` + """ + model = ListFirewallResponseData() + if include_optional: + return ListFirewallResponseData( + tenant_id = 'DE', + customer_id = '54321', + firewall_id = 'b943b25a-c8b5-4570-9135-4bbaa7615b81', + name = 'My Firewall', + description = 'Allowing incoming HTTP traffic.', + status = 'active', + instance_status = [ + pfruck_contabo.models.instance_status_representation.InstanceStatusRepresentation( + instance_id = 100, + status = 'ok', + error_message = 'Failed to assign instance to firewall', ) + ], + instances = [ + pfruck_contabo.models.instance_details.InstanceDetails( + instance_id = 100, + display_name = 'Instance', + name = 'vmd12345', + product_id = 'V1', + ip_config = pfruck_contabo.models.ip_config1.IpConfig1( + v4 = pfruck_contabo.models.ip_v42.IpV42( + ip = '192.168.0.1', + netmask_cidr = 19, + gateway = '1.1.1.1', ), + v6 = pfruck_contabo.models.ip_v6.IpV6( + ip = '1:2:3:4:5:6:7:8', + netmask_cidr = 64, + gateway = '1:2:3:4:5:6:7:8', ), ), + region_slug = 'EU', + region_name = 'European Union (Germany)', + data_center_slug = 'EU1', + data_center_name = 'European Union (Germany) 1', ) + ], + rules = pfruck_contabo.models.rules.Rules( + inbound = [ + pfruck_contabo.models.firewall_rule_response.FirewallRuleResponse( + protocol = 'tcp', + dest_ports = ["80", "80-90"], + src_cidr = pfruck_contabo.models.src_cidr.SrcCidr( + ipv4 = ["192.168.0.1/24","AnyIPv4"], + ipv6 = ["1:2:3:4:5:6:7:8/64","AnyIPv6"], ), + action = 'accept', + status = 'active', + display_name = 'Allow HTTP Traffic', ) + ], ), + created_date = '2021-06-03T06:27:12Z', + updated_date = '2021-06-13T06:27:12Z' + ) + else: + return ListFirewallResponseData( + tenant_id = 'DE', + customer_id = '54321', + firewall_id = 'b943b25a-c8b5-4570-9135-4bbaa7615b81', + name = 'My Firewall', + description = 'Allowing incoming HTTP traffic.', + status = 'active', + instance_status = [ + pfruck_contabo.models.instance_status_representation.InstanceStatusRepresentation( + instance_id = 100, + status = 'ok', + error_message = 'Failed to assign instance to firewall', ) + ], + instances = [ + pfruck_contabo.models.instance_details.InstanceDetails( + instance_id = 100, + display_name = 'Instance', + name = 'vmd12345', + product_id = 'V1', + ip_config = pfruck_contabo.models.ip_config1.IpConfig1( + v4 = pfruck_contabo.models.ip_v42.IpV42( + ip = '192.168.0.1', + netmask_cidr = 19, + gateway = '1.1.1.1', ), + v6 = pfruck_contabo.models.ip_v6.IpV6( + ip = '1:2:3:4:5:6:7:8', + netmask_cidr = 64, + gateway = '1:2:3:4:5:6:7:8', ), ), + region_slug = 'EU', + region_name = 'European Union (Germany)', + data_center_slug = 'EU1', + data_center_name = 'European Union (Germany) 1', ) + ], + rules = pfruck_contabo.models.rules.Rules( + inbound = [ + pfruck_contabo.models.firewall_rule_response.FirewallRuleResponse( + protocol = 'tcp', + dest_ports = ["80", "80-90"], + src_cidr = pfruck_contabo.models.src_cidr.SrcCidr( + ipv4 = ["192.168.0.1/24","AnyIPv4"], + ipv6 = ["1:2:3:4:5:6:7:8/64","AnyIPv6"], ), + action = 'accept', + status = 'active', + display_name = 'Allow HTTP Traffic', ) + ], ), + created_date = '2021-06-03T06:27:12Z', + updated_date = '2021-06-13T06:27:12Z', + ) + """ + + def testListFirewallResponseData(self): + """Test ListFirewallResponseData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_list_instances_response.py b/test/test_list_instances_response.py index b841501e..64f3d921 100644 --- a/test/test_list_instances_response.py +++ b/test/test_list_instances_response.py @@ -46,7 +46,7 @@ def make_instance(self, include_optional) -> ListInstancesResponse: customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', additional_ips = [ pfruck_contabo.models.additional_ip.AdditionalIp( - v4 = pfruck_contabo.models.ip_v4.IpV4( + v4 = pfruck_contabo.models.ip_v43.IpV43( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ), ) @@ -59,8 +59,8 @@ def make_instance(self, include_optional) -> ListInstancesResponse: region_name = 'European Union', product_id = 'V5', image_id = '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d', - ip_config = pfruck_contabo.models.ip_config.IpConfig( - v4 = pfruck_contabo.models.ip_v4.IpV4( + ip_config = pfruck_contabo.models.ip_config2.IpConfig2( + v4 = pfruck_contabo.models.ip_v43.IpV43( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ), @@ -76,7 +76,7 @@ def make_instance(self, include_optional) -> ListInstancesResponse: ssh_keys = [123,125], created_date = '2021-06-03T06:27:12Z', cancel_date = 'Thu Jun 03 00:00:00 UTC 2021', - status = 'provisioning', + status = running, v_host_id = 73395, v_host_number = 1001, v_host_name = 'm1000', @@ -88,7 +88,8 @@ def make_instance(self, include_optional) -> ListInstancesResponse: error_message = '', product_type = 'ssd', product_name = 'VPS M', - default_user = 'root', ) + default_user = 'root', + application_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', ) ], links = pfruck_contabo.models.links.Links( self = '', @@ -110,7 +111,7 @@ def make_instance(self, include_optional) -> ListInstancesResponse: customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', additional_ips = [ pfruck_contabo.models.additional_ip.AdditionalIp( - v4 = pfruck_contabo.models.ip_v4.IpV4( + v4 = pfruck_contabo.models.ip_v43.IpV43( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ), ) @@ -123,8 +124,8 @@ def make_instance(self, include_optional) -> ListInstancesResponse: region_name = 'European Union', product_id = 'V5', image_id = '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d', - ip_config = pfruck_contabo.models.ip_config.IpConfig( - v4 = pfruck_contabo.models.ip_v4.IpV4( + ip_config = pfruck_contabo.models.ip_config2.IpConfig2( + v4 = pfruck_contabo.models.ip_v43.IpV43( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ), @@ -140,7 +141,7 @@ def make_instance(self, include_optional) -> ListInstancesResponse: ssh_keys = [123,125], created_date = '2021-06-03T06:27:12Z', cancel_date = 'Thu Jun 03 00:00:00 UTC 2021', - status = 'provisioning', + status = running, v_host_id = 73395, v_host_number = 1001, v_host_name = 'm1000', @@ -152,7 +153,8 @@ def make_instance(self, include_optional) -> ListInstancesResponse: error_message = '', product_type = 'ssd', product_name = 'VPS M', - default_user = 'root', ) + default_user = 'root', + application_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', ) ], links = pfruck_contabo.models.links.Links( self = '', diff --git a/test/test_list_instances_response_data.py b/test/test_list_instances_response_data.py index 63b504e1..8cd2a7f6 100644 --- a/test/test_list_instances_response_data.py +++ b/test/test_list_instances_response_data.py @@ -39,7 +39,7 @@ def make_instance(self, include_optional) -> ListInstancesResponseData: customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', additional_ips = [ pfruck_contabo.models.additional_ip.AdditionalIp( - v4 = pfruck_contabo.models.ip_v4.IpV4( + v4 = pfruck_contabo.models.ip_v43.IpV43( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ), ) @@ -52,8 +52,8 @@ def make_instance(self, include_optional) -> ListInstancesResponseData: region_name = 'European Union', product_id = 'V5', image_id = '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d', - ip_config = pfruck_contabo.models.ip_config.IpConfig( - v4 = pfruck_contabo.models.ip_v4.IpV4( + ip_config = pfruck_contabo.models.ip_config2.IpConfig2( + v4 = pfruck_contabo.models.ip_v43.IpV43( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ), @@ -81,7 +81,8 @@ def make_instance(self, include_optional) -> ListInstancesResponseData: error_message = '', product_type = 'ssd', product_name = 'VPS M', - default_user = 'root' + default_user = 'root', + application_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752' ) else: return ListInstancesResponseData( @@ -89,7 +90,7 @@ def make_instance(self, include_optional) -> ListInstancesResponseData: customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', additional_ips = [ pfruck_contabo.models.additional_ip.AdditionalIp( - v4 = pfruck_contabo.models.ip_v4.IpV4( + v4 = pfruck_contabo.models.ip_v43.IpV43( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ), ) @@ -102,8 +103,8 @@ def make_instance(self, include_optional) -> ListInstancesResponseData: region_name = 'European Union', product_id = 'V5', image_id = '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d', - ip_config = pfruck_contabo.models.ip_config.IpConfig( - v4 = pfruck_contabo.models.ip_v4.IpV4( + ip_config = pfruck_contabo.models.ip_config2.IpConfig2( + v4 = pfruck_contabo.models.ip_v43.IpV43( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ), @@ -130,6 +131,7 @@ def make_instance(self, include_optional) -> ListInstancesResponseData: ], product_type = 'ssd', product_name = 'VPS M', + application_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', ) """ diff --git a/test/test_list_preset_rules_response.py b/test/test_list_preset_rules_response.py new file mode 100644 index 00000000..37fd776e --- /dev/null +++ b/test/test_list_preset_rules_response.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.list_preset_rules_response import ListPresetRulesResponse + +class TestListPresetRulesResponse(unittest.TestCase): + """ListPresetRulesResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListPresetRulesResponse: + """Test ListPresetRulesResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListPresetRulesResponse` + """ + model = ListPresetRulesResponse() + if include_optional: + return ListPresetRulesResponse( + data = [ + pfruck_contabo.models.preset_rules_response.PresetRulesResponse( + name = 'HTTPS', + macro = { + "inbound": [ + { + "action": "accept", + "status": "active", + "srcCidr": { + "ipv4": [], + "ipv6": [] + }, + "protocol": "udp", + "destPorts": [ + "53" + ] + } + ] + }, ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ) + ) + else: + return ListPresetRulesResponse( + data = [ + pfruck_contabo.models.preset_rules_response.PresetRulesResponse( + name = 'HTTPS', + macro = { + "inbound": [ + { + "action": "accept", + "status": "active", + "srcCidr": { + "ipv4": [], + "ipv6": [] + }, + "protocol": "udp", + "destPorts": [ + "53" + ] + } + ] + }, ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ), + ) + """ + + def testListPresetRulesResponse(self): + """Test ListPresetRulesResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_list_private_network_response.py b/test/test_list_private_network_response.py index c1941a4f..f66c92ce 100644 --- a/test/test_list_private_network_response.py +++ b/test/test_list_private_network_response.py @@ -61,13 +61,13 @@ def make_instance(self, include_optional) -> ListPrivateNetworkResponse: product_id = 'V1', private_ip_config = pfruck_contabo.models.private_ip_config.PrivateIpConfig( v4 = [ - pfruck_contabo.models.ip_v4.IpV4( + pfruck_contabo.models.ip_v41.IpV41( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ) ], ), ip_config = pfruck_contabo.models.ip_config.IpConfig( - v4 = pfruck_contabo.models.ip_v4.IpV4( + v4 = pfruck_contabo.models.ip_v41.IpV41( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ), @@ -114,13 +114,13 @@ def make_instance(self, include_optional) -> ListPrivateNetworkResponse: product_id = 'V1', private_ip_config = pfruck_contabo.models.private_ip_config.PrivateIpConfig( v4 = [ - pfruck_contabo.models.ip_v4.IpV4( + pfruck_contabo.models.ip_v41.IpV41( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ) ], ), ip_config = pfruck_contabo.models.ip_config.IpConfig( - v4 = pfruck_contabo.models.ip_v4.IpV4( + v4 = pfruck_contabo.models.ip_v41.IpV41( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ), diff --git a/test/test_list_private_network_response_data.py b/test/test_list_private_network_response_data.py index af8c234c..95656ea6 100644 --- a/test/test_list_private_network_response_data.py +++ b/test/test_list_private_network_response_data.py @@ -54,13 +54,13 @@ def make_instance(self, include_optional) -> ListPrivateNetworkResponseData: product_id = 'V1', private_ip_config = pfruck_contabo.models.private_ip_config.PrivateIpConfig( v4 = [ - pfruck_contabo.models.ip_v4.IpV4( + pfruck_contabo.models.ip_v41.IpV41( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ) ], ), ip_config = pfruck_contabo.models.ip_config.IpConfig( - v4 = pfruck_contabo.models.ip_v4.IpV4( + v4 = pfruck_contabo.models.ip_v41.IpV41( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ), @@ -93,13 +93,13 @@ def make_instance(self, include_optional) -> ListPrivateNetworkResponseData: product_id = 'V1', private_ip_config = pfruck_contabo.models.private_ip_config.PrivateIpConfig( v4 = [ - pfruck_contabo.models.ip_v4.IpV4( + pfruck_contabo.models.ip_v41.IpV41( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ) ], ), ip_config = pfruck_contabo.models.ip_config.IpConfig( - v4 = pfruck_contabo.models.ip_v4.IpV4( + v4 = pfruck_contabo.models.ip_v41.IpV41( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ), diff --git a/test/test_list_ptr_records_response.py b/test/test_list_ptr_records_response.py new file mode 100644 index 00000000..60d590f5 --- /dev/null +++ b/test/test_list_ptr_records_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.list_ptr_records_response import ListPtrRecordsResponse + +class TestListPtrRecordsResponse(unittest.TestCase): + """ListPtrRecordsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListPtrRecordsResponse: + """Test ListPtrRecordsResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListPtrRecordsResponse` + """ + model = ListPtrRecordsResponse() + if include_optional: + return ListPtrRecordsResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.ptr_record_response.PtrRecordResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + ip = '1.2.3.4', + ttl = 86400, + ptr = 'vmd1027177.server.net', ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ) + ) + else: + return ListPtrRecordsResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.ptr_record_response.PtrRecordResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + ip = '1.2.3.4', + ttl = 86400, + ptr = 'vmd1027177.server.net', ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ), + ) + """ + + def testListPtrRecordsResponse(self): + """Test ListPtrRecordsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_list_tag_response.py b/test/test_list_tag_response.py index 2404821f..e9242e99 100644 --- a/test/test_list_tag_response.py +++ b/test/test_list_tag_response.py @@ -46,7 +46,8 @@ def make_instance(self, include_optional) -> ListTagResponse: customer_id = '54321', tag_id = 12345, name = 'Web-Server', - color = '#0A78C3', ) + color = '#0A78C3', + description = 'Tag Description', ) ], links = pfruck_contabo.models.links.Links( self = '', @@ -68,7 +69,8 @@ def make_instance(self, include_optional) -> ListTagResponse: customer_id = '54321', tag_id = 12345, name = 'Web-Server', - color = '#0A78C3', ) + color = '#0A78C3', + description = 'Tag Description', ) ], links = pfruck_contabo.models.links.Links( self = '', diff --git a/test/test_list_vip_response.py b/test/test_list_vip_response.py index c6fd1e75..45317f3b 100644 --- a/test/test_list_vip_response.py +++ b/test/test_list_vip_response.py @@ -53,7 +53,7 @@ def make_instance(self, include_optional) -> ListVipResponse: resource_display_name = 'My Instance 12', ip_version = 'v4', type = 'additional', - v4 = pfruck_contabo.models.ip_v41.IpV41( + v4 = pfruck_contabo.models.ip_v4.IpV4( ip = '195.123.123.1', gateway = '255.255.255.1', netmask_cidr = 24, @@ -87,7 +87,7 @@ def make_instance(self, include_optional) -> ListVipResponse: resource_display_name = 'My Instance 12', ip_version = 'v4', type = 'additional', - v4 = pfruck_contabo.models.ip_v41.IpV41( + v4 = pfruck_contabo.models.ip_v4.IpV4( ip = '195.123.123.1', gateway = '255.255.255.1', netmask_cidr = 24, diff --git a/test/test_list_vip_response_data.py b/test/test_list_vip_response_data.py index 448f7bb7..9fd6715b 100644 --- a/test/test_list_vip_response_data.py +++ b/test/test_list_vip_response_data.py @@ -46,7 +46,7 @@ def make_instance(self, include_optional) -> ListVipResponseData: resource_display_name = 'My Instance 12', ip_version = 'v4', type = 'additional', - v4 = pfruck_contabo.models.ip_v41.IpV41( + v4 = pfruck_contabo.models.ip_v4.IpV4( ip = '195.123.123.1', gateway = '255.255.255.1', netmask_cidr = 24, diff --git a/test/test_minimum_requirements.py b/test/test_minimum_requirements.py index 9e146aaa..33299a98 100644 --- a/test/test_minimum_requirements.py +++ b/test/test_minimum_requirements.py @@ -37,7 +37,8 @@ def make_instance(self, include_optional) -> MinimumRequirements: return MinimumRequirements( cpu_cores = 2, ram_mb = 100, - disk_mb = 500 + disk_mb = 500, + valid_product_ids = ["V13","V15"] ) else: return MinimumRequirements( diff --git a/test/test_nameserver.py b/test/test_nameserver.py new file mode 100644 index 00000000..d6cad4f1 --- /dev/null +++ b/test/test_nameserver.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.nameserver import Nameserver + +class TestNameserver(unittest.TestCase): + """Nameserver unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Nameserver: + """Test Nameserver + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Nameserver` + """ + model = Nameserver() + if include_optional: + return Nameserver( + hostname = ns1.example.com, + ip_v4 = 132.1.1.1, + ip_v6 = 2001:db8:85a3::8a2e:370:7334 + ) + else: + return Nameserver( + hostname = ns1.example.com, + ) + """ + + def testNameserver(self): + """Test Nameserver""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_optimal_requirements.py b/test/test_optimal_requirements.py index 3369df76..7d720b00 100644 --- a/test/test_optimal_requirements.py +++ b/test/test_optimal_requirements.py @@ -37,7 +37,8 @@ def make_instance(self, include_optional) -> OptimalRequirements: return OptimalRequirements( cpu_cores = 2, ram_mb = 100, - disk_mb = 500 + disk_mb = 500, + valid_product_ids = ["V13","V15"] ) else: return OptimalRequirements( diff --git a/test/test_patch_firewall_request.py b/test/test_patch_firewall_request.py new file mode 100644 index 00000000..958e337c --- /dev/null +++ b/test/test_patch_firewall_request.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.patch_firewall_request import PatchFirewallRequest + +class TestPatchFirewallRequest(unittest.TestCase): + """PatchFirewallRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PatchFirewallRequest: + """Test PatchFirewallRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PatchFirewallRequest` + """ + model = PatchFirewallRequest() + if include_optional: + return PatchFirewallRequest( + name = 'My Firewall', + status = 'active', + description = 'Allowing incoming HTTP traffic.' + ) + else: + return PatchFirewallRequest( + ) + """ + + def testPatchFirewallRequest(self): + """Test PatchFirewallRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_patch_firewall_response.py b/test/test_patch_firewall_response.py new file mode 100644 index 00000000..27918265 --- /dev/null +++ b/test/test_patch_firewall_response.py @@ -0,0 +1,152 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.patch_firewall_response import PatchFirewallResponse + +class TestPatchFirewallResponse(unittest.TestCase): + """PatchFirewallResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PatchFirewallResponse: + """Test PatchFirewallResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PatchFirewallResponse` + """ + model = PatchFirewallResponse() + if include_optional: + return PatchFirewallResponse( + data = [ + pfruck_contabo.models.firewall_response.FirewallResponse( + tenant_id = 'DE', + customer_id = '54321', + firewall_id = 'b943b25a-c8b5-4570-9135-4bbaa7615b81', + name = 'My Firewall', + description = 'Allowing incoming HTTP traffic.', + status = 'active', + instance_status = [ + pfruck_contabo.models.instance_status_representation.InstanceStatusRepresentation( + instance_id = 100, + status = 'ok', + error_message = 'Failed to assign instance to firewall', ) + ], + instances = [ + pfruck_contabo.models.instance_details.InstanceDetails( + instance_id = 100, + display_name = 'Instance', + name = 'vmd12345', + product_id = 'V1', + ip_config = pfruck_contabo.models.ip_config1.IpConfig1( + v4 = pfruck_contabo.models.ip_v42.IpV42( + ip = '192.168.0.1', + netmask_cidr = 19, + gateway = '1.1.1.1', ), + v6 = pfruck_contabo.models.ip_v6.IpV6( + ip = '1:2:3:4:5:6:7:8', + netmask_cidr = 64, + gateway = '1:2:3:4:5:6:7:8', ), ), + region_slug = 'EU', + region_name = 'European Union (Germany)', + data_center_slug = 'EU1', + data_center_name = 'European Union (Germany) 1', ) + ], + rules = pfruck_contabo.models.rules.Rules( + inbound = [ + pfruck_contabo.models.firewall_rule_response.FirewallRuleResponse( + protocol = 'tcp', + dest_ports = ["80", "80-90"], + src_cidr = pfruck_contabo.models.src_cidr.SrcCidr( + ipv4 = ["192.168.0.1/24","AnyIPv4"], + ipv6 = ["1:2:3:4:5:6:7:8/64","AnyIPv6"], ), + action = 'accept', + status = 'active', + display_name = 'Allow HTTP Traffic', ) + ], ), + created_date = '2021-06-03T06:27:12Z', + updated_date = '2021-06-13T06:27:12Z', ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ) + ) + else: + return PatchFirewallResponse( + data = [ + pfruck_contabo.models.firewall_response.FirewallResponse( + tenant_id = 'DE', + customer_id = '54321', + firewall_id = 'b943b25a-c8b5-4570-9135-4bbaa7615b81', + name = 'My Firewall', + description = 'Allowing incoming HTTP traffic.', + status = 'active', + instance_status = [ + pfruck_contabo.models.instance_status_representation.InstanceStatusRepresentation( + instance_id = 100, + status = 'ok', + error_message = 'Failed to assign instance to firewall', ) + ], + instances = [ + pfruck_contabo.models.instance_details.InstanceDetails( + instance_id = 100, + display_name = 'Instance', + name = 'vmd12345', + product_id = 'V1', + ip_config = pfruck_contabo.models.ip_config1.IpConfig1( + v4 = pfruck_contabo.models.ip_v42.IpV42( + ip = '192.168.0.1', + netmask_cidr = 19, + gateway = '1.1.1.1', ), + v6 = pfruck_contabo.models.ip_v6.IpV6( + ip = '1:2:3:4:5:6:7:8', + netmask_cidr = 64, + gateway = '1:2:3:4:5:6:7:8', ), ), + region_slug = 'EU', + region_name = 'European Union (Germany)', + data_center_slug = 'EU1', + data_center_name = 'European Union (Germany) 1', ) + ], + rules = pfruck_contabo.models.rules.Rules( + inbound = [ + pfruck_contabo.models.firewall_rule_response.FirewallRuleResponse( + protocol = 'tcp', + dest_ports = ["80", "80-90"], + src_cidr = pfruck_contabo.models.src_cidr.SrcCidr( + ipv4 = ["192.168.0.1/24","AnyIPv4"], + ipv6 = ["1:2:3:4:5:6:7:8/64","AnyIPv6"], ), + action = 'accept', + status = 'active', + display_name = 'Allow HTTP Traffic', ) + ], ), + created_date = '2021-06-03T06:27:12Z', + updated_date = '2021-06-13T06:27:12Z', ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ), + ) + """ + + def testPatchFirewallResponse(self): + """Test PatchFirewallResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_patch_private_network_response.py b/test/test_patch_private_network_response.py index 25a9cdb2..101c6d4f 100644 --- a/test/test_patch_private_network_response.py +++ b/test/test_patch_private_network_response.py @@ -56,13 +56,13 @@ def make_instance(self, include_optional) -> PatchPrivateNetworkResponse: product_id = 'V1', private_ip_config = pfruck_contabo.models.private_ip_config.PrivateIpConfig( v4 = [ - pfruck_contabo.models.ip_v4.IpV4( + pfruck_contabo.models.ip_v41.IpV41( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ) ], ), ip_config = pfruck_contabo.models.ip_config.IpConfig( - v4 = pfruck_contabo.models.ip_v4.IpV4( + v4 = pfruck_contabo.models.ip_v41.IpV41( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ), @@ -100,13 +100,13 @@ def make_instance(self, include_optional) -> PatchPrivateNetworkResponse: product_id = 'V1', private_ip_config = pfruck_contabo.models.private_ip_config.PrivateIpConfig( v4 = [ - pfruck_contabo.models.ip_v4.IpV4( + pfruck_contabo.models.ip_v41.IpV41( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ) ], ), ip_config = pfruck_contabo.models.ip_config.IpConfig( - v4 = pfruck_contabo.models.ip_v4.IpV4( + v4 = pfruck_contabo.models.ip_v41.IpV41( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ), diff --git a/test/test_preset_rules_response.py b/test/test_preset_rules_response.py new file mode 100644 index 00000000..d9e24bba --- /dev/null +++ b/test/test_preset_rules_response.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.preset_rules_response import PresetRulesResponse + +class TestPresetRulesResponse(unittest.TestCase): + """PresetRulesResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PresetRulesResponse: + """Test PresetRulesResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PresetRulesResponse` + """ + model = PresetRulesResponse() + if include_optional: + return PresetRulesResponse( + name = 'HTTPS', + macro = { + "inbound": [ + { + "action": "accept", + "status": "active", + "srcCidr": { + "ipv4": [], + "ipv6": [] + }, + "protocol": "udp", + "destPorts": [ + "53" + ] + } + ] + } + ) + else: + return PresetRulesResponse( + name = 'HTTPS', + macro = { + "inbound": [ + { + "action": "accept", + "status": "active", + "srcCidr": { + "ipv4": [], + "ipv6": [] + }, + "protocol": "udp", + "destPorts": [ + "53" + ] + } + ] + }, + ) + """ + + def testPresetRulesResponse(self): + """Test PresetRulesResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_private_ip_config.py b/test/test_private_ip_config.py index 670e912c..9ca3dd8d 100644 --- a/test/test_private_ip_config.py +++ b/test/test_private_ip_config.py @@ -36,7 +36,7 @@ def make_instance(self, include_optional) -> PrivateIpConfig: if include_optional: return PrivateIpConfig( v4 = [ - pfruck_contabo.models.ip_v4.IpV4( + pfruck_contabo.models.ip_v41.IpV41( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ) @@ -45,7 +45,7 @@ def make_instance(self, include_optional) -> PrivateIpConfig: else: return PrivateIpConfig( v4 = [ - pfruck_contabo.models.ip_v4.IpV4( + pfruck_contabo.models.ip_v41.IpV41( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ) diff --git a/test/test_private_network_response.py b/test/test_private_network_response.py index edbafb58..02cab0c0 100644 --- a/test/test_private_network_response.py +++ b/test/test_private_network_response.py @@ -54,13 +54,13 @@ def make_instance(self, include_optional) -> PrivateNetworkResponse: product_id = 'V1', private_ip_config = pfruck_contabo.models.private_ip_config.PrivateIpConfig( v4 = [ - pfruck_contabo.models.ip_v4.IpV4( + pfruck_contabo.models.ip_v41.IpV41( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ) ], ), ip_config = pfruck_contabo.models.ip_config.IpConfig( - v4 = pfruck_contabo.models.ip_v4.IpV4( + v4 = pfruck_contabo.models.ip_v41.IpV41( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ), @@ -93,13 +93,13 @@ def make_instance(self, include_optional) -> PrivateNetworkResponse: product_id = 'V1', private_ip_config = pfruck_contabo.models.private_ip_config.PrivateIpConfig( v4 = [ - pfruck_contabo.models.ip_v4.IpV4( + pfruck_contabo.models.ip_v41.IpV41( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ) ], ), ip_config = pfruck_contabo.models.ip_config.IpConfig( - v4 = pfruck_contabo.models.ip_v4.IpV4( + v4 = pfruck_contabo.models.ip_v41.IpV41( ip = '192.168.0.1', netmask_cidr = 19, gateway = '1.1.1.1', ), diff --git a/test/test_ptr_record_response.py b/test/test_ptr_record_response.py new file mode 100644 index 00000000..b97668b7 --- /dev/null +++ b/test/test_ptr_record_response.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.ptr_record_response import PtrRecordResponse + +class TestPtrRecordResponse(unittest.TestCase): + """PtrRecordResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PtrRecordResponse: + """Test PtrRecordResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PtrRecordResponse` + """ + model = PtrRecordResponse() + if include_optional: + return PtrRecordResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + ip = '1.2.3.4', + ttl = 86400, + ptr = 'vmd1027177.server.net' + ) + else: + return PtrRecordResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + ip = '1.2.3.4', + ttl = 86400, + ptr = 'vmd1027177.server.net', + ) + """ + + def testPtrRecordResponse(self): + """Test PtrRecordResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_put_firewall_request.py b/test/test_put_firewall_request.py new file mode 100644 index 00000000..694283ea --- /dev/null +++ b/test/test_put_firewall_request.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.put_firewall_request import PutFirewallRequest + +class TestPutFirewallRequest(unittest.TestCase): + """PutFirewallRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PutFirewallRequest: + """Test PutFirewallRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PutFirewallRequest` + """ + model = PutFirewallRequest() + if include_optional: + return PutFirewallRequest( + rules = pfruck_contabo.models.rules_request.RulesRequest( + inbound = [ + pfruck_contabo.models.firewall_rule_request.FirewallRuleRequest( + protocol = 'tcp', + dest_ports = ["80", "80-90"], + src_cidr = null, + action = 'accept', + status = 'active', + display_name = 'Allow HTTP Traffic', ) + ], ) + ) + else: + return PutFirewallRequest( + ) + """ + + def testPutFirewallRequest(self): + """Test PutFirewallRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_put_firewall_response.py b/test/test_put_firewall_response.py new file mode 100644 index 00000000..85bb61a4 --- /dev/null +++ b/test/test_put_firewall_response.py @@ -0,0 +1,152 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.put_firewall_response import PutFirewallResponse + +class TestPutFirewallResponse(unittest.TestCase): + """PutFirewallResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PutFirewallResponse: + """Test PutFirewallResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PutFirewallResponse` + """ + model = PutFirewallResponse() + if include_optional: + return PutFirewallResponse( + data = [ + pfruck_contabo.models.firewall_response.FirewallResponse( + tenant_id = 'DE', + customer_id = '54321', + firewall_id = 'b943b25a-c8b5-4570-9135-4bbaa7615b81', + name = 'My Firewall', + description = 'Allowing incoming HTTP traffic.', + status = 'active', + instance_status = [ + pfruck_contabo.models.instance_status_representation.InstanceStatusRepresentation( + instance_id = 100, + status = 'ok', + error_message = 'Failed to assign instance to firewall', ) + ], + instances = [ + pfruck_contabo.models.instance_details.InstanceDetails( + instance_id = 100, + display_name = 'Instance', + name = 'vmd12345', + product_id = 'V1', + ip_config = pfruck_contabo.models.ip_config1.IpConfig1( + v4 = pfruck_contabo.models.ip_v42.IpV42( + ip = '192.168.0.1', + netmask_cidr = 19, + gateway = '1.1.1.1', ), + v6 = pfruck_contabo.models.ip_v6.IpV6( + ip = '1:2:3:4:5:6:7:8', + netmask_cidr = 64, + gateway = '1:2:3:4:5:6:7:8', ), ), + region_slug = 'EU', + region_name = 'European Union (Germany)', + data_center_slug = 'EU1', + data_center_name = 'European Union (Germany) 1', ) + ], + rules = pfruck_contabo.models.rules.Rules( + inbound = [ + pfruck_contabo.models.firewall_rule_response.FirewallRuleResponse( + protocol = 'tcp', + dest_ports = ["80", "80-90"], + src_cidr = pfruck_contabo.models.src_cidr.SrcCidr( + ipv4 = ["192.168.0.1/24","AnyIPv4"], + ipv6 = ["1:2:3:4:5:6:7:8/64","AnyIPv6"], ), + action = 'accept', + status = 'active', + display_name = 'Allow HTTP Traffic', ) + ], ), + created_date = '2021-06-03T06:27:12Z', + updated_date = '2021-06-13T06:27:12Z', ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ) + ) + else: + return PutFirewallResponse( + data = [ + pfruck_contabo.models.firewall_response.FirewallResponse( + tenant_id = 'DE', + customer_id = '54321', + firewall_id = 'b943b25a-c8b5-4570-9135-4bbaa7615b81', + name = 'My Firewall', + description = 'Allowing incoming HTTP traffic.', + status = 'active', + instance_status = [ + pfruck_contabo.models.instance_status_representation.InstanceStatusRepresentation( + instance_id = 100, + status = 'ok', + error_message = 'Failed to assign instance to firewall', ) + ], + instances = [ + pfruck_contabo.models.instance_details.InstanceDetails( + instance_id = 100, + display_name = 'Instance', + name = 'vmd12345', + product_id = 'V1', + ip_config = pfruck_contabo.models.ip_config1.IpConfig1( + v4 = pfruck_contabo.models.ip_v42.IpV42( + ip = '192.168.0.1', + netmask_cidr = 19, + gateway = '1.1.1.1', ), + v6 = pfruck_contabo.models.ip_v6.IpV6( + ip = '1:2:3:4:5:6:7:8', + netmask_cidr = 64, + gateway = '1:2:3:4:5:6:7:8', ), ), + region_slug = 'EU', + region_name = 'European Union (Germany)', + data_center_slug = 'EU1', + data_center_name = 'European Union (Germany) 1', ) + ], + rules = pfruck_contabo.models.rules.Rules( + inbound = [ + pfruck_contabo.models.firewall_rule_response.FirewallRuleResponse( + protocol = 'tcp', + dest_ports = ["80", "80-90"], + src_cidr = pfruck_contabo.models.src_cidr.SrcCidr( + ipv4 = ["192.168.0.1/24","AnyIPv4"], + ipv6 = ["1:2:3:4:5:6:7:8/64","AnyIPv6"], ), + action = 'accept', + status = 'active', + display_name = 'Allow HTTP Traffic', ) + ], ), + created_date = '2021-06-03T06:27:12Z', + updated_date = '2021-06-13T06:27:12Z', ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ), + ) + """ + + def testPutFirewallResponse(self): + """Test PutFirewallResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_record_audit_response.py b/test/test_record_audit_response.py new file mode 100644 index 00000000..7c584b7b --- /dev/null +++ b/test/test_record_audit_response.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.record_audit_response import RecordAuditResponse + +class TestRecordAuditResponse(unittest.TestCase): + """RecordAuditResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RecordAuditResponse: + """Test RecordAuditResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RecordAuditResponse` + """ + model = RecordAuditResponse() + if include_optional: + return RecordAuditResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.record_audit_response_data.RecordAuditResponseData( + id = 12345, + action = 'CREATED', + timestamp = '2021-03-30T11:35:06.177Z', + tenant_id = 'DE', + customer_id = '54321', + changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + username = 'John.Doe', + request_id = 'A2F56FAF-18N0-4893-11HG-R312M1E4FEC5', + trace_id = '78E9A428-94E9-4A2A-92F5-26038C6884F', + record_id = 12345, + zone_name = 'example.com', + changes = {"prev":{"name":"example.com"},"new":{"name":"example1.com"}}, ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ) + ) + else: + return RecordAuditResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.record_audit_response_data.RecordAuditResponseData( + id = 12345, + action = 'CREATED', + timestamp = '2021-03-30T11:35:06.177Z', + tenant_id = 'DE', + customer_id = '54321', + changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + username = 'John.Doe', + request_id = 'A2F56FAF-18N0-4893-11HG-R312M1E4FEC5', + trace_id = '78E9A428-94E9-4A2A-92F5-26038C6884F', + record_id = 12345, + zone_name = 'example.com', + changes = {"prev":{"name":"example.com"},"new":{"name":"example1.com"}}, ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ), + ) + """ + + def testRecordAuditResponse(self): + """Test RecordAuditResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_record_audit_response_data.py b/test/test_record_audit_response_data.py new file mode 100644 index 00000000..be71f24a --- /dev/null +++ b/test/test_record_audit_response_data.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.record_audit_response_data import RecordAuditResponseData + +class TestRecordAuditResponseData(unittest.TestCase): + """RecordAuditResponseData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RecordAuditResponseData: + """Test RecordAuditResponseData + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RecordAuditResponseData` + """ + model = RecordAuditResponseData() + if include_optional: + return RecordAuditResponseData( + id = 12345, + action = 'CREATED', + timestamp = '2021-03-30T11:35:06.177Z', + tenant_id = 'DE', + customer_id = '54321', + changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + username = 'John.Doe', + request_id = 'A2F56FAF-18N0-4893-11HG-R312M1E4FEC5', + trace_id = '78E9A428-94E9-4A2A-92F5-26038C6884F', + record_id = 12345, + zone_name = 'example.com', + changes = {"prev":{"name":"example.com"},"new":{"name":"example1.com"}} + ) + else: + return RecordAuditResponseData( + id = 12345, + action = 'CREATED', + timestamp = '2021-03-30T11:35:06.177Z', + tenant_id = 'DE', + customer_id = '54321', + changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + username = 'John.Doe', + request_id = 'A2F56FAF-18N0-4893-11HG-R312M1E4FEC5', + trace_id = '78E9A428-94E9-4A2A-92F5-26038C6884F', + record_id = 12345, + zone_name = 'example.com', + ) + """ + + def testRecordAuditResponseData(self): + """Test RecordAuditResponseData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_reinstall_instance_request.py b/test/test_reinstall_instance_request.py index 9fa4ba2c..b6ce6a75 100644 --- a/test/test_reinstall_instance_request.py +++ b/test/test_reinstall_instance_request.py @@ -43,7 +43,7 @@ def make_instance(self, include_optional) -> ReinstallInstanceRequest: timezone: Europe/Berlin chpasswd: expire: False', - default_user = 'admin', + default_user = 'root', application_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752' ) else: diff --git a/test/test_remedies_api.py b/test/test_remedies_api.py new file mode 100644 index 00000000..62227ed4 --- /dev/null +++ b/test/test_remedies_api.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.api.remedies_api import RemediesApi + + +class TestRemediesApi(unittest.TestCase): + """RemediesApi unit test stubs""" + + def setUp(self) -> None: + self.api = RemediesApi() + + def tearDown(self) -> None: + pass + + def test_cancel_ext_remedy(self) -> None: + """Test case for cancel_ext_remedy + + Cancel remedy + """ + pass + + def test_get_ext_remedy(self) -> None: + """Test case for get_ext_remedy + + Get remedy + """ + pass + + def test_list_ext_remedies(self) -> None: + """Test case for list_ext_remedies + + List remedy + """ + pass + + def test_start_ext_remedy(self) -> None: + """Test case for start_ext_remedy + + Start remedy + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_remedies_audit_list_response.py b/test/test_remedies_audit_list_response.py new file mode 100644 index 00000000..c8faefc1 --- /dev/null +++ b/test/test_remedies_audit_list_response.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.remedies_audit_list_response import RemediesAuditListResponse + +class TestRemediesAuditListResponse(unittest.TestCase): + """RemediesAuditListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RemediesAuditListResponse: + """Test RemediesAuditListResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RemediesAuditListResponse` + """ + model = RemediesAuditListResponse() + if include_optional: + return RemediesAuditListResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.remedies_audit_response.RemediesAuditResponse( + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + audit_id = 12345, + action = 'CREATED', + foreign_changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + foreign_username = 'John.Doe', + changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + username = 'John.Doe', + request_id = 'A2F56FAF-18N0-4893-11HG-R312M1E4FEC5', + trace_id = '78E9A428-94E9-4A2A-92F5-26038C6884F', + changes = null, + remedy_id = 12345, ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ) + ) + else: + return RemediesAuditListResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.remedies_audit_response.RemediesAuditResponse( + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + audit_id = 12345, + action = 'CREATED', + foreign_changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + foreign_username = 'John.Doe', + changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + username = 'John.Doe', + request_id = 'A2F56FAF-18N0-4893-11HG-R312M1E4FEC5', + trace_id = '78E9A428-94E9-4A2A-92F5-26038C6884F', + changes = null, + remedy_id = 12345, ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ), + ) + """ + + def testRemediesAuditListResponse(self): + """Test RemediesAuditListResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_remedies_audit_response.py b/test/test_remedies_audit_response.py new file mode 100644 index 00000000..561a82d6 --- /dev/null +++ b/test/test_remedies_audit_response.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.remedies_audit_response import RemediesAuditResponse + +class TestRemediesAuditResponse(unittest.TestCase): + """RemediesAuditResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RemediesAuditResponse: + """Test RemediesAuditResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RemediesAuditResponse` + """ + model = RemediesAuditResponse() + if include_optional: + return RemediesAuditResponse( + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + audit_id = 12345, + action = 'CREATED', + foreign_changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + foreign_username = 'John.Doe', + changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + username = 'John.Doe', + request_id = 'A2F56FAF-18N0-4893-11HG-R312M1E4FEC5', + trace_id = '78E9A428-94E9-4A2A-92F5-26038C6884F', + changes = pfruck_contabo.models.changes.Changes( + prev = {"property":"foo"}, + new = {"property":"bar"}, ), + remedy_id = 12345 + ) + else: + return RemediesAuditResponse( + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + audit_id = 12345, + action = 'CREATED', + foreign_changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + foreign_username = 'John.Doe', + changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + username = 'John.Doe', + request_id = 'A2F56FAF-18N0-4893-11HG-R312M1E4FEC5', + trace_id = '78E9A428-94E9-4A2A-92F5-26038C6884F', + changes = pfruck_contabo.models.changes.Changes( + prev = {"property":"foo"}, + new = {"property":"bar"}, ), + remedy_id = 12345, + ) + """ + + def testRemediesAuditResponse(self): + """Test RemediesAuditResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_remedies_create_request.py b/test/test_remedies_create_request.py new file mode 100644 index 00000000..36a27b01 --- /dev/null +++ b/test/test_remedies_create_request.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.remedies_create_request import RemediesCreateRequest + +class TestRemediesCreateRequest(unittest.TestCase): + """RemediesCreateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RemediesCreateRequest: + """Test RemediesCreateRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RemediesCreateRequest` + """ + model = RemediesCreateRequest() + if include_optional: + return RemediesCreateRequest( + object_type = 'vserver', + object_id = '4711', + remedy_template_id = 12345, + remedy_collection_id = 12345, + org_id = 'cntb', + account_id = 'DE-123' + ) + else: + return RemediesCreateRequest( + object_type = 'vserver', + object_id = '4711', + remedy_template_id = 12345, + org_id = 'cntb', + account_id = 'DE-123', + ) + """ + + def testRemediesCreateRequest(self): + """Test RemediesCreateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_remedies_get_response.py b/test/test_remedies_get_response.py new file mode 100644 index 00000000..96eaf8ff --- /dev/null +++ b/test/test_remedies_get_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.remedies_get_response import RemediesGetResponse + +class TestRemediesGetResponse(unittest.TestCase): + """RemediesGetResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RemediesGetResponse: + """Test RemediesGetResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RemediesGetResponse` + """ + model = RemediesGetResponse() + if include_optional: + return RemediesGetResponse( + data = [ + pfruck_contabo.models.remedy_response.RemedyResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + remedy_id = 12345, + remedy_collection_id = 12345, + remedy_template_id = 12345, + name = 'Ping remedy', + note = 'Remedy failed with timeout, please check the firewall rules and connectivity', + duration_ms = 4711, + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + internal_note = 'Ping failed with error code 123, could be an issue with the route server settings', + log = '6 packets transmitted, 0 received, 100% packet loss, time 5107ms', ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ) + ) + else: + return RemediesGetResponse( + data = [ + pfruck_contabo.models.remedy_response.RemedyResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + remedy_id = 12345, + remedy_collection_id = 12345, + remedy_template_id = 12345, + name = 'Ping remedy', + note = 'Remedy failed with timeout, please check the firewall rules and connectivity', + duration_ms = 4711, + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + internal_note = 'Ping failed with error code 123, could be an issue with the route server settings', + log = '6 packets transmitted, 0 received, 100% packet loss, time 5107ms', ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ), + ) + """ + + def testRemediesGetResponse(self): + """Test RemediesGetResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_remedies_list_response.py b/test/test_remedies_list_response.py new file mode 100644 index 00000000..27d9448f --- /dev/null +++ b/test/test_remedies_list_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.remedies_list_response import RemediesListResponse + +class TestRemediesListResponse(unittest.TestCase): + """RemediesListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RemediesListResponse: + """Test RemediesListResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RemediesListResponse` + """ + model = RemediesListResponse() + if include_optional: + return RemediesListResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.remedy_response.RemedyResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + remedy_id = 12345, + remedy_collection_id = 12345, + remedy_template_id = 12345, + name = 'Ping remedy', + note = 'Remedy failed with timeout, please check the firewall rules and connectivity', + duration_ms = 4711, + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + internal_note = 'Ping failed with error code 123, could be an issue with the route server settings', + log = '6 packets transmitted, 0 received, 100% packet loss, time 5107ms', ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ) + ) + else: + return RemediesListResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.remedy_response.RemedyResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + remedy_id = 12345, + remedy_collection_id = 12345, + remedy_template_id = 12345, + name = 'Ping remedy', + note = 'Remedy failed with timeout, please check the firewall rules and connectivity', + duration_ms = 4711, + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + internal_note = 'Ping failed with error code 123, could be an issue with the route server settings', + log = '6 packets transmitted, 0 received, 100% packet loss, time 5107ms', ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ), + ) + """ + + def testRemediesListResponse(self): + """Test RemediesListResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_remedies_replay_request.py b/test/test_remedies_replay_request.py new file mode 100644 index 00000000..caac8040 --- /dev/null +++ b/test/test_remedies_replay_request.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.remedies_replay_request import RemediesReplayRequest + +class TestRemediesReplayRequest(unittest.TestCase): + """RemediesReplayRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RemediesReplayRequest: + """Test RemediesReplayRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RemediesReplayRequest` + """ + model = RemediesReplayRequest() + if include_optional: + return RemediesReplayRequest( + org_id = 'cntb', + account_id = 'DE-123', + creation_start_time = '2021-06-03T06:27:12Z', + creation_end_time = '2021-06-03T10:27:12Z', + rate = 10, + remedy_ids = [12345,23456] + ) + else: + return RemediesReplayRequest( + org_id = 'cntb', + account_id = 'DE-123', + ) + """ + + def testRemediesReplayRequest(self): + """Test RemediesReplayRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_remedy_response.py b/test/test_remedy_response.py new file mode 100644 index 00000000..ac6de069 --- /dev/null +++ b/test/test_remedy_response.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.remedy_response import RemedyResponse + +class TestRemedyResponse(unittest.TestCase): + """RemedyResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RemedyResponse: + """Test RemedyResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RemedyResponse` + """ + model = RemedyResponse() + if include_optional: + return RemedyResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + remedy_id = 12345, + remedy_collection_id = 12345, + remedy_template_id = 12345, + name = 'Ping remedy', + note = 'Remedy failed with timeout, please check the firewall rules and connectivity', + duration_ms = 4711, + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + internal_note = 'Ping failed with error code 123, could be an issue with the route server settings', + log = '6 packets transmitted, 0 received, 100% packet loss, time 5107ms' + ) + else: + return RemedyResponse( + internal = False, + status = 'failed', + object_type = 'vserver', + object_id = '4711', + remedy_id = 12345, + remedy_collection_id = 12345, + remedy_template_id = 12345, + name = 'Ping remedy', + note = 'Remedy failed with timeout, please check the firewall rules and connectivity', + duration_ms = 4711, + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + internal_note = 'Ping failed with error code 123, could be an issue with the route server settings', + log = '6 packets transmitted, 0 received, 100% packet loss, time 5107ms', + ) + """ + + def testRemedyResponse(self): + """Test RemedyResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_remedy_template_response.py b/test/test_remedy_template_response.py new file mode 100644 index 00000000..a30863e6 --- /dev/null +++ b/test/test_remedy_template_response.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.remedy_template_response import RemedyTemplateResponse + +class TestRemedyTemplateResponse(unittest.TestCase): + """RemedyTemplateResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RemedyTemplateResponse: + """Test RemedyTemplateResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RemedyTemplateResponse` + """ + model = RemedyTemplateResponse() + if include_optional: + return RemedyTemplateResponse( + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + remedy_template_id = 12345, + name = 'Ping remedy instance', + description = 'Performs a ping remedy on an instance', + internal = False, + object_type = 'vserver', + collector_class = 'InstanceCollector.ts', + remedy_class = 'PingRemedy.ts', + requirements = { reboot: true }, + check_template_ids = 1, 2, ... + ) + else: + return RemedyTemplateResponse( + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + remedy_template_id = 12345, + name = 'Ping remedy instance', + description = 'Performs a ping remedy on an instance', + internal = False, + object_type = 'vserver', + collector_class = 'InstanceCollector.ts', + remedy_class = 'PingRemedy.ts', + requirements = { reboot: true }, + check_template_ids = 1, 2, ..., + ) + """ + + def testRemedyTemplateResponse(self): + """Test RemedyTemplateResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_remedy_templates_get_response.py b/test/test_remedy_templates_get_response.py new file mode 100644 index 00000000..027c54e6 --- /dev/null +++ b/test/test_remedy_templates_get_response.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.remedy_templates_get_response import RemedyTemplatesGetResponse + +class TestRemedyTemplatesGetResponse(unittest.TestCase): + """RemedyTemplatesGetResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RemedyTemplatesGetResponse: + """Test RemedyTemplatesGetResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RemedyTemplatesGetResponse` + """ + model = RemedyTemplatesGetResponse() + if include_optional: + return RemedyTemplatesGetResponse( + data = [ + pfruck_contabo.models.remedy_template_response.RemedyTemplateResponse( + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + remedy_template_id = 12345, + name = 'Ping remedy instance', + description = 'Performs a ping remedy on an instance', + internal = False, + object_type = 'vserver', + collector_class = 'InstanceCollector.ts', + remedy_class = 'PingRemedy.ts', + requirements = { reboot: true }, + check_template_ids = 1, 2, ..., ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ) + ) + else: + return RemedyTemplatesGetResponse( + data = [ + pfruck_contabo.models.remedy_template_response.RemedyTemplateResponse( + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + remedy_template_id = 12345, + name = 'Ping remedy instance', + description = 'Performs a ping remedy on an instance', + internal = False, + object_type = 'vserver', + collector_class = 'InstanceCollector.ts', + remedy_class = 'PingRemedy.ts', + requirements = { reboot: true }, + check_template_ids = 1, 2, ..., ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ), + ) + """ + + def testRemedyTemplatesGetResponse(self): + """Test RemedyTemplatesGetResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_remedy_templates_list_response.py b/test/test_remedy_templates_list_response.py new file mode 100644 index 00000000..92ade3ff --- /dev/null +++ b/test/test_remedy_templates_list_response.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.remedy_templates_list_response import RemedyTemplatesListResponse + +class TestRemedyTemplatesListResponse(unittest.TestCase): + """RemedyTemplatesListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RemedyTemplatesListResponse: + """Test RemedyTemplatesListResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RemedyTemplatesListResponse` + """ + model = RemedyTemplatesListResponse() + if include_optional: + return RemedyTemplatesListResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.remedy_template_response.RemedyTemplateResponse( + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + remedy_template_id = 12345, + name = 'Ping remedy instance', + description = 'Performs a ping remedy on an instance', + internal = False, + object_type = 'vserver', + collector_class = 'InstanceCollector.ts', + remedy_class = 'PingRemedy.ts', + requirements = { reboot: true }, + check_template_ids = 1, 2, ..., ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ) + ) + else: + return RemedyTemplatesListResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.remedy_template_response.RemedyTemplateResponse( + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + remedy_template_id = 12345, + name = 'Ping remedy instance', + description = 'Performs a ping remedy on an instance', + internal = False, + object_type = 'vserver', + collector_class = 'InstanceCollector.ts', + remedy_class = 'PingRemedy.ts', + requirements = { reboot: true }, + check_template_ids = 1, 2, ..., ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ), + ) + """ + + def testRemedyTemplatesListResponse(self): + """Test RemedyTemplatesListResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_replay_response.py b/test/test_replay_response.py new file mode 100644 index 00000000..140b0e96 --- /dev/null +++ b/test/test_replay_response.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.replay_response import ReplayResponse + +class TestReplayResponse(unittest.TestCase): + """ReplayResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ReplayResponse: + """Test ReplayResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ReplayResponse` + """ + model = ReplayResponse() + if include_optional: + return ReplayResponse( + data = [ + pfruck_contabo.models.audit_count_response.AuditCountResponse( + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + count = 5, ) + ] + ) + else: + return ReplayResponse( + data = [ + pfruck_contabo.models.audit_count_response.AuditCountResponse( + created_date = '1998-02-14T12:00:01.654Z', + modified_date = '2024-12-14T12:00:01.654Z', + org_id = 'cntb', + account_id = 'd8d15718-8f0a-4933-8844-6b69b9c2f15f', + count = 5, ) + ], + ) + """ + + def testReplayResponse(self): + """Test ReplayResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_rules.py b/test/test_rules.py new file mode 100644 index 00000000..20cfe1d0 --- /dev/null +++ b/test/test_rules.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.rules import Rules + +class TestRules(unittest.TestCase): + """Rules unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Rules: + """Test Rules + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Rules` + """ + model = Rules() + if include_optional: + return Rules( + inbound = [ + pfruck_contabo.models.firewall_rule_response.FirewallRuleResponse( + protocol = 'tcp', + dest_ports = ["80", "80-90"], + src_cidr = pfruck_contabo.models.src_cidr.SrcCidr( + ipv4 = ["192.168.0.1/24","AnyIPv4"], + ipv6 = ["1:2:3:4:5:6:7:8/64","AnyIPv6"], ), + action = 'accept', + status = 'active', + display_name = 'Allow HTTP Traffic', ) + ] + ) + else: + return Rules( + inbound = [ + pfruck_contabo.models.firewall_rule_response.FirewallRuleResponse( + protocol = 'tcp', + dest_ports = ["80", "80-90"], + src_cidr = pfruck_contabo.models.src_cidr.SrcCidr( + ipv4 = ["192.168.0.1/24","AnyIPv4"], + ipv6 = ["1:2:3:4:5:6:7:8/64","AnyIPv6"], ), + action = 'accept', + status = 'active', + display_name = 'Allow HTTP Traffic', ) + ], + ) + """ + + def testRules(self): + """Test Rules""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_rules_request.py b/test/test_rules_request.py new file mode 100644 index 00000000..6a6dce61 --- /dev/null +++ b/test/test_rules_request.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.rules_request import RulesRequest + +class TestRulesRequest(unittest.TestCase): + """RulesRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RulesRequest: + """Test RulesRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RulesRequest` + """ + model = RulesRequest() + if include_optional: + return RulesRequest( + inbound = [ + pfruck_contabo.models.firewall_rule_request.FirewallRuleRequest( + protocol = 'tcp', + dest_ports = ["80", "80-90"], + src_cidr = null, + action = 'accept', + status = 'active', + display_name = 'Allow HTTP Traffic', ) + ] + ) + else: + return RulesRequest( + inbound = [ + pfruck_contabo.models.firewall_rule_request.FirewallRuleRequest( + protocol = 'tcp', + dest_ports = ["80", "80-90"], + src_cidr = null, + action = 'accept', + status = 'active', + display_name = 'Allow HTTP Traffic', ) + ], + ) + """ + + def testRulesRequest(self): + """Test RulesRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_set_default_handle_response.py b/test/test_set_default_handle_response.py new file mode 100644 index 00000000..23b4b676 --- /dev/null +++ b/test/test_set_default_handle_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.set_default_handle_response import SetDefaultHandleResponse + +class TestSetDefaultHandleResponse(unittest.TestCase): + """SetDefaultHandleResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SetDefaultHandleResponse: + """Test SetDefaultHandleResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SetDefaultHandleResponse` + """ + model = SetDefaultHandleResponse() + if include_optional: + return SetDefaultHandleResponse( + data = [ + pfruck_contabo.models.handle_response.HandleResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + handle_id = 'CA1234O1', + handle_type = 'person', + is_default = True, + first_name = 'John', + last_name = 'Doe', + organization = 'Test Organization', + email = 'john.doe@test.com', + gender = 'male', + birth_info = null, + address = null, + phone = null, + fax = null, ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ) + ) + else: + return SetDefaultHandleResponse( + data = [ + pfruck_contabo.models.handle_response.HandleResponse( + tenant_id = 'DE', + customer_id = '3f184ab8-a600-4e7c-8c9b-3413e21a3752', + handle_id = 'CA1234O1', + handle_type = 'person', + is_default = True, + first_name = 'John', + last_name = 'Doe', + organization = 'Test Organization', + email = 'john.doe@test.com', + gender = 'male', + birth_info = null, + address = null, + phone = null, + fax = null, ) + ], + links = pfruck_contabo.models.self_links.SelfLinks( + self = '', ), + ) + """ + + def testSetDefaultHandleResponse(self): + """Test SetDefaultHandleResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_src_cidr.py b/test/test_src_cidr.py new file mode 100644 index 00000000..ca2ae08b --- /dev/null +++ b/test/test_src_cidr.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.src_cidr import SrcCidr + +class TestSrcCidr(unittest.TestCase): + """SrcCidr unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SrcCidr: + """Test SrcCidr + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SrcCidr` + """ + model = SrcCidr() + if include_optional: + return SrcCidr( + ipv4 = ["192.168.0.1/24","AnyIPv4"], + ipv6 = ["1:2:3:4:5:6:7:8/64","AnyIPv6"] + ) + else: + return SrcCidr( + ) + """ + + def testSrcCidr(self): + """Test SrcCidr""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_tag_response.py b/test/test_tag_response.py index 142e021e..c98df49e 100644 --- a/test/test_tag_response.py +++ b/test/test_tag_response.py @@ -39,7 +39,8 @@ def make_instance(self, include_optional) -> TagResponse: customer_id = '54321', tag_id = 12345, name = 'Web-Server', - color = '#0A78C3' + color = '#0A78C3', + description = 'Tag Description' ) else: return TagResponse( @@ -48,6 +49,7 @@ def make_instance(self, include_optional) -> TagResponse: tag_id = 12345, name = 'Web-Server', color = '#0A78C3', + description = 'Tag Description', ) """ diff --git a/test/test_unassign_instance_firewall_response.py b/test/test_unassign_instance_firewall_response.py new file mode 100644 index 00000000..29679f35 --- /dev/null +++ b/test/test_unassign_instance_firewall_response.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.unassign_instance_firewall_response import UnassignInstanceFirewallResponse + +class TestUnassignInstanceFirewallResponse(unittest.TestCase): + """UnassignInstanceFirewallResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnassignInstanceFirewallResponse: + """Test UnassignInstanceFirewallResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnassignInstanceFirewallResponse` + """ + model = UnassignInstanceFirewallResponse() + if include_optional: + return UnassignInstanceFirewallResponse( + links = pfruck_contabo.models.instance_assignment_self_links1.InstanceAssignmentSelfLinks1( + self = '', + firewall = '', + instance = '', ) + ) + else: + return UnassignInstanceFirewallResponse( + links = pfruck_contabo.models.instance_assignment_self_links1.InstanceAssignmentSelfLinks1( + self = '', + firewall = '', + instance = '', ), + ) + """ + + def testUnassignInstanceFirewallResponse(self): + """Test UnassignInstanceFirewallResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_dns_zone_record_request.py b/test/test_update_dns_zone_record_request.py new file mode 100644 index 00000000..45080258 --- /dev/null +++ b/test/test_update_dns_zone_record_request.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.update_dns_zone_record_request import UpdateDnsZoneRecordRequest + +class TestUpdateDnsZoneRecordRequest(unittest.TestCase): + """UpdateDnsZoneRecordRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateDnsZoneRecordRequest: + """Test UpdateDnsZoneRecordRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateDnsZoneRecordRequest` + """ + model = UpdateDnsZoneRecordRequest() + if include_optional: + return UpdateDnsZoneRecordRequest( + ttl = 86400, + prio = 0, + type = 'A', + data = '10.0.0.1', + port = 1.337, + weight = 1.337, + flag = 1.337, + tag = '' + ) + else: + return UpdateDnsZoneRecordRequest( + ttl = 86400, + prio = 0, + type = 'A', + data = '10.0.0.1', + ) + """ + + def testUpdateDnsZoneRecordRequest(self): + """Test UpdateDnsZoneRecordRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_ptr_record_request.py b/test/test_update_ptr_record_request.py new file mode 100644 index 00000000..b5539a1b --- /dev/null +++ b/test/test_update_ptr_record_request.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.update_ptr_record_request import UpdatePtrRecordRequest + +class TestUpdatePtrRecordRequest(unittest.TestCase): + """UpdatePtrRecordRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdatePtrRecordRequest: + """Test UpdatePtrRecordRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdatePtrRecordRequest` + """ + model = UpdatePtrRecordRequest() + if include_optional: + return UpdatePtrRecordRequest( + ptr = 'vmd1027177.server.net' + ) + else: + return UpdatePtrRecordRequest( + ptr = 'vmd1027177.server.net', + ) + """ + + def testUpdatePtrRecordRequest(self): + """Test UpdatePtrRecordRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_tag_request.py b/test/test_update_tag_request.py index 0b656c2f..143c933e 100644 --- a/test/test_update_tag_request.py +++ b/test/test_update_tag_request.py @@ -36,7 +36,8 @@ def make_instance(self, include_optional) -> UpdateTagRequest: if include_optional: return UpdateTagRequest( name = 'Updated-Web-Server', - color = '#0A78C3' + color = '#0A78C3', + description = 'Tag to differenciate the bad vhosts' ) else: return UpdateTagRequest( diff --git a/test/test_upgrade_instance_request.py b/test/test_upgrade_instance_request.py index 2331cb8d..35a5d052 100644 --- a/test/test_upgrade_instance_request.py +++ b/test/test_upgrade_instance_request.py @@ -35,7 +35,8 @@ def make_instance(self, include_optional) -> UpgradeInstanceRequest: model = UpgradeInstanceRequest() if include_optional: return UpgradeInstanceRequest( - private_networking = None + private_networking = None, + backup = None ) else: return UpgradeInstanceRequest( diff --git a/test/test_users_api.py b/test/test_users_api.py index 3d05bb26..fc673f97 100644 --- a/test/test_users_api.py +++ b/test/test_users_api.py @@ -47,27 +47,6 @@ def test_generate_client_secret(self) -> None: """ pass - def test_get_object_storage_credentials(self) -> None: - """Test case for get_object_storage_credentials - - Get S3 compatible object storage credentials. - """ - pass - - def test_list_object_storage_credentials(self) -> None: - """Test case for list_object_storage_credentials - - Get list of S3 compatible object storage credentials for user. - """ - pass - - def test_regenerate_object_storage_credentials(self) -> None: - """Test case for regenerate_object_storage_credentials - - Regenerates secret key of specified user for the S3 compatible object storages. - """ - pass - def test_resend_email_verification(self) -> None: """Test case for resend_email_verification @@ -96,6 +75,13 @@ def test_retrieve_user_client(self) -> None: """ pass + def test_retrieve_user_is_password_set(self) -> None: + """Test case for retrieve_user_is_password_set + + Get user is password set status + """ + pass + def test_retrieve_user_list(self) -> None: """Test case for retrieve_user_list diff --git a/test/test_users_object_storage_credentials_api.py b/test/test_users_object_storage_credentials_api.py new file mode 100644 index 00000000..7909d9d8 --- /dev/null +++ b/test/test_users_object_storage_credentials_api.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.api.users_object_storage_credentials_api import UsersObjectStorageCredentialsApi + + +class TestUsersObjectStorageCredentialsApi(unittest.TestCase): + """UsersObjectStorageCredentialsApi unit test stubs""" + + def setUp(self) -> None: + self.api = UsersObjectStorageCredentialsApi() + + def tearDown(self) -> None: + pass + + def test_get_object_storage_credentials(self) -> None: + """Test case for get_object_storage_credentials + + Get S3 compatible object storage credentials. + """ + pass + + def test_list_object_storage_credentials(self) -> None: + """Test case for list_object_storage_credentials + + Get list of S3 compatible object storage credentials for user. + """ + pass + + def test_regenerate_object_storage_credentials(self) -> None: + """Test case for regenerate_object_storage_credentials + + Regenerates secret key of specified user for the S3 compatible object storages. + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_vip_response.py b/test/test_vip_response.py index 56dde421..7c9361c1 100644 --- a/test/test_vip_response.py +++ b/test/test_vip_response.py @@ -46,7 +46,7 @@ def make_instance(self, include_optional) -> VipResponse: resource_display_name = 'My Instance 12', ip_version = 'v4', type = 'additional', - v4 = pfruck_contabo.models.ip_v41.IpV41( + v4 = pfruck_contabo.models.ip_v4.IpV4( ip = '195.123.123.1', gateway = '255.255.255.1', netmask_cidr = 24, diff --git a/test/test_zone_audit_response.py b/test/test_zone_audit_response.py new file mode 100644 index 00000000..bf98aaca --- /dev/null +++ b/test/test_zone_audit_response.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.zone_audit_response import ZoneAuditResponse + +class TestZoneAuditResponse(unittest.TestCase): + """ZoneAuditResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ZoneAuditResponse: + """Test ZoneAuditResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ZoneAuditResponse` + """ + model = ZoneAuditResponse() + if include_optional: + return ZoneAuditResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.zone_audit_response_data.ZoneAuditResponseData( + id = 12345, + action = 'CREATED', + timestamp = '2021-03-30T11:35:06.177Z', + tenant_id = 'DE', + customer_id = '54321', + changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + username = 'John.Doe', + request_id = 'A2F56FAF-18N0-4893-11HG-R312M1E4FEC5', + trace_id = '78E9A428-94E9-4A2A-92F5-26038C6884F', + name = 'example.com', + changes = {"prev":{"name":"example.com"},"new":{"name":"example1.com"}}, ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ) + ) + else: + return ZoneAuditResponse( + pagination = pfruck_contabo.models.pagination_meta.PaginationMeta( + size = 10, + total_elements = 100, + total_pages = 10, + page = 1, ), + data = [ + pfruck_contabo.models.zone_audit_response_data.ZoneAuditResponseData( + id = 12345, + action = 'CREATED', + timestamp = '2021-03-30T11:35:06.177Z', + tenant_id = 'DE', + customer_id = '54321', + changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + username = 'John.Doe', + request_id = 'A2F56FAF-18N0-4893-11HG-R312M1E4FEC5', + trace_id = '78E9A428-94E9-4A2A-92F5-26038C6884F', + name = 'example.com', + changes = {"prev":{"name":"example.com"},"new":{"name":"example1.com"}}, ) + ], + links = pfruck_contabo.models.links.Links( + self = '', + first = '', + previous = '', + next = '', + last = '', ), + ) + """ + + def testZoneAuditResponse(self): + """Test ZoneAuditResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_zone_audit_response_data.py b/test/test_zone_audit_response_data.py new file mode 100644 index 00000000..3538f1c0 --- /dev/null +++ b/test/test_zone_audit_response_data.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + Contabo API + + + The version of the OpenAPI document: 1.0.0 + Contact: support@contabo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from pfruck_contabo.models.zone_audit_response_data import ZoneAuditResponseData + +class TestZoneAuditResponseData(unittest.TestCase): + """ZoneAuditResponseData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ZoneAuditResponseData: + """Test ZoneAuditResponseData + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ZoneAuditResponseData` + """ + model = ZoneAuditResponseData() + if include_optional: + return ZoneAuditResponseData( + id = 12345, + action = 'CREATED', + timestamp = '2021-03-30T11:35:06.177Z', + tenant_id = 'DE', + customer_id = '54321', + changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + username = 'John.Doe', + request_id = 'A2F56FAF-18N0-4893-11HG-R312M1E4FEC5', + trace_id = '78E9A428-94E9-4A2A-92F5-26038C6884F', + name = 'example.com', + changes = {"prev":{"name":"example.com"},"new":{"name":"example1.com"}} + ) + else: + return ZoneAuditResponseData( + id = 12345, + action = 'CREATED', + timestamp = '2021-03-30T11:35:06.177Z', + tenant_id = 'DE', + customer_id = '54321', + changed_by = 'c4c800ff-e524-47dd-9543-71dfc8b91113', + username = 'John.Doe', + request_id = 'A2F56FAF-18N0-4893-11HG-R312M1E4FEC5', + trace_id = '78E9A428-94E9-4A2A-92F5-26038C6884F', + name = 'example.com', + ) + """ + + def testZoneAuditResponseData(self): + """Test ZoneAuditResponseData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main()