1919)
2020from ...._wrappers import ResultWrapper
2121from ...._base_client import make_request_options
22- from ....types .radar .entities import asn_ip_params , asn_get_params , asn_rel_params , asn_list_params
22+ from ....types .radar .entities import asn_ip_params , asn_get_params , asn_rel_params , asn_list_params , asn_as_set_params
2323from ....types .radar .entities .asn_ip_response import ASNIPResponse
2424from ....types .radar .entities .asn_get_response import ASNGetResponse
2525from ....types .radar .entities .asn_rel_response import ASNRelResponse
2626from ....types .radar .entities .asn_list_response import ASNListResponse
27+ from ....types .radar .entities .asn_as_set_response import ASNAsSetResponse
2728
2829__all__ = ["ASNsResource" , "AsyncASNsResource" ]
2930
@@ -112,6 +113,47 @@ def list(
112113 cast_to = cast (Type [ASNListResponse ], ResultWrapper [ASNListResponse ]),
113114 )
114115
116+ def as_set (
117+ self ,
118+ asn : int ,
119+ * ,
120+ format : Literal ["JSON" , "CSV" ] | Omit = omit ,
121+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
122+ # The extra values given here take precedence over values defined on the client or passed to this method.
123+ extra_headers : Headers | None = None ,
124+ extra_query : Query | None = None ,
125+ extra_body : Body | None = None ,
126+ timeout : float | httpx .Timeout | None | NotGiven = not_given ,
127+ ) -> ASNAsSetResponse :
128+ """
129+ Retrieves Internet Routing Registry AS-SETs that an AS is a member of.
130+
131+ Args:
132+ asn: Retrieves all AS-SETs that the given AS is a member of.
133+
134+ format: Format in which results will be returned.
135+
136+ extra_headers: Send extra headers
137+
138+ extra_query: Add additional query parameters to the request
139+
140+ extra_body: Add additional JSON properties to the request
141+
142+ timeout: Override the client-level default timeout for this request, in seconds
143+ """
144+ return self ._get (
145+ f"/radar/entities/asns/{ asn } /as_set" ,
146+ options = make_request_options (
147+ extra_headers = extra_headers ,
148+ extra_query = extra_query ,
149+ extra_body = extra_body ,
150+ timeout = timeout ,
151+ query = maybe_transform ({"format" : format }, asn_as_set_params .ASNAsSetParams ),
152+ post_parser = ResultWrapper [ASNAsSetResponse ]._unwrapper ,
153+ ),
154+ cast_to = cast (Type [ASNAsSetResponse ], ResultWrapper [ASNAsSetResponse ]),
155+ )
156+
115157 def get (
116158 self ,
117159 asn : int ,
@@ -341,6 +383,47 @@ async def list(
341383 cast_to = cast (Type [ASNListResponse ], ResultWrapper [ASNListResponse ]),
342384 )
343385
386+ async def as_set (
387+ self ,
388+ asn : int ,
389+ * ,
390+ format : Literal ["JSON" , "CSV" ] | Omit = omit ,
391+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
392+ # The extra values given here take precedence over values defined on the client or passed to this method.
393+ extra_headers : Headers | None = None ,
394+ extra_query : Query | None = None ,
395+ extra_body : Body | None = None ,
396+ timeout : float | httpx .Timeout | None | NotGiven = not_given ,
397+ ) -> ASNAsSetResponse :
398+ """
399+ Retrieves Internet Routing Registry AS-SETs that an AS is a member of.
400+
401+ Args:
402+ asn: Retrieves all AS-SETs that the given AS is a member of.
403+
404+ format: Format in which results will be returned.
405+
406+ extra_headers: Send extra headers
407+
408+ extra_query: Add additional query parameters to the request
409+
410+ extra_body: Add additional JSON properties to the request
411+
412+ timeout: Override the client-level default timeout for this request, in seconds
413+ """
414+ return await self ._get (
415+ f"/radar/entities/asns/{ asn } /as_set" ,
416+ options = make_request_options (
417+ extra_headers = extra_headers ,
418+ extra_query = extra_query ,
419+ extra_body = extra_body ,
420+ timeout = timeout ,
421+ query = await async_maybe_transform ({"format" : format }, asn_as_set_params .ASNAsSetParams ),
422+ post_parser = ResultWrapper [ASNAsSetResponse ]._unwrapper ,
423+ ),
424+ cast_to = cast (Type [ASNAsSetResponse ], ResultWrapper [ASNAsSetResponse ]),
425+ )
426+
344427 async def get (
345428 self ,
346429 asn : int ,
@@ -493,6 +576,9 @@ def __init__(self, asns: ASNsResource) -> None:
493576 self .list = to_raw_response_wrapper (
494577 asns .list ,
495578 )
579+ self .as_set = to_raw_response_wrapper (
580+ asns .as_set ,
581+ )
496582 self .get = to_raw_response_wrapper (
497583 asns .get ,
498584 )
@@ -511,6 +597,9 @@ def __init__(self, asns: AsyncASNsResource) -> None:
511597 self .list = async_to_raw_response_wrapper (
512598 asns .list ,
513599 )
600+ self .as_set = async_to_raw_response_wrapper (
601+ asns .as_set ,
602+ )
514603 self .get = async_to_raw_response_wrapper (
515604 asns .get ,
516605 )
@@ -529,6 +618,9 @@ def __init__(self, asns: ASNsResource) -> None:
529618 self .list = to_streamed_response_wrapper (
530619 asns .list ,
531620 )
621+ self .as_set = to_streamed_response_wrapper (
622+ asns .as_set ,
623+ )
532624 self .get = to_streamed_response_wrapper (
533625 asns .get ,
534626 )
@@ -547,6 +639,9 @@ def __init__(self, asns: AsyncASNsResource) -> None:
547639 self .list = async_to_streamed_response_wrapper (
548640 asns .list ,
549641 )
642+ self .as_set = async_to_streamed_response_wrapper (
643+ asns .as_set ,
644+ )
550645 self .get = async_to_streamed_response_wrapper (
551646 asns .get ,
552647 )
0 commit comments