2
2
3
3
from __future__ import annotations
4
4
5
+ from typing import Optional
6
+
5
7
import httpx
6
8
7
9
from ..._types import NOT_GIVEN , Body , Query , Headers , NotGiven
17
19
from ...pagination import SyncV4PagePagination , AsyncV4PagePagination
18
20
from ...types .intel import dns_list_params
19
21
from ..._base_client import AsyncPaginator , make_request_options
20
- from ...types .intel .dns_list_response import DNSListResponse
22
+ from ...types .intel .dns import DNS
21
23
22
24
__all__ = ["DNSResource" , "AsyncDNSResource" ]
23
25
@@ -56,7 +58,7 @@ def list(
56
58
extra_query : Query | None = None ,
57
59
extra_body : Body | None = None ,
58
60
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
59
- ) -> SyncV4PagePagination [DNSListResponse ]:
61
+ ) -> SyncV4PagePagination [Optional [ DNS ] ]:
60
62
"""
61
63
Gets a list of all the domains that have resolved to a specific IP address.
62
64
@@ -79,7 +81,7 @@ def list(
79
81
raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
80
82
return self ._get_api_list (
81
83
f"/accounts/{ account_id } /intel/dns" ,
82
- page = SyncV4PagePagination [DNSListResponse ],
84
+ page = SyncV4PagePagination [Optional [ DNS ] ],
83
85
options = make_request_options (
84
86
extra_headers = extra_headers ,
85
87
extra_query = extra_query ,
@@ -95,7 +97,7 @@ def list(
95
97
dns_list_params .DNSListParams ,
96
98
),
97
99
),
98
- model = DNSListResponse ,
100
+ model = DNS ,
99
101
)
100
102
101
103
@@ -133,7 +135,7 @@ def list(
133
135
extra_query : Query | None = None ,
134
136
extra_body : Body | None = None ,
135
137
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
136
- ) -> AsyncPaginator [DNSListResponse , AsyncV4PagePagination [DNSListResponse ]]:
138
+ ) -> AsyncPaginator [Optional [ DNS ] , AsyncV4PagePagination [Optional [ DNS ] ]]:
137
139
"""
138
140
Gets a list of all the domains that have resolved to a specific IP address.
139
141
@@ -156,7 +158,7 @@ def list(
156
158
raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
157
159
return self ._get_api_list (
158
160
f"/accounts/{ account_id } /intel/dns" ,
159
- page = AsyncV4PagePagination [DNSListResponse ],
161
+ page = AsyncV4PagePagination [Optional [ DNS ] ],
160
162
options = make_request_options (
161
163
extra_headers = extra_headers ,
162
164
extra_query = extra_query ,
@@ -172,7 +174,7 @@ def list(
172
174
dns_list_params .DNSListParams ,
173
175
),
174
176
),
175
- model = DNSListResponse ,
177
+ model = DNS ,
176
178
)
177
179
178
180
0 commit comments