gcore 0.2.0__py3-none-any.whl → 0.3.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/_base_client.py +22 -2
- gcore/_models.py +2 -0
- gcore/_types.py +2 -0
- gcore/_version.py +1 -1
- gcore/resources/cloud/baremetal/flavors.py +2 -2
- gcore/resources/cloud/baremetal/images.py +2 -2
- gcore/resources/cloud/baremetal/servers.py +46 -52
- gcore/resources/cloud/floating_ips.py +4 -4
- gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +8 -8
- gcore/resources/cloud/gpu_baremetal_clusters/images.py +2 -2
- gcore/resources/cloud/gpu_baremetal_clusters/servers.py +4 -4
- gcore/resources/cloud/inference/deployments/deployments.py +6 -6
- gcore/resources/cloud/instances/flavors.py +2 -2
- gcore/resources/cloud/instances/images.py +2 -2
- gcore/resources/cloud/instances/instances.py +62 -70
- gcore/resources/cloud/instances/interfaces.py +4 -4
- gcore/resources/cloud/load_balancers/flavors.py +2 -2
- gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +20 -20
- gcore/resources/cloud/load_balancers/listeners.py +14 -14
- gcore/resources/cloud/load_balancers/load_balancers.py +28 -24
- gcore/resources/cloud/load_balancers/pools/members.py +6 -6
- gcore/resources/cloud/networks/networks.py +4 -4
- gcore/resources/cloud/networks/subnets.py +6 -6
- gcore/resources/cloud/registries/registries.py +6 -10
- gcore/resources/cloud/registries/users.py +4 -10
- gcore/resources/cloud/reserved_fixed_ips/reserved_fixed_ips.py +10 -10
- gcore/resources/cloud/security_groups/security_groups.py +2 -2
- gcore/resources/cloud/ssh_keys.py +2 -2
- gcore/resources/cloud/tasks.py +98 -90
- gcore/resources/cloud/users/role_assignments.py +4 -4
- gcore/resources/cloud/volumes.py +18 -18
- gcore/resources/waap/__init__.py +98 -0
- gcore/resources/waap/advanced_rules.py +135 -0
- gcore/resources/waap/clients.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 +289 -0
- gcore/types/cloud/allowed_address_pairs.py +2 -2
- gcore/types/cloud/baremetal/baremetal_server.py +1 -1
- gcore/types/cloud/baremetal/image_list_params.py +1 -1
- gcore/types/cloud/baremetal/server_create_params.py +9 -9
- gcore/types/cloud/baremetal/server_list_params.py +8 -8
- 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/floating_ip_detailed.py +1 -1
- gcore/types/cloud/floating_ip_list_params.py +2 -2
- gcore/types/cloud/gpu_baremetal_cluster.py +1 -1
- gcore/types/cloud/gpu_baremetal_cluster_create_params.py +2 -2
- 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 +1 -1
- 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/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 +8 -10
- gcore/types/cloud/instance_list_params.py +8 -8
- gcore/types/cloud/instances/flavor_list_suitable_params.py +4 -1
- gcore/types/cloud/instances/image_list_params.py +1 -1
- 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 +17 -15
- 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 -5
- gcore/types/cloud/load_balancer_listener_detail.py +4 -4
- 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 +4 -4
- gcore/types/cloud/load_balancers/pool_update_params.py +4 -4
- gcore/types/cloud/load_balancers/pools/member_add_params.py +3 -3
- gcore/types/cloud/member.py +2 -2
- gcore/types/cloud/network.py +2 -2
- gcore/types/cloud/network_details.py +2 -2
- gcore/types/cloud/network_list_params.py +2 -2
- gcore/types/cloud/networks/subnet_create_params.py +1 -1
- gcore/types/cloud/networks/subnet_list_params.py +2 -2
- gcore/types/cloud/region.py +4 -4
- gcore/types/cloud/registries/user_create_multiple_params.py +3 -5
- gcore/types/cloud/registries/user_create_params.py +3 -5
- 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 +1 -1
- gcore/types/cloud/session_persistence.py +1 -1
- gcore/types/cloud/ssh_key_created.py +3 -6
- 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 -3
- gcore/types/waap/__init__.py +98 -2
- gcore/types/waap/client_me_response.py +34 -0
- 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 +368 -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 +371 -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 +373 -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.3.0.dist-info}/METADATA +1 -1
- {gcore-0.2.0.dist-info → gcore-0.3.0.dist-info}/RECORD +258 -109
- {gcore-0.2.0.dist-info → gcore-0.3.0.dist-info}/WHEEL +0 -0
- {gcore-0.2.0.dist-info → gcore-0.3.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,425 @@
|
|
|
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 List, 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 ...._resource import SyncAPIResource, AsyncAPIResource
|
|
13
|
+
from ...._response import (
|
|
14
|
+
to_raw_response_wrapper,
|
|
15
|
+
to_streamed_response_wrapper,
|
|
16
|
+
async_to_raw_response_wrapper,
|
|
17
|
+
async_to_streamed_response_wrapper,
|
|
18
|
+
)
|
|
19
|
+
from ....pagination import SyncOffsetPage, AsyncOffsetPage
|
|
20
|
+
from ....types.waap import WaapInsightSortBy, WaapInsightStatus
|
|
21
|
+
from ...._base_client import AsyncPaginator, make_request_options
|
|
22
|
+
from ....types.waap.domains import insight_list_params, insight_replace_params
|
|
23
|
+
from ....types.waap.waap_insight import WaapInsight
|
|
24
|
+
from ....types.waap.waap_insight_status import WaapInsightStatus
|
|
25
|
+
from ....types.waap.waap_insight_sort_by import WaapInsightSortBy
|
|
26
|
+
|
|
27
|
+
__all__ = ["InsightsResource", "AsyncInsightsResource"]
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class InsightsResource(SyncAPIResource):
|
|
31
|
+
@cached_property
|
|
32
|
+
def with_raw_response(self) -> InsightsResourceWithRawResponse:
|
|
33
|
+
"""
|
|
34
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
35
|
+
the raw response object instead of the parsed content.
|
|
36
|
+
|
|
37
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
38
|
+
"""
|
|
39
|
+
return InsightsResourceWithRawResponse(self)
|
|
40
|
+
|
|
41
|
+
@cached_property
|
|
42
|
+
def with_streaming_response(self) -> InsightsResourceWithStreamingResponse:
|
|
43
|
+
"""
|
|
44
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
45
|
+
|
|
46
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
47
|
+
"""
|
|
48
|
+
return InsightsResourceWithStreamingResponse(self)
|
|
49
|
+
|
|
50
|
+
def list(
|
|
51
|
+
self,
|
|
52
|
+
domain_id: int,
|
|
53
|
+
*,
|
|
54
|
+
id: Optional[List[str]] | NotGiven = NOT_GIVEN,
|
|
55
|
+
description: Optional[str] | NotGiven = NOT_GIVEN,
|
|
56
|
+
insight_type: Optional[List[str]] | NotGiven = NOT_GIVEN,
|
|
57
|
+
limit: int | NotGiven = NOT_GIVEN,
|
|
58
|
+
offset: int | NotGiven = NOT_GIVEN,
|
|
59
|
+
ordering: WaapInsightSortBy | NotGiven = NOT_GIVEN,
|
|
60
|
+
status: Optional[List[WaapInsightStatus]] | NotGiven = NOT_GIVEN,
|
|
61
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
62
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
63
|
+
extra_headers: Headers | None = None,
|
|
64
|
+
extra_query: Query | None = None,
|
|
65
|
+
extra_body: Body | None = None,
|
|
66
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
67
|
+
) -> SyncOffsetPage[WaapInsight]:
|
|
68
|
+
"""
|
|
69
|
+
Retrieve a list of insights for a specific domain.
|
|
70
|
+
|
|
71
|
+
Args:
|
|
72
|
+
domain_id: The domain ID
|
|
73
|
+
|
|
74
|
+
id: The ID of the insight
|
|
75
|
+
|
|
76
|
+
description: The description of the insight. Supports '\\**' as a wildcard.
|
|
77
|
+
|
|
78
|
+
insight_type: The type of the insight
|
|
79
|
+
|
|
80
|
+
limit: Number of items to return
|
|
81
|
+
|
|
82
|
+
offset: Number of items to skip
|
|
83
|
+
|
|
84
|
+
ordering: Sort the response by given field.
|
|
85
|
+
|
|
86
|
+
status: The status of the insight
|
|
87
|
+
|
|
88
|
+
extra_headers: Send extra headers
|
|
89
|
+
|
|
90
|
+
extra_query: Add additional query parameters to the request
|
|
91
|
+
|
|
92
|
+
extra_body: Add additional JSON properties to the request
|
|
93
|
+
|
|
94
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
95
|
+
"""
|
|
96
|
+
return self._get_api_list(
|
|
97
|
+
f"/waap/v1/domains/{domain_id}/insights",
|
|
98
|
+
page=SyncOffsetPage[WaapInsight],
|
|
99
|
+
options=make_request_options(
|
|
100
|
+
extra_headers=extra_headers,
|
|
101
|
+
extra_query=extra_query,
|
|
102
|
+
extra_body=extra_body,
|
|
103
|
+
timeout=timeout,
|
|
104
|
+
query=maybe_transform(
|
|
105
|
+
{
|
|
106
|
+
"id": id,
|
|
107
|
+
"description": description,
|
|
108
|
+
"insight_type": insight_type,
|
|
109
|
+
"limit": limit,
|
|
110
|
+
"offset": offset,
|
|
111
|
+
"ordering": ordering,
|
|
112
|
+
"status": status,
|
|
113
|
+
},
|
|
114
|
+
insight_list_params.InsightListParams,
|
|
115
|
+
),
|
|
116
|
+
),
|
|
117
|
+
model=WaapInsight,
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
def get(
|
|
121
|
+
self,
|
|
122
|
+
insight_id: str,
|
|
123
|
+
*,
|
|
124
|
+
domain_id: int,
|
|
125
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
126
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
127
|
+
extra_headers: Headers | None = None,
|
|
128
|
+
extra_query: Query | None = None,
|
|
129
|
+
extra_body: Body | None = None,
|
|
130
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
131
|
+
) -> WaapInsight:
|
|
132
|
+
"""
|
|
133
|
+
Retrieve a specific insight for a specific domain.
|
|
134
|
+
|
|
135
|
+
Args:
|
|
136
|
+
domain_id: The domain ID
|
|
137
|
+
|
|
138
|
+
extra_headers: Send extra headers
|
|
139
|
+
|
|
140
|
+
extra_query: Add additional query parameters to the request
|
|
141
|
+
|
|
142
|
+
extra_body: Add additional JSON properties to the request
|
|
143
|
+
|
|
144
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
145
|
+
"""
|
|
146
|
+
if not insight_id:
|
|
147
|
+
raise ValueError(f"Expected a non-empty value for `insight_id` but received {insight_id!r}")
|
|
148
|
+
return self._get(
|
|
149
|
+
f"/waap/v1/domains/{domain_id}/insights/{insight_id}",
|
|
150
|
+
options=make_request_options(
|
|
151
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
152
|
+
),
|
|
153
|
+
cast_to=WaapInsight,
|
|
154
|
+
)
|
|
155
|
+
|
|
156
|
+
def replace(
|
|
157
|
+
self,
|
|
158
|
+
insight_id: str,
|
|
159
|
+
*,
|
|
160
|
+
domain_id: int,
|
|
161
|
+
status: WaapInsightStatus,
|
|
162
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
163
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
164
|
+
extra_headers: Headers | None = None,
|
|
165
|
+
extra_query: Query | None = None,
|
|
166
|
+
extra_body: Body | None = None,
|
|
167
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
168
|
+
) -> WaapInsight:
|
|
169
|
+
"""
|
|
170
|
+
Update the status of an insight for a specific domain.
|
|
171
|
+
|
|
172
|
+
Args:
|
|
173
|
+
domain_id: The domain ID
|
|
174
|
+
|
|
175
|
+
insight_id: The ID of the insight
|
|
176
|
+
|
|
177
|
+
status: The different statuses an insight can have
|
|
178
|
+
|
|
179
|
+
extra_headers: Send extra headers
|
|
180
|
+
|
|
181
|
+
extra_query: Add additional query parameters to the request
|
|
182
|
+
|
|
183
|
+
extra_body: Add additional JSON properties to the request
|
|
184
|
+
|
|
185
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
186
|
+
"""
|
|
187
|
+
if not insight_id:
|
|
188
|
+
raise ValueError(f"Expected a non-empty value for `insight_id` but received {insight_id!r}")
|
|
189
|
+
return self._put(
|
|
190
|
+
f"/waap/v1/domains/{domain_id}/insights/{insight_id}",
|
|
191
|
+
body=maybe_transform({"status": status}, insight_replace_params.InsightReplaceParams),
|
|
192
|
+
options=make_request_options(
|
|
193
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
194
|
+
),
|
|
195
|
+
cast_to=WaapInsight,
|
|
196
|
+
)
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
class AsyncInsightsResource(AsyncAPIResource):
|
|
200
|
+
@cached_property
|
|
201
|
+
def with_raw_response(self) -> AsyncInsightsResourceWithRawResponse:
|
|
202
|
+
"""
|
|
203
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
204
|
+
the raw response object instead of the parsed content.
|
|
205
|
+
|
|
206
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
207
|
+
"""
|
|
208
|
+
return AsyncInsightsResourceWithRawResponse(self)
|
|
209
|
+
|
|
210
|
+
@cached_property
|
|
211
|
+
def with_streaming_response(self) -> AsyncInsightsResourceWithStreamingResponse:
|
|
212
|
+
"""
|
|
213
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
214
|
+
|
|
215
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
216
|
+
"""
|
|
217
|
+
return AsyncInsightsResourceWithStreamingResponse(self)
|
|
218
|
+
|
|
219
|
+
def list(
|
|
220
|
+
self,
|
|
221
|
+
domain_id: int,
|
|
222
|
+
*,
|
|
223
|
+
id: Optional[List[str]] | NotGiven = NOT_GIVEN,
|
|
224
|
+
description: Optional[str] | NotGiven = NOT_GIVEN,
|
|
225
|
+
insight_type: Optional[List[str]] | NotGiven = NOT_GIVEN,
|
|
226
|
+
limit: int | NotGiven = NOT_GIVEN,
|
|
227
|
+
offset: int | NotGiven = NOT_GIVEN,
|
|
228
|
+
ordering: WaapInsightSortBy | NotGiven = NOT_GIVEN,
|
|
229
|
+
status: Optional[List[WaapInsightStatus]] | NotGiven = NOT_GIVEN,
|
|
230
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
231
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
232
|
+
extra_headers: Headers | None = None,
|
|
233
|
+
extra_query: Query | None = None,
|
|
234
|
+
extra_body: Body | None = None,
|
|
235
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
236
|
+
) -> AsyncPaginator[WaapInsight, AsyncOffsetPage[WaapInsight]]:
|
|
237
|
+
"""
|
|
238
|
+
Retrieve a list of insights for a specific domain.
|
|
239
|
+
|
|
240
|
+
Args:
|
|
241
|
+
domain_id: The domain ID
|
|
242
|
+
|
|
243
|
+
id: The ID of the insight
|
|
244
|
+
|
|
245
|
+
description: The description of the insight. Supports '\\**' as a wildcard.
|
|
246
|
+
|
|
247
|
+
insight_type: The type of the insight
|
|
248
|
+
|
|
249
|
+
limit: Number of items to return
|
|
250
|
+
|
|
251
|
+
offset: Number of items to skip
|
|
252
|
+
|
|
253
|
+
ordering: Sort the response by given field.
|
|
254
|
+
|
|
255
|
+
status: The status of the insight
|
|
256
|
+
|
|
257
|
+
extra_headers: Send extra headers
|
|
258
|
+
|
|
259
|
+
extra_query: Add additional query parameters to the request
|
|
260
|
+
|
|
261
|
+
extra_body: Add additional JSON properties to the request
|
|
262
|
+
|
|
263
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
264
|
+
"""
|
|
265
|
+
return self._get_api_list(
|
|
266
|
+
f"/waap/v1/domains/{domain_id}/insights",
|
|
267
|
+
page=AsyncOffsetPage[WaapInsight],
|
|
268
|
+
options=make_request_options(
|
|
269
|
+
extra_headers=extra_headers,
|
|
270
|
+
extra_query=extra_query,
|
|
271
|
+
extra_body=extra_body,
|
|
272
|
+
timeout=timeout,
|
|
273
|
+
query=maybe_transform(
|
|
274
|
+
{
|
|
275
|
+
"id": id,
|
|
276
|
+
"description": description,
|
|
277
|
+
"insight_type": insight_type,
|
|
278
|
+
"limit": limit,
|
|
279
|
+
"offset": offset,
|
|
280
|
+
"ordering": ordering,
|
|
281
|
+
"status": status,
|
|
282
|
+
},
|
|
283
|
+
insight_list_params.InsightListParams,
|
|
284
|
+
),
|
|
285
|
+
),
|
|
286
|
+
model=WaapInsight,
|
|
287
|
+
)
|
|
288
|
+
|
|
289
|
+
async def get(
|
|
290
|
+
self,
|
|
291
|
+
insight_id: str,
|
|
292
|
+
*,
|
|
293
|
+
domain_id: int,
|
|
294
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
295
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
296
|
+
extra_headers: Headers | None = None,
|
|
297
|
+
extra_query: Query | None = None,
|
|
298
|
+
extra_body: Body | None = None,
|
|
299
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
300
|
+
) -> WaapInsight:
|
|
301
|
+
"""
|
|
302
|
+
Retrieve a specific insight for a specific domain.
|
|
303
|
+
|
|
304
|
+
Args:
|
|
305
|
+
domain_id: The domain ID
|
|
306
|
+
|
|
307
|
+
extra_headers: Send extra headers
|
|
308
|
+
|
|
309
|
+
extra_query: Add additional query parameters to the request
|
|
310
|
+
|
|
311
|
+
extra_body: Add additional JSON properties to the request
|
|
312
|
+
|
|
313
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
314
|
+
"""
|
|
315
|
+
if not insight_id:
|
|
316
|
+
raise ValueError(f"Expected a non-empty value for `insight_id` but received {insight_id!r}")
|
|
317
|
+
return await self._get(
|
|
318
|
+
f"/waap/v1/domains/{domain_id}/insights/{insight_id}",
|
|
319
|
+
options=make_request_options(
|
|
320
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
321
|
+
),
|
|
322
|
+
cast_to=WaapInsight,
|
|
323
|
+
)
|
|
324
|
+
|
|
325
|
+
async def replace(
|
|
326
|
+
self,
|
|
327
|
+
insight_id: str,
|
|
328
|
+
*,
|
|
329
|
+
domain_id: int,
|
|
330
|
+
status: WaapInsightStatus,
|
|
331
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
332
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
333
|
+
extra_headers: Headers | None = None,
|
|
334
|
+
extra_query: Query | None = None,
|
|
335
|
+
extra_body: Body | None = None,
|
|
336
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
337
|
+
) -> WaapInsight:
|
|
338
|
+
"""
|
|
339
|
+
Update the status of an insight for a specific domain.
|
|
340
|
+
|
|
341
|
+
Args:
|
|
342
|
+
domain_id: The domain ID
|
|
343
|
+
|
|
344
|
+
insight_id: The ID of the insight
|
|
345
|
+
|
|
346
|
+
status: The different statuses an insight can have
|
|
347
|
+
|
|
348
|
+
extra_headers: Send extra headers
|
|
349
|
+
|
|
350
|
+
extra_query: Add additional query parameters to the request
|
|
351
|
+
|
|
352
|
+
extra_body: Add additional JSON properties to the request
|
|
353
|
+
|
|
354
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
355
|
+
"""
|
|
356
|
+
if not insight_id:
|
|
357
|
+
raise ValueError(f"Expected a non-empty value for `insight_id` but received {insight_id!r}")
|
|
358
|
+
return await self._put(
|
|
359
|
+
f"/waap/v1/domains/{domain_id}/insights/{insight_id}",
|
|
360
|
+
body=await async_maybe_transform({"status": status}, insight_replace_params.InsightReplaceParams),
|
|
361
|
+
options=make_request_options(
|
|
362
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
363
|
+
),
|
|
364
|
+
cast_to=WaapInsight,
|
|
365
|
+
)
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
class InsightsResourceWithRawResponse:
|
|
369
|
+
def __init__(self, insights: InsightsResource) -> None:
|
|
370
|
+
self._insights = insights
|
|
371
|
+
|
|
372
|
+
self.list = to_raw_response_wrapper(
|
|
373
|
+
insights.list,
|
|
374
|
+
)
|
|
375
|
+
self.get = to_raw_response_wrapper(
|
|
376
|
+
insights.get,
|
|
377
|
+
)
|
|
378
|
+
self.replace = to_raw_response_wrapper(
|
|
379
|
+
insights.replace,
|
|
380
|
+
)
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
class AsyncInsightsResourceWithRawResponse:
|
|
384
|
+
def __init__(self, insights: AsyncInsightsResource) -> None:
|
|
385
|
+
self._insights = insights
|
|
386
|
+
|
|
387
|
+
self.list = async_to_raw_response_wrapper(
|
|
388
|
+
insights.list,
|
|
389
|
+
)
|
|
390
|
+
self.get = async_to_raw_response_wrapper(
|
|
391
|
+
insights.get,
|
|
392
|
+
)
|
|
393
|
+
self.replace = async_to_raw_response_wrapper(
|
|
394
|
+
insights.replace,
|
|
395
|
+
)
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
class InsightsResourceWithStreamingResponse:
|
|
399
|
+
def __init__(self, insights: InsightsResource) -> None:
|
|
400
|
+
self._insights = insights
|
|
401
|
+
|
|
402
|
+
self.list = to_streamed_response_wrapper(
|
|
403
|
+
insights.list,
|
|
404
|
+
)
|
|
405
|
+
self.get = to_streamed_response_wrapper(
|
|
406
|
+
insights.get,
|
|
407
|
+
)
|
|
408
|
+
self.replace = to_streamed_response_wrapper(
|
|
409
|
+
insights.replace,
|
|
410
|
+
)
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
class AsyncInsightsResourceWithStreamingResponse:
|
|
414
|
+
def __init__(self, insights: AsyncInsightsResource) -> None:
|
|
415
|
+
self._insights = insights
|
|
416
|
+
|
|
417
|
+
self.list = async_to_streamed_response_wrapper(
|
|
418
|
+
insights.list,
|
|
419
|
+
)
|
|
420
|
+
self.get = async_to_streamed_response_wrapper(
|
|
421
|
+
insights.get,
|
|
422
|
+
)
|
|
423
|
+
self.replace = async_to_streamed_response_wrapper(
|
|
424
|
+
insights.replace,
|
|
425
|
+
)
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
8
|
+
from ...._compat import cached_property
|
|
9
|
+
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
10
|
+
from ...._response import (
|
|
11
|
+
to_raw_response_wrapper,
|
|
12
|
+
to_streamed_response_wrapper,
|
|
13
|
+
async_to_raw_response_wrapper,
|
|
14
|
+
async_to_streamed_response_wrapper,
|
|
15
|
+
)
|
|
16
|
+
from ...._base_client import make_request_options
|
|
17
|
+
from ....types.waap.waap_policy_mode import WaapPolicyMode
|
|
18
|
+
|
|
19
|
+
__all__ = ["PoliciesResource", "AsyncPoliciesResource"]
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class PoliciesResource(SyncAPIResource):
|
|
23
|
+
@cached_property
|
|
24
|
+
def with_raw_response(self) -> PoliciesResourceWithRawResponse:
|
|
25
|
+
"""
|
|
26
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
27
|
+
the raw response object instead of the parsed content.
|
|
28
|
+
|
|
29
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
30
|
+
"""
|
|
31
|
+
return PoliciesResourceWithRawResponse(self)
|
|
32
|
+
|
|
33
|
+
@cached_property
|
|
34
|
+
def with_streaming_response(self) -> PoliciesResourceWithStreamingResponse:
|
|
35
|
+
"""
|
|
36
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
37
|
+
|
|
38
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
39
|
+
"""
|
|
40
|
+
return PoliciesResourceWithStreamingResponse(self)
|
|
41
|
+
|
|
42
|
+
def toggle(
|
|
43
|
+
self,
|
|
44
|
+
policy_id: str,
|
|
45
|
+
*,
|
|
46
|
+
domain_id: int,
|
|
47
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
48
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
49
|
+
extra_headers: Headers | None = None,
|
|
50
|
+
extra_query: Query | None = None,
|
|
51
|
+
extra_body: Body | None = None,
|
|
52
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
53
|
+
) -> WaapPolicyMode:
|
|
54
|
+
"""
|
|
55
|
+
Modify the activation state of a policy associated with a domain
|
|
56
|
+
|
|
57
|
+
Args:
|
|
58
|
+
domain_id: The domain ID
|
|
59
|
+
|
|
60
|
+
policy_id: The ID of the policy to toggle
|
|
61
|
+
|
|
62
|
+
extra_headers: Send extra headers
|
|
63
|
+
|
|
64
|
+
extra_query: Add additional query parameters to the request
|
|
65
|
+
|
|
66
|
+
extra_body: Add additional JSON properties to the request
|
|
67
|
+
|
|
68
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
69
|
+
"""
|
|
70
|
+
if not policy_id:
|
|
71
|
+
raise ValueError(f"Expected a non-empty value for `policy_id` but received {policy_id!r}")
|
|
72
|
+
return self._patch(
|
|
73
|
+
f"/waap/v1/domains/{domain_id}/policies/{policy_id}/toggle",
|
|
74
|
+
options=make_request_options(
|
|
75
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
76
|
+
),
|
|
77
|
+
cast_to=WaapPolicyMode,
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
class AsyncPoliciesResource(AsyncAPIResource):
|
|
82
|
+
@cached_property
|
|
83
|
+
def with_raw_response(self) -> AsyncPoliciesResourceWithRawResponse:
|
|
84
|
+
"""
|
|
85
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
86
|
+
the raw response object instead of the parsed content.
|
|
87
|
+
|
|
88
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
89
|
+
"""
|
|
90
|
+
return AsyncPoliciesResourceWithRawResponse(self)
|
|
91
|
+
|
|
92
|
+
@cached_property
|
|
93
|
+
def with_streaming_response(self) -> AsyncPoliciesResourceWithStreamingResponse:
|
|
94
|
+
"""
|
|
95
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
96
|
+
|
|
97
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
98
|
+
"""
|
|
99
|
+
return AsyncPoliciesResourceWithStreamingResponse(self)
|
|
100
|
+
|
|
101
|
+
async def toggle(
|
|
102
|
+
self,
|
|
103
|
+
policy_id: str,
|
|
104
|
+
*,
|
|
105
|
+
domain_id: int,
|
|
106
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
107
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
108
|
+
extra_headers: Headers | None = None,
|
|
109
|
+
extra_query: Query | None = None,
|
|
110
|
+
extra_body: Body | None = None,
|
|
111
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
112
|
+
) -> WaapPolicyMode:
|
|
113
|
+
"""
|
|
114
|
+
Modify the activation state of a policy associated with a domain
|
|
115
|
+
|
|
116
|
+
Args:
|
|
117
|
+
domain_id: The domain ID
|
|
118
|
+
|
|
119
|
+
policy_id: The ID of the policy to toggle
|
|
120
|
+
|
|
121
|
+
extra_headers: Send extra headers
|
|
122
|
+
|
|
123
|
+
extra_query: Add additional query parameters to the request
|
|
124
|
+
|
|
125
|
+
extra_body: Add additional JSON properties to the request
|
|
126
|
+
|
|
127
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
128
|
+
"""
|
|
129
|
+
if not policy_id:
|
|
130
|
+
raise ValueError(f"Expected a non-empty value for `policy_id` but received {policy_id!r}")
|
|
131
|
+
return await self._patch(
|
|
132
|
+
f"/waap/v1/domains/{domain_id}/policies/{policy_id}/toggle",
|
|
133
|
+
options=make_request_options(
|
|
134
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
135
|
+
),
|
|
136
|
+
cast_to=WaapPolicyMode,
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
class PoliciesResourceWithRawResponse:
|
|
141
|
+
def __init__(self, policies: PoliciesResource) -> None:
|
|
142
|
+
self._policies = policies
|
|
143
|
+
|
|
144
|
+
self.toggle = to_raw_response_wrapper(
|
|
145
|
+
policies.toggle,
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
class AsyncPoliciesResourceWithRawResponse:
|
|
150
|
+
def __init__(self, policies: AsyncPoliciesResource) -> None:
|
|
151
|
+
self._policies = policies
|
|
152
|
+
|
|
153
|
+
self.toggle = async_to_raw_response_wrapper(
|
|
154
|
+
policies.toggle,
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
class PoliciesResourceWithStreamingResponse:
|
|
159
|
+
def __init__(self, policies: PoliciesResource) -> None:
|
|
160
|
+
self._policies = policies
|
|
161
|
+
|
|
162
|
+
self.toggle = to_streamed_response_wrapper(
|
|
163
|
+
policies.toggle,
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
class AsyncPoliciesResourceWithStreamingResponse:
|
|
168
|
+
def __init__(self, policies: AsyncPoliciesResource) -> None:
|
|
169
|
+
self._policies = policies
|
|
170
|
+
|
|
171
|
+
self.toggle = async_to_streamed_response_wrapper(
|
|
172
|
+
policies.toggle,
|
|
173
|
+
)
|
|
@@ -16,7 +16,7 @@ from ...._response import (
|
|
|
16
16
|
)
|
|
17
17
|
from ...._base_client import make_request_options
|
|
18
18
|
from ....types.waap.domains import setting_update_params
|
|
19
|
-
from ....types.waap.
|
|
19
|
+
from ....types.waap.waap_domain_settings_model import WaapDomainSettingsModel
|
|
20
20
|
|
|
21
21
|
__all__ = ["SettingsResource", "AsyncSettingsResource"]
|
|
22
22
|
|
|
@@ -98,7 +98,7 @@ class SettingsResource(SyncAPIResource):
|
|
|
98
98
|
extra_query: Query | None = None,
|
|
99
99
|
extra_body: Body | None = None,
|
|
100
100
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
101
|
-
) ->
|
|
101
|
+
) -> WaapDomainSettingsModel:
|
|
102
102
|
"""
|
|
103
103
|
Retrieve settings for a specific domain
|
|
104
104
|
|
|
@@ -118,7 +118,7 @@ class SettingsResource(SyncAPIResource):
|
|
|
118
118
|
options=make_request_options(
|
|
119
119
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
120
120
|
),
|
|
121
|
-
cast_to=
|
|
121
|
+
cast_to=WaapDomainSettingsModel,
|
|
122
122
|
)
|
|
123
123
|
|
|
124
124
|
|
|
@@ -199,7 +199,7 @@ class AsyncSettingsResource(AsyncAPIResource):
|
|
|
199
199
|
extra_query: Query | None = None,
|
|
200
200
|
extra_body: Body | None = None,
|
|
201
201
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
202
|
-
) ->
|
|
202
|
+
) -> WaapDomainSettingsModel:
|
|
203
203
|
"""
|
|
204
204
|
Retrieve settings for a specific domain
|
|
205
205
|
|
|
@@ -219,7 +219,7 @@ class AsyncSettingsResource(AsyncAPIResource):
|
|
|
219
219
|
options=make_request_options(
|
|
220
220
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
221
221
|
),
|
|
222
|
-
cast_to=
|
|
222
|
+
cast_to=WaapDomainSettingsModel,
|
|
223
223
|
)
|
|
224
224
|
|
|
225
225
|
|