gcore 0.2.0__py3-none-any.whl → 0.4.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of gcore might be problematic. Click here for more details.
- gcore/__init__.py +2 -1
- gcore/_base_client.py +44 -2
- gcore/_client.py +9 -0
- gcore/_models.py +2 -0
- gcore/_types.py +2 -0
- gcore/_version.py +1 -1
- gcore/pagination.py +61 -1
- gcore/resources/__init__.py +14 -0
- gcore/resources/cloud/baremetal/flavors.py +11 -137
- gcore/resources/cloud/baremetal/images.py +10 -12
- gcore/resources/cloud/baremetal/servers.py +75 -78
- gcore/resources/cloud/billing_reservations.py +2 -2
- gcore/resources/cloud/file_shares/file_shares.py +7 -8
- gcore/resources/cloud/floating_ips.py +9 -14
- gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +39 -28
- gcore/resources/cloud/gpu_baremetal_clusters/images.py +11 -12
- gcore/resources/cloud/gpu_baremetal_clusters/interfaces.py +2 -2
- gcore/resources/cloud/gpu_baremetal_clusters/servers.py +12 -8
- gcore/resources/cloud/inference/deployments/deployments.py +16 -8
- gcore/resources/cloud/inference/registry_credentials.py +2 -2
- gcore/resources/cloud/inference/secrets.py +8 -8
- gcore/resources/cloud/instances/flavors.py +9 -233
- gcore/resources/cloud/instances/images.py +47 -37
- gcore/resources/cloud/instances/instances.py +107 -100
- gcore/resources/cloud/instances/interfaces.py +6 -6
- gcore/resources/cloud/ip_ranges.py +34 -2
- gcore/resources/cloud/load_balancers/flavors.py +2 -2
- gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +30 -22
- gcore/resources/cloud/load_balancers/listeners.py +31 -22
- gcore/resources/cloud/load_balancers/load_balancers.py +99 -43
- gcore/resources/cloud/load_balancers/metrics.py +2 -2
- gcore/resources/cloud/load_balancers/pools/health_monitors.py +2 -2
- gcore/resources/cloud/load_balancers/pools/members.py +12 -8
- gcore/resources/cloud/networks/networks.py +83 -19
- gcore/resources/cloud/networks/routers.py +18 -18
- gcore/resources/cloud/networks/subnets.py +55 -15
- gcore/resources/cloud/projects.py +38 -24
- gcore/resources/cloud/quotas/quotas.py +6 -6
- gcore/resources/cloud/quotas/requests.py +8 -8
- gcore/resources/cloud/registries/artifacts.py +4 -4
- gcore/resources/cloud/registries/registries.py +14 -20
- gcore/resources/cloud/registries/repositories.py +4 -4
- gcore/resources/cloud/registries/tags.py +2 -2
- gcore/resources/cloud/registries/users.py +25 -32
- gcore/resources/cloud/reserved_fixed_ips/reserved_fixed_ips.py +26 -26
- gcore/resources/cloud/reserved_fixed_ips/vip.py +10 -10
- gcore/resources/cloud/security_groups/rules.py +6 -6
- gcore/resources/cloud/security_groups/security_groups.py +70 -31
- gcore/resources/cloud/ssh_keys.py +2 -2
- gcore/resources/cloud/tasks.py +102 -94
- gcore/resources/cloud/users/role_assignments.py +16 -18
- gcore/resources/cloud/volumes.py +155 -65
- gcore/resources/iam/__init__.py +47 -0
- gcore/resources/iam/api_tokens.py +521 -0
- gcore/resources/iam/iam.py +199 -0
- gcore/resources/iam/users.py +642 -0
- gcore/resources/waap/__init__.py +84 -0
- gcore/resources/waap/advanced_rules.py +135 -0
- gcore/resources/waap/custom_page_sets.py +805 -0
- gcore/resources/waap/domains/__init__.py +140 -0
- gcore/resources/waap/domains/advanced_rules.py +876 -0
- gcore/resources/waap/domains/analytics/__init__.py +33 -0
- gcore/resources/waap/domains/analytics/analytics.py +676 -0
- gcore/resources/waap/domains/analytics/requests.py +378 -0
- gcore/resources/waap/domains/api_discovery/__init__.py +33 -0
- gcore/resources/waap/domains/api_discovery/api_discovery.py +530 -0
- gcore/resources/waap/domains/api_discovery/scan_results.py +352 -0
- gcore/resources/waap/domains/api_path_groups.py +163 -0
- gcore/resources/waap/domains/api_paths.py +771 -0
- gcore/resources/waap/domains/custom_rules.py +889 -0
- gcore/resources/waap/domains/domains.py +399 -0
- gcore/resources/waap/domains/firewall_rules.py +884 -0
- gcore/resources/waap/domains/insight_silences.py +689 -0
- gcore/resources/waap/domains/insights.py +425 -0
- gcore/resources/waap/domains/policies.py +173 -0
- gcore/resources/waap/domains/settings.py +5 -5
- gcore/resources/waap/ip_info.py +1017 -0
- gcore/resources/waap/organizations.py +217 -0
- gcore/resources/waap/statistics.py +225 -0
- gcore/resources/waap/tags.py +233 -0
- gcore/resources/waap/waap.py +257 -0
- gcore/types/cloud/allowed_address_pairs.py +2 -2
- gcore/types/cloud/baremetal/__init__.py +0 -1
- gcore/types/cloud/baremetal/baremetal_server.py +1 -1
- gcore/types/cloud/baremetal/image_list_params.py +1 -5
- gcore/types/cloud/baremetal/server_create_params.py +13 -17
- gcore/types/cloud/baremetal/server_list_params.py +8 -12
- gcore/types/cloud/baremetal/server_rebuild_params.py +1 -1
- gcore/types/cloud/baremetal_flavor.py +3 -3
- gcore/types/cloud/container_probe_config.py +1 -1
- gcore/types/cloud/container_probe_config_create_param.py +1 -1
- gcore/types/cloud/container_scale_triggers.py +2 -2
- gcore/types/cloud/ddos_profile.py +9 -3
- gcore/types/cloud/file_share_create_params.py +3 -5
- gcore/types/cloud/floating_ip_create_params.py +2 -4
- gcore/types/cloud/floating_ip_detailed.py +1 -1
- gcore/types/cloud/floating_ip_list_params.py +2 -6
- gcore/types/cloud/gpu_baremetal_cluster.py +1 -1
- gcore/types/cloud/gpu_baremetal_cluster_create_params.py +4 -5
- gcore/types/cloud/gpu_baremetal_cluster_delete_params.py +1 -1
- gcore/types/cloud/gpu_baremetal_cluster_rebuild_params.py +1 -1
- gcore/types/cloud/gpu_baremetal_cluster_server.py +1 -1
- gcore/types/cloud/gpu_baremetal_clusters/image_upload_params.py +3 -5
- gcore/types/cloud/gpu_baremetal_clusters/server_attach_interface_params.py +10 -10
- gcore/types/cloud/gpu_baremetal_flavor.py +3 -3
- gcore/types/cloud/health_monitor.py +6 -1
- gcore/types/cloud/image.py +1 -1
- gcore/types/cloud/inference/deployment_create_params.py +4 -4
- gcore/types/cloud/inference/deployment_update_params.py +6 -6
- gcore/types/cloud/inference/inference.py +2 -4
- gcore/types/cloud/instance.py +1 -1
- gcore/types/cloud/instance_create_params.py +15 -18
- gcore/types/cloud/instance_list_params.py +8 -12
- gcore/types/cloud/instances/__init__.py +0 -2
- gcore/types/cloud/instances/image_create_from_volume_params.py +2 -4
- gcore/types/cloud/instances/image_list_params.py +1 -5
- gcore/types/cloud/instances/image_upload_params.py +2 -4
- gcore/types/cloud/instances/instance_flavor.py +3 -3
- gcore/types/cloud/instances/interface_attach_params.py +10 -10
- gcore/types/cloud/load_balancer_create_params.py +25 -19
- gcore/types/cloud/load_balancer_flavor_detail.py +3 -3
- gcore/types/cloud/load_balancer_l7_policy.py +5 -5
- gcore/types/cloud/load_balancer_list_params.py +5 -9
- gcore/types/cloud/load_balancer_listener_detail.py +4 -4
- gcore/types/cloud/load_balancer_update_params.py +24 -0
- gcore/types/cloud/load_balancers/l7_policy_create_params.py +5 -5
- gcore/types/cloud/load_balancers/l7_policy_replace_params.py +5 -5
- gcore/types/cloud/load_balancers/listener_create_params.py +4 -4
- gcore/types/cloud/load_balancers/listener_update_params.py +3 -3
- gcore/types/cloud/load_balancers/pool_create_params.py +10 -5
- gcore/types/cloud/load_balancers/pool_update_params.py +10 -5
- gcore/types/cloud/load_balancers/pools/member_add_params.py +9 -4
- gcore/types/cloud/member.py +8 -3
- gcore/types/cloud/network.py +2 -2
- gcore/types/cloud/network_create_params.py +2 -3
- gcore/types/cloud/network_details.py +2 -2
- gcore/types/cloud/network_list_params.py +5 -6
- gcore/types/cloud/network_update_params.py +28 -2
- gcore/types/cloud/networks/router_list_params.py +2 -2
- gcore/types/cloud/networks/subnet_create_params.py +3 -4
- gcore/types/cloud/networks/subnet_list_params.py +2 -6
- gcore/types/cloud/networks/subnet_update_params.py +25 -0
- gcore/types/cloud/region.py +4 -4
- gcore/types/cloud/registries/__init__.py +1 -0
- gcore/types/cloud/registries/user_create_multiple_params.py +3 -5
- gcore/types/cloud/registries/user_create_params.py +3 -5
- gcore/types/cloud/registries/user_refresh_secret_response.py +31 -0
- gcore/types/cloud/registry_create_params.py +3 -5
- gcore/types/cloud/reserved_fixed_ip_create_params.py +2 -2
- gcore/types/cloud/reserved_fixed_ip_list_params.py +3 -3
- gcore/types/cloud/security_group_list_params.py +3 -7
- gcore/types/cloud/security_group_update_params.py +25 -0
- gcore/types/cloud/session_persistence.py +1 -1
- gcore/types/cloud/ssh_key_created.py +3 -6
- gcore/types/cloud/tag_update_map_param.py +2 -2
- gcore/types/cloud/task.py +1 -1
- gcore/types/cloud/task_list_params.py +49 -45
- gcore/types/cloud/users/role_assignment_create_params.py +1 -1
- gcore/types/cloud/users/role_assignment_update_params.py +1 -1
- gcore/types/cloud/volume_create_params.py +6 -6
- gcore/types/cloud/volume_list_params.py +3 -7
- gcore/types/cloud/volume_update_params.py +29 -3
- gcore/types/iam/__init__.py +17 -0
- gcore/types/iam/account_overview.py +488 -0
- gcore/types/iam/api_token.py +78 -0
- gcore/types/iam/api_token_create.py +15 -0
- gcore/types/iam/api_token_create_params.py +42 -0
- gcore/types/iam/api_token_list.py +81 -0
- gcore/types/iam/api_token_list_params.py +41 -0
- gcore/types/iam/user.py +86 -0
- gcore/types/iam/user_detailed.py +104 -0
- gcore/types/iam/user_invite.py +15 -0
- gcore/types/iam/user_invite_params.py +37 -0
- gcore/types/iam/user_list_params.py +15 -0
- gcore/types/iam/user_update.py +104 -0
- gcore/types/iam/user_update_params.py +52 -0
- gcore/types/waap/__init__.py +97 -2
- gcore/types/waap/custom_page_set_create_params.py +35 -0
- gcore/types/waap/custom_page_set_list_params.py +25 -0
- gcore/types/waap/custom_page_set_preview_params.py +34 -0
- gcore/types/waap/custom_page_set_update_params.py +35 -0
- gcore/types/waap/domain_list_rule_sets_response.py +10 -0
- gcore/types/waap/domains/__init__.py +42 -0
- gcore/types/waap/domains/advanced_rule_create_params.py +80 -0
- gcore/types/waap/domains/advanced_rule_list_params.py +58 -0
- gcore/types/waap/domains/advanced_rule_update_params.py +83 -0
- gcore/types/waap/domains/analytics/__init__.py +5 -0
- gcore/types/waap/domains/analytics/request_list_params.py +53 -0
- gcore/types/waap/domains/analytics_get_event_statistics_params.py +34 -0
- gcore/types/waap/domains/analytics_list_ddos_attacks_params.py +28 -0
- gcore/types/waap/domains/analytics_list_ddos_info_params.py +31 -0
- gcore/types/waap/domains/analytics_list_event_traffic_params.py +26 -0
- gcore/types/waap/domains/analytics_list_event_traffic_response.py +10 -0
- gcore/types/waap/domains/api_discovery/__init__.py +7 -0
- gcore/types/waap/domains/api_discovery/scan_result_get_response.py +29 -0
- gcore/types/waap/domains/api_discovery/scan_result_list_params.py +41 -0
- gcore/types/waap/domains/api_discovery/scan_result_list_response.py +29 -0
- gcore/types/waap/domains/api_discovery_get_settings_response.py +36 -0
- gcore/types/waap/domains/api_discovery_scan_openapi_response.py +10 -0
- gcore/types/waap/domains/api_discovery_update_settings_params.py +34 -0
- gcore/types/waap/domains/api_discovery_update_settings_response.py +36 -0
- gcore/types/waap/domains/api_discovery_upload_openapi_params.py +19 -0
- gcore/types/waap/domains/api_discovery_upload_openapi_response.py +10 -0
- gcore/types/waap/domains/api_path_create_params.py +31 -0
- gcore/types/waap/domains/api_path_create_response.py +50 -0
- gcore/types/waap/domains/api_path_get_response.py +50 -0
- gcore/types/waap/domains/api_path_group_list_response.py +12 -0
- gcore/types/waap/domains/api_path_list_params.py +62 -0
- gcore/types/waap/domains/api_path_list_response.py +50 -0
- gcore/types/waap/domains/api_path_update_params.py +29 -0
- gcore/types/waap/domains/custom_rule_create_params.py +372 -0
- gcore/types/waap/domains/custom_rule_delete_multiple_params.py +13 -0
- gcore/types/waap/domains/custom_rule_list_params.py +35 -0
- gcore/types/waap/domains/custom_rule_update_params.py +375 -0
- gcore/types/waap/domains/firewall_rule_create_params.py +75 -0
- gcore/types/waap/domains/firewall_rule_delete_multiple_params.py +13 -0
- gcore/types/waap/domains/firewall_rule_list_params.py +33 -0
- gcore/types/waap/domains/firewall_rule_update_params.py +78 -0
- gcore/types/waap/domains/insight_list_params.py +34 -0
- gcore/types/waap/domains/insight_replace_params.py +17 -0
- gcore/types/waap/domains/insight_silence_create_params.py +28 -0
- gcore/types/waap/domains/insight_silence_list_params.py +33 -0
- gcore/types/waap/domains/insight_silence_update_params.py +28 -0
- gcore/types/waap/domains/setting_update_params.py +7 -0
- gcore/types/waap/ip_info_get_attack_time_series_params.py +12 -0
- gcore/types/waap/ip_info_get_attack_time_series_response.py +10 -0
- gcore/types/waap/ip_info_get_blocked_requests_params.py +15 -0
- gcore/types/waap/ip_info_get_blocked_requests_response.py +10 -0
- gcore/types/waap/ip_info_get_counts_params.py +19 -0
- gcore/types/waap/ip_info_get_ddos_attack_series_params.py +12 -0
- gcore/types/waap/ip_info_get_params.py +12 -0
- gcore/types/waap/ip_info_get_top_sessions_params.py +15 -0
- gcore/types/waap/ip_info_get_top_sessions_response.py +10 -0
- gcore/types/waap/ip_info_get_top_urls_params.py +15 -0
- gcore/types/waap/ip_info_get_top_urls_response.py +10 -0
- gcore/types/waap/ip_info_get_top_user_agents_params.py +15 -0
- gcore/types/waap/ip_info_get_top_user_agents_response.py +10 -0
- gcore/types/waap/ip_info_list_attacked_countries_params.py +12 -0
- gcore/types/waap/ip_info_list_attacked_countries_response.py +10 -0
- gcore/types/waap/organization_list_params.py +22 -0
- gcore/types/waap/statistic_get_usage_series_params.py +25 -0
- gcore/types/waap/tag_list_params.py +28 -0
- gcore/types/waap/waap_advanced_rule.py +83 -0
- gcore/types/waap/waap_advanced_rule_descriptor.py +49 -0
- gcore/types/waap/waap_advanced_rule_descriptor_list.py +15 -0
- gcore/types/waap/waap_block_csrf_page_data.py +28 -0
- gcore/types/waap/waap_block_csrf_page_data_param.py +28 -0
- gcore/types/waap/waap_block_page_data.py +28 -0
- gcore/types/waap/waap_block_page_data_param.py +28 -0
- gcore/types/waap/waap_blocked_statistics.py +36 -0
- gcore/types/waap/waap_captcha_page_data.py +31 -0
- gcore/types/waap/waap_captcha_page_data_param.py +31 -0
- gcore/types/waap/waap_common_tag.py +16 -0
- gcore/types/waap/waap_cookie_disabled_page_data.py +18 -0
- gcore/types/waap/waap_cookie_disabled_page_data_param.py +18 -0
- gcore/types/waap/waap_count_statistics.py +36 -0
- gcore/types/waap/waap_custom_page_preview.py +10 -0
- gcore/types/waap/waap_custom_page_set.py +36 -0
- gcore/types/waap/waap_custom_rule.py +377 -0
- gcore/types/waap/waap_customer_rule_state.py +7 -0
- gcore/types/waap/waap_ddos_attack.py +16 -0
- gcore/types/waap/waap_ddos_info.py +17 -0
- gcore/types/waap/{waap_api_urls.py → waap_domain_api_settings.py} +9 -2
- gcore/types/waap/waap_domain_policy.py +29 -0
- gcore/types/waap/{waap_domain_settings.py → waap_domain_settings_model.py} +4 -4
- gcore/types/waap/waap_event_statistics.py +15 -0
- gcore/types/waap/waap_firewall_rule.py +78 -0
- gcore/types/waap/waap_get_account_overview_response.py +34 -0
- gcore/types/waap/waap_handshake_page_data.py +25 -0
- gcore/types/waap/waap_handshake_page_data_param.py +25 -0
- gcore/types/waap/waap_insight.py +38 -0
- gcore/types/waap/waap_insight_silence.py +28 -0
- gcore/types/waap/waap_insight_silence_sort_by.py +9 -0
- gcore/types/waap/waap_insight_sort_by.py +20 -0
- gcore/types/waap/waap_insight_status.py +7 -0
- gcore/types/waap/waap_ip_country_attack.py +16 -0
- gcore/types/waap/waap_ip_ddos_info_model.py +23 -0
- gcore/types/waap/waap_ip_info.py +57 -0
- gcore/types/waap/waap_ip_info_counts.py +16 -0
- gcore/types/waap/waap_javascript_disabled_page_data.py +18 -0
- gcore/types/waap/waap_javascript_disabled_page_data_param.py +18 -0
- gcore/types/waap/waap_network_details.py +17 -0
- gcore/types/waap/waap_organization.py +13 -0
- gcore/types/waap/waap_page_type.py +9 -0
- gcore/types/waap/waap_paginated_custom_page_set.py +22 -0
- gcore/types/waap/waap_paginated_ddos_attack.py +22 -0
- gcore/types/waap/waap_paginated_ddos_info.py +22 -0
- gcore/types/waap/waap_paginated_request_summary.py +22 -0
- gcore/types/waap/waap_pattern_matched_tag.py +37 -0
- gcore/types/waap/waap_policy_action.py +7 -0
- gcore/types/waap/waap_policy_mode.py +10 -0
- gcore/types/waap/waap_request_details.py +92 -0
- gcore/types/waap/waap_request_organization.py +13 -0
- gcore/types/waap/waap_request_summary.py +59 -0
- gcore/types/waap/waap_resolution.py +7 -0
- gcore/types/waap/waap_rule_action_type.py +7 -0
- gcore/types/waap/waap_rule_blocked_requests.py +16 -0
- gcore/types/waap/waap_rule_set.py +41 -0
- gcore/types/waap/waap_statistic_item.py +18 -0
- gcore/types/waap/waap_statistics_series.py +16 -0
- gcore/types/waap/waap_tag.py +16 -0
- gcore/types/waap/waap_time_series_attack.py +23 -0
- gcore/types/waap/waap_top_session.py +24 -0
- gcore/types/waap/waap_top_url.py +13 -0
- gcore/types/waap/waap_top_user_agent.py +13 -0
- gcore/types/waap/waap_traffic_metrics.py +68 -0
- gcore/types/waap/waap_traffic_type.py +28 -0
- gcore/types/waap/waap_user_agent_details.py +40 -0
- {gcore-0.2.0.dist-info → gcore-0.4.0.dist-info}/METADATA +40 -3
- {gcore-0.2.0.dist-info → gcore-0.4.0.dist-info}/RECORD +312 -149
- gcore/types/cloud/baremetal/flavor_list_suitable_params.py +0 -22
- gcore/types/cloud/instances/flavor_list_for_resize_params.py +0 -16
- gcore/types/cloud/instances/flavor_list_suitable_params.py +0 -56
- {gcore-0.2.0.dist-info → gcore-0.4.0.dist-info}/WHEEL +0 -0
- {gcore-0.2.0.dist-info → gcore-0.4.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,530 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Optional
|
|
6
|
+
|
|
7
|
+
import httpx
|
|
8
|
+
|
|
9
|
+
from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
10
|
+
from ....._utils import maybe_transform, async_maybe_transform
|
|
11
|
+
from ....._compat import cached_property
|
|
12
|
+
from .scan_results import (
|
|
13
|
+
ScanResultsResource,
|
|
14
|
+
AsyncScanResultsResource,
|
|
15
|
+
ScanResultsResourceWithRawResponse,
|
|
16
|
+
AsyncScanResultsResourceWithRawResponse,
|
|
17
|
+
ScanResultsResourceWithStreamingResponse,
|
|
18
|
+
AsyncScanResultsResourceWithStreamingResponse,
|
|
19
|
+
)
|
|
20
|
+
from ....._resource import SyncAPIResource, AsyncAPIResource
|
|
21
|
+
from ....._response import (
|
|
22
|
+
to_raw_response_wrapper,
|
|
23
|
+
to_streamed_response_wrapper,
|
|
24
|
+
async_to_raw_response_wrapper,
|
|
25
|
+
async_to_streamed_response_wrapper,
|
|
26
|
+
)
|
|
27
|
+
from ....._base_client import make_request_options
|
|
28
|
+
from .....types.waap.domains import api_discovery_upload_openapi_params, api_discovery_update_settings_params
|
|
29
|
+
from .....types.waap.domains.api_discovery_get_settings_response import APIDiscoveryGetSettingsResponse
|
|
30
|
+
from .....types.waap.domains.api_discovery_scan_openapi_response import APIDiscoveryScanOpenAPIResponse
|
|
31
|
+
from .....types.waap.domains.api_discovery_upload_openapi_response import APIDiscoveryUploadOpenAPIResponse
|
|
32
|
+
from .....types.waap.domains.api_discovery_update_settings_response import APIDiscoveryUpdateSettingsResponse
|
|
33
|
+
|
|
34
|
+
__all__ = ["APIDiscoveryResource", "AsyncAPIDiscoveryResource"]
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class APIDiscoveryResource(SyncAPIResource):
|
|
38
|
+
@cached_property
|
|
39
|
+
def scan_results(self) -> ScanResultsResource:
|
|
40
|
+
return ScanResultsResource(self._client)
|
|
41
|
+
|
|
42
|
+
@cached_property
|
|
43
|
+
def with_raw_response(self) -> APIDiscoveryResourceWithRawResponse:
|
|
44
|
+
"""
|
|
45
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
46
|
+
the raw response object instead of the parsed content.
|
|
47
|
+
|
|
48
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
49
|
+
"""
|
|
50
|
+
return APIDiscoveryResourceWithRawResponse(self)
|
|
51
|
+
|
|
52
|
+
@cached_property
|
|
53
|
+
def with_streaming_response(self) -> APIDiscoveryResourceWithStreamingResponse:
|
|
54
|
+
"""
|
|
55
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
56
|
+
|
|
57
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
58
|
+
"""
|
|
59
|
+
return APIDiscoveryResourceWithStreamingResponse(self)
|
|
60
|
+
|
|
61
|
+
def get_settings(
|
|
62
|
+
self,
|
|
63
|
+
domain_id: int,
|
|
64
|
+
*,
|
|
65
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
66
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
67
|
+
extra_headers: Headers | None = None,
|
|
68
|
+
extra_query: Query | None = None,
|
|
69
|
+
extra_body: Body | None = None,
|
|
70
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
71
|
+
) -> APIDiscoveryGetSettingsResponse:
|
|
72
|
+
"""
|
|
73
|
+
Retrieve the API discovery settings for a domain
|
|
74
|
+
|
|
75
|
+
Args:
|
|
76
|
+
domain_id: The domain ID
|
|
77
|
+
|
|
78
|
+
extra_headers: Send extra headers
|
|
79
|
+
|
|
80
|
+
extra_query: Add additional query parameters to the request
|
|
81
|
+
|
|
82
|
+
extra_body: Add additional JSON properties to the request
|
|
83
|
+
|
|
84
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
85
|
+
"""
|
|
86
|
+
return self._get(
|
|
87
|
+
f"/waap/v1/domains/{domain_id}/api-discovery/settings",
|
|
88
|
+
options=make_request_options(
|
|
89
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
90
|
+
),
|
|
91
|
+
cast_to=APIDiscoveryGetSettingsResponse,
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
def scan_openapi(
|
|
95
|
+
self,
|
|
96
|
+
domain_id: int,
|
|
97
|
+
*,
|
|
98
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
99
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
100
|
+
extra_headers: Headers | None = None,
|
|
101
|
+
extra_query: Query | None = None,
|
|
102
|
+
extra_body: Body | None = None,
|
|
103
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
104
|
+
) -> APIDiscoveryScanOpenAPIResponse:
|
|
105
|
+
"""Scan an API description file hosted online.
|
|
106
|
+
|
|
107
|
+
The file must be in YAML or JSON
|
|
108
|
+
format and adhere to the OpenAPI specification. The location of the API
|
|
109
|
+
description file should be specified in the API discovery settings.
|
|
110
|
+
|
|
111
|
+
Args:
|
|
112
|
+
domain_id: The domain ID
|
|
113
|
+
|
|
114
|
+
extra_headers: Send extra headers
|
|
115
|
+
|
|
116
|
+
extra_query: Add additional query parameters to the request
|
|
117
|
+
|
|
118
|
+
extra_body: Add additional JSON properties to the request
|
|
119
|
+
|
|
120
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
121
|
+
"""
|
|
122
|
+
return self._post(
|
|
123
|
+
f"/waap/v1/domains/{domain_id}/api-discovery/scan",
|
|
124
|
+
options=make_request_options(
|
|
125
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
126
|
+
),
|
|
127
|
+
cast_to=APIDiscoveryScanOpenAPIResponse,
|
|
128
|
+
)
|
|
129
|
+
|
|
130
|
+
def update_settings(
|
|
131
|
+
self,
|
|
132
|
+
domain_id: int,
|
|
133
|
+
*,
|
|
134
|
+
description_file_location: Optional[str] | NotGiven = NOT_GIVEN,
|
|
135
|
+
description_file_scan_enabled: Optional[bool] | NotGiven = NOT_GIVEN,
|
|
136
|
+
description_file_scan_interval_hours: Optional[int] | NotGiven = NOT_GIVEN,
|
|
137
|
+
traffic_scan_enabled: Optional[bool] | NotGiven = NOT_GIVEN,
|
|
138
|
+
traffic_scan_interval_hours: Optional[int] | NotGiven = NOT_GIVEN,
|
|
139
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
140
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
141
|
+
extra_headers: Headers | None = None,
|
|
142
|
+
extra_query: Query | None = None,
|
|
143
|
+
extra_body: Body | None = None,
|
|
144
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
145
|
+
) -> APIDiscoveryUpdateSettingsResponse:
|
|
146
|
+
"""
|
|
147
|
+
Update the API discovery settings for a domain
|
|
148
|
+
|
|
149
|
+
Args:
|
|
150
|
+
domain_id: The domain ID
|
|
151
|
+
|
|
152
|
+
description_file_location: The URL of the API description file. This will be periodically scanned if
|
|
153
|
+
`descriptionFileScanEnabled` is enabled. Supported formats are YAML and JSON,
|
|
154
|
+
and it must adhere to OpenAPI versions 2, 3, or 3.1.
|
|
155
|
+
|
|
156
|
+
description_file_scan_enabled: Indicates if periodic scan of the description file is enabled
|
|
157
|
+
|
|
158
|
+
description_file_scan_interval_hours: The interval in hours for scanning the description file
|
|
159
|
+
|
|
160
|
+
traffic_scan_enabled: Indicates if traffic scan is enabled
|
|
161
|
+
|
|
162
|
+
traffic_scan_interval_hours: The interval in hours for scanning the traffic
|
|
163
|
+
|
|
164
|
+
extra_headers: Send extra headers
|
|
165
|
+
|
|
166
|
+
extra_query: Add additional query parameters to the request
|
|
167
|
+
|
|
168
|
+
extra_body: Add additional JSON properties to the request
|
|
169
|
+
|
|
170
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
171
|
+
"""
|
|
172
|
+
return self._patch(
|
|
173
|
+
f"/waap/v1/domains/{domain_id}/api-discovery/settings",
|
|
174
|
+
body=maybe_transform(
|
|
175
|
+
{
|
|
176
|
+
"description_file_location": description_file_location,
|
|
177
|
+
"description_file_scan_enabled": description_file_scan_enabled,
|
|
178
|
+
"description_file_scan_interval_hours": description_file_scan_interval_hours,
|
|
179
|
+
"traffic_scan_enabled": traffic_scan_enabled,
|
|
180
|
+
"traffic_scan_interval_hours": traffic_scan_interval_hours,
|
|
181
|
+
},
|
|
182
|
+
api_discovery_update_settings_params.APIDiscoveryUpdateSettingsParams,
|
|
183
|
+
),
|
|
184
|
+
options=make_request_options(
|
|
185
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
186
|
+
),
|
|
187
|
+
cast_to=APIDiscoveryUpdateSettingsResponse,
|
|
188
|
+
)
|
|
189
|
+
|
|
190
|
+
def upload_openapi(
|
|
191
|
+
self,
|
|
192
|
+
domain_id: int,
|
|
193
|
+
*,
|
|
194
|
+
file_data: str,
|
|
195
|
+
file_name: str,
|
|
196
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
197
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
198
|
+
extra_headers: Headers | None = None,
|
|
199
|
+
extra_query: Query | None = None,
|
|
200
|
+
extra_body: Body | None = None,
|
|
201
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
202
|
+
) -> APIDiscoveryUploadOpenAPIResponse:
|
|
203
|
+
"""
|
|
204
|
+
An API description file must adhere to the OpenAPI specification and be written
|
|
205
|
+
in YAML or JSON format. The file name should be provided as the value for the
|
|
206
|
+
`file_name` parameter. The contents of the file must be base64 encoded and
|
|
207
|
+
supplied as the value for the `file_data` parameter.
|
|
208
|
+
|
|
209
|
+
Args:
|
|
210
|
+
domain_id: The domain ID
|
|
211
|
+
|
|
212
|
+
file_data: Base64 representation of the description file. Supported formats are YAML and
|
|
213
|
+
JSON, and it must adhere to OpenAPI versions 2, 3, or 3.1.
|
|
214
|
+
|
|
215
|
+
file_name: The name of the file
|
|
216
|
+
|
|
217
|
+
extra_headers: Send extra headers
|
|
218
|
+
|
|
219
|
+
extra_query: Add additional query parameters to the request
|
|
220
|
+
|
|
221
|
+
extra_body: Add additional JSON properties to the request
|
|
222
|
+
|
|
223
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
224
|
+
"""
|
|
225
|
+
return self._post(
|
|
226
|
+
f"/waap/v1/domains/{domain_id}/api-discovery/upload",
|
|
227
|
+
body=maybe_transform(
|
|
228
|
+
{
|
|
229
|
+
"file_data": file_data,
|
|
230
|
+
"file_name": file_name,
|
|
231
|
+
},
|
|
232
|
+
api_discovery_upload_openapi_params.APIDiscoveryUploadOpenAPIParams,
|
|
233
|
+
),
|
|
234
|
+
options=make_request_options(
|
|
235
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
236
|
+
),
|
|
237
|
+
cast_to=APIDiscoveryUploadOpenAPIResponse,
|
|
238
|
+
)
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
class AsyncAPIDiscoveryResource(AsyncAPIResource):
|
|
242
|
+
@cached_property
|
|
243
|
+
def scan_results(self) -> AsyncScanResultsResource:
|
|
244
|
+
return AsyncScanResultsResource(self._client)
|
|
245
|
+
|
|
246
|
+
@cached_property
|
|
247
|
+
def with_raw_response(self) -> AsyncAPIDiscoveryResourceWithRawResponse:
|
|
248
|
+
"""
|
|
249
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
250
|
+
the raw response object instead of the parsed content.
|
|
251
|
+
|
|
252
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
253
|
+
"""
|
|
254
|
+
return AsyncAPIDiscoveryResourceWithRawResponse(self)
|
|
255
|
+
|
|
256
|
+
@cached_property
|
|
257
|
+
def with_streaming_response(self) -> AsyncAPIDiscoveryResourceWithStreamingResponse:
|
|
258
|
+
"""
|
|
259
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
260
|
+
|
|
261
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
262
|
+
"""
|
|
263
|
+
return AsyncAPIDiscoveryResourceWithStreamingResponse(self)
|
|
264
|
+
|
|
265
|
+
async def get_settings(
|
|
266
|
+
self,
|
|
267
|
+
domain_id: int,
|
|
268
|
+
*,
|
|
269
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
270
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
271
|
+
extra_headers: Headers | None = None,
|
|
272
|
+
extra_query: Query | None = None,
|
|
273
|
+
extra_body: Body | None = None,
|
|
274
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
275
|
+
) -> APIDiscoveryGetSettingsResponse:
|
|
276
|
+
"""
|
|
277
|
+
Retrieve the API discovery settings for a domain
|
|
278
|
+
|
|
279
|
+
Args:
|
|
280
|
+
domain_id: The domain ID
|
|
281
|
+
|
|
282
|
+
extra_headers: Send extra headers
|
|
283
|
+
|
|
284
|
+
extra_query: Add additional query parameters to the request
|
|
285
|
+
|
|
286
|
+
extra_body: Add additional JSON properties to the request
|
|
287
|
+
|
|
288
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
289
|
+
"""
|
|
290
|
+
return await self._get(
|
|
291
|
+
f"/waap/v1/domains/{domain_id}/api-discovery/settings",
|
|
292
|
+
options=make_request_options(
|
|
293
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
294
|
+
),
|
|
295
|
+
cast_to=APIDiscoveryGetSettingsResponse,
|
|
296
|
+
)
|
|
297
|
+
|
|
298
|
+
async def scan_openapi(
|
|
299
|
+
self,
|
|
300
|
+
domain_id: int,
|
|
301
|
+
*,
|
|
302
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
303
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
304
|
+
extra_headers: Headers | None = None,
|
|
305
|
+
extra_query: Query | None = None,
|
|
306
|
+
extra_body: Body | None = None,
|
|
307
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
308
|
+
) -> APIDiscoveryScanOpenAPIResponse:
|
|
309
|
+
"""Scan an API description file hosted online.
|
|
310
|
+
|
|
311
|
+
The file must be in YAML or JSON
|
|
312
|
+
format and adhere to the OpenAPI specification. The location of the API
|
|
313
|
+
description file should be specified in the API discovery settings.
|
|
314
|
+
|
|
315
|
+
Args:
|
|
316
|
+
domain_id: The domain ID
|
|
317
|
+
|
|
318
|
+
extra_headers: Send extra headers
|
|
319
|
+
|
|
320
|
+
extra_query: Add additional query parameters to the request
|
|
321
|
+
|
|
322
|
+
extra_body: Add additional JSON properties to the request
|
|
323
|
+
|
|
324
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
325
|
+
"""
|
|
326
|
+
return await self._post(
|
|
327
|
+
f"/waap/v1/domains/{domain_id}/api-discovery/scan",
|
|
328
|
+
options=make_request_options(
|
|
329
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
330
|
+
),
|
|
331
|
+
cast_to=APIDiscoveryScanOpenAPIResponse,
|
|
332
|
+
)
|
|
333
|
+
|
|
334
|
+
async def update_settings(
|
|
335
|
+
self,
|
|
336
|
+
domain_id: int,
|
|
337
|
+
*,
|
|
338
|
+
description_file_location: Optional[str] | NotGiven = NOT_GIVEN,
|
|
339
|
+
description_file_scan_enabled: Optional[bool] | NotGiven = NOT_GIVEN,
|
|
340
|
+
description_file_scan_interval_hours: Optional[int] | NotGiven = NOT_GIVEN,
|
|
341
|
+
traffic_scan_enabled: Optional[bool] | NotGiven = NOT_GIVEN,
|
|
342
|
+
traffic_scan_interval_hours: Optional[int] | NotGiven = NOT_GIVEN,
|
|
343
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
344
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
345
|
+
extra_headers: Headers | None = None,
|
|
346
|
+
extra_query: Query | None = None,
|
|
347
|
+
extra_body: Body | None = None,
|
|
348
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
349
|
+
) -> APIDiscoveryUpdateSettingsResponse:
|
|
350
|
+
"""
|
|
351
|
+
Update the API discovery settings for a domain
|
|
352
|
+
|
|
353
|
+
Args:
|
|
354
|
+
domain_id: The domain ID
|
|
355
|
+
|
|
356
|
+
description_file_location: The URL of the API description file. This will be periodically scanned if
|
|
357
|
+
`descriptionFileScanEnabled` is enabled. Supported formats are YAML and JSON,
|
|
358
|
+
and it must adhere to OpenAPI versions 2, 3, or 3.1.
|
|
359
|
+
|
|
360
|
+
description_file_scan_enabled: Indicates if periodic scan of the description file is enabled
|
|
361
|
+
|
|
362
|
+
description_file_scan_interval_hours: The interval in hours for scanning the description file
|
|
363
|
+
|
|
364
|
+
traffic_scan_enabled: Indicates if traffic scan is enabled
|
|
365
|
+
|
|
366
|
+
traffic_scan_interval_hours: The interval in hours for scanning the traffic
|
|
367
|
+
|
|
368
|
+
extra_headers: Send extra headers
|
|
369
|
+
|
|
370
|
+
extra_query: Add additional query parameters to the request
|
|
371
|
+
|
|
372
|
+
extra_body: Add additional JSON properties to the request
|
|
373
|
+
|
|
374
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
375
|
+
"""
|
|
376
|
+
return await self._patch(
|
|
377
|
+
f"/waap/v1/domains/{domain_id}/api-discovery/settings",
|
|
378
|
+
body=await async_maybe_transform(
|
|
379
|
+
{
|
|
380
|
+
"description_file_location": description_file_location,
|
|
381
|
+
"description_file_scan_enabled": description_file_scan_enabled,
|
|
382
|
+
"description_file_scan_interval_hours": description_file_scan_interval_hours,
|
|
383
|
+
"traffic_scan_enabled": traffic_scan_enabled,
|
|
384
|
+
"traffic_scan_interval_hours": traffic_scan_interval_hours,
|
|
385
|
+
},
|
|
386
|
+
api_discovery_update_settings_params.APIDiscoveryUpdateSettingsParams,
|
|
387
|
+
),
|
|
388
|
+
options=make_request_options(
|
|
389
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
390
|
+
),
|
|
391
|
+
cast_to=APIDiscoveryUpdateSettingsResponse,
|
|
392
|
+
)
|
|
393
|
+
|
|
394
|
+
async def upload_openapi(
|
|
395
|
+
self,
|
|
396
|
+
domain_id: int,
|
|
397
|
+
*,
|
|
398
|
+
file_data: str,
|
|
399
|
+
file_name: str,
|
|
400
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
401
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
402
|
+
extra_headers: Headers | None = None,
|
|
403
|
+
extra_query: Query | None = None,
|
|
404
|
+
extra_body: Body | None = None,
|
|
405
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
406
|
+
) -> APIDiscoveryUploadOpenAPIResponse:
|
|
407
|
+
"""
|
|
408
|
+
An API description file must adhere to the OpenAPI specification and be written
|
|
409
|
+
in YAML or JSON format. The file name should be provided as the value for the
|
|
410
|
+
`file_name` parameter. The contents of the file must be base64 encoded and
|
|
411
|
+
supplied as the value for the `file_data` parameter.
|
|
412
|
+
|
|
413
|
+
Args:
|
|
414
|
+
domain_id: The domain ID
|
|
415
|
+
|
|
416
|
+
file_data: Base64 representation of the description file. Supported formats are YAML and
|
|
417
|
+
JSON, and it must adhere to OpenAPI versions 2, 3, or 3.1.
|
|
418
|
+
|
|
419
|
+
file_name: The name of the file
|
|
420
|
+
|
|
421
|
+
extra_headers: Send extra headers
|
|
422
|
+
|
|
423
|
+
extra_query: Add additional query parameters to the request
|
|
424
|
+
|
|
425
|
+
extra_body: Add additional JSON properties to the request
|
|
426
|
+
|
|
427
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
428
|
+
"""
|
|
429
|
+
return await self._post(
|
|
430
|
+
f"/waap/v1/domains/{domain_id}/api-discovery/upload",
|
|
431
|
+
body=await async_maybe_transform(
|
|
432
|
+
{
|
|
433
|
+
"file_data": file_data,
|
|
434
|
+
"file_name": file_name,
|
|
435
|
+
},
|
|
436
|
+
api_discovery_upload_openapi_params.APIDiscoveryUploadOpenAPIParams,
|
|
437
|
+
),
|
|
438
|
+
options=make_request_options(
|
|
439
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
440
|
+
),
|
|
441
|
+
cast_to=APIDiscoveryUploadOpenAPIResponse,
|
|
442
|
+
)
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
class APIDiscoveryResourceWithRawResponse:
|
|
446
|
+
def __init__(self, api_discovery: APIDiscoveryResource) -> None:
|
|
447
|
+
self._api_discovery = api_discovery
|
|
448
|
+
|
|
449
|
+
self.get_settings = to_raw_response_wrapper(
|
|
450
|
+
api_discovery.get_settings,
|
|
451
|
+
)
|
|
452
|
+
self.scan_openapi = to_raw_response_wrapper(
|
|
453
|
+
api_discovery.scan_openapi,
|
|
454
|
+
)
|
|
455
|
+
self.update_settings = to_raw_response_wrapper(
|
|
456
|
+
api_discovery.update_settings,
|
|
457
|
+
)
|
|
458
|
+
self.upload_openapi = to_raw_response_wrapper(
|
|
459
|
+
api_discovery.upload_openapi,
|
|
460
|
+
)
|
|
461
|
+
|
|
462
|
+
@cached_property
|
|
463
|
+
def scan_results(self) -> ScanResultsResourceWithRawResponse:
|
|
464
|
+
return ScanResultsResourceWithRawResponse(self._api_discovery.scan_results)
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
class AsyncAPIDiscoveryResourceWithRawResponse:
|
|
468
|
+
def __init__(self, api_discovery: AsyncAPIDiscoveryResource) -> None:
|
|
469
|
+
self._api_discovery = api_discovery
|
|
470
|
+
|
|
471
|
+
self.get_settings = async_to_raw_response_wrapper(
|
|
472
|
+
api_discovery.get_settings,
|
|
473
|
+
)
|
|
474
|
+
self.scan_openapi = async_to_raw_response_wrapper(
|
|
475
|
+
api_discovery.scan_openapi,
|
|
476
|
+
)
|
|
477
|
+
self.update_settings = async_to_raw_response_wrapper(
|
|
478
|
+
api_discovery.update_settings,
|
|
479
|
+
)
|
|
480
|
+
self.upload_openapi = async_to_raw_response_wrapper(
|
|
481
|
+
api_discovery.upload_openapi,
|
|
482
|
+
)
|
|
483
|
+
|
|
484
|
+
@cached_property
|
|
485
|
+
def scan_results(self) -> AsyncScanResultsResourceWithRawResponse:
|
|
486
|
+
return AsyncScanResultsResourceWithRawResponse(self._api_discovery.scan_results)
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
class APIDiscoveryResourceWithStreamingResponse:
|
|
490
|
+
def __init__(self, api_discovery: APIDiscoveryResource) -> None:
|
|
491
|
+
self._api_discovery = api_discovery
|
|
492
|
+
|
|
493
|
+
self.get_settings = to_streamed_response_wrapper(
|
|
494
|
+
api_discovery.get_settings,
|
|
495
|
+
)
|
|
496
|
+
self.scan_openapi = to_streamed_response_wrapper(
|
|
497
|
+
api_discovery.scan_openapi,
|
|
498
|
+
)
|
|
499
|
+
self.update_settings = to_streamed_response_wrapper(
|
|
500
|
+
api_discovery.update_settings,
|
|
501
|
+
)
|
|
502
|
+
self.upload_openapi = to_streamed_response_wrapper(
|
|
503
|
+
api_discovery.upload_openapi,
|
|
504
|
+
)
|
|
505
|
+
|
|
506
|
+
@cached_property
|
|
507
|
+
def scan_results(self) -> ScanResultsResourceWithStreamingResponse:
|
|
508
|
+
return ScanResultsResourceWithStreamingResponse(self._api_discovery.scan_results)
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
class AsyncAPIDiscoveryResourceWithStreamingResponse:
|
|
512
|
+
def __init__(self, api_discovery: AsyncAPIDiscoveryResource) -> None:
|
|
513
|
+
self._api_discovery = api_discovery
|
|
514
|
+
|
|
515
|
+
self.get_settings = async_to_streamed_response_wrapper(
|
|
516
|
+
api_discovery.get_settings,
|
|
517
|
+
)
|
|
518
|
+
self.scan_openapi = async_to_streamed_response_wrapper(
|
|
519
|
+
api_discovery.scan_openapi,
|
|
520
|
+
)
|
|
521
|
+
self.update_settings = async_to_streamed_response_wrapper(
|
|
522
|
+
api_discovery.update_settings,
|
|
523
|
+
)
|
|
524
|
+
self.upload_openapi = async_to_streamed_response_wrapper(
|
|
525
|
+
api_discovery.upload_openapi,
|
|
526
|
+
)
|
|
527
|
+
|
|
528
|
+
@cached_property
|
|
529
|
+
def scan_results(self) -> AsyncScanResultsResourceWithStreamingResponse:
|
|
530
|
+
return AsyncScanResultsResourceWithStreamingResponse(self._api_discovery.scan_results)
|