diff --git a/README.md b/README.md index 8047c97241d..6456b071eb0 100644 --- a/README.md +++ b/README.md @@ -30,12 +30,12 @@ client = Cloudflare( api_email=os.environ.get("CLOUDFLARE_EMAIL"), ) -zone_create_response = client.zones.create( +zone = client.zones.create( account={"id": "023e105f4ecef8ad9ca31a8372d0c353"}, name="example.com", type="full", ) -print(zone_create_response.id) +print(zone.id) ``` While you can provide a `api_email` keyword argument, @@ -59,12 +59,12 @@ client = AsyncCloudflare( async def main() -> None: - zone_create_response = await client.zones.create( + zone = await client.zones.create( account={"id": "023e105f4ecef8ad9ca31a8372d0c353"}, name="example.com", type="full", ) - print(zone_create_response.id) + print(zone.id) asyncio.run(main()) diff --git a/api.md b/api.md index f55e7eea8ad..aaf8d4f374b 100644 --- a/api.md +++ b/api.md @@ -358,23 +358,16 @@ Methods: Types: ```python -from cloudflare.types import ( - Zone, - ZoneCreateResponse, - ZoneListResponse, - ZoneDeleteResponse, - ZoneEditResponse, - ZoneGetResponse, -) +from cloudflare.types import Zone, ZoneDeleteResponse ``` Methods: -- client.zones.create(\*\*params) -> Optional -- client.zones.list(\*\*params) -> SyncV4PagePaginationArray[ZoneListResponse] +- client.zones.create(\*\*params) -> Optional +- client.zones.list(\*\*params) -> SyncV4PagePaginationArray[Zone] - client.zones.delete(\*, zone_id) -> Optional -- client.zones.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.get(\*, zone_id) -> Optional +- client.zones.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.get(\*, zone_id) -> Optional ## ActivationCheck @@ -1664,13 +1657,8 @@ Types: ```python from cloudflare.types.dns import ( DNSRecord, - RecordCreateResponse, - RecordUpdateResponse, - RecordListResponse, RecordDeleteResponse, - RecordEditResponse, RecordExportResponse, - RecordGetResponse, RecordImportResponse, RecordScanResponse, ) @@ -1678,13 +1666,13 @@ from cloudflare.types.dns import ( Methods: -- client.dns.records.create(\*, zone_id, \*\*params) -> RecordCreateResponse -- client.dns.records.update(dns_record_id, \*, zone_id, \*\*params) -> RecordUpdateResponse -- client.dns.records.list(\*, zone_id, \*\*params) -> SyncV4PagePaginationArray[RecordListResponse] +- client.dns.records.create(\*, zone_id, \*\*params) -> DNSRecord +- client.dns.records.update(dns_record_id, \*, zone_id, \*\*params) -> DNSRecord +- client.dns.records.list(\*, zone_id, \*\*params) -> SyncV4PagePaginationArray[DNSRecord] - client.dns.records.delete(dns_record_id, \*, zone_id) -> Optional -- client.dns.records.edit(dns_record_id, \*, zone_id, \*\*params) -> RecordEditResponse +- client.dns.records.edit(dns_record_id, \*, zone_id, \*\*params) -> DNSRecord - client.dns.records.export(\*, zone_id) -> str -- client.dns.records.get(dns_record_id, \*, zone_id) -> RecordGetResponse +- client.dns.records.get(dns_record_id, \*, zone_id) -> DNSRecord - client.dns.records.import\_(\*, zone_id, \*\*params) -> RecordImportResponse - client.dns.records.scan(\*, zone_id) -> RecordScanResponse diff --git a/src/cloudflare/resources/dns/records.py b/src/cloudflare/resources/dns/records.py index c7328d36034..8ac3ffeca6b 100644 --- a/src/cloudflare/resources/dns/records.py +++ b/src/cloudflare/resources/dns/records.py @@ -22,14 +22,10 @@ ) from ..._wrappers import ResultWrapper from ...types.dns import ( - RecordGetResponse, - RecordEditResponse, - RecordListResponse, + DNSRecord, RecordScanResponse, - RecordCreateResponse, RecordDeleteResponse, RecordImportResponse, - RecordUpdateResponse, record_edit_params, record_list_params, record_create_params, @@ -95,7 +91,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RecordCreateResponse: + ) -> DNSRecord: """ Create a new DNS record for a zone. @@ -141,7 +137,7 @@ def create( if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return cast( - RecordCreateResponse, + DNSRecord, self._post( f"/zones/{zone_id}/dns_records", body=maybe_transform( @@ -167,7 +163,7 @@ def create( post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Any, ResultWrapper[RecordCreateResponse] + Any, ResultWrapper[DNSRecord] ), # Union types cannot be passed in as arguments in the type system ), ) @@ -214,7 +210,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RecordUpdateResponse: + ) -> DNSRecord: """Overwrite an existing DNS record. Notes: @@ -263,7 +259,7 @@ def update( if not dns_record_id: raise ValueError(f"Expected a non-empty value for `dns_record_id` but received {dns_record_id!r}") return cast( - RecordUpdateResponse, + DNSRecord, self._put( f"/zones/{zone_id}/dns_records/{dns_record_id}", body=maybe_transform( @@ -289,7 +285,7 @@ def update( post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Any, ResultWrapper[RecordUpdateResponse] + Any, ResultWrapper[DNSRecord] ), # Union types cannot be passed in as arguments in the type system ), ) @@ -339,7 +335,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncV4PagePaginationArray[RecordListResponse]: + ) -> SyncV4PagePaginationArray[DNSRecord]: """ List, search, sort, and filter a zones' DNS records. @@ -391,7 +387,7 @@ def list( raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return self._get_api_list( f"/zones/{zone_id}/dns_records", - page=SyncV4PagePaginationArray[RecordListResponse], + page=SyncV4PagePaginationArray[DNSRecord], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -416,7 +412,7 @@ def list( record_list_params.RecordListParams, ), ), - model=cast(Any, RecordListResponse), # Union types cannot be passed in as arguments in the type system + model=cast(Any, DNSRecord), # Union types cannot be passed in as arguments in the type system ) def delete( @@ -505,7 +501,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RecordEditResponse: + ) -> DNSRecord: """Update an existing DNS record. Notes: @@ -554,7 +550,7 @@ def edit( if not dns_record_id: raise ValueError(f"Expected a non-empty value for `dns_record_id` but received {dns_record_id!r}") return cast( - RecordEditResponse, + DNSRecord, self._patch( f"/zones/{zone_id}/dns_records/{dns_record_id}", body=maybe_transform( @@ -580,7 +576,7 @@ def edit( post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Any, ResultWrapper[RecordEditResponse] + Any, ResultWrapper[DNSRecord] ), # Union types cannot be passed in as arguments in the type system ), ) @@ -638,7 +634,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RecordGetResponse: + ) -> DNSRecord: """ DNS Record Details @@ -660,7 +656,7 @@ def get( if not dns_record_id: raise ValueError(f"Expected a non-empty value for `dns_record_id` but received {dns_record_id!r}") return cast( - RecordGetResponse, + DNSRecord, self._get( f"/zones/{zone_id}/dns_records/{dns_record_id}", options=make_request_options( @@ -671,7 +667,7 @@ def get( post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Any, ResultWrapper[RecordGetResponse] + Any, ResultWrapper[DNSRecord] ), # Union types cannot be passed in as arguments in the type system ), ) @@ -832,7 +828,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RecordCreateResponse: + ) -> DNSRecord: """ Create a new DNS record for a zone. @@ -878,7 +874,7 @@ async def create( if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return cast( - RecordCreateResponse, + DNSRecord, await self._post( f"/zones/{zone_id}/dns_records", body=await async_maybe_transform( @@ -904,7 +900,7 @@ async def create( post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Any, ResultWrapper[RecordCreateResponse] + Any, ResultWrapper[DNSRecord] ), # Union types cannot be passed in as arguments in the type system ), ) @@ -951,7 +947,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RecordUpdateResponse: + ) -> DNSRecord: """Overwrite an existing DNS record. Notes: @@ -1000,7 +996,7 @@ async def update( if not dns_record_id: raise ValueError(f"Expected a non-empty value for `dns_record_id` but received {dns_record_id!r}") return cast( - RecordUpdateResponse, + DNSRecord, await self._put( f"/zones/{zone_id}/dns_records/{dns_record_id}", body=await async_maybe_transform( @@ -1026,7 +1022,7 @@ async def update( post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Any, ResultWrapper[RecordUpdateResponse] + Any, ResultWrapper[DNSRecord] ), # Union types cannot be passed in as arguments in the type system ), ) @@ -1076,7 +1072,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[RecordListResponse, AsyncV4PagePaginationArray[RecordListResponse]]: + ) -> AsyncPaginator[DNSRecord, AsyncV4PagePaginationArray[DNSRecord]]: """ List, search, sort, and filter a zones' DNS records. @@ -1128,7 +1124,7 @@ def list( raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return self._get_api_list( f"/zones/{zone_id}/dns_records", - page=AsyncV4PagePaginationArray[RecordListResponse], + page=AsyncV4PagePaginationArray[DNSRecord], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -1153,7 +1149,7 @@ def list( record_list_params.RecordListParams, ), ), - model=cast(Any, RecordListResponse), # Union types cannot be passed in as arguments in the type system + model=cast(Any, DNSRecord), # Union types cannot be passed in as arguments in the type system ) async def delete( @@ -1242,7 +1238,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RecordEditResponse: + ) -> DNSRecord: """Update an existing DNS record. Notes: @@ -1291,7 +1287,7 @@ async def edit( if not dns_record_id: raise ValueError(f"Expected a non-empty value for `dns_record_id` but received {dns_record_id!r}") return cast( - RecordEditResponse, + DNSRecord, await self._patch( f"/zones/{zone_id}/dns_records/{dns_record_id}", body=await async_maybe_transform( @@ -1317,7 +1313,7 @@ async def edit( post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Any, ResultWrapper[RecordEditResponse] + Any, ResultWrapper[DNSRecord] ), # Union types cannot be passed in as arguments in the type system ), ) @@ -1375,7 +1371,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RecordGetResponse: + ) -> DNSRecord: """ DNS Record Details @@ -1397,7 +1393,7 @@ async def get( if not dns_record_id: raise ValueError(f"Expected a non-empty value for `dns_record_id` but received {dns_record_id!r}") return cast( - RecordGetResponse, + DNSRecord, await self._get( f"/zones/{zone_id}/dns_records/{dns_record_id}", options=make_request_options( @@ -1408,7 +1404,7 @@ async def get( post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Any, ResultWrapper[RecordGetResponse] + Any, ResultWrapper[DNSRecord] ), # Union types cannot be passed in as arguments in the type system ), ) diff --git a/src/cloudflare/resources/zero_trust/dlp/profiles/custom.py b/src/cloudflare/resources/zero_trust/dlp/profiles/custom.py index bced082d911..4a68854a3e8 100644 --- a/src/cloudflare/resources/zero_trust/dlp/profiles/custom.py +++ b/src/cloudflare/resources/zero_trust/dlp/profiles/custom.py @@ -94,6 +94,7 @@ def update( description: str | NotGiven = NOT_GIVEN, entries: Iterable[custom_update_params.Entry] | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, + ocr_enabled: bool | NotGiven = NOT_GIVEN, shared_entries: Iterable[custom_update_params.SharedEntry] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -123,6 +124,8 @@ def update( name: The name of the profile. + ocr_enabled: If true, scan images via OCR to determine if any text present matches filters. + shared_entries: Entries from other profiles (e.g. pre-defined Cloudflare profiles, or your Microsoft Information Protection profiles). @@ -147,6 +150,7 @@ def update( "description": description, "entries": entries, "name": name, + "ocr_enabled": ocr_enabled, "shared_entries": shared_entries, }, custom_update_params.CustomUpdateParams, @@ -311,6 +315,7 @@ async def update( description: str | NotGiven = NOT_GIVEN, entries: Iterable[custom_update_params.Entry] | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, + ocr_enabled: bool | NotGiven = NOT_GIVEN, shared_entries: Iterable[custom_update_params.SharedEntry] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -340,6 +345,8 @@ async def update( name: The name of the profile. + ocr_enabled: If true, scan images via OCR to determine if any text present matches filters. + shared_entries: Entries from other profiles (e.g. pre-defined Cloudflare profiles, or your Microsoft Information Protection profiles). @@ -364,6 +371,7 @@ async def update( "description": description, "entries": entries, "name": name, + "ocr_enabled": ocr_enabled, "shared_entries": shared_entries, }, custom_update_params.CustomUpdateParams, diff --git a/src/cloudflare/resources/zero_trust/dlp/profiles/predefined.py b/src/cloudflare/resources/zero_trust/dlp/profiles/predefined.py index dd73b3040c9..3405cc538f1 100644 --- a/src/cloudflare/resources/zero_trust/dlp/profiles/predefined.py +++ b/src/cloudflare/resources/zero_trust/dlp/profiles/predefined.py @@ -45,6 +45,7 @@ def update( allowed_match_count: float | NotGiven = NOT_GIVEN, context_awareness: predefined_update_params.ContextAwareness | NotGiven = NOT_GIVEN, entries: Iterable[predefined_update_params.Entry] | NotGiven = NOT_GIVEN, + ocr_enabled: bool | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -68,6 +69,8 @@ def update( entries: The entries for this profile. + ocr_enabled: If true, scan images via OCR to determine if any text present matches filters. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -87,6 +90,7 @@ def update( "allowed_match_count": allowed_match_count, "context_awareness": context_awareness, "entries": entries, + "ocr_enabled": ocr_enabled, }, predefined_update_params.PredefinedUpdateParams, ), @@ -158,6 +162,7 @@ async def update( allowed_match_count: float | NotGiven = NOT_GIVEN, context_awareness: predefined_update_params.ContextAwareness | NotGiven = NOT_GIVEN, entries: Iterable[predefined_update_params.Entry] | NotGiven = NOT_GIVEN, + ocr_enabled: bool | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -181,6 +186,8 @@ async def update( entries: The entries for this profile. + ocr_enabled: If true, scan images via OCR to determine if any text present matches filters. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -200,6 +207,7 @@ async def update( "allowed_match_count": allowed_match_count, "context_awareness": context_awareness, "entries": entries, + "ocr_enabled": ocr_enabled, }, predefined_update_params.PredefinedUpdateParams, ), diff --git a/src/cloudflare/resources/zones/zones.py b/src/cloudflare/resources/zones/zones.py index d531fea2aca..508854493dd 100644 --- a/src/cloudflare/resources/zones/zones.py +++ b/src/cloudflare/resources/zones/zones.py @@ -15,16 +15,7 @@ HoldsWithStreamingResponse, AsyncHoldsWithStreamingResponse, ) -from ...types import ( - ZoneGetResponse, - ZoneEditResponse, - ZoneListResponse, - ZoneCreateResponse, - ZoneDeleteResponse, - zone_edit_params, - zone_list_params, - zone_create_params, -) +from ...types import Zone, ZoneDeleteResponse, zone_edit_params, zone_list_params, zone_create_params from .workers import ( Workers, AsyncWorkers, @@ -135,7 +126,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZoneCreateResponse]: + ) -> Optional[Zone]: """ Create Zone @@ -170,7 +161,7 @@ def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZoneCreateResponse]], ResultWrapper[ZoneCreateResponse]), + cast_to=cast(Type[Optional[Zone]], ResultWrapper[Zone]), ) def list( @@ -190,7 +181,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncV4PagePaginationArray[ZoneListResponse]: + ) -> SyncV4PagePaginationArray[Zone]: """ Lists, searches, sorts, and filters your zones. @@ -229,7 +220,7 @@ def list( """ return self._get_api_list( "/zones", - page=SyncV4PagePaginationArray[ZoneListResponse], + page=SyncV4PagePaginationArray[Zone], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -249,7 +240,7 @@ def list( zone_list_params.ZoneListParams, ), ), - model=ZoneListResponse, + model=Zone, ) def delete( @@ -304,7 +295,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZoneEditResponse]: + ) -> Optional[Zone]: """Edits a zone. Only one zone property can be changed at a time. @@ -351,7 +342,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZoneEditResponse]], ResultWrapper[ZoneEditResponse]), + cast_to=cast(Type[Optional[Zone]], ResultWrapper[Zone]), ) def get( @@ -364,7 +355,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZoneGetResponse]: + ) -> Optional[Zone]: """ Zone Details @@ -390,7 +381,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZoneGetResponse]], ResultWrapper[ZoneGetResponse]), + cast_to=cast(Type[Optional[Zone]], ResultWrapper[Zone]), ) @@ -439,7 +430,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZoneCreateResponse]: + ) -> Optional[Zone]: """ Create Zone @@ -474,7 +465,7 @@ async def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZoneCreateResponse]], ResultWrapper[ZoneCreateResponse]), + cast_to=cast(Type[Optional[Zone]], ResultWrapper[Zone]), ) def list( @@ -494,7 +485,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[ZoneListResponse, AsyncV4PagePaginationArray[ZoneListResponse]]: + ) -> AsyncPaginator[Zone, AsyncV4PagePaginationArray[Zone]]: """ Lists, searches, sorts, and filters your zones. @@ -533,7 +524,7 @@ def list( """ return self._get_api_list( "/zones", - page=AsyncV4PagePaginationArray[ZoneListResponse], + page=AsyncV4PagePaginationArray[Zone], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -553,7 +544,7 @@ def list( zone_list_params.ZoneListParams, ), ), - model=ZoneListResponse, + model=Zone, ) async def delete( @@ -608,7 +599,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZoneEditResponse]: + ) -> Optional[Zone]: """Edits a zone. Only one zone property can be changed at a time. @@ -655,7 +646,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZoneEditResponse]], ResultWrapper[ZoneEditResponse]), + cast_to=cast(Type[Optional[Zone]], ResultWrapper[Zone]), ) async def get( @@ -668,7 +659,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZoneGetResponse]: + ) -> Optional[Zone]: """ Zone Details @@ -694,7 +685,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZoneGetResponse]], ResultWrapper[ZoneGetResponse]), + cast_to=cast(Type[Optional[Zone]], ResultWrapper[Zone]), ) diff --git a/src/cloudflare/types/__init__.py b/src/cloudflare/types/__init__.py index e835374b94d..54326eb97a7 100644 --- a/src/cloudflare/types/__init__.py +++ b/src/cloudflare/types/__init__.py @@ -3,6 +3,7 @@ from __future__ import annotations from .ips import IPs as IPs +from .zone import Zone as Zone from .account import Account as Account from .snippet import Snippet as Snippet from .calls_app import CallsApp as CallsApp @@ -22,7 +23,6 @@ from .observatory_trend import ObservatoryTrend as ObservatoryTrend from .pcap_get_response import PCAPGetResponse as PCAPGetResponse from .user_get_response import UserGetResponse as UserGetResponse -from .zone_get_response import ZoneGetResponse as ZoneGetResponse from .cache_purge_params import CachePurgeParams as CachePurgeParams from .call_create_params import CallCreateParams as CallCreateParams from .call_list_response import CallListResponse as CallListResponse @@ -34,8 +34,6 @@ from .stream_list_params import StreamListParams as StreamListParams from .user_edit_response import UserEditResponse as UserEditResponse from .zone_create_params import ZoneCreateParams as ZoneCreateParams -from .zone_edit_response import ZoneEditResponse as ZoneEditResponse -from .zone_list_response import ZoneListResponse as ZoneListResponse from .account_list_params import AccountListParams as AccountListParams from .queue_create_params import QueueCreateParams as QueueCreateParams from .queue_list_response import QueueListResponse as QueueListResponse @@ -50,7 +48,6 @@ from .pagerule_list_params import PageruleListParams as PageruleListParams from .pcap_create_response import PCAPCreateResponse as PCAPCreateResponse from .stream_list_response import StreamListResponse as StreamListResponse -from .zone_create_response import ZoneCreateResponse as ZoneCreateResponse from .zone_delete_response import ZoneDeleteResponse as ZoneDeleteResponse from .account_update_params import AccountUpdateParams as AccountUpdateParams from .audit_log_list_params import AuditLogListParams as AuditLogListParams diff --git a/src/cloudflare/types/dns/__init__.py b/src/cloudflare/types/dns/__init__.py index 90868d05589..05f3f8ddc0b 100644 --- a/src/cloudflare/types/dns/__init__.py +++ b/src/cloudflare/types/dns/__init__.py @@ -2,22 +2,18 @@ from __future__ import annotations +from .dns_record import DNSRecord as DNSRecord from .record_edit_params import RecordEditParams as RecordEditParams from .record_list_params import RecordListParams as RecordListParams -from .record_get_response import RecordGetResponse as RecordGetResponse from .firewall_edit_params import FirewallEditParams as FirewallEditParams from .firewall_list_params import FirewallListParams as FirewallListParams from .record_create_params import RecordCreateParams as RecordCreateParams -from .record_edit_response import RecordEditResponse as RecordEditResponse from .record_import_params import RecordImportParams as RecordImportParams -from .record_list_response import RecordListResponse as RecordListResponse from .record_scan_response import RecordScanResponse as RecordScanResponse from .record_update_params import RecordUpdateParams as RecordUpdateParams from .firewall_create_params import FirewallCreateParams as FirewallCreateParams -from .record_create_response import RecordCreateResponse as RecordCreateResponse from .record_delete_response import RecordDeleteResponse as RecordDeleteResponse from .record_export_response import RecordExportResponse as RecordExportResponse from .record_import_response import RecordImportResponse as RecordImportResponse -from .record_update_response import RecordUpdateResponse as RecordUpdateResponse from .firewall_delete_response import FirewallDeleteResponse as FirewallDeleteResponse from .dns_firewall_dns_firewall import DNSFirewallDNSFirewall as DNSFirewallDNSFirewall diff --git a/src/cloudflare/types/dns/record_get_response.py b/src/cloudflare/types/dns/dns_record.py similarity index 99% rename from src/cloudflare/types/dns/record_get_response.py rename to src/cloudflare/types/dns/dns_record.py index dbfc09dd482..edf809026e4 100644 --- a/src/cloudflare/types/dns/record_get_response.py +++ b/src/cloudflare/types/dns/dns_record.py @@ -8,7 +8,7 @@ from ..._models import BaseModel __all__ = [ - "RecordGetResponse", + "DNSRecord", "A", "AMeta", "AAAA", @@ -1660,7 +1660,7 @@ class URI(BaseModel): """The domain of the record.""" -RecordGetResponse = Annotated[ +DNSRecord = Annotated[ Union[ A, AAAA, CAA, Cert, CNAME, DNSKEY, DS, HTTPS, LOC, MX, NAPTR, NS, PTR, Smimea, SRV, SSHFP, SVCB, TLSA, TXT, URI ], diff --git a/src/cloudflare/types/dns/record_create_response.py b/src/cloudflare/types/dns/record_create_response.py deleted file mode 100644 index dc45c4fb4eb..00000000000 --- a/src/cloudflare/types/dns/record_create_response.py +++ /dev/null @@ -1,1668 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List, Union, Optional -from datetime import datetime -from typing_extensions import Literal, Annotated - -from ..._utils import PropertyInfo -from ..._models import BaseModel - -__all__ = [ - "RecordCreateResponse", - "A", - "AMeta", - "AAAA", - "AAAAMeta", - "CAA", - "CAAData", - "CAAMeta", - "Cert", - "CertData", - "CertMeta", - "CNAME", - "CNAMEMeta", - "DNSKEY", - "DNSKEYData", - "DNSKEYMeta", - "DS", - "DSData", - "DSMeta", - "HTTPS", - "HTTPSData", - "HTTPSMeta", - "LOC", - "LOCData", - "LOCMeta", - "MX", - "MXMeta", - "NAPTR", - "NAPTRData", - "NAPTRMeta", - "NS", - "NSMeta", - "PTR", - "PTRMeta", - "Smimea", - "SmimeaData", - "SmimeaMeta", - "SRV", - "SRVData", - "SRVMeta", - "SSHFP", - "SSHFPData", - "SSHFPMeta", - "SVCB", - "SVCBData", - "SVCBMeta", - "TLSA", - "TLSAData", - "TLSAMeta", - "TXT", - "TXTMeta", - "URI", - "URIData", - "URIMeta", -] - - -class AMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class A(BaseModel): - content: str - """A valid IPv4 address.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["A"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[AMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - proxied: Optional[bool] = None - """ - Whether the record is receiving the performance and security benefits of - Cloudflare. - """ - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class AAAAMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class AAAA(BaseModel): - content: str - """A valid IPv6 address.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["AAAA"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[AAAAMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - proxied: Optional[bool] = None - """ - Whether the record is receiving the performance and security benefits of - Cloudflare. - """ - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class CAAData(BaseModel): - flags: Optional[float] = None - """Flags for the CAA record.""" - - tag: Optional[str] = None - """Name of the property controlled by this record (e.g.: issue, issuewild, iodef).""" - - value: Optional[str] = None - """Value of the record. This field's semantics depend on the chosen tag.""" - - -class CAAMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class CAA(BaseModel): - data: CAAData - """Components of a CAA record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["CAA"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted CAA content. See 'data' to set CAA properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[CAAMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class CertData(BaseModel): - algorithm: Optional[float] = None - """Algorithm.""" - - certificate: Optional[str] = None - """Certificate.""" - - key_tag: Optional[float] = None - """Key Tag.""" - - type: Optional[float] = None - """Type.""" - - -class CertMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class Cert(BaseModel): - data: CertData - """Components of a CERT record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["CERT"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted CERT content. See 'data' to set CERT properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[CertMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class CNAMEMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class CNAME(BaseModel): - content: object - """A valid hostname. Must not match the record's name.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["CNAME"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[CNAMEMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - proxied: Optional[bool] = None - """ - Whether the record is receiving the performance and security benefits of - Cloudflare. - """ - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class DNSKEYData(BaseModel): - algorithm: Optional[float] = None - """Algorithm.""" - - flags: Optional[float] = None - """Flags.""" - - protocol: Optional[float] = None - """Protocol.""" - - public_key: Optional[str] = None - """Public Key.""" - - -class DNSKEYMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class DNSKEY(BaseModel): - data: DNSKEYData - """Components of a DNSKEY record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["DNSKEY"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted DNSKEY content. See 'data' to set DNSKEY properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[DNSKEYMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class DSData(BaseModel): - algorithm: Optional[float] = None - """Algorithm.""" - - digest: Optional[str] = None - """Digest.""" - - digest_type: Optional[float] = None - """Digest Type.""" - - key_tag: Optional[float] = None - """Key Tag.""" - - -class DSMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class DS(BaseModel): - data: DSData - """Components of a DS record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["DS"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted DS content. See 'data' to set DS properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[DSMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class HTTPSData(BaseModel): - priority: Optional[float] = None - """priority.""" - - target: Optional[str] = None - """target.""" - - value: Optional[str] = None - """value.""" - - -class HTTPSMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class HTTPS(BaseModel): - data: HTTPSData - """Components of a HTTPS record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["HTTPS"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted HTTPS content. See 'data' to set HTTPS properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[HTTPSMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class LOCData(BaseModel): - altitude: Optional[float] = None - """Altitude of location in meters.""" - - lat_degrees: Optional[float] = None - """Degrees of latitude.""" - - lat_direction: Optional[Literal["N", "S"]] = None - """Latitude direction.""" - - lat_minutes: Optional[float] = None - """Minutes of latitude.""" - - lat_seconds: Optional[float] = None - """Seconds of latitude.""" - - long_degrees: Optional[float] = None - """Degrees of longitude.""" - - long_direction: Optional[Literal["E", "W"]] = None - """Longitude direction.""" - - long_minutes: Optional[float] = None - """Minutes of longitude.""" - - long_seconds: Optional[float] = None - """Seconds of longitude.""" - - precision_horz: Optional[float] = None - """Horizontal precision of location.""" - - precision_vert: Optional[float] = None - """Vertical precision of location.""" - - size: Optional[float] = None - """Size of location in meters.""" - - -class LOCMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class LOC(BaseModel): - data: LOCData - """Components of a LOC record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["LOC"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted LOC content. See 'data' to set LOC properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[LOCMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class MXMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class MX(BaseModel): - content: str - """A valid mail server hostname.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - priority: float - """Required for MX, SRV and URI records; unused by other record types. - - Records with lower priorities are preferred. - """ - - type: Literal["MX"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[MXMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class NAPTRData(BaseModel): - flags: Optional[str] = None - """Flags.""" - - order: Optional[float] = None - """Order.""" - - preference: Optional[float] = None - """Preference.""" - - regex: Optional[str] = None - """Regex.""" - - replacement: Optional[str] = None - """Replacement.""" - - service: Optional[str] = None - """Service.""" - - -class NAPTRMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class NAPTR(BaseModel): - data: NAPTRData - """Components of a NAPTR record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["NAPTR"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted NAPTR content. See 'data' to set NAPTR properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[NAPTRMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class NSMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class NS(BaseModel): - content: object - """A valid name server host name.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["NS"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[NSMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class PTRMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class PTR(BaseModel): - content: str - """Domain name pointing to the address.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["PTR"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[PTRMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class SmimeaData(BaseModel): - certificate: Optional[str] = None - """Certificate.""" - - matching_type: Optional[float] = None - """Matching Type.""" - - selector: Optional[float] = None - """Selector.""" - - usage: Optional[float] = None - """Usage.""" - - -class SmimeaMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class Smimea(BaseModel): - data: SmimeaData - """Components of a SMIMEA record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["SMIMEA"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted SMIMEA content. See 'data' to set SMIMEA properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[SmimeaMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class SRVData(BaseModel): - name: Optional[str] = None - """A valid hostname. - - Deprecated in favor of the regular 'name' outside the data map. This data map - field represents the remainder of the full 'name' after the service and - protocol. - """ - - port: Optional[float] = None - """The port of the service.""" - - priority: Optional[float] = None - """Required for MX, SRV and URI records; unused by other record types. - - Records with lower priorities are preferred. - """ - - proto: Optional[str] = None - """A valid protocol, prefixed with an underscore. - - Deprecated in favor of the regular 'name' outside the data map. This data map - field normally represents the second label of that 'name'. - """ - - service: Optional[str] = None - """A service type, prefixed with an underscore. - - Deprecated in favor of the regular 'name' outside the data map. This data map - field normally represents the first label of that 'name'. - """ - - target: Optional[str] = None - """A valid hostname.""" - - weight: Optional[float] = None - """The record weight.""" - - -class SRVMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class SRV(BaseModel): - data: SRVData - """Components of a SRV record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode. - - For SRV records, the first label is normally a service and the second a protocol - name, each starting with an underscore. - """ - - type: Literal["SRV"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Priority, weight, port, and SRV target. - - See 'data' for setting the individual component values. - """ - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[SRVMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class SSHFPData(BaseModel): - algorithm: Optional[float] = None - """algorithm.""" - - fingerprint: Optional[str] = None - """fingerprint.""" - - type: Optional[float] = None - """type.""" - - -class SSHFPMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class SSHFP(BaseModel): - data: SSHFPData - """Components of a SSHFP record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["SSHFP"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted SSHFP content. See 'data' to set SSHFP properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[SSHFPMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class SVCBData(BaseModel): - priority: Optional[float] = None - """priority.""" - - target: Optional[str] = None - """target.""" - - value: Optional[str] = None - """value.""" - - -class SVCBMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class SVCB(BaseModel): - data: SVCBData - """Components of a SVCB record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["SVCB"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted SVCB content. See 'data' to set SVCB properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[SVCBMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class TLSAData(BaseModel): - certificate: Optional[str] = None - """certificate.""" - - matching_type: Optional[float] = None - """Matching Type.""" - - selector: Optional[float] = None - """Selector.""" - - usage: Optional[float] = None - """Usage.""" - - -class TLSAMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class TLSA(BaseModel): - data: TLSAData - """Components of a TLSA record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["TLSA"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted TLSA content. See 'data' to set TLSA properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[TLSAMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class TXTMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class TXT(BaseModel): - content: str - """Text content for the record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["TXT"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[TXTMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class URIData(BaseModel): - content: Optional[str] = None - """The record content.""" - - weight: Optional[float] = None - """The record weight.""" - - -class URIMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class URI(BaseModel): - data: URIData - """Components of a URI record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - priority: float - """Required for MX, SRV and URI records; unused by other record types. - - Records with lower priorities are preferred. - """ - - type: Literal["URI"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted URI content. See 'data' to set URI properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[URIMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -RecordCreateResponse = Annotated[ - Union[ - A, AAAA, CAA, Cert, CNAME, DNSKEY, DS, HTTPS, LOC, MX, NAPTR, NS, PTR, Smimea, SRV, SSHFP, SVCB, TLSA, TXT, URI - ], - PropertyInfo(discriminator="type"), -] diff --git a/src/cloudflare/types/dns/record_edit_response.py b/src/cloudflare/types/dns/record_edit_response.py deleted file mode 100644 index 684bf7bc1cd..00000000000 --- a/src/cloudflare/types/dns/record_edit_response.py +++ /dev/null @@ -1,1668 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List, Union, Optional -from datetime import datetime -from typing_extensions import Literal, Annotated - -from ..._utils import PropertyInfo -from ..._models import BaseModel - -__all__ = [ - "RecordEditResponse", - "A", - "AMeta", - "AAAA", - "AAAAMeta", - "CAA", - "CAAData", - "CAAMeta", - "Cert", - "CertData", - "CertMeta", - "CNAME", - "CNAMEMeta", - "DNSKEY", - "DNSKEYData", - "DNSKEYMeta", - "DS", - "DSData", - "DSMeta", - "HTTPS", - "HTTPSData", - "HTTPSMeta", - "LOC", - "LOCData", - "LOCMeta", - "MX", - "MXMeta", - "NAPTR", - "NAPTRData", - "NAPTRMeta", - "NS", - "NSMeta", - "PTR", - "PTRMeta", - "Smimea", - "SmimeaData", - "SmimeaMeta", - "SRV", - "SRVData", - "SRVMeta", - "SSHFP", - "SSHFPData", - "SSHFPMeta", - "SVCB", - "SVCBData", - "SVCBMeta", - "TLSA", - "TLSAData", - "TLSAMeta", - "TXT", - "TXTMeta", - "URI", - "URIData", - "URIMeta", -] - - -class AMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class A(BaseModel): - content: str - """A valid IPv4 address.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["A"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[AMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - proxied: Optional[bool] = None - """ - Whether the record is receiving the performance and security benefits of - Cloudflare. - """ - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class AAAAMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class AAAA(BaseModel): - content: str - """A valid IPv6 address.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["AAAA"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[AAAAMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - proxied: Optional[bool] = None - """ - Whether the record is receiving the performance and security benefits of - Cloudflare. - """ - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class CAAData(BaseModel): - flags: Optional[float] = None - """Flags for the CAA record.""" - - tag: Optional[str] = None - """Name of the property controlled by this record (e.g.: issue, issuewild, iodef).""" - - value: Optional[str] = None - """Value of the record. This field's semantics depend on the chosen tag.""" - - -class CAAMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class CAA(BaseModel): - data: CAAData - """Components of a CAA record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["CAA"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted CAA content. See 'data' to set CAA properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[CAAMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class CertData(BaseModel): - algorithm: Optional[float] = None - """Algorithm.""" - - certificate: Optional[str] = None - """Certificate.""" - - key_tag: Optional[float] = None - """Key Tag.""" - - type: Optional[float] = None - """Type.""" - - -class CertMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class Cert(BaseModel): - data: CertData - """Components of a CERT record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["CERT"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted CERT content. See 'data' to set CERT properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[CertMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class CNAMEMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class CNAME(BaseModel): - content: object - """A valid hostname. Must not match the record's name.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["CNAME"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[CNAMEMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - proxied: Optional[bool] = None - """ - Whether the record is receiving the performance and security benefits of - Cloudflare. - """ - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class DNSKEYData(BaseModel): - algorithm: Optional[float] = None - """Algorithm.""" - - flags: Optional[float] = None - """Flags.""" - - protocol: Optional[float] = None - """Protocol.""" - - public_key: Optional[str] = None - """Public Key.""" - - -class DNSKEYMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class DNSKEY(BaseModel): - data: DNSKEYData - """Components of a DNSKEY record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["DNSKEY"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted DNSKEY content. See 'data' to set DNSKEY properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[DNSKEYMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class DSData(BaseModel): - algorithm: Optional[float] = None - """Algorithm.""" - - digest: Optional[str] = None - """Digest.""" - - digest_type: Optional[float] = None - """Digest Type.""" - - key_tag: Optional[float] = None - """Key Tag.""" - - -class DSMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class DS(BaseModel): - data: DSData - """Components of a DS record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["DS"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted DS content. See 'data' to set DS properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[DSMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class HTTPSData(BaseModel): - priority: Optional[float] = None - """priority.""" - - target: Optional[str] = None - """target.""" - - value: Optional[str] = None - """value.""" - - -class HTTPSMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class HTTPS(BaseModel): - data: HTTPSData - """Components of a HTTPS record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["HTTPS"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted HTTPS content. See 'data' to set HTTPS properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[HTTPSMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class LOCData(BaseModel): - altitude: Optional[float] = None - """Altitude of location in meters.""" - - lat_degrees: Optional[float] = None - """Degrees of latitude.""" - - lat_direction: Optional[Literal["N", "S"]] = None - """Latitude direction.""" - - lat_minutes: Optional[float] = None - """Minutes of latitude.""" - - lat_seconds: Optional[float] = None - """Seconds of latitude.""" - - long_degrees: Optional[float] = None - """Degrees of longitude.""" - - long_direction: Optional[Literal["E", "W"]] = None - """Longitude direction.""" - - long_minutes: Optional[float] = None - """Minutes of longitude.""" - - long_seconds: Optional[float] = None - """Seconds of longitude.""" - - precision_horz: Optional[float] = None - """Horizontal precision of location.""" - - precision_vert: Optional[float] = None - """Vertical precision of location.""" - - size: Optional[float] = None - """Size of location in meters.""" - - -class LOCMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class LOC(BaseModel): - data: LOCData - """Components of a LOC record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["LOC"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted LOC content. See 'data' to set LOC properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[LOCMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class MXMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class MX(BaseModel): - content: str - """A valid mail server hostname.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - priority: float - """Required for MX, SRV and URI records; unused by other record types. - - Records with lower priorities are preferred. - """ - - type: Literal["MX"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[MXMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class NAPTRData(BaseModel): - flags: Optional[str] = None - """Flags.""" - - order: Optional[float] = None - """Order.""" - - preference: Optional[float] = None - """Preference.""" - - regex: Optional[str] = None - """Regex.""" - - replacement: Optional[str] = None - """Replacement.""" - - service: Optional[str] = None - """Service.""" - - -class NAPTRMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class NAPTR(BaseModel): - data: NAPTRData - """Components of a NAPTR record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["NAPTR"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted NAPTR content. See 'data' to set NAPTR properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[NAPTRMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class NSMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class NS(BaseModel): - content: object - """A valid name server host name.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["NS"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[NSMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class PTRMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class PTR(BaseModel): - content: str - """Domain name pointing to the address.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["PTR"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[PTRMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class SmimeaData(BaseModel): - certificate: Optional[str] = None - """Certificate.""" - - matching_type: Optional[float] = None - """Matching Type.""" - - selector: Optional[float] = None - """Selector.""" - - usage: Optional[float] = None - """Usage.""" - - -class SmimeaMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class Smimea(BaseModel): - data: SmimeaData - """Components of a SMIMEA record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["SMIMEA"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted SMIMEA content. See 'data' to set SMIMEA properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[SmimeaMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class SRVData(BaseModel): - name: Optional[str] = None - """A valid hostname. - - Deprecated in favor of the regular 'name' outside the data map. This data map - field represents the remainder of the full 'name' after the service and - protocol. - """ - - port: Optional[float] = None - """The port of the service.""" - - priority: Optional[float] = None - """Required for MX, SRV and URI records; unused by other record types. - - Records with lower priorities are preferred. - """ - - proto: Optional[str] = None - """A valid protocol, prefixed with an underscore. - - Deprecated in favor of the regular 'name' outside the data map. This data map - field normally represents the second label of that 'name'. - """ - - service: Optional[str] = None - """A service type, prefixed with an underscore. - - Deprecated in favor of the regular 'name' outside the data map. This data map - field normally represents the first label of that 'name'. - """ - - target: Optional[str] = None - """A valid hostname.""" - - weight: Optional[float] = None - """The record weight.""" - - -class SRVMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class SRV(BaseModel): - data: SRVData - """Components of a SRV record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode. - - For SRV records, the first label is normally a service and the second a protocol - name, each starting with an underscore. - """ - - type: Literal["SRV"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Priority, weight, port, and SRV target. - - See 'data' for setting the individual component values. - """ - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[SRVMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class SSHFPData(BaseModel): - algorithm: Optional[float] = None - """algorithm.""" - - fingerprint: Optional[str] = None - """fingerprint.""" - - type: Optional[float] = None - """type.""" - - -class SSHFPMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class SSHFP(BaseModel): - data: SSHFPData - """Components of a SSHFP record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["SSHFP"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted SSHFP content. See 'data' to set SSHFP properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[SSHFPMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class SVCBData(BaseModel): - priority: Optional[float] = None - """priority.""" - - target: Optional[str] = None - """target.""" - - value: Optional[str] = None - """value.""" - - -class SVCBMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class SVCB(BaseModel): - data: SVCBData - """Components of a SVCB record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["SVCB"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted SVCB content. See 'data' to set SVCB properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[SVCBMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class TLSAData(BaseModel): - certificate: Optional[str] = None - """certificate.""" - - matching_type: Optional[float] = None - """Matching Type.""" - - selector: Optional[float] = None - """Selector.""" - - usage: Optional[float] = None - """Usage.""" - - -class TLSAMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class TLSA(BaseModel): - data: TLSAData - """Components of a TLSA record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["TLSA"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted TLSA content. See 'data' to set TLSA properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[TLSAMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class TXTMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class TXT(BaseModel): - content: str - """Text content for the record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["TXT"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[TXTMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class URIData(BaseModel): - content: Optional[str] = None - """The record content.""" - - weight: Optional[float] = None - """The record weight.""" - - -class URIMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class URI(BaseModel): - data: URIData - """Components of a URI record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - priority: float - """Required for MX, SRV and URI records; unused by other record types. - - Records with lower priorities are preferred. - """ - - type: Literal["URI"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted URI content. See 'data' to set URI properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[URIMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -RecordEditResponse = Annotated[ - Union[ - A, AAAA, CAA, Cert, CNAME, DNSKEY, DS, HTTPS, LOC, MX, NAPTR, NS, PTR, Smimea, SRV, SSHFP, SVCB, TLSA, TXT, URI - ], - PropertyInfo(discriminator="type"), -] diff --git a/src/cloudflare/types/dns/record_list_response.py b/src/cloudflare/types/dns/record_list_response.py deleted file mode 100644 index a59213af85d..00000000000 --- a/src/cloudflare/types/dns/record_list_response.py +++ /dev/null @@ -1,1668 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List, Union, Optional -from datetime import datetime -from typing_extensions import Literal, Annotated - -from ..._utils import PropertyInfo -from ..._models import BaseModel - -__all__ = [ - "RecordListResponse", - "A", - "AMeta", - "AAAA", - "AAAAMeta", - "CAA", - "CAAData", - "CAAMeta", - "Cert", - "CertData", - "CertMeta", - "CNAME", - "CNAMEMeta", - "DNSKEY", - "DNSKEYData", - "DNSKEYMeta", - "DS", - "DSData", - "DSMeta", - "HTTPS", - "HTTPSData", - "HTTPSMeta", - "LOC", - "LOCData", - "LOCMeta", - "MX", - "MXMeta", - "NAPTR", - "NAPTRData", - "NAPTRMeta", - "NS", - "NSMeta", - "PTR", - "PTRMeta", - "Smimea", - "SmimeaData", - "SmimeaMeta", - "SRV", - "SRVData", - "SRVMeta", - "SSHFP", - "SSHFPData", - "SSHFPMeta", - "SVCB", - "SVCBData", - "SVCBMeta", - "TLSA", - "TLSAData", - "TLSAMeta", - "TXT", - "TXTMeta", - "URI", - "URIData", - "URIMeta", -] - - -class AMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class A(BaseModel): - content: str - """A valid IPv4 address.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["A"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[AMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - proxied: Optional[bool] = None - """ - Whether the record is receiving the performance and security benefits of - Cloudflare. - """ - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class AAAAMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class AAAA(BaseModel): - content: str - """A valid IPv6 address.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["AAAA"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[AAAAMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - proxied: Optional[bool] = None - """ - Whether the record is receiving the performance and security benefits of - Cloudflare. - """ - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class CAAData(BaseModel): - flags: Optional[float] = None - """Flags for the CAA record.""" - - tag: Optional[str] = None - """Name of the property controlled by this record (e.g.: issue, issuewild, iodef).""" - - value: Optional[str] = None - """Value of the record. This field's semantics depend on the chosen tag.""" - - -class CAAMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class CAA(BaseModel): - data: CAAData - """Components of a CAA record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["CAA"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted CAA content. See 'data' to set CAA properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[CAAMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class CertData(BaseModel): - algorithm: Optional[float] = None - """Algorithm.""" - - certificate: Optional[str] = None - """Certificate.""" - - key_tag: Optional[float] = None - """Key Tag.""" - - type: Optional[float] = None - """Type.""" - - -class CertMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class Cert(BaseModel): - data: CertData - """Components of a CERT record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["CERT"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted CERT content. See 'data' to set CERT properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[CertMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class CNAMEMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class CNAME(BaseModel): - content: object - """A valid hostname. Must not match the record's name.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["CNAME"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[CNAMEMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - proxied: Optional[bool] = None - """ - Whether the record is receiving the performance and security benefits of - Cloudflare. - """ - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class DNSKEYData(BaseModel): - algorithm: Optional[float] = None - """Algorithm.""" - - flags: Optional[float] = None - """Flags.""" - - protocol: Optional[float] = None - """Protocol.""" - - public_key: Optional[str] = None - """Public Key.""" - - -class DNSKEYMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class DNSKEY(BaseModel): - data: DNSKEYData - """Components of a DNSKEY record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["DNSKEY"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted DNSKEY content. See 'data' to set DNSKEY properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[DNSKEYMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class DSData(BaseModel): - algorithm: Optional[float] = None - """Algorithm.""" - - digest: Optional[str] = None - """Digest.""" - - digest_type: Optional[float] = None - """Digest Type.""" - - key_tag: Optional[float] = None - """Key Tag.""" - - -class DSMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class DS(BaseModel): - data: DSData - """Components of a DS record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["DS"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted DS content. See 'data' to set DS properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[DSMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class HTTPSData(BaseModel): - priority: Optional[float] = None - """priority.""" - - target: Optional[str] = None - """target.""" - - value: Optional[str] = None - """value.""" - - -class HTTPSMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class HTTPS(BaseModel): - data: HTTPSData - """Components of a HTTPS record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["HTTPS"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted HTTPS content. See 'data' to set HTTPS properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[HTTPSMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class LOCData(BaseModel): - altitude: Optional[float] = None - """Altitude of location in meters.""" - - lat_degrees: Optional[float] = None - """Degrees of latitude.""" - - lat_direction: Optional[Literal["N", "S"]] = None - """Latitude direction.""" - - lat_minutes: Optional[float] = None - """Minutes of latitude.""" - - lat_seconds: Optional[float] = None - """Seconds of latitude.""" - - long_degrees: Optional[float] = None - """Degrees of longitude.""" - - long_direction: Optional[Literal["E", "W"]] = None - """Longitude direction.""" - - long_minutes: Optional[float] = None - """Minutes of longitude.""" - - long_seconds: Optional[float] = None - """Seconds of longitude.""" - - precision_horz: Optional[float] = None - """Horizontal precision of location.""" - - precision_vert: Optional[float] = None - """Vertical precision of location.""" - - size: Optional[float] = None - """Size of location in meters.""" - - -class LOCMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class LOC(BaseModel): - data: LOCData - """Components of a LOC record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["LOC"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted LOC content. See 'data' to set LOC properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[LOCMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class MXMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class MX(BaseModel): - content: str - """A valid mail server hostname.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - priority: float - """Required for MX, SRV and URI records; unused by other record types. - - Records with lower priorities are preferred. - """ - - type: Literal["MX"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[MXMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class NAPTRData(BaseModel): - flags: Optional[str] = None - """Flags.""" - - order: Optional[float] = None - """Order.""" - - preference: Optional[float] = None - """Preference.""" - - regex: Optional[str] = None - """Regex.""" - - replacement: Optional[str] = None - """Replacement.""" - - service: Optional[str] = None - """Service.""" - - -class NAPTRMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class NAPTR(BaseModel): - data: NAPTRData - """Components of a NAPTR record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["NAPTR"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted NAPTR content. See 'data' to set NAPTR properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[NAPTRMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class NSMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class NS(BaseModel): - content: object - """A valid name server host name.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["NS"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[NSMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class PTRMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class PTR(BaseModel): - content: str - """Domain name pointing to the address.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["PTR"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[PTRMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class SmimeaData(BaseModel): - certificate: Optional[str] = None - """Certificate.""" - - matching_type: Optional[float] = None - """Matching Type.""" - - selector: Optional[float] = None - """Selector.""" - - usage: Optional[float] = None - """Usage.""" - - -class SmimeaMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class Smimea(BaseModel): - data: SmimeaData - """Components of a SMIMEA record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["SMIMEA"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted SMIMEA content. See 'data' to set SMIMEA properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[SmimeaMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class SRVData(BaseModel): - name: Optional[str] = None - """A valid hostname. - - Deprecated in favor of the regular 'name' outside the data map. This data map - field represents the remainder of the full 'name' after the service and - protocol. - """ - - port: Optional[float] = None - """The port of the service.""" - - priority: Optional[float] = None - """Required for MX, SRV and URI records; unused by other record types. - - Records with lower priorities are preferred. - """ - - proto: Optional[str] = None - """A valid protocol, prefixed with an underscore. - - Deprecated in favor of the regular 'name' outside the data map. This data map - field normally represents the second label of that 'name'. - """ - - service: Optional[str] = None - """A service type, prefixed with an underscore. - - Deprecated in favor of the regular 'name' outside the data map. This data map - field normally represents the first label of that 'name'. - """ - - target: Optional[str] = None - """A valid hostname.""" - - weight: Optional[float] = None - """The record weight.""" - - -class SRVMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class SRV(BaseModel): - data: SRVData - """Components of a SRV record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode. - - For SRV records, the first label is normally a service and the second a protocol - name, each starting with an underscore. - """ - - type: Literal["SRV"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Priority, weight, port, and SRV target. - - See 'data' for setting the individual component values. - """ - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[SRVMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class SSHFPData(BaseModel): - algorithm: Optional[float] = None - """algorithm.""" - - fingerprint: Optional[str] = None - """fingerprint.""" - - type: Optional[float] = None - """type.""" - - -class SSHFPMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class SSHFP(BaseModel): - data: SSHFPData - """Components of a SSHFP record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["SSHFP"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted SSHFP content. See 'data' to set SSHFP properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[SSHFPMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class SVCBData(BaseModel): - priority: Optional[float] = None - """priority.""" - - target: Optional[str] = None - """target.""" - - value: Optional[str] = None - """value.""" - - -class SVCBMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class SVCB(BaseModel): - data: SVCBData - """Components of a SVCB record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["SVCB"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted SVCB content. See 'data' to set SVCB properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[SVCBMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class TLSAData(BaseModel): - certificate: Optional[str] = None - """certificate.""" - - matching_type: Optional[float] = None - """Matching Type.""" - - selector: Optional[float] = None - """Selector.""" - - usage: Optional[float] = None - """Usage.""" - - -class TLSAMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class TLSA(BaseModel): - data: TLSAData - """Components of a TLSA record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["TLSA"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted TLSA content. See 'data' to set TLSA properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[TLSAMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class TXTMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class TXT(BaseModel): - content: str - """Text content for the record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["TXT"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[TXTMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class URIData(BaseModel): - content: Optional[str] = None - """The record content.""" - - weight: Optional[float] = None - """The record weight.""" - - -class URIMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class URI(BaseModel): - data: URIData - """Components of a URI record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - priority: float - """Required for MX, SRV and URI records; unused by other record types. - - Records with lower priorities are preferred. - """ - - type: Literal["URI"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted URI content. See 'data' to set URI properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[URIMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -RecordListResponse = Annotated[ - Union[ - A, AAAA, CAA, Cert, CNAME, DNSKEY, DS, HTTPS, LOC, MX, NAPTR, NS, PTR, Smimea, SRV, SSHFP, SVCB, TLSA, TXT, URI - ], - PropertyInfo(discriminator="type"), -] diff --git a/src/cloudflare/types/dns/record_update_response.py b/src/cloudflare/types/dns/record_update_response.py deleted file mode 100644 index d8e66010a86..00000000000 --- a/src/cloudflare/types/dns/record_update_response.py +++ /dev/null @@ -1,1668 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List, Union, Optional -from datetime import datetime -from typing_extensions import Literal, Annotated - -from ..._utils import PropertyInfo -from ..._models import BaseModel - -__all__ = [ - "RecordUpdateResponse", - "A", - "AMeta", - "AAAA", - "AAAAMeta", - "CAA", - "CAAData", - "CAAMeta", - "Cert", - "CertData", - "CertMeta", - "CNAME", - "CNAMEMeta", - "DNSKEY", - "DNSKEYData", - "DNSKEYMeta", - "DS", - "DSData", - "DSMeta", - "HTTPS", - "HTTPSData", - "HTTPSMeta", - "LOC", - "LOCData", - "LOCMeta", - "MX", - "MXMeta", - "NAPTR", - "NAPTRData", - "NAPTRMeta", - "NS", - "NSMeta", - "PTR", - "PTRMeta", - "Smimea", - "SmimeaData", - "SmimeaMeta", - "SRV", - "SRVData", - "SRVMeta", - "SSHFP", - "SSHFPData", - "SSHFPMeta", - "SVCB", - "SVCBData", - "SVCBMeta", - "TLSA", - "TLSAData", - "TLSAMeta", - "TXT", - "TXTMeta", - "URI", - "URIData", - "URIMeta", -] - - -class AMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class A(BaseModel): - content: str - """A valid IPv4 address.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["A"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[AMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - proxied: Optional[bool] = None - """ - Whether the record is receiving the performance and security benefits of - Cloudflare. - """ - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class AAAAMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class AAAA(BaseModel): - content: str - """A valid IPv6 address.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["AAAA"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[AAAAMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - proxied: Optional[bool] = None - """ - Whether the record is receiving the performance and security benefits of - Cloudflare. - """ - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class CAAData(BaseModel): - flags: Optional[float] = None - """Flags for the CAA record.""" - - tag: Optional[str] = None - """Name of the property controlled by this record (e.g.: issue, issuewild, iodef).""" - - value: Optional[str] = None - """Value of the record. This field's semantics depend on the chosen tag.""" - - -class CAAMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class CAA(BaseModel): - data: CAAData - """Components of a CAA record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["CAA"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted CAA content. See 'data' to set CAA properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[CAAMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class CertData(BaseModel): - algorithm: Optional[float] = None - """Algorithm.""" - - certificate: Optional[str] = None - """Certificate.""" - - key_tag: Optional[float] = None - """Key Tag.""" - - type: Optional[float] = None - """Type.""" - - -class CertMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class Cert(BaseModel): - data: CertData - """Components of a CERT record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["CERT"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted CERT content. See 'data' to set CERT properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[CertMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class CNAMEMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class CNAME(BaseModel): - content: object - """A valid hostname. Must not match the record's name.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["CNAME"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[CNAMEMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - proxied: Optional[bool] = None - """ - Whether the record is receiving the performance and security benefits of - Cloudflare. - """ - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class DNSKEYData(BaseModel): - algorithm: Optional[float] = None - """Algorithm.""" - - flags: Optional[float] = None - """Flags.""" - - protocol: Optional[float] = None - """Protocol.""" - - public_key: Optional[str] = None - """Public Key.""" - - -class DNSKEYMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class DNSKEY(BaseModel): - data: DNSKEYData - """Components of a DNSKEY record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["DNSKEY"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted DNSKEY content. See 'data' to set DNSKEY properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[DNSKEYMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class DSData(BaseModel): - algorithm: Optional[float] = None - """Algorithm.""" - - digest: Optional[str] = None - """Digest.""" - - digest_type: Optional[float] = None - """Digest Type.""" - - key_tag: Optional[float] = None - """Key Tag.""" - - -class DSMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class DS(BaseModel): - data: DSData - """Components of a DS record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["DS"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted DS content. See 'data' to set DS properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[DSMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class HTTPSData(BaseModel): - priority: Optional[float] = None - """priority.""" - - target: Optional[str] = None - """target.""" - - value: Optional[str] = None - """value.""" - - -class HTTPSMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class HTTPS(BaseModel): - data: HTTPSData - """Components of a HTTPS record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["HTTPS"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted HTTPS content. See 'data' to set HTTPS properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[HTTPSMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class LOCData(BaseModel): - altitude: Optional[float] = None - """Altitude of location in meters.""" - - lat_degrees: Optional[float] = None - """Degrees of latitude.""" - - lat_direction: Optional[Literal["N", "S"]] = None - """Latitude direction.""" - - lat_minutes: Optional[float] = None - """Minutes of latitude.""" - - lat_seconds: Optional[float] = None - """Seconds of latitude.""" - - long_degrees: Optional[float] = None - """Degrees of longitude.""" - - long_direction: Optional[Literal["E", "W"]] = None - """Longitude direction.""" - - long_minutes: Optional[float] = None - """Minutes of longitude.""" - - long_seconds: Optional[float] = None - """Seconds of longitude.""" - - precision_horz: Optional[float] = None - """Horizontal precision of location.""" - - precision_vert: Optional[float] = None - """Vertical precision of location.""" - - size: Optional[float] = None - """Size of location in meters.""" - - -class LOCMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class LOC(BaseModel): - data: LOCData - """Components of a LOC record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["LOC"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted LOC content. See 'data' to set LOC properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[LOCMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class MXMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class MX(BaseModel): - content: str - """A valid mail server hostname.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - priority: float - """Required for MX, SRV and URI records; unused by other record types. - - Records with lower priorities are preferred. - """ - - type: Literal["MX"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[MXMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class NAPTRData(BaseModel): - flags: Optional[str] = None - """Flags.""" - - order: Optional[float] = None - """Order.""" - - preference: Optional[float] = None - """Preference.""" - - regex: Optional[str] = None - """Regex.""" - - replacement: Optional[str] = None - """Replacement.""" - - service: Optional[str] = None - """Service.""" - - -class NAPTRMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class NAPTR(BaseModel): - data: NAPTRData - """Components of a NAPTR record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["NAPTR"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted NAPTR content. See 'data' to set NAPTR properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[NAPTRMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class NSMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class NS(BaseModel): - content: object - """A valid name server host name.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["NS"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[NSMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class PTRMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class PTR(BaseModel): - content: str - """Domain name pointing to the address.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["PTR"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[PTRMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class SmimeaData(BaseModel): - certificate: Optional[str] = None - """Certificate.""" - - matching_type: Optional[float] = None - """Matching Type.""" - - selector: Optional[float] = None - """Selector.""" - - usage: Optional[float] = None - """Usage.""" - - -class SmimeaMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class Smimea(BaseModel): - data: SmimeaData - """Components of a SMIMEA record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["SMIMEA"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted SMIMEA content. See 'data' to set SMIMEA properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[SmimeaMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class SRVData(BaseModel): - name: Optional[str] = None - """A valid hostname. - - Deprecated in favor of the regular 'name' outside the data map. This data map - field represents the remainder of the full 'name' after the service and - protocol. - """ - - port: Optional[float] = None - """The port of the service.""" - - priority: Optional[float] = None - """Required for MX, SRV and URI records; unused by other record types. - - Records with lower priorities are preferred. - """ - - proto: Optional[str] = None - """A valid protocol, prefixed with an underscore. - - Deprecated in favor of the regular 'name' outside the data map. This data map - field normally represents the second label of that 'name'. - """ - - service: Optional[str] = None - """A service type, prefixed with an underscore. - - Deprecated in favor of the regular 'name' outside the data map. This data map - field normally represents the first label of that 'name'. - """ - - target: Optional[str] = None - """A valid hostname.""" - - weight: Optional[float] = None - """The record weight.""" - - -class SRVMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class SRV(BaseModel): - data: SRVData - """Components of a SRV record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode. - - For SRV records, the first label is normally a service and the second a protocol - name, each starting with an underscore. - """ - - type: Literal["SRV"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Priority, weight, port, and SRV target. - - See 'data' for setting the individual component values. - """ - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[SRVMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class SSHFPData(BaseModel): - algorithm: Optional[float] = None - """algorithm.""" - - fingerprint: Optional[str] = None - """fingerprint.""" - - type: Optional[float] = None - """type.""" - - -class SSHFPMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class SSHFP(BaseModel): - data: SSHFPData - """Components of a SSHFP record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["SSHFP"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted SSHFP content. See 'data' to set SSHFP properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[SSHFPMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class SVCBData(BaseModel): - priority: Optional[float] = None - """priority.""" - - target: Optional[str] = None - """target.""" - - value: Optional[str] = None - """value.""" - - -class SVCBMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class SVCB(BaseModel): - data: SVCBData - """Components of a SVCB record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["SVCB"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted SVCB content. See 'data' to set SVCB properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[SVCBMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class TLSAData(BaseModel): - certificate: Optional[str] = None - """certificate.""" - - matching_type: Optional[float] = None - """Matching Type.""" - - selector: Optional[float] = None - """Selector.""" - - usage: Optional[float] = None - """Usage.""" - - -class TLSAMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class TLSA(BaseModel): - data: TLSAData - """Components of a TLSA record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["TLSA"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted TLSA content. See 'data' to set TLSA properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[TLSAMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class TXTMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class TXT(BaseModel): - content: str - """Text content for the record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - type: Literal["TXT"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[TXTMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -class URIData(BaseModel): - content: Optional[str] = None - """The record content.""" - - weight: Optional[float] = None - """The record weight.""" - - -class URIMeta(BaseModel): - auto_added: Optional[bool] = None - """ - Will exist if Cloudflare automatically added this DNS record during initial - setup. - """ - - source: Optional[str] = None - """Where the record originated from.""" - - -class URI(BaseModel): - data: URIData - """Components of a URI record.""" - - name: str - """DNS record name (or @ for the zone apex) in Punycode.""" - - priority: float - """Required for MX, SRV and URI records; unused by other record types. - - Records with lower priorities are preferred. - """ - - type: Literal["URI"] - """Record type.""" - - id: Optional[str] = None - """Identifier""" - - comment: Optional[str] = None - """Comments or notes about the DNS record. - - This field has no effect on DNS responses. - """ - - content: Optional[str] = None - """Formatted URI content. See 'data' to set URI properties.""" - - created_on: Optional[datetime] = None - """When the record was created.""" - - locked: Optional[bool] = None - """ - Whether this record can be modified/deleted (true means it's managed by - Cloudflare). - """ - - meta: Optional[URIMeta] = None - """Extra Cloudflare-specific information about the record.""" - - modified_on: Optional[datetime] = None - """When the record was last modified.""" - - proxiable: Optional[bool] = None - """Whether the record can be proxied by Cloudflare or not.""" - - tags: Optional[List[str]] = None - """Custom tags for the DNS record. This field has no effect on DNS responses.""" - - ttl: Union[float, Literal[1], None] = None - """Time To Live (TTL) of the DNS record in seconds. - - Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the - minimum reduced to 30 for Enterprise zones. - """ - - zone_id: Optional[str] = None - """Identifier""" - - zone_name: Optional[str] = None - """The domain of the record.""" - - -RecordUpdateResponse = Annotated[ - Union[ - A, AAAA, CAA, Cert, CNAME, DNSKEY, DS, HTTPS, LOC, MX, NAPTR, NS, PTR, Smimea, SRV, SSHFP, SVCB, TLSA, TXT, URI - ], - PropertyInfo(discriminator="type"), -] diff --git a/src/cloudflare/types/zero_trust/dlp/profiles/custom_create_params.py b/src/cloudflare/types/zero_trust/dlp/profiles/custom_create_params.py index eaa6599fb35..a36b4fe62d6 100644 --- a/src/cloudflare/types/zero_trust/dlp/profiles/custom_create_params.py +++ b/src/cloudflare/types/zero_trust/dlp/profiles/custom_create_params.py @@ -79,3 +79,6 @@ class Profile(TypedDict, total=False): name: str """The name of the profile.""" + + ocr_enabled: bool + """If true, scan images via OCR to determine if any text present matches filters.""" diff --git a/src/cloudflare/types/zero_trust/dlp/profiles/custom_update_params.py b/src/cloudflare/types/zero_trust/dlp/profiles/custom_update_params.py index 345ddb86bf2..265f70d5da0 100644 --- a/src/cloudflare/types/zero_trust/dlp/profiles/custom_update_params.py +++ b/src/cloudflare/types/zero_trust/dlp/profiles/custom_update_params.py @@ -43,6 +43,9 @@ class CustomUpdateParams(TypedDict, total=False): name: str """The name of the profile.""" + ocr_enabled: bool + """If true, scan images via OCR to determine if any text present matches filters.""" + shared_entries: Iterable[SharedEntry] """Entries from other profiles (e.g. diff --git a/src/cloudflare/types/zero_trust/dlp/profiles/dlp_custom_profile.py b/src/cloudflare/types/zero_trust/dlp/profiles/dlp_custom_profile.py index 22bc14ac87d..746676ab3d9 100644 --- a/src/cloudflare/types/zero_trust/dlp/profiles/dlp_custom_profile.py +++ b/src/cloudflare/types/zero_trust/dlp/profiles/dlp_custom_profile.py @@ -82,6 +82,9 @@ class DLPCustomProfile(BaseModel): name: Optional[str] = None """The name of the profile.""" + ocr_enabled: Optional[bool] = None + """If true, scan images via OCR to determine if any text present matches filters.""" + type: Optional[Literal["custom"]] = None """The type of the profile.""" diff --git a/src/cloudflare/types/zero_trust/dlp/profiles/dlp_predefined_profile.py b/src/cloudflare/types/zero_trust/dlp/profiles/dlp_predefined_profile.py index df45b17c36d..78d59d7e297 100644 --- a/src/cloudflare/types/zero_trust/dlp/profiles/dlp_predefined_profile.py +++ b/src/cloudflare/types/zero_trust/dlp/profiles/dlp_predefined_profile.py @@ -57,5 +57,8 @@ class DLPPredefinedProfile(BaseModel): name: Optional[str] = None """The name of the profile.""" + ocr_enabled: Optional[bool] = None + """If true, scan images via OCR to determine if any text present matches filters.""" + type: Optional[Literal["predefined"]] = None """The type of the profile.""" diff --git a/src/cloudflare/types/zero_trust/dlp/profiles/predefined_update_params.py b/src/cloudflare/types/zero_trust/dlp/profiles/predefined_update_params.py index 13232084b1a..6708f7e7eea 100644 --- a/src/cloudflare/types/zero_trust/dlp/profiles/predefined_update_params.py +++ b/src/cloudflare/types/zero_trust/dlp/profiles/predefined_update_params.py @@ -24,6 +24,9 @@ class PredefinedUpdateParams(TypedDict, total=False): entries: Iterable[Entry] """The entries for this profile.""" + ocr_enabled: bool + """If true, scan images via OCR to determine if any text present matches filters.""" + class ContextAwarenessSkip(TypedDict, total=False): files: Required[bool] diff --git a/src/cloudflare/types/zone_get_response.py b/src/cloudflare/types/zone.py similarity index 96% rename from src/cloudflare/types/zone_get_response.py rename to src/cloudflare/types/zone.py index e68efeb7dd1..d32a80cf5a6 100644 --- a/src/cloudflare/types/zone_get_response.py +++ b/src/cloudflare/types/zone.py @@ -5,7 +5,7 @@ from .._models import BaseModel -__all__ = ["ZoneGetResponse", "Account", "Meta", "Owner"] +__all__ = ["Zone", "Account", "Meta", "Owner"] class Account(BaseModel): @@ -49,7 +49,7 @@ class Owner(BaseModel): """The type of owner""" -class ZoneGetResponse(BaseModel): +class Zone(BaseModel): id: str """Identifier""" diff --git a/src/cloudflare/types/zone_create_response.py b/src/cloudflare/types/zone_create_response.py deleted file mode 100644 index e0bd7482412..00000000000 --- a/src/cloudflare/types/zone_create_response.py +++ /dev/null @@ -1,100 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List, Optional -from datetime import datetime - -from .._models import BaseModel - -__all__ = ["ZoneCreateResponse", "Account", "Meta", "Owner"] - - -class Account(BaseModel): - id: Optional[str] = None - """Identifier""" - - name: Optional[str] = None - """The name of the account""" - - -class Meta(BaseModel): - cdn_only: Optional[bool] = None - """The zone is only configured for CDN""" - - custom_certificate_quota: Optional[int] = None - """Number of Custom Certificates the zone can have""" - - dns_only: Optional[bool] = None - """The zone is only configured for DNS""" - - foundation_dns: Optional[bool] = None - """The zone is setup with Foundation DNS""" - - page_rule_quota: Optional[int] = None - """Number of Page Rules a zone can have""" - - phishing_detected: Optional[bool] = None - """The zone has been flagged for phishing""" - - step: Optional[int] = None - - -class Owner(BaseModel): - id: Optional[str] = None - """Identifier""" - - name: Optional[str] = None - """Name of the owner""" - - type: Optional[str] = None - """The type of owner""" - - -class ZoneCreateResponse(BaseModel): - id: str - """Identifier""" - - account: Account - """The account the zone belongs to""" - - activated_on: Optional[datetime] = None - """The last time proof of ownership was detected and the zone was made active""" - - created_on: datetime - """When the zone was created""" - - development_mode: float - """ - The interval (in seconds) from when development mode expires (positive integer) - or last expired (negative integer) for the domain. If development mode has never - been enabled, this value is 0. - """ - - meta: Meta - """Metadata about the zone""" - - modified_on: datetime - """When the zone was last modified""" - - name: str - """The domain name""" - - original_dnshost: Optional[str] = None - """DNS host at the time of switching to Cloudflare""" - - original_name_servers: Optional[List[str]] = None - """ - Original name servers before moving to Cloudflare Notes: Is this only available - for full zones? - """ - - original_registrar: Optional[str] = None - """Registrar for the domain at the time of switching to Cloudflare""" - - owner: Owner - """The owner of the zone""" - - vanity_name_servers: Optional[List[str]] = None - """An array of domains used for custom name servers. - - This is only available for Business and Enterprise plans. - """ diff --git a/src/cloudflare/types/zone_edit_response.py b/src/cloudflare/types/zone_edit_response.py deleted file mode 100644 index e5437a04a43..00000000000 --- a/src/cloudflare/types/zone_edit_response.py +++ /dev/null @@ -1,100 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List, Optional -from datetime import datetime - -from .._models import BaseModel - -__all__ = ["ZoneEditResponse", "Account", "Meta", "Owner"] - - -class Account(BaseModel): - id: Optional[str] = None - """Identifier""" - - name: Optional[str] = None - """The name of the account""" - - -class Meta(BaseModel): - cdn_only: Optional[bool] = None - """The zone is only configured for CDN""" - - custom_certificate_quota: Optional[int] = None - """Number of Custom Certificates the zone can have""" - - dns_only: Optional[bool] = None - """The zone is only configured for DNS""" - - foundation_dns: Optional[bool] = None - """The zone is setup with Foundation DNS""" - - page_rule_quota: Optional[int] = None - """Number of Page Rules a zone can have""" - - phishing_detected: Optional[bool] = None - """The zone has been flagged for phishing""" - - step: Optional[int] = None - - -class Owner(BaseModel): - id: Optional[str] = None - """Identifier""" - - name: Optional[str] = None - """Name of the owner""" - - type: Optional[str] = None - """The type of owner""" - - -class ZoneEditResponse(BaseModel): - id: str - """Identifier""" - - account: Account - """The account the zone belongs to""" - - activated_on: Optional[datetime] = None - """The last time proof of ownership was detected and the zone was made active""" - - created_on: datetime - """When the zone was created""" - - development_mode: float - """ - The interval (in seconds) from when development mode expires (positive integer) - or last expired (negative integer) for the domain. If development mode has never - been enabled, this value is 0. - """ - - meta: Meta - """Metadata about the zone""" - - modified_on: datetime - """When the zone was last modified""" - - name: str - """The domain name""" - - original_dnshost: Optional[str] = None - """DNS host at the time of switching to Cloudflare""" - - original_name_servers: Optional[List[str]] = None - """ - Original name servers before moving to Cloudflare Notes: Is this only available - for full zones? - """ - - original_registrar: Optional[str] = None - """Registrar for the domain at the time of switching to Cloudflare""" - - owner: Owner - """The owner of the zone""" - - vanity_name_servers: Optional[List[str]] = None - """An array of domains used for custom name servers. - - This is only available for Business and Enterprise plans. - """ diff --git a/src/cloudflare/types/zone_list_response.py b/src/cloudflare/types/zone_list_response.py deleted file mode 100644 index e8031be216d..00000000000 --- a/src/cloudflare/types/zone_list_response.py +++ /dev/null @@ -1,100 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List, Optional -from datetime import datetime - -from .._models import BaseModel - -__all__ = ["ZoneListResponse", "Account", "Meta", "Owner"] - - -class Account(BaseModel): - id: Optional[str] = None - """Identifier""" - - name: Optional[str] = None - """The name of the account""" - - -class Meta(BaseModel): - cdn_only: Optional[bool] = None - """The zone is only configured for CDN""" - - custom_certificate_quota: Optional[int] = None - """Number of Custom Certificates the zone can have""" - - dns_only: Optional[bool] = None - """The zone is only configured for DNS""" - - foundation_dns: Optional[bool] = None - """The zone is setup with Foundation DNS""" - - page_rule_quota: Optional[int] = None - """Number of Page Rules a zone can have""" - - phishing_detected: Optional[bool] = None - """The zone has been flagged for phishing""" - - step: Optional[int] = None - - -class Owner(BaseModel): - id: Optional[str] = None - """Identifier""" - - name: Optional[str] = None - """Name of the owner""" - - type: Optional[str] = None - """The type of owner""" - - -class ZoneListResponse(BaseModel): - id: str - """Identifier""" - - account: Account - """The account the zone belongs to""" - - activated_on: Optional[datetime] = None - """The last time proof of ownership was detected and the zone was made active""" - - created_on: datetime - """When the zone was created""" - - development_mode: float - """ - The interval (in seconds) from when development mode expires (positive integer) - or last expired (negative integer) for the domain. If development mode has never - been enabled, this value is 0. - """ - - meta: Meta - """Metadata about the zone""" - - modified_on: datetime - """When the zone was last modified""" - - name: str - """The domain name""" - - original_dnshost: Optional[str] = None - """DNS host at the time of switching to Cloudflare""" - - original_name_servers: Optional[List[str]] = None - """ - Original name servers before moving to Cloudflare Notes: Is this only available - for full zones? - """ - - original_registrar: Optional[str] = None - """Registrar for the domain at the time of switching to Cloudflare""" - - owner: Owner - """The owner of the zone""" - - vanity_name_servers: Optional[List[str]] = None - """An array of domains used for custom name servers. - - This is only available for Business and Enterprise plans. - """ diff --git a/tests/api_resources/dns/test_records.py b/tests/api_resources/dns/test_records.py index 66e2c5db8d4..ef3765cea2e 100644 --- a/tests/api_resources/dns/test_records.py +++ b/tests/api_resources/dns/test_records.py @@ -10,14 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.dns import ( - RecordGetResponse, - RecordEditResponse, - RecordListResponse, + DNSRecord, RecordScanResponse, - RecordCreateResponse, RecordDeleteResponse, RecordImportResponse, - RecordUpdateResponse, ) from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray @@ -35,7 +31,7 @@ def test_method_create(self, client: Cloudflare) -> None: name="example.com", type="URI", ) - assert_matches_type(RecordCreateResponse, record, path=["response"]) + assert_matches_type(DNSRecord, record, path=["response"]) @pytest.mark.skip() @parametrize @@ -96,7 +92,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, ) - assert_matches_type(RecordCreateResponse, record, path=["response"]) + assert_matches_type(DNSRecord, record, path=["response"]) @pytest.mark.skip() @parametrize @@ -110,7 +106,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" record = response.parse() - assert_matches_type(RecordCreateResponse, record, path=["response"]) + assert_matches_type(DNSRecord, record, path=["response"]) @pytest.mark.skip() @parametrize @@ -124,7 +120,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" record = response.parse() - assert_matches_type(RecordCreateResponse, record, path=["response"]) + assert_matches_type(DNSRecord, record, path=["response"]) assert cast(Any, response.is_closed) is True @@ -147,7 +143,7 @@ def test_method_update(self, client: Cloudflare) -> None: name="example.com", type="URI", ) - assert_matches_type(RecordUpdateResponse, record, path=["response"]) + assert_matches_type(DNSRecord, record, path=["response"]) @pytest.mark.skip() @parametrize @@ -209,7 +205,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, ) - assert_matches_type(RecordUpdateResponse, record, path=["response"]) + assert_matches_type(DNSRecord, record, path=["response"]) @pytest.mark.skip() @parametrize @@ -224,7 +220,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" record = response.parse() - assert_matches_type(RecordUpdateResponse, record, path=["response"]) + assert_matches_type(DNSRecord, record, path=["response"]) @pytest.mark.skip() @parametrize @@ -239,7 +235,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" record = response.parse() - assert_matches_type(RecordUpdateResponse, record, path=["response"]) + assert_matches_type(DNSRecord, record, path=["response"]) assert cast(Any, response.is_closed) is True @@ -268,7 +264,7 @@ def test_method_list(self, client: Cloudflare) -> None: record = client.dns.records.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SyncV4PagePaginationArray[RecordListResponse], record, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[DNSRecord], record, path=["response"]) @pytest.mark.skip() @parametrize @@ -303,7 +299,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: tag_match="any", type="A", ) - assert_matches_type(SyncV4PagePaginationArray[RecordListResponse], record, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[DNSRecord], record, path=["response"]) @pytest.mark.skip() @parametrize @@ -315,7 +311,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" record = response.parse() - assert_matches_type(SyncV4PagePaginationArray[RecordListResponse], record, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[DNSRecord], record, path=["response"]) @pytest.mark.skip() @parametrize @@ -327,7 +323,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" record = response.parse() - assert_matches_type(SyncV4PagePaginationArray[RecordListResponse], record, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[DNSRecord], record, path=["response"]) assert cast(Any, response.is_closed) is True @@ -400,7 +396,7 @@ def test_method_edit(self, client: Cloudflare) -> None: name="example.com", type="URI", ) - assert_matches_type(RecordEditResponse, record, path=["response"]) + assert_matches_type(DNSRecord, record, path=["response"]) @pytest.mark.skip() @parametrize @@ -462,7 +458,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, ) - assert_matches_type(RecordEditResponse, record, path=["response"]) + assert_matches_type(DNSRecord, record, path=["response"]) @pytest.mark.skip() @parametrize @@ -477,7 +473,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" record = response.parse() - assert_matches_type(RecordEditResponse, record, path=["response"]) + assert_matches_type(DNSRecord, record, path=["response"]) @pytest.mark.skip() @parametrize @@ -492,7 +488,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" record = response.parse() - assert_matches_type(RecordEditResponse, record, path=["response"]) + assert_matches_type(DNSRecord, record, path=["response"]) assert cast(Any, response.is_closed) is True @@ -564,7 +560,7 @@ def test_method_get(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(RecordGetResponse, record, path=["response"]) + assert_matches_type(DNSRecord, record, path=["response"]) @pytest.mark.skip() @parametrize @@ -577,7 +573,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" record = response.parse() - assert_matches_type(RecordGetResponse, record, path=["response"]) + assert_matches_type(DNSRecord, record, path=["response"]) @pytest.mark.skip() @parametrize @@ -590,7 +586,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" record = response.parse() - assert_matches_type(RecordGetResponse, record, path=["response"]) + assert_matches_type(DNSRecord, record, path=["response"]) assert cast(Any, response.is_closed) is True @@ -719,7 +715,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: name="example.com", type="URI", ) - assert_matches_type(RecordCreateResponse, record, path=["response"]) + assert_matches_type(DNSRecord, record, path=["response"]) @pytest.mark.skip() @parametrize @@ -780,7 +776,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, ) - assert_matches_type(RecordCreateResponse, record, path=["response"]) + assert_matches_type(DNSRecord, record, path=["response"]) @pytest.mark.skip() @parametrize @@ -794,7 +790,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" record = await response.parse() - assert_matches_type(RecordCreateResponse, record, path=["response"]) + assert_matches_type(DNSRecord, record, path=["response"]) @pytest.mark.skip() @parametrize @@ -808,7 +804,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" record = await response.parse() - assert_matches_type(RecordCreateResponse, record, path=["response"]) + assert_matches_type(DNSRecord, record, path=["response"]) assert cast(Any, response.is_closed) is True @@ -831,7 +827,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: name="example.com", type="URI", ) - assert_matches_type(RecordUpdateResponse, record, path=["response"]) + assert_matches_type(DNSRecord, record, path=["response"]) @pytest.mark.skip() @parametrize @@ -893,7 +889,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, ) - assert_matches_type(RecordUpdateResponse, record, path=["response"]) + assert_matches_type(DNSRecord, record, path=["response"]) @pytest.mark.skip() @parametrize @@ -908,7 +904,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" record = await response.parse() - assert_matches_type(RecordUpdateResponse, record, path=["response"]) + assert_matches_type(DNSRecord, record, path=["response"]) @pytest.mark.skip() @parametrize @@ -923,7 +919,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" record = await response.parse() - assert_matches_type(RecordUpdateResponse, record, path=["response"]) + assert_matches_type(DNSRecord, record, path=["response"]) assert cast(Any, response.is_closed) is True @@ -952,7 +948,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AsyncV4PagePaginationArray[RecordListResponse], record, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[DNSRecord], record, path=["response"]) @pytest.mark.skip() @parametrize @@ -987,7 +983,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) tag_match="any", type="A", ) - assert_matches_type(AsyncV4PagePaginationArray[RecordListResponse], record, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[DNSRecord], record, path=["response"]) @pytest.mark.skip() @parametrize @@ -999,7 +995,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" record = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[RecordListResponse], record, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[DNSRecord], record, path=["response"]) @pytest.mark.skip() @parametrize @@ -1011,7 +1007,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" record = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[RecordListResponse], record, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[DNSRecord], record, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1084,7 +1080,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: name="example.com", type="URI", ) - assert_matches_type(RecordEditResponse, record, path=["response"]) + assert_matches_type(DNSRecord, record, path=["response"]) @pytest.mark.skip() @parametrize @@ -1146,7 +1142,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) tags=["owner:dns-team", "owner:dns-team", "owner:dns-team"], ttl=3600, ) - assert_matches_type(RecordEditResponse, record, path=["response"]) + assert_matches_type(DNSRecord, record, path=["response"]) @pytest.mark.skip() @parametrize @@ -1161,7 +1157,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" record = await response.parse() - assert_matches_type(RecordEditResponse, record, path=["response"]) + assert_matches_type(DNSRecord, record, path=["response"]) @pytest.mark.skip() @parametrize @@ -1176,7 +1172,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" record = await response.parse() - assert_matches_type(RecordEditResponse, record, path=["response"]) + assert_matches_type(DNSRecord, record, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1248,7 +1244,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(RecordGetResponse, record, path=["response"]) + assert_matches_type(DNSRecord, record, path=["response"]) @pytest.mark.skip() @parametrize @@ -1261,7 +1257,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" record = await response.parse() - assert_matches_type(RecordGetResponse, record, path=["response"]) + assert_matches_type(DNSRecord, record, path=["response"]) @pytest.mark.skip() @parametrize @@ -1274,7 +1270,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" record = await response.parse() - assert_matches_type(RecordGetResponse, record, path=["response"]) + assert_matches_type(DNSRecord, record, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_zones.py b/tests/api_resources/test_zones.py index 49843a41466..a0fc3e6f431 100644 --- a/tests/api_resources/test_zones.py +++ b/tests/api_resources/test_zones.py @@ -9,13 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types import ( - ZoneGetResponse, - ZoneEditResponse, - ZoneListResponse, - ZoneCreateResponse, - ZoneDeleteResponse, -) +from cloudflare.types import Zone, ZoneDeleteResponse from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -31,7 +25,7 @@ def test_method_create(self, client: Cloudflare) -> None: account={}, name="example.com", ) - assert_matches_type(Optional[ZoneCreateResponse], zone, path=["response"]) + assert_matches_type(Optional[Zone], zone, path=["response"]) @pytest.mark.skip() @parametrize @@ -41,7 +35,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: name="example.com", type="full", ) - assert_matches_type(Optional[ZoneCreateResponse], zone, path=["response"]) + assert_matches_type(Optional[Zone], zone, path=["response"]) @pytest.mark.skip() @parametrize @@ -54,7 +48,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" zone = response.parse() - assert_matches_type(Optional[ZoneCreateResponse], zone, path=["response"]) + assert_matches_type(Optional[Zone], zone, path=["response"]) @pytest.mark.skip() @parametrize @@ -67,7 +61,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" zone = response.parse() - assert_matches_type(Optional[ZoneCreateResponse], zone, path=["response"]) + assert_matches_type(Optional[Zone], zone, path=["response"]) assert cast(Any, response.is_closed) is True @@ -75,7 +69,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: zone = client.zones.list() - assert_matches_type(SyncV4PagePaginationArray[ZoneListResponse], zone, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[Zone], zone, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +87,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: per_page=5, status="initializing", ) - assert_matches_type(SyncV4PagePaginationArray[ZoneListResponse], zone, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[Zone], zone, path=["response"]) @pytest.mark.skip() @parametrize @@ -103,7 +97,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" zone = response.parse() - assert_matches_type(SyncV4PagePaginationArray[ZoneListResponse], zone, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[Zone], zone, path=["response"]) @pytest.mark.skip() @parametrize @@ -113,7 +107,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" zone = response.parse() - assert_matches_type(SyncV4PagePaginationArray[ZoneListResponse], zone, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[Zone], zone, path=["response"]) assert cast(Any, response.is_closed) is True @@ -165,7 +159,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone = client.zones.edit( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZoneEditResponse], zone, path=["response"]) + assert_matches_type(Optional[Zone], zone, path=["response"]) @pytest.mark.skip() @parametrize @@ -176,7 +170,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: type="full", vanity_name_servers=["ns1.example.com", "ns2.example.com"], ) - assert_matches_type(Optional[ZoneEditResponse], zone, path=["response"]) + assert_matches_type(Optional[Zone], zone, path=["response"]) @pytest.mark.skip() @parametrize @@ -188,7 +182,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" zone = response.parse() - assert_matches_type(Optional[ZoneEditResponse], zone, path=["response"]) + assert_matches_type(Optional[Zone], zone, path=["response"]) @pytest.mark.skip() @parametrize @@ -200,7 +194,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" zone = response.parse() - assert_matches_type(Optional[ZoneEditResponse], zone, path=["response"]) + assert_matches_type(Optional[Zone], zone, path=["response"]) assert cast(Any, response.is_closed) is True @@ -218,7 +212,7 @@ def test_method_get(self, client: Cloudflare) -> None: zone = client.zones.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZoneGetResponse], zone, path=["response"]) + assert_matches_type(Optional[Zone], zone, path=["response"]) @pytest.mark.skip() @parametrize @@ -230,7 +224,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" zone = response.parse() - assert_matches_type(Optional[ZoneGetResponse], zone, path=["response"]) + assert_matches_type(Optional[Zone], zone, path=["response"]) @pytest.mark.skip() @parametrize @@ -242,7 +236,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" zone = response.parse() - assert_matches_type(Optional[ZoneGetResponse], zone, path=["response"]) + assert_matches_type(Optional[Zone], zone, path=["response"]) assert cast(Any, response.is_closed) is True @@ -265,7 +259,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: account={}, name="example.com", ) - assert_matches_type(Optional[ZoneCreateResponse], zone, path=["response"]) + assert_matches_type(Optional[Zone], zone, path=["response"]) @pytest.mark.skip() @parametrize @@ -275,7 +269,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare name="example.com", type="full", ) - assert_matches_type(Optional[ZoneCreateResponse], zone, path=["response"]) + assert_matches_type(Optional[Zone], zone, path=["response"]) @pytest.mark.skip() @parametrize @@ -288,7 +282,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" zone = await response.parse() - assert_matches_type(Optional[ZoneCreateResponse], zone, path=["response"]) + assert_matches_type(Optional[Zone], zone, path=["response"]) @pytest.mark.skip() @parametrize @@ -301,7 +295,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" zone = await response.parse() - assert_matches_type(Optional[ZoneCreateResponse], zone, path=["response"]) + assert_matches_type(Optional[Zone], zone, path=["response"]) assert cast(Any, response.is_closed) is True @@ -309,7 +303,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: zone = await async_client.zones.list() - assert_matches_type(AsyncV4PagePaginationArray[ZoneListResponse], zone, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[Zone], zone, path=["response"]) @pytest.mark.skip() @parametrize @@ -327,7 +321,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) per_page=5, status="initializing", ) - assert_matches_type(AsyncV4PagePaginationArray[ZoneListResponse], zone, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[Zone], zone, path=["response"]) @pytest.mark.skip() @parametrize @@ -337,7 +331,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" zone = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[ZoneListResponse], zone, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[Zone], zone, path=["response"]) @pytest.mark.skip() @parametrize @@ -347,7 +341,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" zone = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[ZoneListResponse], zone, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[Zone], zone, path=["response"]) assert cast(Any, response.is_closed) is True @@ -399,7 +393,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone = await async_client.zones.edit( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZoneEditResponse], zone, path=["response"]) + assert_matches_type(Optional[Zone], zone, path=["response"]) @pytest.mark.skip() @parametrize @@ -410,7 +404,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) type="full", vanity_name_servers=["ns1.example.com", "ns2.example.com"], ) - assert_matches_type(Optional[ZoneEditResponse], zone, path=["response"]) + assert_matches_type(Optional[Zone], zone, path=["response"]) @pytest.mark.skip() @parametrize @@ -422,7 +416,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" zone = await response.parse() - assert_matches_type(Optional[ZoneEditResponse], zone, path=["response"]) + assert_matches_type(Optional[Zone], zone, path=["response"]) @pytest.mark.skip() @parametrize @@ -434,7 +428,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" zone = await response.parse() - assert_matches_type(Optional[ZoneEditResponse], zone, path=["response"]) + assert_matches_type(Optional[Zone], zone, path=["response"]) assert cast(Any, response.is_closed) is True @@ -452,7 +446,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: zone = await async_client.zones.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZoneGetResponse], zone, path=["response"]) + assert_matches_type(Optional[Zone], zone, path=["response"]) @pytest.mark.skip() @parametrize @@ -464,7 +458,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" zone = await response.parse() - assert_matches_type(Optional[ZoneGetResponse], zone, path=["response"]) + assert_matches_type(Optional[Zone], zone, path=["response"]) @pytest.mark.skip() @parametrize @@ -476,7 +470,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" zone = await response.parse() - assert_matches_type(Optional[ZoneGetResponse], zone, path=["response"]) + assert_matches_type(Optional[Zone], zone, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/dlp/profiles/test_custom.py b/tests/api_resources/zero_trust/dlp/profiles/test_custom.py index 65de6f0d2d1..6fe7f1aadbf 100644 --- a/tests/api_resources/zero_trust/dlp/profiles/test_custom.py +++ b/tests/api_resources/zero_trust/dlp/profiles/test_custom.py @@ -118,6 +118,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: }, ], name="Generic CVV Card Number", + ocr_enabled=True, shared_entries=[{"enabled": True}, {"enabled": True}, {"enabled": True}], ) assert_matches_type(DLPCustomProfile, custom, path=["response"]) @@ -370,6 +371,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare }, ], name="Generic CVV Card Number", + ocr_enabled=True, shared_entries=[{"enabled": True}, {"enabled": True}, {"enabled": True}], ) assert_matches_type(DLPCustomProfile, custom, path=["response"]) diff --git a/tests/api_resources/zero_trust/dlp/profiles/test_predefined.py b/tests/api_resources/zero_trust/dlp/profiles/test_predefined.py index d787648fd7c..9cc2978647c 100644 --- a/tests/api_resources/zero_trust/dlp/profiles/test_predefined.py +++ b/tests/api_resources/zero_trust/dlp/profiles/test_predefined.py @@ -38,6 +38,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "skip": {"files": True}, }, entries=[{"enabled": True}, {"enabled": True}, {"enabled": True}], + ocr_enabled=True, ) assert_matches_type(DLPPredefinedProfile, predefined, path=["response"]) @@ -161,6 +162,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "skip": {"files": True}, }, entries=[{"enabled": True}, {"enabled": True}, {"enabled": True}], + ocr_enabled=True, ) assert_matches_type(DLPPredefinedProfile, predefined, path=["response"])