chore(types): change optional parameter type from NotGiven to Omit

This commit is contained in:
stainless-app[bot] 2025-09-18 14:58:26 +00:00
parent afc82697b9
commit 43968e2b25
642 changed files with 19352 additions and 19396 deletions

View file

@ -3,7 +3,7 @@
import typing as _t
from . import types
from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes
from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes, omit, not_given
from ._utils import file_from_path
from ._client import (
Client,
@ -48,7 +48,9 @@ __all__ = [
"ProxiesTypes",
"NotGiven",
"NOT_GIVEN",
"not_given",
"Omit",
"omit",
"CloudflareError",
"APIError",
"APIStatusError",

View file

@ -42,7 +42,6 @@ from . import _exceptions
from ._qs import Querystring
from ._files import to_httpx_files, async_to_httpx_files
from ._types import (
NOT_GIVEN,
Body,
Omit,
Query,
@ -59,6 +58,7 @@ from ._types import (
MultipartSyntax,
HttpxRequestFiles,
ModelBuilderProtocol,
not_given,
)
from ._utils import is_dict, is_list, asyncify, is_given, is_tuple, lru_cache, is_mapping, is_mapping_t, is_sequence_t
from ._compat import PYDANTIC_V1, model_copy, model_dump
@ -147,9 +147,9 @@ class PageInfo:
def __init__(
self,
*,
url: URL | NotGiven = NOT_GIVEN,
json: Body | NotGiven = NOT_GIVEN,
params: Query | NotGiven = NOT_GIVEN,
url: URL | NotGiven = not_given,
json: Body | NotGiven = not_given,
params: Query | NotGiven = not_given,
) -> None:
self.url = url
self.json = json
@ -635,7 +635,7 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
# we internally support defining a temporary header to override the
# default `cast_to` type for use with `.with_raw_response` and `.with_streaming_response`
# see _response.py for implementation details
override_cast_to = headers.pop(OVERRIDE_CAST_TO_HEADER, NOT_GIVEN)
override_cast_to = headers.pop(OVERRIDE_CAST_TO_HEADER, not_given)
if is_given(override_cast_to):
options.headers = headers
return cast(Type[ResponseT], override_cast_to)
@ -866,7 +866,7 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
base_url: str | URL,
api_version: str,
max_retries: int = DEFAULT_MAX_RETRIES,
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | Timeout | None | NotGiven = not_given,
http_client: httpx.Client | None = None,
custom_headers: Mapping[str, str] | None = None,
custom_query: Mapping[str, object] | None = None,
@ -1399,7 +1399,7 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
api_version: str,
_strict_response_validation: bool,
max_retries: int = DEFAULT_MAX_RETRIES,
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | Timeout | None | NotGiven = not_given,
http_client: httpx.AsyncClient | None = None,
custom_headers: Mapping[str, str] | None = None,
custom_query: Mapping[str, object] | None = None,
@ -1862,8 +1862,8 @@ def make_request_options(
extra_query: Query | None = None,
extra_body: Body | None = None,
idempotency_key: str | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
post_parser: PostParser | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
post_parser: PostParser | NotGiven = not_given,
multipart_syntax: MultipartSyntax | None = None,
) -> RequestOptions:
"""Create a dict of type RequestOptions without keys of NotGiven values."""

View file

@ -3,7 +3,7 @@
from __future__ import annotations
import os
from typing import TYPE_CHECKING, Any, Union, Mapping
from typing import TYPE_CHECKING, Any, Mapping
from datetime import datetime
from typing_extensions import Self, override
@ -12,7 +12,6 @@ import httpx
from . import _exceptions
from ._qs import Querystring
from ._types import (
NOT_GIVEN,
Omit,
Headers,
Timeout,
@ -20,6 +19,7 @@ from ._types import (
Transport,
ProxiesTypes,
RequestOptions,
not_given,
)
from ._utils import is_given, get_async_library
from ._compat import cached_property
@ -276,7 +276,7 @@ class Cloudflare(SyncAPIClient):
user_service_key: str | None = None,
base_url: str | httpx.URL | None = None,
api_version: str | None = None,
timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN,
timeout: float | Timeout | None | NotGiven = not_given,
max_retries: int = DEFAULT_MAX_RETRIES,
default_headers: Mapping[str, str] | None = None,
default_query: Mapping[str, object] | None = None,
@ -1002,9 +1002,9 @@ class Cloudflare(SyncAPIClient):
user_service_key: str | None = None,
base_url: str | httpx.URL | None = None,
api_version: str | None = None,
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | Timeout | None | NotGiven = not_given,
http_client: httpx.Client | None = None,
max_retries: int | NotGiven = NOT_GIVEN,
max_retries: int | NotGiven = not_given,
default_headers: Mapping[str, str] | None = None,
set_default_headers: Mapping[str, str] | None = None,
default_query: Mapping[str, object] | None = None,
@ -1102,7 +1102,7 @@ class AsyncCloudflare(AsyncAPIClient):
user_service_key: str | None = None,
base_url: str | httpx.URL | None = None,
api_version: str | None = None,
timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN,
timeout: float | Timeout | None | NotGiven = not_given,
max_retries: int = DEFAULT_MAX_RETRIES,
default_headers: Mapping[str, str] | None = None,
default_query: Mapping[str, object] | None = None,
@ -1828,9 +1828,9 @@ class AsyncCloudflare(AsyncAPIClient):
user_service_key: str | None = None,
base_url: str | httpx.URL | None = None,
api_version: str | None = None,
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | Timeout | None | NotGiven = not_given,
http_client: httpx.AsyncClient | None = None,
max_retries: int | NotGiven = NOT_GIVEN,
max_retries: int | NotGiven = not_given,
default_headers: Mapping[str, str] | None = None,
set_default_headers: Mapping[str, str] | None = None,
default_query: Mapping[str, object] | None = None,

View file

@ -4,7 +4,7 @@ from typing import Any, List, Tuple, Union, Mapping, TypeVar
from urllib.parse import parse_qs, urlencode
from typing_extensions import Literal, get_args
from ._types import NOT_GIVEN, NotGiven, NotGivenOr
from ._types import NotGiven, not_given
from ._utils import flatten
_T = TypeVar("_T")
@ -41,8 +41,8 @@ class Querystring:
self,
params: Params,
*,
array_format: NotGivenOr[ArrayFormat] = NOT_GIVEN,
nested_format: NotGivenOr[NestedFormat] = NOT_GIVEN,
array_format: ArrayFormat | NotGiven = not_given,
nested_format: NestedFormat | NotGiven = not_given,
) -> str:
return urlencode(
self.stringify_items(
@ -56,8 +56,8 @@ class Querystring:
self,
params: Params,
*,
array_format: NotGivenOr[ArrayFormat] = NOT_GIVEN,
nested_format: NotGivenOr[NestedFormat] = NOT_GIVEN,
array_format: ArrayFormat | NotGiven = not_given,
nested_format: NestedFormat | NotGiven = not_given,
) -> list[tuple[str, str]]:
opts = Options(
qs=self,
@ -143,8 +143,8 @@ class Options:
self,
qs: Querystring = _qs,
*,
array_format: NotGivenOr[ArrayFormat] = NOT_GIVEN,
nested_format: NotGivenOr[NestedFormat] = NOT_GIVEN,
array_format: ArrayFormat | NotGiven = not_given,
nested_format: NestedFormat | NotGiven = not_given,
) -> None:
self.array_format = qs.array_format if isinstance(array_format, NotGiven) else array_format
self.nested_format = qs.nested_format if isinstance(nested_format, NotGiven) else nested_format

View file

@ -120,18 +120,21 @@ class RequestOptions(TypedDict, total=False):
# Sentinel class used until PEP 0661 is accepted
class NotGiven:
"""
A sentinel singleton class used to distinguish omitted keyword arguments
from those passed in with the value None (which may have different behavior).
For parameters with a meaningful None value, we need to distinguish between
the user explicitly passing None, and the user not passing the parameter at
all.
User code shouldn't need to use not_given directly.
For example:
```py
def get(timeout: Union[int, NotGiven, None] = NotGiven()) -> Response: ...
def create(timeout: Timeout | None | NotGiven = not_given): ...
get(timeout=1) # 1s timeout
get(timeout=None) # No timeout
get() # Default timeout behavior, which may not be statically known at the method definition.
create(timeout=1) # 1s timeout
create(timeout=None) # No timeout
create() # Default timeout behavior
```
"""
@ -143,13 +146,14 @@ class NotGiven:
return "NOT_GIVEN"
NotGivenOr = Union[_T, NotGiven]
not_given = NotGiven()
# for backwards compatibility:
NOT_GIVEN = NotGiven()
class Omit:
"""In certain situations you need to be able to represent a case where a default value has
to be explicitly removed and `None` is not an appropriate substitute, for example:
"""
To explicitly omit something from being sent in a request, use `omit`.
```py
# as the default `Content-Type` header is `application/json` that will be sent
@ -159,8 +163,8 @@ class Omit:
# to look something like: 'multipart/form-data; boundary=0d8382fcf5f8c3be01ca2e11002d2983'
client.post(..., headers={"Content-Type": "multipart/form-data"})
# instead you can remove the default `application/json` header by passing Omit
client.post(..., headers={"Content-Type": Omit()})
# instead you can remove the default `application/json` header by passing omit
client.post(..., headers={"Content-Type": omit})
```
"""
@ -168,6 +172,9 @@ class Omit:
return False
omit = Omit()
@runtime_checkable
class ModelBuilderProtocol(Protocol):
@classmethod

View file

@ -268,7 +268,7 @@ def _transform_typeddict(
annotations = get_type_hints(expected_type, include_extras=True)
for key, value in data.items():
if not is_given(value):
# we don't need to include `NotGiven` values here as they'll
# we don't need to include omitted values here as they'll
# be stripped out before the request is sent anyway
continue
@ -434,7 +434,7 @@ async def _async_transform_typeddict(
annotations = get_type_hints(expected_type, include_extras=True)
for key, value in data.items():
if not is_given(value):
# we don't need to include `NotGiven` values here as they'll
# we don't need to include omitted values here as they'll
# be stripped out before the request is sent anyway
continue

View file

@ -21,7 +21,7 @@ from typing_extensions import TypeGuard
import sniffio
from .._types import NotGiven, FileTypes, NotGivenOr, HeadersLike
from .._types import Omit, NotGiven, FileTypes, HeadersLike
_T = TypeVar("_T")
_TupleT = TypeVar("_TupleT", bound=Tuple[object, ...])
@ -63,7 +63,7 @@ def _extract_items(
try:
key = path[index]
except IndexError:
if isinstance(obj, NotGiven):
if not is_given(obj):
# no value was provided - we can safely ignore
return []
@ -126,8 +126,8 @@ def _extract_items(
return []
def is_given(obj: NotGivenOr[_T]) -> TypeGuard[_T]:
return not isinstance(obj, NotGiven)
def is_given(obj: _T | NotGiven | Omit) -> TypeGuard[_T]:
return not isinstance(obj, NotGiven) and not isinstance(obj, Omit)
# Type safe methods for narrowing types with TypeVars.

View file

@ -7,7 +7,7 @@ from typing_extensions import Literal, overload
import httpx
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from .._utils import required_args, maybe_transform, async_maybe_transform
from .._compat import cached_property
from .._resource import SyncAPIResource, AsyncAPIResource
@ -66,18 +66,18 @@ class AbuseReportsResource(SyncAPIResource):
signature: str,
state: str,
urls: str,
comments: str | NotGiven = NOT_GIVEN,
company: str | NotGiven = NOT_GIVEN,
reported_country: str | NotGiven = NOT_GIVEN,
reported_user_agent: str | NotGiven = NOT_GIVEN,
tele: str | NotGiven = NOT_GIVEN,
title: str | NotGiven = NOT_GIVEN,
comments: str | Omit = omit,
company: str | Omit = omit,
reported_country: str | Omit = omit,
reported_user_agent: str | Omit = omit,
tele: str | Omit = omit,
title: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> str:
"""
Submit the Abuse Report of a particular type
@ -172,18 +172,18 @@ class AbuseReportsResource(SyncAPIResource):
trademark_office: str,
trademark_symbol: str,
urls: str,
comments: str | NotGiven = NOT_GIVEN,
company: str | NotGiven = NOT_GIVEN,
reported_country: str | NotGiven = NOT_GIVEN,
reported_user_agent: str | NotGiven = NOT_GIVEN,
tele: str | NotGiven = NOT_GIVEN,
title: str | NotGiven = NOT_GIVEN,
comments: str | Omit = omit,
company: str | Omit = omit,
reported_country: str | Omit = omit,
reported_user_agent: str | Omit = omit,
tele: str | Omit = omit,
title: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> str:
"""
Submit the Abuse Report of a particular type
@ -260,21 +260,21 @@ class AbuseReportsResource(SyncAPIResource):
name: str,
owner_notification: Literal["send", "send-anon", "none"],
urls: str,
comments: str | NotGiven = NOT_GIVEN,
company: str | NotGiven = NOT_GIVEN,
destination_ips: str | NotGiven = NOT_GIVEN,
ports_protocols: str | NotGiven = NOT_GIVEN,
reported_country: str | NotGiven = NOT_GIVEN,
reported_user_agent: str | NotGiven = NOT_GIVEN,
source_ips: str | NotGiven = NOT_GIVEN,
tele: str | NotGiven = NOT_GIVEN,
title: str | NotGiven = NOT_GIVEN,
comments: str | Omit = omit,
company: str | Omit = omit,
destination_ips: str | Omit = omit,
ports_protocols: str | Omit = omit,
reported_country: str | Omit = omit,
reported_user_agent: str | Omit = omit,
source_ips: str | Omit = omit,
tele: str | Omit = omit,
title: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> str:
"""
Submit the Abuse Report of a particular type
@ -358,19 +358,19 @@ class AbuseReportsResource(SyncAPIResource):
name: str,
owner_notification: Literal["send", "send-anon"],
urls: str,
comments: str | NotGiven = NOT_GIVEN,
company: str | NotGiven = NOT_GIVEN,
original_work: str | NotGiven = NOT_GIVEN,
reported_country: str | NotGiven = NOT_GIVEN,
reported_user_agent: str | NotGiven = NOT_GIVEN,
tele: str | NotGiven = NOT_GIVEN,
title: str | NotGiven = NOT_GIVEN,
comments: str | Omit = omit,
company: str | Omit = omit,
original_work: str | Omit = omit,
reported_country: str | Omit = omit,
reported_user_agent: str | Omit = omit,
tele: str | Omit = omit,
title: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> str:
"""
Submit the Abuse Report of a particular type
@ -445,19 +445,19 @@ class AbuseReportsResource(SyncAPIResource):
ncmec_notification: Literal["send", "send-anon"],
owner_notification: Literal["send", "send-anon", "none"],
urls: str,
comments: str | NotGiven = NOT_GIVEN,
company: str | NotGiven = NOT_GIVEN,
country: str | NotGiven = NOT_GIVEN,
reported_country: str | NotGiven = NOT_GIVEN,
reported_user_agent: str | NotGiven = NOT_GIVEN,
tele: str | NotGiven = NOT_GIVEN,
title: str | NotGiven = NOT_GIVEN,
comments: str | Omit = omit,
company: str | Omit = omit,
country: str | Omit = omit,
reported_country: str | Omit = omit,
reported_user_agent: str | Omit = omit,
tele: str | Omit = omit,
title: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> str:
"""
Submit the Abuse Report of a particular type
@ -534,18 +534,18 @@ class AbuseReportsResource(SyncAPIResource):
name: str,
owner_notification: Literal["send", "send-anon"],
urls: str,
comments: str | NotGiven = NOT_GIVEN,
company: str | NotGiven = NOT_GIVEN,
reported_country: str | NotGiven = NOT_GIVEN,
reported_user_agent: str | NotGiven = NOT_GIVEN,
tele: str | NotGiven = NOT_GIVEN,
title: str | NotGiven = NOT_GIVEN,
comments: str | Omit = omit,
company: str | Omit = omit,
reported_country: str | Omit = omit,
reported_user_agent: str | Omit = omit,
tele: str | Omit = omit,
title: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> str:
"""
Submit the Abuse Report of a particular type
@ -614,18 +614,18 @@ class AbuseReportsResource(SyncAPIResource):
name: str,
owner_notification: Literal["send", "send-anon", "none"],
urls: str,
comments: str | NotGiven = NOT_GIVEN,
company: str | NotGiven = NOT_GIVEN,
reported_country: str | NotGiven = NOT_GIVEN,
reported_user_agent: str | NotGiven = NOT_GIVEN,
tele: str | NotGiven = NOT_GIVEN,
title: str | NotGiven = NOT_GIVEN,
comments: str | Omit = omit,
company: str | Omit = omit,
reported_country: str | Omit = omit,
reported_user_agent: str | Omit = omit,
tele: str | Omit = omit,
title: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> str:
"""
Submit the Abuse Report of a particular type
@ -689,19 +689,19 @@ class AbuseReportsResource(SyncAPIResource):
ncsei_subject_representation: bool,
owner_notification: Literal["send", "send-anon", "none"],
urls: str,
comments: str | NotGiven = NOT_GIVEN,
company: str | NotGiven = NOT_GIVEN,
country: str | NotGiven = NOT_GIVEN,
reported_country: str | NotGiven = NOT_GIVEN,
reported_user_agent: str | NotGiven = NOT_GIVEN,
tele: str | NotGiven = NOT_GIVEN,
title: str | NotGiven = NOT_GIVEN,
comments: str | Omit = omit,
company: str | Omit = omit,
country: str | Omit = omit,
reported_country: str | Omit = omit,
reported_user_agent: str | Omit = omit,
tele: str | Omit = omit,
title: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> str:
"""
Submit the Abuse Report of a particular type
@ -841,41 +841,41 @@ class AbuseReportsResource(SyncAPIResource):
| Literal["abuse_threat"]
| Literal["abuse_registrar_whois"]
| Literal["abuse_ncsei"],
address1: str | NotGiven = NOT_GIVEN,
agent_name: str | NotGiven = NOT_GIVEN,
agree: Literal[1] | NotGiven = NOT_GIVEN,
city: str | NotGiven = NOT_GIVEN,
country: str | NotGiven = NOT_GIVEN,
address1: str | Omit = omit,
agent_name: str | Omit = omit,
agree: Literal[1] | Omit = omit,
city: str | Omit = omit,
country: str | Omit = omit,
email: str,
email2: str,
host_notification: Literal["send"] | Literal["send", "send-anon"] | NotGiven = NOT_GIVEN,
host_notification: Literal["send"] | Literal["send", "send-anon"] | Omit = omit,
name: str,
original_work: str | NotGiven = NOT_GIVEN,
original_work: str | Omit = omit,
owner_notification: Literal["send"] | Literal["send", "send-anon", "none"] | Literal["send", "send-anon"],
signature: str | NotGiven = NOT_GIVEN,
state: str | NotGiven = NOT_GIVEN,
signature: str | Omit = omit,
state: str | Omit = omit,
urls: str,
comments: str | NotGiven = NOT_GIVEN,
company: str | NotGiven = NOT_GIVEN,
reported_country: str | NotGiven = NOT_GIVEN,
reported_user_agent: str | NotGiven = NOT_GIVEN,
tele: str | NotGiven = NOT_GIVEN,
title: str | NotGiven = NOT_GIVEN,
justification: str | NotGiven = NOT_GIVEN,
trademark_number: str | NotGiven = NOT_GIVEN,
trademark_office: str | NotGiven = NOT_GIVEN,
trademark_symbol: str | NotGiven = NOT_GIVEN,
destination_ips: str | NotGiven = NOT_GIVEN,
ports_protocols: str | NotGiven = NOT_GIVEN,
source_ips: str | NotGiven = NOT_GIVEN,
ncmec_notification: Literal["send", "send-anon"] | NotGiven = NOT_GIVEN,
ncsei_subject_representation: bool | NotGiven = NOT_GIVEN,
comments: str | Omit = omit,
company: str | Omit = omit,
reported_country: str | Omit = omit,
reported_user_agent: str | Omit = omit,
tele: str | Omit = omit,
title: str | Omit = omit,
justification: str | Omit = omit,
trademark_number: str | Omit = omit,
trademark_office: str | Omit = omit,
trademark_symbol: str | Omit = omit,
destination_ips: str | Omit = omit,
ports_protocols: str | Omit = omit,
source_ips: str | Omit = omit,
ncmec_notification: Literal["send", "send-anon"] | Omit = omit,
ncsei_subject_representation: bool | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> str:
if not account_id:
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
@ -970,18 +970,18 @@ class AsyncAbuseReportsResource(AsyncAPIResource):
signature: str,
state: str,
urls: str,
comments: str | NotGiven = NOT_GIVEN,
company: str | NotGiven = NOT_GIVEN,
reported_country: str | NotGiven = NOT_GIVEN,
reported_user_agent: str | NotGiven = NOT_GIVEN,
tele: str | NotGiven = NOT_GIVEN,
title: str | NotGiven = NOT_GIVEN,
comments: str | Omit = omit,
company: str | Omit = omit,
reported_country: str | Omit = omit,
reported_user_agent: str | Omit = omit,
tele: str | Omit = omit,
title: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> str:
"""
Submit the Abuse Report of a particular type
@ -1076,18 +1076,18 @@ class AsyncAbuseReportsResource(AsyncAPIResource):
trademark_office: str,
trademark_symbol: str,
urls: str,
comments: str | NotGiven = NOT_GIVEN,
company: str | NotGiven = NOT_GIVEN,
reported_country: str | NotGiven = NOT_GIVEN,
reported_user_agent: str | NotGiven = NOT_GIVEN,
tele: str | NotGiven = NOT_GIVEN,
title: str | NotGiven = NOT_GIVEN,
comments: str | Omit = omit,
company: str | Omit = omit,
reported_country: str | Omit = omit,
reported_user_agent: str | Omit = omit,
tele: str | Omit = omit,
title: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> str:
"""
Submit the Abuse Report of a particular type
@ -1164,21 +1164,21 @@ class AsyncAbuseReportsResource(AsyncAPIResource):
name: str,
owner_notification: Literal["send", "send-anon", "none"],
urls: str,
comments: str | NotGiven = NOT_GIVEN,
company: str | NotGiven = NOT_GIVEN,
destination_ips: str | NotGiven = NOT_GIVEN,
ports_protocols: str | NotGiven = NOT_GIVEN,
reported_country: str | NotGiven = NOT_GIVEN,
reported_user_agent: str | NotGiven = NOT_GIVEN,
source_ips: str | NotGiven = NOT_GIVEN,
tele: str | NotGiven = NOT_GIVEN,
title: str | NotGiven = NOT_GIVEN,
comments: str | Omit = omit,
company: str | Omit = omit,
destination_ips: str | Omit = omit,
ports_protocols: str | Omit = omit,
reported_country: str | Omit = omit,
reported_user_agent: str | Omit = omit,
source_ips: str | Omit = omit,
tele: str | Omit = omit,
title: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> str:
"""
Submit the Abuse Report of a particular type
@ -1262,19 +1262,19 @@ class AsyncAbuseReportsResource(AsyncAPIResource):
name: str,
owner_notification: Literal["send", "send-anon"],
urls: str,
comments: str | NotGiven = NOT_GIVEN,
company: str | NotGiven = NOT_GIVEN,
original_work: str | NotGiven = NOT_GIVEN,
reported_country: str | NotGiven = NOT_GIVEN,
reported_user_agent: str | NotGiven = NOT_GIVEN,
tele: str | NotGiven = NOT_GIVEN,
title: str | NotGiven = NOT_GIVEN,
comments: str | Omit = omit,
company: str | Omit = omit,
original_work: str | Omit = omit,
reported_country: str | Omit = omit,
reported_user_agent: str | Omit = omit,
tele: str | Omit = omit,
title: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> str:
"""
Submit the Abuse Report of a particular type
@ -1349,19 +1349,19 @@ class AsyncAbuseReportsResource(AsyncAPIResource):
ncmec_notification: Literal["send", "send-anon"],
owner_notification: Literal["send", "send-anon", "none"],
urls: str,
comments: str | NotGiven = NOT_GIVEN,
company: str | NotGiven = NOT_GIVEN,
country: str | NotGiven = NOT_GIVEN,
reported_country: str | NotGiven = NOT_GIVEN,
reported_user_agent: str | NotGiven = NOT_GIVEN,
tele: str | NotGiven = NOT_GIVEN,
title: str | NotGiven = NOT_GIVEN,
comments: str | Omit = omit,
company: str | Omit = omit,
country: str | Omit = omit,
reported_country: str | Omit = omit,
reported_user_agent: str | Omit = omit,
tele: str | Omit = omit,
title: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> str:
"""
Submit the Abuse Report of a particular type
@ -1438,18 +1438,18 @@ class AsyncAbuseReportsResource(AsyncAPIResource):
name: str,
owner_notification: Literal["send", "send-anon"],
urls: str,
comments: str | NotGiven = NOT_GIVEN,
company: str | NotGiven = NOT_GIVEN,
reported_country: str | NotGiven = NOT_GIVEN,
reported_user_agent: str | NotGiven = NOT_GIVEN,
tele: str | NotGiven = NOT_GIVEN,
title: str | NotGiven = NOT_GIVEN,
comments: str | Omit = omit,
company: str | Omit = omit,
reported_country: str | Omit = omit,
reported_user_agent: str | Omit = omit,
tele: str | Omit = omit,
title: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> str:
"""
Submit the Abuse Report of a particular type
@ -1518,18 +1518,18 @@ class AsyncAbuseReportsResource(AsyncAPIResource):
name: str,
owner_notification: Literal["send", "send-anon", "none"],
urls: str,
comments: str | NotGiven = NOT_GIVEN,
company: str | NotGiven = NOT_GIVEN,
reported_country: str | NotGiven = NOT_GIVEN,
reported_user_agent: str | NotGiven = NOT_GIVEN,
tele: str | NotGiven = NOT_GIVEN,
title: str | NotGiven = NOT_GIVEN,
comments: str | Omit = omit,
company: str | Omit = omit,
reported_country: str | Omit = omit,
reported_user_agent: str | Omit = omit,
tele: str | Omit = omit,
title: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> str:
"""
Submit the Abuse Report of a particular type
@ -1593,19 +1593,19 @@ class AsyncAbuseReportsResource(AsyncAPIResource):
ncsei_subject_representation: bool,
owner_notification: Literal["send", "send-anon", "none"],
urls: str,
comments: str | NotGiven = NOT_GIVEN,
company: str | NotGiven = NOT_GIVEN,
country: str | NotGiven = NOT_GIVEN,
reported_country: str | NotGiven = NOT_GIVEN,
reported_user_agent: str | NotGiven = NOT_GIVEN,
tele: str | NotGiven = NOT_GIVEN,
title: str | NotGiven = NOT_GIVEN,
comments: str | Omit = omit,
company: str | Omit = omit,
country: str | Omit = omit,
reported_country: str | Omit = omit,
reported_user_agent: str | Omit = omit,
tele: str | Omit = omit,
title: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> str:
"""
Submit the Abuse Report of a particular type
@ -1745,41 +1745,41 @@ class AsyncAbuseReportsResource(AsyncAPIResource):
| Literal["abuse_threat"]
| Literal["abuse_registrar_whois"]
| Literal["abuse_ncsei"],
address1: str | NotGiven = NOT_GIVEN,
agent_name: str | NotGiven = NOT_GIVEN,
agree: Literal[1] | NotGiven = NOT_GIVEN,
city: str | NotGiven = NOT_GIVEN,
country: str | NotGiven = NOT_GIVEN,
address1: str | Omit = omit,
agent_name: str | Omit = omit,
agree: Literal[1] | Omit = omit,
city: str | Omit = omit,
country: str | Omit = omit,
email: str,
email2: str,
host_notification: Literal["send"] | Literal["send", "send-anon"] | NotGiven = NOT_GIVEN,
host_notification: Literal["send"] | Literal["send", "send-anon"] | Omit = omit,
name: str,
original_work: str | NotGiven = NOT_GIVEN,
original_work: str | Omit = omit,
owner_notification: Literal["send"] | Literal["send", "send-anon", "none"] | Literal["send", "send-anon"],
signature: str | NotGiven = NOT_GIVEN,
state: str | NotGiven = NOT_GIVEN,
signature: str | Omit = omit,
state: str | Omit = omit,
urls: str,
comments: str | NotGiven = NOT_GIVEN,
company: str | NotGiven = NOT_GIVEN,
reported_country: str | NotGiven = NOT_GIVEN,
reported_user_agent: str | NotGiven = NOT_GIVEN,
tele: str | NotGiven = NOT_GIVEN,
title: str | NotGiven = NOT_GIVEN,
justification: str | NotGiven = NOT_GIVEN,
trademark_number: str | NotGiven = NOT_GIVEN,
trademark_office: str | NotGiven = NOT_GIVEN,
trademark_symbol: str | NotGiven = NOT_GIVEN,
destination_ips: str | NotGiven = NOT_GIVEN,
ports_protocols: str | NotGiven = NOT_GIVEN,
source_ips: str | NotGiven = NOT_GIVEN,
ncmec_notification: Literal["send", "send-anon"] | NotGiven = NOT_GIVEN,
ncsei_subject_representation: bool | NotGiven = NOT_GIVEN,
comments: str | Omit = omit,
company: str | Omit = omit,
reported_country: str | Omit = omit,
reported_user_agent: str | Omit = omit,
tele: str | Omit = omit,
title: str | Omit = omit,
justification: str | Omit = omit,
trademark_number: str | Omit = omit,
trademark_office: str | Omit = omit,
trademark_symbol: str | Omit = omit,
destination_ips: str | Omit = omit,
ports_protocols: str | Omit = omit,
source_ips: str | Omit = omit,
ncmec_notification: Literal["send", "send-anon"] | Omit = omit,
ncsei_subject_representation: bool | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> str:
if not account_id:
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")

View file

@ -23,7 +23,7 @@ from .members import (
MembersResourceWithStreamingResponse,
AsyncMembersResourceWithStreamingResponse,
)
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from .logs.logs import (
@ -111,14 +111,14 @@ class AccountsResource(SyncAPIResource):
self,
*,
name: str,
type: Literal["standard", "enterprise"] | NotGiven = NOT_GIVEN,
unit: account_create_params.Unit | NotGiven = NOT_GIVEN,
type: Literal["standard", "enterprise"] | Omit = omit,
unit: account_create_params.Unit | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Account]:
"""
Create an account (only available for tenant admins at this time)
@ -165,13 +165,13 @@ class AccountsResource(SyncAPIResource):
id: str,
name: str,
type: Literal["standard", "enterprise"],
settings: account_update_params.Settings | NotGiven = NOT_GIVEN,
settings: account_update_params.Settings | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Account]:
"""
Update an existing account.
@ -219,16 +219,16 @@ class AccountsResource(SyncAPIResource):
def list(
self,
*,
direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
page: float | NotGiven = NOT_GIVEN,
per_page: float | NotGiven = NOT_GIVEN,
direction: Literal["asc", "desc"] | Omit = omit,
name: str | Omit = omit,
page: float | Omit = omit,
per_page: float | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncV4PagePaginationArray[Account]:
"""
List all accounts you have ownership or verified access to.
@ -280,7 +280,7 @@ class AccountsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AccountDeleteResponse]:
"""Delete a specific account (only available for tenant admins at this time).
@ -322,7 +322,7 @@ class AccountsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Account]:
"""
Get information about a specific account that you are a member of.
@ -397,14 +397,14 @@ class AsyncAccountsResource(AsyncAPIResource):
self,
*,
name: str,
type: Literal["standard", "enterprise"] | NotGiven = NOT_GIVEN,
unit: account_create_params.Unit | NotGiven = NOT_GIVEN,
type: Literal["standard", "enterprise"] | Omit = omit,
unit: account_create_params.Unit | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Account]:
"""
Create an account (only available for tenant admins at this time)
@ -451,13 +451,13 @@ class AsyncAccountsResource(AsyncAPIResource):
id: str,
name: str,
type: Literal["standard", "enterprise"],
settings: account_update_params.Settings | NotGiven = NOT_GIVEN,
settings: account_update_params.Settings | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Account]:
"""
Update an existing account.
@ -505,16 +505,16 @@ class AsyncAccountsResource(AsyncAPIResource):
def list(
self,
*,
direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
page: float | NotGiven = NOT_GIVEN,
per_page: float | NotGiven = NOT_GIVEN,
direction: Literal["asc", "desc"] | Omit = omit,
name: str | Omit = omit,
page: float | Omit = omit,
per_page: float | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[Account, AsyncV4PagePaginationArray[Account]]:
"""
List all accounts you have ownership or verified access to.
@ -566,7 +566,7 @@ class AsyncAccountsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AccountDeleteResponse]:
"""Delete a specific account (only available for tenant admins at this time).
@ -608,7 +608,7 @@ class AsyncAccountsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Account]:
"""
Get information about a specific account that you are a member of.

View file

@ -8,7 +8,7 @@ from typing_extensions import Literal
import httpx
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ...._utils import maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@ -52,36 +52,36 @@ class AuditResource(SyncAPIResource):
account_id: str,
before: Union[str, date],
since: Union[str, date],
account_name: audit_list_params.AccountName | NotGiven = NOT_GIVEN,
action_result: audit_list_params.ActionResult | NotGiven = NOT_GIVEN,
action_type: audit_list_params.ActionType | NotGiven = NOT_GIVEN,
actor_context: audit_list_params.ActorContext | NotGiven = NOT_GIVEN,
actor_email: audit_list_params.ActorEmail | NotGiven = NOT_GIVEN,
actor_id: audit_list_params.ActorID | NotGiven = NOT_GIVEN,
actor_ip_address: audit_list_params.ActorIPAddress | NotGiven = NOT_GIVEN,
actor_token_id: audit_list_params.ActorTokenID | NotGiven = NOT_GIVEN,
actor_token_name: audit_list_params.ActorTokenName | NotGiven = NOT_GIVEN,
actor_type: audit_list_params.ActorType | NotGiven = NOT_GIVEN,
audit_log_id: audit_list_params.AuditLogID | NotGiven = NOT_GIVEN,
cursor: str | NotGiven = NOT_GIVEN,
direction: Literal["desc", "asc"] | NotGiven = NOT_GIVEN,
limit: float | NotGiven = NOT_GIVEN,
raw_cf_rayid: audit_list_params.RawCfRayID | NotGiven = NOT_GIVEN,
raw_method: audit_list_params.RawMethod | NotGiven = NOT_GIVEN,
raw_status_code: audit_list_params.RawStatusCode | NotGiven = NOT_GIVEN,
raw_uri: audit_list_params.RawURI | NotGiven = NOT_GIVEN,
resource_id: audit_list_params.ResourceID | NotGiven = NOT_GIVEN,
resource_product: audit_list_params.ResourceProduct | NotGiven = NOT_GIVEN,
resource_scope: audit_list_params.ResourceScope | NotGiven = NOT_GIVEN,
resource_type: audit_list_params.ResourceType | NotGiven = NOT_GIVEN,
zone_id: audit_list_params.ZoneID | NotGiven = NOT_GIVEN,
zone_name: audit_list_params.ZoneName | NotGiven = NOT_GIVEN,
account_name: audit_list_params.AccountName | Omit = omit,
action_result: audit_list_params.ActionResult | Omit = omit,
action_type: audit_list_params.ActionType | Omit = omit,
actor_context: audit_list_params.ActorContext | Omit = omit,
actor_email: audit_list_params.ActorEmail | Omit = omit,
actor_id: audit_list_params.ActorID | Omit = omit,
actor_ip_address: audit_list_params.ActorIPAddress | Omit = omit,
actor_token_id: audit_list_params.ActorTokenID | Omit = omit,
actor_token_name: audit_list_params.ActorTokenName | Omit = omit,
actor_type: audit_list_params.ActorType | Omit = omit,
audit_log_id: audit_list_params.AuditLogID | Omit = omit,
cursor: str | Omit = omit,
direction: Literal["desc", "asc"] | Omit = omit,
limit: float | Omit = omit,
raw_cf_rayid: audit_list_params.RawCfRayID | Omit = omit,
raw_method: audit_list_params.RawMethod | Omit = omit,
raw_status_code: audit_list_params.RawStatusCode | Omit = omit,
raw_uri: audit_list_params.RawURI | Omit = omit,
resource_id: audit_list_params.ResourceID | Omit = omit,
resource_product: audit_list_params.ResourceProduct | Omit = omit,
resource_scope: audit_list_params.ResourceScope | Omit = omit,
resource_type: audit_list_params.ResourceType | Omit = omit,
zone_id: audit_list_params.ZoneID | Omit = omit,
zone_name: audit_list_params.ZoneName | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncCursorPaginationAfter[AuditListResponse]:
"""Gets a list of audit logs for an account.
@ -192,36 +192,36 @@ class AsyncAuditResource(AsyncAPIResource):
account_id: str,
before: Union[str, date],
since: Union[str, date],
account_name: audit_list_params.AccountName | NotGiven = NOT_GIVEN,
action_result: audit_list_params.ActionResult | NotGiven = NOT_GIVEN,
action_type: audit_list_params.ActionType | NotGiven = NOT_GIVEN,
actor_context: audit_list_params.ActorContext | NotGiven = NOT_GIVEN,
actor_email: audit_list_params.ActorEmail | NotGiven = NOT_GIVEN,
actor_id: audit_list_params.ActorID | NotGiven = NOT_GIVEN,
actor_ip_address: audit_list_params.ActorIPAddress | NotGiven = NOT_GIVEN,
actor_token_id: audit_list_params.ActorTokenID | NotGiven = NOT_GIVEN,
actor_token_name: audit_list_params.ActorTokenName | NotGiven = NOT_GIVEN,
actor_type: audit_list_params.ActorType | NotGiven = NOT_GIVEN,
audit_log_id: audit_list_params.AuditLogID | NotGiven = NOT_GIVEN,
cursor: str | NotGiven = NOT_GIVEN,
direction: Literal["desc", "asc"] | NotGiven = NOT_GIVEN,
limit: float | NotGiven = NOT_GIVEN,
raw_cf_rayid: audit_list_params.RawCfRayID | NotGiven = NOT_GIVEN,
raw_method: audit_list_params.RawMethod | NotGiven = NOT_GIVEN,
raw_status_code: audit_list_params.RawStatusCode | NotGiven = NOT_GIVEN,
raw_uri: audit_list_params.RawURI | NotGiven = NOT_GIVEN,
resource_id: audit_list_params.ResourceID | NotGiven = NOT_GIVEN,
resource_product: audit_list_params.ResourceProduct | NotGiven = NOT_GIVEN,
resource_scope: audit_list_params.ResourceScope | NotGiven = NOT_GIVEN,
resource_type: audit_list_params.ResourceType | NotGiven = NOT_GIVEN,
zone_id: audit_list_params.ZoneID | NotGiven = NOT_GIVEN,
zone_name: audit_list_params.ZoneName | NotGiven = NOT_GIVEN,
account_name: audit_list_params.AccountName | Omit = omit,
action_result: audit_list_params.ActionResult | Omit = omit,
action_type: audit_list_params.ActionType | Omit = omit,
actor_context: audit_list_params.ActorContext | Omit = omit,
actor_email: audit_list_params.ActorEmail | Omit = omit,
actor_id: audit_list_params.ActorID | Omit = omit,
actor_ip_address: audit_list_params.ActorIPAddress | Omit = omit,
actor_token_id: audit_list_params.ActorTokenID | Omit = omit,
actor_token_name: audit_list_params.ActorTokenName | Omit = omit,
actor_type: audit_list_params.ActorType | Omit = omit,
audit_log_id: audit_list_params.AuditLogID | Omit = omit,
cursor: str | Omit = omit,
direction: Literal["desc", "asc"] | Omit = omit,
limit: float | Omit = omit,
raw_cf_rayid: audit_list_params.RawCfRayID | Omit = omit,
raw_method: audit_list_params.RawMethod | Omit = omit,
raw_status_code: audit_list_params.RawStatusCode | Omit = omit,
raw_uri: audit_list_params.RawURI | Omit = omit,
resource_id: audit_list_params.ResourceID | Omit = omit,
resource_product: audit_list_params.ResourceProduct | Omit = omit,
resource_scope: audit_list_params.ResourceScope | Omit = omit,
resource_type: audit_list_params.ResourceType | Omit = omit,
zone_id: audit_list_params.ZoneID | Omit = omit,
zone_name: audit_list_params.ZoneName | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[AuditListResponse, AsyncCursorPaginationAfter[AuditListResponse]]:
"""Gets a list of audit logs for an account.

View file

@ -7,7 +7,7 @@ from typing_extensions import Literal, overload
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ..._utils import required_args, maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -55,13 +55,13 @@ class MembersResource(SyncAPIResource):
account_id: str,
email: str,
roles: SequenceNotStr[str],
status: Literal["accepted", "pending"] | NotGiven = NOT_GIVEN,
status: Literal["accepted", "pending"] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Member]:
"""
Add a user to the list of members for this account.
@ -90,13 +90,13 @@ class MembersResource(SyncAPIResource):
account_id: str,
email: str,
policies: Iterable[member_create_params.IAMCreateMemberWithPoliciesPolicy],
status: Literal["accepted", "pending"] | NotGiven = NOT_GIVEN,
status: Literal["accepted", "pending"] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Member]:
"""
Add a user to the list of members for this account.
@ -124,15 +124,15 @@ class MembersResource(SyncAPIResource):
*,
account_id: str,
email: str,
roles: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
status: Literal["accepted", "pending"] | NotGiven = NOT_GIVEN,
policies: Iterable[member_create_params.IAMCreateMemberWithPoliciesPolicy] | NotGiven = NOT_GIVEN,
roles: SequenceNotStr[str] | Omit = omit,
status: Literal["accepted", "pending"] | Omit = omit,
policies: Iterable[member_create_params.IAMCreateMemberWithPoliciesPolicy] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Member]:
if not account_id:
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
@ -163,13 +163,13 @@ class MembersResource(SyncAPIResource):
member_id: str,
*,
account_id: str,
roles: Iterable[Role] | NotGiven = NOT_GIVEN,
roles: Iterable[Role] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Member]:
"""
Modify an account member.
@ -203,7 +203,7 @@ class MembersResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Member]:
"""
Modify an account member.
@ -231,14 +231,14 @@ class MembersResource(SyncAPIResource):
member_id: str,
*,
account_id: str,
roles: Iterable[Role] | NotGiven = NOT_GIVEN,
policies: Iterable[member_update_params.IAMUpdateMemberWithPoliciesPolicy] | NotGiven = NOT_GIVEN,
roles: Iterable[Role] | Omit = omit,
policies: Iterable[member_update_params.IAMUpdateMemberWithPoliciesPolicy] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Member]:
if not account_id:
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
@ -267,17 +267,17 @@ class MembersResource(SyncAPIResource):
self,
*,
account_id: str,
direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
order: Literal["user.first_name", "user.last_name", "user.email", "status"] | NotGiven = NOT_GIVEN,
page: float | NotGiven = NOT_GIVEN,
per_page: float | NotGiven = NOT_GIVEN,
status: Literal["accepted", "pending", "rejected"] | NotGiven = NOT_GIVEN,
direction: Literal["asc", "desc"] | Omit = omit,
order: Literal["user.first_name", "user.last_name", "user.email", "status"] | Omit = omit,
page: float | Omit = omit,
per_page: float | Omit = omit,
status: Literal["accepted", "pending", "rejected"] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncV4PagePaginationArray[Member]:
"""
List all members of an account.
@ -337,7 +337,7 @@ class MembersResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[MemberDeleteResponse]:
"""
Remove a member from an account.
@ -381,7 +381,7 @@ class MembersResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Member]:
"""
Get information about a specific member of an account.
@ -443,13 +443,13 @@ class AsyncMembersResource(AsyncAPIResource):
account_id: str,
email: str,
roles: SequenceNotStr[str],
status: Literal["accepted", "pending"] | NotGiven = NOT_GIVEN,
status: Literal["accepted", "pending"] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Member]:
"""
Add a user to the list of members for this account.
@ -478,13 +478,13 @@ class AsyncMembersResource(AsyncAPIResource):
account_id: str,
email: str,
policies: Iterable[member_create_params.IAMCreateMemberWithPoliciesPolicy],
status: Literal["accepted", "pending"] | NotGiven = NOT_GIVEN,
status: Literal["accepted", "pending"] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Member]:
"""
Add a user to the list of members for this account.
@ -512,15 +512,15 @@ class AsyncMembersResource(AsyncAPIResource):
*,
account_id: str,
email: str,
roles: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
status: Literal["accepted", "pending"] | NotGiven = NOT_GIVEN,
policies: Iterable[member_create_params.IAMCreateMemberWithPoliciesPolicy] | NotGiven = NOT_GIVEN,
roles: SequenceNotStr[str] | Omit = omit,
status: Literal["accepted", "pending"] | Omit = omit,
policies: Iterable[member_create_params.IAMCreateMemberWithPoliciesPolicy] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Member]:
if not account_id:
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
@ -551,13 +551,13 @@ class AsyncMembersResource(AsyncAPIResource):
member_id: str,
*,
account_id: str,
roles: Iterable[Role] | NotGiven = NOT_GIVEN,
roles: Iterable[Role] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Member]:
"""
Modify an account member.
@ -591,7 +591,7 @@ class AsyncMembersResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Member]:
"""
Modify an account member.
@ -619,14 +619,14 @@ class AsyncMembersResource(AsyncAPIResource):
member_id: str,
*,
account_id: str,
roles: Iterable[Role] | NotGiven = NOT_GIVEN,
policies: Iterable[member_update_params.IAMUpdateMemberWithPoliciesPolicy] | NotGiven = NOT_GIVEN,
roles: Iterable[Role] | Omit = omit,
policies: Iterable[member_update_params.IAMUpdateMemberWithPoliciesPolicy] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Member]:
if not account_id:
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
@ -655,17 +655,17 @@ class AsyncMembersResource(AsyncAPIResource):
self,
*,
account_id: str,
direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
order: Literal["user.first_name", "user.last_name", "user.email", "status"] | NotGiven = NOT_GIVEN,
page: float | NotGiven = NOT_GIVEN,
per_page: float | NotGiven = NOT_GIVEN,
status: Literal["accepted", "pending", "rejected"] | NotGiven = NOT_GIVEN,
direction: Literal["asc", "desc"] | Omit = omit,
order: Literal["user.first_name", "user.last_name", "user.email", "status"] | Omit = omit,
page: float | Omit = omit,
per_page: float | Omit = omit,
status: Literal["accepted", "pending", "rejected"] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[Member, AsyncV4PagePaginationArray[Member]]:
"""
List all members of an account.
@ -725,7 +725,7 @@ class AsyncMembersResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[MemberDeleteResponse]:
"""
Remove a member from an account.
@ -769,7 +769,7 @@ class AsyncMembersResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Member]:
"""
Get information about a specific member of an account.

View file

@ -6,7 +6,7 @@ from typing import Type, Optional, cast
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ..._utils import maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -49,14 +49,14 @@ class RolesResource(SyncAPIResource):
self,
*,
account_id: str,
page: float | NotGiven = NOT_GIVEN,
per_page: float | NotGiven = NOT_GIVEN,
page: float | Omit = omit,
per_page: float | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncV4PagePaginationArray[Role]:
"""
Get all available roles for an account.
@ -107,7 +107,7 @@ class RolesResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Role]:
"""
Get information about a specific role for an account.
@ -166,14 +166,14 @@ class AsyncRolesResource(AsyncAPIResource):
self,
*,
account_id: str,
page: float | NotGiven = NOT_GIVEN,
per_page: float | NotGiven = NOT_GIVEN,
page: float | Omit = omit,
per_page: float | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[Role, AsyncV4PagePaginationArray[Role]]:
"""
Get all available roles for an account.
@ -224,7 +224,7 @@ class AsyncRolesResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Role]:
"""
Get information about a specific role for an account.

View file

@ -7,7 +7,7 @@ from typing_extensions import Literal
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -52,14 +52,14 @@ class SubscriptionsResource(SyncAPIResource):
self,
*,
account_id: str,
frequency: Literal["weekly", "monthly", "quarterly", "yearly"] | NotGiven = NOT_GIVEN,
rate_plan: RatePlan | NotGiven = NOT_GIVEN,
frequency: Literal["weekly", "monthly", "quarterly", "yearly"] | Omit = omit,
rate_plan: RatePlan | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Subscription:
"""
Creates an account subscription.
@ -105,14 +105,14 @@ class SubscriptionsResource(SyncAPIResource):
subscription_identifier: str,
*,
account_id: str,
frequency: Literal["weekly", "monthly", "quarterly", "yearly"] | NotGiven = NOT_GIVEN,
rate_plan: RatePlan | NotGiven = NOT_GIVEN,
frequency: Literal["weekly", "monthly", "quarterly", "yearly"] | Omit = omit,
rate_plan: RatePlan | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Subscription:
"""
Updates an account subscription.
@ -169,7 +169,7 @@ class SubscriptionsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SubscriptionDeleteResponse:
"""
Deletes an account's subscription.
@ -214,7 +214,7 @@ class SubscriptionsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncSinglePage[Subscription]:
"""
Lists all of an account's subscriptions.
@ -266,14 +266,14 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
self,
*,
account_id: str,
frequency: Literal["weekly", "monthly", "quarterly", "yearly"] | NotGiven = NOT_GIVEN,
rate_plan: RatePlan | NotGiven = NOT_GIVEN,
frequency: Literal["weekly", "monthly", "quarterly", "yearly"] | Omit = omit,
rate_plan: RatePlan | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Subscription:
"""
Creates an account subscription.
@ -319,14 +319,14 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
subscription_identifier: str,
*,
account_id: str,
frequency: Literal["weekly", "monthly", "quarterly", "yearly"] | NotGiven = NOT_GIVEN,
rate_plan: RatePlan | NotGiven = NOT_GIVEN,
frequency: Literal["weekly", "monthly", "quarterly", "yearly"] | Omit = omit,
rate_plan: RatePlan | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Subscription:
"""
Updates an account subscription.
@ -383,7 +383,7 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SubscriptionDeleteResponse:
"""
Deletes an account's subscription.
@ -428,7 +428,7 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[Subscription, AsyncSinglePage[Subscription]]:
"""
Lists all of an account's subscriptions.

View file

@ -6,7 +6,7 @@ from typing import Type, Optional, cast
import httpx
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@ -50,14 +50,14 @@ class PermissionGroupsResource(SyncAPIResource):
self,
*,
account_id: str,
name: str | NotGiven = NOT_GIVEN,
scope: str | NotGiven = NOT_GIVEN,
name: str | Omit = omit,
scope: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncSinglePage[PermissionGroupListResponse]:
"""
Find all available permission groups for Account Owned API Tokens
@ -102,14 +102,14 @@ class PermissionGroupsResource(SyncAPIResource):
self,
*,
account_id: str,
name: str | NotGiven = NOT_GIVEN,
scope: str | NotGiven = NOT_GIVEN,
name: str | Omit = omit,
scope: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[PermissionGroupGetResponse]:
"""
Find all available permission groups for Account Owned API Tokens
@ -175,14 +175,14 @@ class AsyncPermissionGroupsResource(AsyncAPIResource):
self,
*,
account_id: str,
name: str | NotGiven = NOT_GIVEN,
scope: str | NotGiven = NOT_GIVEN,
name: str | Omit = omit,
scope: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[PermissionGroupListResponse, AsyncSinglePage[PermissionGroupListResponse]]:
"""
Find all available permission groups for Account Owned API Tokens
@ -227,14 +227,14 @@ class AsyncPermissionGroupsResource(AsyncAPIResource):
self,
*,
account_id: str,
name: str | NotGiven = NOT_GIVEN,
scope: str | NotGiven = NOT_GIVEN,
name: str | Omit = omit,
scope: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[PermissionGroupGetResponse]:
"""
Find all available permission groups for Account Owned API Tokens

View file

@ -16,7 +16,7 @@ from .value import (
ValueResourceWithStreamingResponse,
AsyncValueResourceWithStreamingResponse,
)
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@ -81,15 +81,15 @@ class TokensResource(SyncAPIResource):
account_id: str,
name: str,
policies: Iterable[TokenPolicy],
condition: token_create_params.Condition | NotGiven = NOT_GIVEN,
expires_on: Union[str, datetime] | NotGiven = NOT_GIVEN,
not_before: Union[str, datetime] | NotGiven = NOT_GIVEN,
condition: token_create_params.Condition | Omit = omit,
expires_on: Union[str, datetime] | Omit = omit,
not_before: Union[str, datetime] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[TokenCreateResponse]:
"""
Create a new Account Owned API token.
@ -145,16 +145,16 @@ class TokensResource(SyncAPIResource):
account_id: str,
name: str,
policies: Iterable[TokenPolicy],
condition: token_update_params.Condition | NotGiven = NOT_GIVEN,
expires_on: Union[str, datetime] | NotGiven = NOT_GIVEN,
not_before: Union[str, datetime] | NotGiven = NOT_GIVEN,
status: Literal["active", "disabled", "expired"] | NotGiven = NOT_GIVEN,
condition: token_update_params.Condition | Omit = omit,
expires_on: Union[str, datetime] | Omit = omit,
not_before: Union[str, datetime] | Omit = omit,
status: Literal["active", "disabled", "expired"] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Token]:
"""
Update an existing token.
@ -214,15 +214,15 @@ class TokensResource(SyncAPIResource):
self,
*,
account_id: str,
direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
page: float | NotGiven = NOT_GIVEN,
per_page: float | NotGiven = NOT_GIVEN,
direction: Literal["asc", "desc"] | Omit = omit,
page: float | Omit = omit,
per_page: float | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncV4PagePaginationArray[Token]:
"""
List all Account Owned API tokens created for this account.
@ -276,7 +276,7 @@ class TokensResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[TokenDeleteResponse]:
"""
Destroy an Account Owned API token.
@ -320,7 +320,7 @@ class TokensResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Token]:
"""
Get information about a specific Account Owned API token.
@ -363,7 +363,7 @@ class TokensResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[TokenVerifyResponse]:
"""
Test whether a token works.
@ -428,15 +428,15 @@ class AsyncTokensResource(AsyncAPIResource):
account_id: str,
name: str,
policies: Iterable[TokenPolicy],
condition: token_create_params.Condition | NotGiven = NOT_GIVEN,
expires_on: Union[str, datetime] | NotGiven = NOT_GIVEN,
not_before: Union[str, datetime] | NotGiven = NOT_GIVEN,
condition: token_create_params.Condition | Omit = omit,
expires_on: Union[str, datetime] | Omit = omit,
not_before: Union[str, datetime] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[TokenCreateResponse]:
"""
Create a new Account Owned API token.
@ -492,16 +492,16 @@ class AsyncTokensResource(AsyncAPIResource):
account_id: str,
name: str,
policies: Iterable[TokenPolicy],
condition: token_update_params.Condition | NotGiven = NOT_GIVEN,
expires_on: Union[str, datetime] | NotGiven = NOT_GIVEN,
not_before: Union[str, datetime] | NotGiven = NOT_GIVEN,
status: Literal["active", "disabled", "expired"] | NotGiven = NOT_GIVEN,
condition: token_update_params.Condition | Omit = omit,
expires_on: Union[str, datetime] | Omit = omit,
not_before: Union[str, datetime] | Omit = omit,
status: Literal["active", "disabled", "expired"] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Token]:
"""
Update an existing token.
@ -561,15 +561,15 @@ class AsyncTokensResource(AsyncAPIResource):
self,
*,
account_id: str,
direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
page: float | NotGiven = NOT_GIVEN,
per_page: float | NotGiven = NOT_GIVEN,
direction: Literal["asc", "desc"] | Omit = omit,
page: float | Omit = omit,
per_page: float | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[Token, AsyncV4PagePaginationArray[Token]]:
"""
List all Account Owned API tokens created for this account.
@ -623,7 +623,7 @@ class AsyncTokensResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[TokenDeleteResponse]:
"""
Destroy an Account Owned API token.
@ -667,7 +667,7 @@ class AsyncTokensResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Token]:
"""
Get information about a specific Account Owned API token.
@ -710,7 +710,7 @@ class AsyncTokensResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[TokenVerifyResponse]:
"""
Test whether a token works.

View file

@ -6,7 +6,7 @@ from typing import Type, Optional, cast
import httpx
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._types import Body, Query, Headers, NotGiven, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@ -55,7 +55,7 @@ class ValueResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> str:
"""
Roll the Account Owned API token secret.
@ -122,7 +122,7 @@ class AsyncValueResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> str:
"""
Roll the Account Owned API token secret.

View file

@ -6,7 +6,7 @@ from typing import Type, Optional, cast
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -51,13 +51,13 @@ class TotalTLSResource(SyncAPIResource):
*,
zone_id: str,
enabled: bool,
certificate_authority: CertificateAuthority | NotGiven = NOT_GIVEN,
certificate_authority: CertificateAuthority | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[TotalTLSCreateResponse]:
"""
Set Total TLS Settings or disable the feature for a Zone.
@ -108,7 +108,7 @@ class TotalTLSResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[TotalTLSGetResponse]:
"""
Get Total TLS Settings for a Zone.
@ -164,13 +164,13 @@ class AsyncTotalTLSResource(AsyncAPIResource):
*,
zone_id: str,
enabled: bool,
certificate_authority: CertificateAuthority | NotGiven = NOT_GIVEN,
certificate_authority: CertificateAuthority | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[TotalTLSCreateResponse]:
"""
Set Total TLS Settings or disable the feature for a Zone.
@ -221,7 +221,7 @@ class AsyncTotalTLSResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[TotalTLSGetResponse]:
"""
Get Total TLS Settings for a Zone.

View file

@ -4,7 +4,7 @@ from __future__ import annotations
import httpx
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._types import Body, Query, Headers, NotGiven, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@ -53,7 +53,7 @@ class AccountsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AccountUpdateResponse:
"""
Add an account as a member of a particular address map.
@ -94,7 +94,7 @@ class AccountsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AccountDeleteResponse:
"""
Remove an account as a member of a particular address map.
@ -156,7 +156,7 @@ class AsyncAccountsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AccountUpdateResponse:
"""
Add an account as a member of a particular address map.
@ -197,7 +197,7 @@ class AsyncAccountsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AccountDeleteResponse:
"""
Remove an account as a member of a particular address map.

View file

@ -30,7 +30,7 @@ from .accounts import (
AccountsResourceWithStreamingResponse,
AsyncAccountsResourceWithStreamingResponse,
)
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
from ...._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@ -88,16 +88,16 @@ class AddressMapsResource(SyncAPIResource):
self,
*,
account_id: str,
description: Optional[str] | NotGiven = NOT_GIVEN,
enabled: Optional[bool] | NotGiven = NOT_GIVEN,
ips: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
memberships: Iterable[address_map_create_params.Membership] | NotGiven = NOT_GIVEN,
description: Optional[str] | Omit = omit,
enabled: Optional[bool] | Omit = omit,
ips: SequenceNotStr[str] | Omit = omit,
memberships: Iterable[address_map_create_params.Membership] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AddressMapCreateResponse]:
"""
Create a new address map under the account.
@ -154,7 +154,7 @@ class AddressMapsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncSinglePage[AddressMap]:
"""
List all address maps owned by the account.
@ -191,7 +191,7 @@ class AddressMapsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AddressMapDeleteResponse:
"""Delete a particular address map owned by the account.
@ -228,15 +228,15 @@ class AddressMapsResource(SyncAPIResource):
address_map_id: str,
*,
account_id: str,
default_sni: Optional[str] | NotGiven = NOT_GIVEN,
description: Optional[str] | NotGiven = NOT_GIVEN,
enabled: Optional[bool] | NotGiven = NOT_GIVEN,
default_sni: Optional[str] | Omit = omit,
description: Optional[str] | Omit = omit,
enabled: Optional[bool] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AddressMap]:
"""
Modify properties of an address map owned by the account.
@ -300,7 +300,7 @@ class AddressMapsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AddressMapGetResponse]:
"""
Show a particular address map owned by the account.
@ -371,16 +371,16 @@ class AsyncAddressMapsResource(AsyncAPIResource):
self,
*,
account_id: str,
description: Optional[str] | NotGiven = NOT_GIVEN,
enabled: Optional[bool] | NotGiven = NOT_GIVEN,
ips: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
memberships: Iterable[address_map_create_params.Membership] | NotGiven = NOT_GIVEN,
description: Optional[str] | Omit = omit,
enabled: Optional[bool] | Omit = omit,
ips: SequenceNotStr[str] | Omit = omit,
memberships: Iterable[address_map_create_params.Membership] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AddressMapCreateResponse]:
"""
Create a new address map under the account.
@ -437,7 +437,7 @@ class AsyncAddressMapsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[AddressMap, AsyncSinglePage[AddressMap]]:
"""
List all address maps owned by the account.
@ -474,7 +474,7 @@ class AsyncAddressMapsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AddressMapDeleteResponse:
"""Delete a particular address map owned by the account.
@ -511,15 +511,15 @@ class AsyncAddressMapsResource(AsyncAPIResource):
address_map_id: str,
*,
account_id: str,
default_sni: Optional[str] | NotGiven = NOT_GIVEN,
description: Optional[str] | NotGiven = NOT_GIVEN,
enabled: Optional[bool] | NotGiven = NOT_GIVEN,
default_sni: Optional[str] | Omit = omit,
description: Optional[str] | Omit = omit,
enabled: Optional[bool] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AddressMap]:
"""
Modify properties of an address map owned by the account.
@ -583,7 +583,7 @@ class AsyncAddressMapsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AddressMapGetResponse]:
"""
Show a particular address map owned by the account.

View file

@ -4,7 +4,7 @@ from __future__ import annotations
import httpx
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._types import Body, Query, Headers, NotGiven, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@ -54,7 +54,7 @@ class IPsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> IPUpdateResponse:
"""
Add an IP from a prefix owned by the account to a particular address map.
@ -100,7 +100,7 @@ class IPsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> IPDeleteResponse:
"""
Remove an IP from a particular address map.
@ -167,7 +167,7 @@ class AsyncIPsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> IPUpdateResponse:
"""
Add an IP from a prefix owned by the account to a particular address map.
@ -213,7 +213,7 @@ class AsyncIPsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> IPDeleteResponse:
"""
Remove an IP from a particular address map.

View file

@ -4,7 +4,7 @@ from __future__ import annotations
import httpx
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._types import Body, Query, Headers, NotGiven, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@ -54,7 +54,7 @@ class ZonesResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> ZoneUpdateResponse:
"""
Add a zone as a member of a particular address map.
@ -100,7 +100,7 @@ class ZonesResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> ZoneDeleteResponse:
"""
Remove a zone as a member of a particular address map.
@ -167,7 +167,7 @@ class AsyncZonesResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> ZoneUpdateResponse:
"""
Add a zone as a member of a particular address map.
@ -213,7 +213,7 @@ class AsyncZonesResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> ZoneDeleteResponse:
"""
Remove a zone as a member of a particular address map.

View file

@ -6,7 +6,7 @@ from typing import Type, Optional, cast
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._types import Body, Query, Headers, NotGiven, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -62,7 +62,7 @@ class LOADocumentsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[LOADocumentCreateResponse]:
"""
Submit LOA document (pdf format) under the account.
@ -109,7 +109,7 @@ class LOADocumentsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BinaryAPIResponse:
"""
Download specified LOA document under the account.
@ -171,7 +171,7 @@ class AsyncLOADocumentsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[LOADocumentCreateResponse]:
"""
Submit LOA document (pdf format) under the account.
@ -220,7 +220,7 @@ class AsyncLOADocumentsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncBinaryAPIResponse:
"""
Download specified LOA document under the account.

View file

@ -7,7 +7,7 @@ from typing import Type, Optional, cast
import httpx
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._types import Body, Query, Headers, NotGiven, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@ -58,7 +58,7 @@ class AdvertisementStatusResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AdvertisementStatusEditResponse]:
"""
Advertise or withdraw the BGP route for a prefix.
@ -114,7 +114,7 @@ class AdvertisementStatusResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AdvertisementStatusGetResponse]:
"""
View the current advertisement state for a prefix.
@ -184,7 +184,7 @@ class AsyncAdvertisementStatusResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AdvertisementStatusEditResponse]:
"""
Advertise or withdraw the BGP route for a prefix.
@ -240,7 +240,7 @@ class AsyncAdvertisementStatusResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AdvertisementStatusGetResponse]:
"""
View the current advertisement state for a prefix.

View file

@ -6,7 +6,7 @@ from typing import Type, Optional, cast
import httpx
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@ -50,13 +50,13 @@ class BGPPrefixesResource(SyncAPIResource):
prefix_id: str,
*,
account_id: str,
cidr: str | NotGiven = NOT_GIVEN,
cidr: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[BGPPrefix]:
"""
Create a BGP prefix, controlling the BGP advertisement status of a specific
@ -105,7 +105,7 @@ class BGPPrefixesResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncSinglePage[BGPPrefix]:
"""List all BGP Prefixes within the specified IP Prefix.
@ -146,15 +146,15 @@ class BGPPrefixesResource(SyncAPIResource):
*,
account_id: str,
prefix_id: str,
asn_prepend_count: int | NotGiven = NOT_GIVEN,
auto_advertise_withdraw: bool | NotGiven = NOT_GIVEN,
on_demand: bgp_prefix_edit_params.OnDemand | NotGiven = NOT_GIVEN,
asn_prepend_count: int | Omit = omit,
auto_advertise_withdraw: bool | Omit = omit,
on_demand: bgp_prefix_edit_params.OnDemand | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[BGPPrefix]:
"""
Update the properties of a BGP Prefix, such as the on demand advertisement
@ -219,7 +219,7 @@ class BGPPrefixesResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[BGPPrefix]:
"""
Retrieve a single BGP Prefix according to its identifier
@ -283,13 +283,13 @@ class AsyncBGPPrefixesResource(AsyncAPIResource):
prefix_id: str,
*,
account_id: str,
cidr: str | NotGiven = NOT_GIVEN,
cidr: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[BGPPrefix]:
"""
Create a BGP prefix, controlling the BGP advertisement status of a specific
@ -338,7 +338,7 @@ class AsyncBGPPrefixesResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[BGPPrefix, AsyncSinglePage[BGPPrefix]]:
"""List all BGP Prefixes within the specified IP Prefix.
@ -379,15 +379,15 @@ class AsyncBGPPrefixesResource(AsyncAPIResource):
*,
account_id: str,
prefix_id: str,
asn_prepend_count: int | NotGiven = NOT_GIVEN,
auto_advertise_withdraw: bool | NotGiven = NOT_GIVEN,
on_demand: bgp_prefix_edit_params.OnDemand | NotGiven = NOT_GIVEN,
asn_prepend_count: int | Omit = omit,
auto_advertise_withdraw: bool | Omit = omit,
on_demand: bgp_prefix_edit_params.OnDemand | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[BGPPrefix]:
"""
Update the properties of a BGP Prefix, such as the on demand advertisement
@ -452,7 +452,7 @@ class AsyncBGPPrefixesResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[BGPPrefix]:
"""
Retrieve a single BGP Prefix according to its identifier

View file

@ -6,7 +6,7 @@ from typing import Type, Optional, cast
import httpx
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._types import Body, Query, Headers, NotGiven, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@ -58,7 +58,7 @@ class DelegationsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Delegations]:
"""
Create a new account delegation for a given IP prefix.
@ -113,7 +113,7 @@ class DelegationsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncSinglePage[Delegations]:
"""
List all delegations for a given account IP prefix.
@ -155,7 +155,7 @@ class DelegationsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[DelegationDeleteResponse]:
"""
Delete an account delegation for a given IP prefix.
@ -226,7 +226,7 @@ class AsyncDelegationsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Delegations]:
"""
Create a new account delegation for a given IP prefix.
@ -281,7 +281,7 @@ class AsyncDelegationsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[Delegations, AsyncSinglePage[Delegations]]:
"""
List all delegations for a given account IP prefix.
@ -323,7 +323,7 @@ class AsyncDelegationsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[DelegationDeleteResponse]:
"""
Delete an account delegation for a given IP prefix.

View file

@ -6,7 +6,7 @@ from typing import Type, Optional, cast
import httpx
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._types import Body, Query, Headers, NotGiven, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from .delegations import (
@ -106,7 +106,7 @@ class PrefixesResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Prefix]:
"""
Add a new prefix under the account.
@ -159,7 +159,7 @@ class PrefixesResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncSinglePage[Prefix]:
"""
List all prefixes owned by the account.
@ -196,7 +196,7 @@ class PrefixesResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> PrefixDeleteResponse:
"""
Delete an unapproved prefix owned by the account.
@ -237,7 +237,7 @@ class PrefixesResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Prefix]:
"""
Modify the description for a prefix owned by the account.
@ -284,7 +284,7 @@ class PrefixesResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Prefix]:
"""
List a particular prefix owned by the account.
@ -367,7 +367,7 @@ class AsyncPrefixesResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Prefix]:
"""
Add a new prefix under the account.
@ -420,7 +420,7 @@ class AsyncPrefixesResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[Prefix, AsyncSinglePage[Prefix]]:
"""
List all prefixes owned by the account.
@ -457,7 +457,7 @@ class AsyncPrefixesResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> PrefixDeleteResponse:
"""
Delete an unapproved prefix owned by the account.
@ -498,7 +498,7 @@ class AsyncPrefixesResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Prefix]:
"""
Modify the description for a prefix owned by the account.
@ -545,7 +545,7 @@ class AsyncPrefixesResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Prefix]:
"""
List a particular prefix owned by the account.

View file

@ -6,7 +6,7 @@ from typing import Type, Optional, cast
import httpx
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@ -51,14 +51,14 @@ class ServiceBindingsResource(SyncAPIResource):
prefix_id: str,
*,
account_id: str,
cidr: str | NotGiven = NOT_GIVEN,
service_id: str | NotGiven = NOT_GIVEN,
cidr: str | Omit = omit,
service_id: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[ServiceBinding]:
"""
Creates a new Service Binding, routing traffic to IPs within the given CIDR to a
@ -118,7 +118,7 @@ class ServiceBindingsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncSinglePage[ServiceBinding]:
"""List the Cloudflare services this prefix is currently bound to.
@ -166,7 +166,7 @@ class ServiceBindingsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> ServiceBindingDeleteResponse:
"""
Delete a Service Binding
@ -211,7 +211,7 @@ class ServiceBindingsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[ServiceBinding]:
"""
Fetch a single Service Binding
@ -275,14 +275,14 @@ class AsyncServiceBindingsResource(AsyncAPIResource):
prefix_id: str,
*,
account_id: str,
cidr: str | NotGiven = NOT_GIVEN,
service_id: str | NotGiven = NOT_GIVEN,
cidr: str | Omit = omit,
service_id: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[ServiceBinding]:
"""
Creates a new Service Binding, routing traffic to IPs within the given CIDR to a
@ -342,7 +342,7 @@ class AsyncServiceBindingsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[ServiceBinding, AsyncSinglePage[ServiceBinding]]:
"""List the Cloudflare services this prefix is currently bound to.
@ -390,7 +390,7 @@ class AsyncServiceBindingsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> ServiceBindingDeleteResponse:
"""
Delete a Service Binding
@ -435,7 +435,7 @@ class AsyncServiceBindingsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[ServiceBinding]:
"""
Fetch a single Service Binding

View file

@ -14,7 +14,7 @@ from .regions import (
RegionsResourceWithStreamingResponse,
AsyncRegionsResourceWithStreamingResponse,
)
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@ -67,13 +67,13 @@ class RegionalHostnamesResource(SyncAPIResource):
zone_id: str,
hostname: str,
region_key: str,
routing: str | NotGiven = NOT_GIVEN,
routing: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[RegionalHostnameCreateResponse]:
"""Create a new Regional Hostname entry.
@ -131,7 +131,7 @@ class RegionalHostnamesResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncSinglePage[RegionalHostnameListResponse]:
"""
List all Regional Hostnames within a zone.
@ -168,7 +168,7 @@ class RegionalHostnamesResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> RegionalHostnameDeleteResponse:
"""
Delete the region configuration for a specific Regional Hostname.
@ -210,7 +210,7 @@ class RegionalHostnamesResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[RegionalHostnameEditResponse]:
"""Update the configuration for a specific Regional Hostname.
@ -260,7 +260,7 @@ class RegionalHostnamesResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[RegionalHostnameGetResponse]:
"""
Fetch the configuration for a specific Regional Hostname, within a zone.
@ -326,13 +326,13 @@ class AsyncRegionalHostnamesResource(AsyncAPIResource):
zone_id: str,
hostname: str,
region_key: str,
routing: str | NotGiven = NOT_GIVEN,
routing: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[RegionalHostnameCreateResponse]:
"""Create a new Regional Hostname entry.
@ -390,7 +390,7 @@ class AsyncRegionalHostnamesResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[RegionalHostnameListResponse, AsyncSinglePage[RegionalHostnameListResponse]]:
"""
List all Regional Hostnames within a zone.
@ -427,7 +427,7 @@ class AsyncRegionalHostnamesResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> RegionalHostnameDeleteResponse:
"""
Delete the region configuration for a specific Regional Hostname.
@ -469,7 +469,7 @@ class AsyncRegionalHostnamesResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[RegionalHostnameEditResponse]:
"""Update the configuration for a specific Regional Hostname.
@ -521,7 +521,7 @@ class AsyncRegionalHostnamesResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[RegionalHostnameGetResponse]:
"""
Fetch the configuration for a specific Regional Hostname, within a zone.

View file

@ -4,7 +4,7 @@ from __future__ import annotations
import httpx
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._types import Body, Query, Headers, NotGiven, not_given
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
from ...._response import (
@ -49,7 +49,7 @@ class RegionsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncSinglePage[RegionListResponse]:
"""
List all Regional Services regions available for use by this account.
@ -106,7 +106,7 @@ class AsyncRegionsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[RegionListResponse, AsyncSinglePage[RegionListResponse]]:
"""
List all Regional Services regions available for use by this account.

View file

@ -4,7 +4,7 @@ from __future__ import annotations
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._types import Body, Query, Headers, NotGiven, not_given
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import (
@ -49,7 +49,7 @@ class ServicesResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncSinglePage[ServiceListResponse]:
"""
Bring-Your-Own IP (BYOIP) prefixes onboarded to Cloudflare must be bound to a
@ -109,7 +109,7 @@ class AsyncServicesResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[ServiceListResponse, AsyncSinglePage[ServiceListResponse]]:
"""
Bring-Your-Own IP (BYOIP) prefixes onboarded to Cloudflare must be bound to a

View file

@ -23,7 +23,7 @@ from .authors import (
AuthorsResourceWithStreamingResponse,
AsyncAuthorsResourceWithStreamingResponse,
)
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ..._utils import required_args, maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ...types.ai import ai_run_params
@ -105,7 +105,7 @@ class AIResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AIRunResponse]:
"""
This endpoint provides users with the capability to run specific AI models
@ -138,22 +138,22 @@ class AIResource(SyncAPIResource):
*,
account_id: str,
prompt: str,
guidance: float | NotGiven = NOT_GIVEN,
height: int | NotGiven = NOT_GIVEN,
image: Iterable[float] | NotGiven = NOT_GIVEN,
image_b64: str | NotGiven = NOT_GIVEN,
mask: Iterable[float] | NotGiven = NOT_GIVEN,
negative_prompt: str | NotGiven = NOT_GIVEN,
num_steps: int | NotGiven = NOT_GIVEN,
seed: int | NotGiven = NOT_GIVEN,
strength: float | NotGiven = NOT_GIVEN,
width: int | NotGiven = NOT_GIVEN,
guidance: float | Omit = omit,
height: int | Omit = omit,
image: Iterable[float] | Omit = omit,
image_b64: str | Omit = omit,
mask: Iterable[float] | Omit = omit,
negative_prompt: str | Omit = omit,
num_steps: int | Omit = omit,
seed: int | Omit = omit,
strength: float | Omit = omit,
width: int | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AIRunResponse]:
"""
This endpoint provides users with the capability to run specific AI models
@ -210,13 +210,13 @@ class AIResource(SyncAPIResource):
*,
account_id: str,
prompt: str,
lang: str | NotGiven = NOT_GIVEN,
lang: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AIRunResponse]:
"""
This endpoint provides users with the capability to run specific AI models
@ -257,7 +257,7 @@ class AIResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AIRunResponse]:
"""
This endpoint provides users with the capability to run specific AI models
@ -290,14 +290,14 @@ class AIResource(SyncAPIResource):
*,
account_id: str,
audio: Iterable[float],
source_lang: str | NotGiven = NOT_GIVEN,
target_lang: str | NotGiven = NOT_GIVEN,
source_lang: str | Omit = omit,
target_lang: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AIRunResponse]:
"""
This endpoint provides users with the capability to run specific AI models
@ -341,7 +341,7 @@ class AIResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AIRunResponse]:
"""
This endpoint provides users with the capability to run specific AI models
@ -374,13 +374,13 @@ class AIResource(SyncAPIResource):
model_name: str,
*,
account_id: str,
image: Iterable[float] | NotGiven = NOT_GIVEN,
image: Iterable[float] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AIRunResponse]:
"""
This endpoint provides users with the capability to run specific AI models
@ -414,24 +414,24 @@ class AIResource(SyncAPIResource):
*,
account_id: str,
prompt: str,
frequency_penalty: float | NotGiven = NOT_GIVEN,
lora: str | NotGiven = NOT_GIVEN,
max_tokens: int | NotGiven = NOT_GIVEN,
presence_penalty: float | NotGiven = NOT_GIVEN,
raw: bool | NotGiven = NOT_GIVEN,
repetition_penalty: float | NotGiven = NOT_GIVEN,
response_format: ai_run_params.PromptResponseFormat | NotGiven = NOT_GIVEN,
seed: int | NotGiven = NOT_GIVEN,
stream: bool | NotGiven = NOT_GIVEN,
temperature: float | NotGiven = NOT_GIVEN,
top_k: int | NotGiven = NOT_GIVEN,
top_p: float | NotGiven = NOT_GIVEN,
frequency_penalty: float | Omit = omit,
lora: str | Omit = omit,
max_tokens: int | Omit = omit,
presence_penalty: float | Omit = omit,
raw: bool | Omit = omit,
repetition_penalty: float | Omit = omit,
response_format: ai_run_params.PromptResponseFormat | Omit = omit,
seed: int | Omit = omit,
stream: bool | Omit = omit,
temperature: float | Omit = omit,
top_k: int | Omit = omit,
top_p: float | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AIRunResponse]:
"""
This endpoint provides users with the capability to run specific AI models
@ -493,25 +493,25 @@ class AIResource(SyncAPIResource):
*,
account_id: str,
messages: Iterable[ai_run_params.MessagesMessage],
frequency_penalty: float | NotGiven = NOT_GIVEN,
functions: Iterable[ai_run_params.MessagesFunction] | NotGiven = NOT_GIVEN,
max_tokens: int | NotGiven = NOT_GIVEN,
presence_penalty: float | NotGiven = NOT_GIVEN,
raw: bool | NotGiven = NOT_GIVEN,
repetition_penalty: float | NotGiven = NOT_GIVEN,
response_format: ai_run_params.MessagesResponseFormat | NotGiven = NOT_GIVEN,
seed: int | NotGiven = NOT_GIVEN,
stream: bool | NotGiven = NOT_GIVEN,
temperature: float | NotGiven = NOT_GIVEN,
tools: Iterable[ai_run_params.MessagesTool] | NotGiven = NOT_GIVEN,
top_k: int | NotGiven = NOT_GIVEN,
top_p: float | NotGiven = NOT_GIVEN,
frequency_penalty: float | Omit = omit,
functions: Iterable[ai_run_params.MessagesFunction] | Omit = omit,
max_tokens: int | Omit = omit,
presence_penalty: float | Omit = omit,
raw: bool | Omit = omit,
repetition_penalty: float | Omit = omit,
response_format: ai_run_params.MessagesResponseFormat | Omit = omit,
seed: int | Omit = omit,
stream: bool | Omit = omit,
temperature: float | Omit = omit,
tools: Iterable[ai_run_params.MessagesTool] | Omit = omit,
top_k: int | Omit = omit,
top_p: float | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AIRunResponse]:
"""
This endpoint provides users with the capability to run specific AI models
@ -574,13 +574,13 @@ class AIResource(SyncAPIResource):
account_id: str,
target_lang: str,
text: str,
source_lang: str | NotGiven = NOT_GIVEN,
source_lang: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AIRunResponse]:
"""
This endpoint provides users with the capability to run specific AI models
@ -618,13 +618,13 @@ class AIResource(SyncAPIResource):
*,
account_id: str,
input_text: str,
max_length: int | NotGiven = NOT_GIVEN,
max_length: int | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AIRunResponse]:
"""
This endpoint provides users with the capability to run specific AI models
@ -659,22 +659,22 @@ class AIResource(SyncAPIResource):
*,
account_id: str,
image: Iterable[float],
frequency_penalty: float | NotGiven = NOT_GIVEN,
max_tokens: int | NotGiven = NOT_GIVEN,
presence_penalty: float | NotGiven = NOT_GIVEN,
prompt: str | NotGiven = NOT_GIVEN,
raw: bool | NotGiven = NOT_GIVEN,
repetition_penalty: float | NotGiven = NOT_GIVEN,
seed: float | NotGiven = NOT_GIVEN,
temperature: float | NotGiven = NOT_GIVEN,
top_k: float | NotGiven = NOT_GIVEN,
top_p: float | NotGiven = NOT_GIVEN,
frequency_penalty: float | Omit = omit,
max_tokens: int | Omit = omit,
presence_penalty: float | Omit = omit,
prompt: str | Omit = omit,
raw: bool | Omit = omit,
repetition_penalty: float | Omit = omit,
seed: float | Omit = omit,
temperature: float | Omit = omit,
top_k: float | Omit = omit,
top_p: float | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AIRunResponse]:
"""
This endpoint provides users with the capability to run specific AI models
@ -735,21 +735,21 @@ class AIResource(SyncAPIResource):
account_id: str,
image: str,
prompt: str,
frequency_penalty: float | NotGiven = NOT_GIVEN,
ignore_eos: bool | NotGiven = NOT_GIVEN,
max_tokens: int | NotGiven = NOT_GIVEN,
presence_penalty: float | NotGiven = NOT_GIVEN,
repetition_penalty: float | NotGiven = NOT_GIVEN,
seed: float | NotGiven = NOT_GIVEN,
temperature: float | NotGiven = NOT_GIVEN,
top_k: float | NotGiven = NOT_GIVEN,
top_p: float | NotGiven = NOT_GIVEN,
frequency_penalty: float | Omit = omit,
ignore_eos: bool | Omit = omit,
max_tokens: int | Omit = omit,
presence_penalty: float | Omit = omit,
repetition_penalty: float | Omit = omit,
seed: float | Omit = omit,
temperature: float | Omit = omit,
top_k: float | Omit = omit,
top_p: float | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AIRunResponse]:
"""
This endpoint provides users with the capability to run specific AI models
@ -809,21 +809,21 @@ class AIResource(SyncAPIResource):
account_id: str,
image: str,
messages: Iterable[ai_run_params.Variant13Message],
frequency_penalty: float | NotGiven = NOT_GIVEN,
ignore_eos: bool | NotGiven = NOT_GIVEN,
max_tokens: int | NotGiven = NOT_GIVEN,
presence_penalty: float | NotGiven = NOT_GIVEN,
repetition_penalty: float | NotGiven = NOT_GIVEN,
seed: float | NotGiven = NOT_GIVEN,
temperature: float | NotGiven = NOT_GIVEN,
top_k: float | NotGiven = NOT_GIVEN,
top_p: float | NotGiven = NOT_GIVEN,
frequency_penalty: float | Omit = omit,
ignore_eos: bool | Omit = omit,
max_tokens: int | Omit = omit,
presence_penalty: float | Omit = omit,
repetition_penalty: float | Omit = omit,
seed: float | Omit = omit,
temperature: float | Omit = omit,
top_k: float | Omit = omit,
top_p: float | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AIRunResponse]:
"""
This endpoint provides users with the capability to run specific AI models
@ -881,14 +881,14 @@ class AIResource(SyncAPIResource):
model_name: str,
*,
account_id: str,
image: str | NotGiven = NOT_GIVEN,
text: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
image: str | Omit = omit,
text: SequenceNotStr[str] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AIRunResponse]:
"""
This endpoint provides users with the capability to run specific AI models
@ -931,49 +931,45 @@ class AIResource(SyncAPIResource):
model_name: str,
*,
account_id: str,
text: str | Union[str, SequenceNotStr[str]] | SequenceNotStr[str] | NotGiven = NOT_GIVEN,
prompt: str | NotGiven = NOT_GIVEN,
guidance: float | NotGiven = NOT_GIVEN,
height: int | NotGiven = NOT_GIVEN,
image: Iterable[float] | str | NotGiven = NOT_GIVEN,
image_b64: str | NotGiven = NOT_GIVEN,
mask: Iterable[float] | NotGiven = NOT_GIVEN,
negative_prompt: str | NotGiven = NOT_GIVEN,
num_steps: int | NotGiven = NOT_GIVEN,
seed: int | float | NotGiven = NOT_GIVEN,
strength: float | NotGiven = NOT_GIVEN,
width: int | NotGiven = NOT_GIVEN,
lang: str | NotGiven = NOT_GIVEN,
audio: Iterable[float] | NotGiven = NOT_GIVEN,
source_lang: str | NotGiven = NOT_GIVEN,
target_lang: str | NotGiven = NOT_GIVEN,
frequency_penalty: float | NotGiven = NOT_GIVEN,
lora: str | NotGiven = NOT_GIVEN,
max_tokens: int | NotGiven = NOT_GIVEN,
presence_penalty: float | NotGiven = NOT_GIVEN,
raw: bool | NotGiven = NOT_GIVEN,
repetition_penalty: float | NotGiven = NOT_GIVEN,
response_format: ai_run_params.PromptResponseFormat
| ai_run_params.MessagesResponseFormat
| NotGiven = NOT_GIVEN,
stream: bool | NotGiven = NOT_GIVEN,
temperature: float | NotGiven = NOT_GIVEN,
top_k: int | float | NotGiven = NOT_GIVEN,
top_p: float | NotGiven = NOT_GIVEN,
messages: Iterable[ai_run_params.MessagesMessage]
| Iterable[ai_run_params.Variant13Message]
| NotGiven = NOT_GIVEN,
functions: Iterable[ai_run_params.MessagesFunction] | NotGiven = NOT_GIVEN,
tools: Iterable[ai_run_params.MessagesTool] | NotGiven = NOT_GIVEN,
input_text: str | NotGiven = NOT_GIVEN,
max_length: int | NotGiven = NOT_GIVEN,
ignore_eos: bool | NotGiven = NOT_GIVEN,
text: str | Union[str, SequenceNotStr[str]] | SequenceNotStr[str] | Omit = omit,
prompt: str | Omit = omit,
guidance: float | Omit = omit,
height: int | Omit = omit,
image: Iterable[float] | str | Omit = omit,
image_b64: str | Omit = omit,
mask: Iterable[float] | Omit = omit,
negative_prompt: str | Omit = omit,
num_steps: int | Omit = omit,
seed: int | float | Omit = omit,
strength: float | Omit = omit,
width: int | Omit = omit,
lang: str | Omit = omit,
audio: Iterable[float] | Omit = omit,
source_lang: str | Omit = omit,
target_lang: str | Omit = omit,
frequency_penalty: float | Omit = omit,
lora: str | Omit = omit,
max_tokens: int | Omit = omit,
presence_penalty: float | Omit = omit,
raw: bool | Omit = omit,
repetition_penalty: float | Omit = omit,
response_format: ai_run_params.PromptResponseFormat | ai_run_params.MessagesResponseFormat | Omit = omit,
stream: bool | Omit = omit,
temperature: float | Omit = omit,
top_k: int | float | Omit = omit,
top_p: float | Omit = omit,
messages: Iterable[ai_run_params.MessagesMessage] | Iterable[ai_run_params.Variant13Message] | Omit = omit,
functions: Iterable[ai_run_params.MessagesFunction] | Omit = omit,
tools: Iterable[ai_run_params.MessagesTool] | Omit = omit,
input_text: str | Omit = omit,
max_length: int | Omit = omit,
ignore_eos: bool | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AIRunResponse]:
if not account_id:
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
@ -1083,7 +1079,7 @@ class AsyncAIResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AIRunResponse]:
"""
This endpoint provides users with the capability to run specific AI models
@ -1116,22 +1112,22 @@ class AsyncAIResource(AsyncAPIResource):
*,
account_id: str,
prompt: str,
guidance: float | NotGiven = NOT_GIVEN,
height: int | NotGiven = NOT_GIVEN,
image: Iterable[float] | NotGiven = NOT_GIVEN,
image_b64: str | NotGiven = NOT_GIVEN,
mask: Iterable[float] | NotGiven = NOT_GIVEN,
negative_prompt: str | NotGiven = NOT_GIVEN,
num_steps: int | NotGiven = NOT_GIVEN,
seed: int | NotGiven = NOT_GIVEN,
strength: float | NotGiven = NOT_GIVEN,
width: int | NotGiven = NOT_GIVEN,
guidance: float | Omit = omit,
height: int | Omit = omit,
image: Iterable[float] | Omit = omit,
image_b64: str | Omit = omit,
mask: Iterable[float] | Omit = omit,
negative_prompt: str | Omit = omit,
num_steps: int | Omit = omit,
seed: int | Omit = omit,
strength: float | Omit = omit,
width: int | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AIRunResponse]:
"""
This endpoint provides users with the capability to run specific AI models
@ -1188,13 +1184,13 @@ class AsyncAIResource(AsyncAPIResource):
*,
account_id: str,
prompt: str,
lang: str | NotGiven = NOT_GIVEN,
lang: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AIRunResponse]:
"""
This endpoint provides users with the capability to run specific AI models
@ -1235,7 +1231,7 @@ class AsyncAIResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AIRunResponse]:
"""
This endpoint provides users with the capability to run specific AI models
@ -1268,14 +1264,14 @@ class AsyncAIResource(AsyncAPIResource):
*,
account_id: str,
audio: Iterable[float],
source_lang: str | NotGiven = NOT_GIVEN,
target_lang: str | NotGiven = NOT_GIVEN,
source_lang: str | Omit = omit,
target_lang: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AIRunResponse]:
"""
This endpoint provides users with the capability to run specific AI models
@ -1319,7 +1315,7 @@ class AsyncAIResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AIRunResponse]:
"""
This endpoint provides users with the capability to run specific AI models
@ -1352,13 +1348,13 @@ class AsyncAIResource(AsyncAPIResource):
model_name: str,
*,
account_id: str,
image: Iterable[float] | NotGiven = NOT_GIVEN,
image: Iterable[float] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AIRunResponse]:
"""
This endpoint provides users with the capability to run specific AI models
@ -1392,24 +1388,24 @@ class AsyncAIResource(AsyncAPIResource):
*,
account_id: str,
prompt: str,
frequency_penalty: float | NotGiven = NOT_GIVEN,
lora: str | NotGiven = NOT_GIVEN,
max_tokens: int | NotGiven = NOT_GIVEN,
presence_penalty: float | NotGiven = NOT_GIVEN,
raw: bool | NotGiven = NOT_GIVEN,
repetition_penalty: float | NotGiven = NOT_GIVEN,
response_format: ai_run_params.PromptResponseFormat | NotGiven = NOT_GIVEN,
seed: int | NotGiven = NOT_GIVEN,
stream: bool | NotGiven = NOT_GIVEN,
temperature: float | NotGiven = NOT_GIVEN,
top_k: int | NotGiven = NOT_GIVEN,
top_p: float | NotGiven = NOT_GIVEN,
frequency_penalty: float | Omit = omit,
lora: str | Omit = omit,
max_tokens: int | Omit = omit,
presence_penalty: float | Omit = omit,
raw: bool | Omit = omit,
repetition_penalty: float | Omit = omit,
response_format: ai_run_params.PromptResponseFormat | Omit = omit,
seed: int | Omit = omit,
stream: bool | Omit = omit,
temperature: float | Omit = omit,
top_k: int | Omit = omit,
top_p: float | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AIRunResponse]:
"""
This endpoint provides users with the capability to run specific AI models
@ -1471,25 +1467,25 @@ class AsyncAIResource(AsyncAPIResource):
*,
account_id: str,
messages: Iterable[ai_run_params.MessagesMessage],
frequency_penalty: float | NotGiven = NOT_GIVEN,
functions: Iterable[ai_run_params.MessagesFunction] | NotGiven = NOT_GIVEN,
max_tokens: int | NotGiven = NOT_GIVEN,
presence_penalty: float | NotGiven = NOT_GIVEN,
raw: bool | NotGiven = NOT_GIVEN,
repetition_penalty: float | NotGiven = NOT_GIVEN,
response_format: ai_run_params.MessagesResponseFormat | NotGiven = NOT_GIVEN,
seed: int | NotGiven = NOT_GIVEN,
stream: bool | NotGiven = NOT_GIVEN,
temperature: float | NotGiven = NOT_GIVEN,
tools: Iterable[ai_run_params.MessagesTool] | NotGiven = NOT_GIVEN,
top_k: int | NotGiven = NOT_GIVEN,
top_p: float | NotGiven = NOT_GIVEN,
frequency_penalty: float | Omit = omit,
functions: Iterable[ai_run_params.MessagesFunction] | Omit = omit,
max_tokens: int | Omit = omit,
presence_penalty: float | Omit = omit,
raw: bool | Omit = omit,
repetition_penalty: float | Omit = omit,
response_format: ai_run_params.MessagesResponseFormat | Omit = omit,
seed: int | Omit = omit,
stream: bool | Omit = omit,
temperature: float | Omit = omit,
tools: Iterable[ai_run_params.MessagesTool] | Omit = omit,
top_k: int | Omit = omit,
top_p: float | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AIRunResponse]:
"""
This endpoint provides users with the capability to run specific AI models
@ -1552,13 +1548,13 @@ class AsyncAIResource(AsyncAPIResource):
account_id: str,
target_lang: str,
text: str,
source_lang: str | NotGiven = NOT_GIVEN,
source_lang: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AIRunResponse]:
"""
This endpoint provides users with the capability to run specific AI models
@ -1596,13 +1592,13 @@ class AsyncAIResource(AsyncAPIResource):
*,
account_id: str,
input_text: str,
max_length: int | NotGiven = NOT_GIVEN,
max_length: int | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AIRunResponse]:
"""
This endpoint provides users with the capability to run specific AI models
@ -1637,22 +1633,22 @@ class AsyncAIResource(AsyncAPIResource):
*,
account_id: str,
image: Iterable[float],
frequency_penalty: float | NotGiven = NOT_GIVEN,
max_tokens: int | NotGiven = NOT_GIVEN,
presence_penalty: float | NotGiven = NOT_GIVEN,
prompt: str | NotGiven = NOT_GIVEN,
raw: bool | NotGiven = NOT_GIVEN,
repetition_penalty: float | NotGiven = NOT_GIVEN,
seed: float | NotGiven = NOT_GIVEN,
temperature: float | NotGiven = NOT_GIVEN,
top_k: float | NotGiven = NOT_GIVEN,
top_p: float | NotGiven = NOT_GIVEN,
frequency_penalty: float | Omit = omit,
max_tokens: int | Omit = omit,
presence_penalty: float | Omit = omit,
prompt: str | Omit = omit,
raw: bool | Omit = omit,
repetition_penalty: float | Omit = omit,
seed: float | Omit = omit,
temperature: float | Omit = omit,
top_k: float | Omit = omit,
top_p: float | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AIRunResponse]:
"""
This endpoint provides users with the capability to run specific AI models
@ -1713,21 +1709,21 @@ class AsyncAIResource(AsyncAPIResource):
account_id: str,
image: str,
prompt: str,
frequency_penalty: float | NotGiven = NOT_GIVEN,
ignore_eos: bool | NotGiven = NOT_GIVEN,
max_tokens: int | NotGiven = NOT_GIVEN,
presence_penalty: float | NotGiven = NOT_GIVEN,
repetition_penalty: float | NotGiven = NOT_GIVEN,
seed: float | NotGiven = NOT_GIVEN,
temperature: float | NotGiven = NOT_GIVEN,
top_k: float | NotGiven = NOT_GIVEN,
top_p: float | NotGiven = NOT_GIVEN,
frequency_penalty: float | Omit = omit,
ignore_eos: bool | Omit = omit,
max_tokens: int | Omit = omit,
presence_penalty: float | Omit = omit,
repetition_penalty: float | Omit = omit,
seed: float | Omit = omit,
temperature: float | Omit = omit,
top_k: float | Omit = omit,
top_p: float | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AIRunResponse]:
"""
This endpoint provides users with the capability to run specific AI models
@ -1787,21 +1783,21 @@ class AsyncAIResource(AsyncAPIResource):
account_id: str,
image: str,
messages: Iterable[ai_run_params.Variant13Message],
frequency_penalty: float | NotGiven = NOT_GIVEN,
ignore_eos: bool | NotGiven = NOT_GIVEN,
max_tokens: int | NotGiven = NOT_GIVEN,
presence_penalty: float | NotGiven = NOT_GIVEN,
repetition_penalty: float | NotGiven = NOT_GIVEN,
seed: float | NotGiven = NOT_GIVEN,
temperature: float | NotGiven = NOT_GIVEN,
top_k: float | NotGiven = NOT_GIVEN,
top_p: float | NotGiven = NOT_GIVEN,
frequency_penalty: float | Omit = omit,
ignore_eos: bool | Omit = omit,
max_tokens: int | Omit = omit,
presence_penalty: float | Omit = omit,
repetition_penalty: float | Omit = omit,
seed: float | Omit = omit,
temperature: float | Omit = omit,
top_k: float | Omit = omit,
top_p: float | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AIRunResponse]:
"""
This endpoint provides users with the capability to run specific AI models
@ -1859,14 +1855,14 @@ class AsyncAIResource(AsyncAPIResource):
model_name: str,
*,
account_id: str,
image: str | NotGiven = NOT_GIVEN,
text: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
image: str | Omit = omit,
text: SequenceNotStr[str] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AIRunResponse]:
"""
This endpoint provides users with the capability to run specific AI models
@ -1909,49 +1905,45 @@ class AsyncAIResource(AsyncAPIResource):
model_name: str,
*,
account_id: str,
text: str | Union[str, SequenceNotStr[str]] | SequenceNotStr[str] | NotGiven = NOT_GIVEN,
prompt: str | NotGiven = NOT_GIVEN,
guidance: float | NotGiven = NOT_GIVEN,
height: int | NotGiven = NOT_GIVEN,
image: Iterable[float] | str | NotGiven = NOT_GIVEN,
image_b64: str | NotGiven = NOT_GIVEN,
mask: Iterable[float] | NotGiven = NOT_GIVEN,
negative_prompt: str | NotGiven = NOT_GIVEN,
num_steps: int | NotGiven = NOT_GIVEN,
seed: int | float | NotGiven = NOT_GIVEN,
strength: float | NotGiven = NOT_GIVEN,
width: int | NotGiven = NOT_GIVEN,
lang: str | NotGiven = NOT_GIVEN,
audio: Iterable[float] | NotGiven = NOT_GIVEN,
source_lang: str | NotGiven = NOT_GIVEN,
target_lang: str | NotGiven = NOT_GIVEN,
frequency_penalty: float | NotGiven = NOT_GIVEN,
lora: str | NotGiven = NOT_GIVEN,
max_tokens: int | NotGiven = NOT_GIVEN,
presence_penalty: float | NotGiven = NOT_GIVEN,
raw: bool | NotGiven = NOT_GIVEN,
repetition_penalty: float | NotGiven = NOT_GIVEN,
response_format: ai_run_params.PromptResponseFormat
| ai_run_params.MessagesResponseFormat
| NotGiven = NOT_GIVEN,
stream: bool | NotGiven = NOT_GIVEN,
temperature: float | NotGiven = NOT_GIVEN,
top_k: int | float | NotGiven = NOT_GIVEN,
top_p: float | NotGiven = NOT_GIVEN,
messages: Iterable[ai_run_params.MessagesMessage]
| Iterable[ai_run_params.Variant13Message]
| NotGiven = NOT_GIVEN,
functions: Iterable[ai_run_params.MessagesFunction] | NotGiven = NOT_GIVEN,
tools: Iterable[ai_run_params.MessagesTool] | NotGiven = NOT_GIVEN,
input_text: str | NotGiven = NOT_GIVEN,
max_length: int | NotGiven = NOT_GIVEN,
ignore_eos: bool | NotGiven = NOT_GIVEN,
text: str | Union[str, SequenceNotStr[str]] | SequenceNotStr[str] | Omit = omit,
prompt: str | Omit = omit,
guidance: float | Omit = omit,
height: int | Omit = omit,
image: Iterable[float] | str | Omit = omit,
image_b64: str | Omit = omit,
mask: Iterable[float] | Omit = omit,
negative_prompt: str | Omit = omit,
num_steps: int | Omit = omit,
seed: int | float | Omit = omit,
strength: float | Omit = omit,
width: int | Omit = omit,
lang: str | Omit = omit,
audio: Iterable[float] | Omit = omit,
source_lang: str | Omit = omit,
target_lang: str | Omit = omit,
frequency_penalty: float | Omit = omit,
lora: str | Omit = omit,
max_tokens: int | Omit = omit,
presence_penalty: float | Omit = omit,
raw: bool | Omit = omit,
repetition_penalty: float | Omit = omit,
response_format: ai_run_params.PromptResponseFormat | ai_run_params.MessagesResponseFormat | Omit = omit,
stream: bool | Omit = omit,
temperature: float | Omit = omit,
top_k: int | float | Omit = omit,
top_p: float | Omit = omit,
messages: Iterable[ai_run_params.MessagesMessage] | Iterable[ai_run_params.Variant13Message] | Omit = omit,
functions: Iterable[ai_run_params.MessagesFunction] | Omit = omit,
tools: Iterable[ai_run_params.MessagesTool] | Omit = omit,
input_text: str | Omit = omit,
max_length: int | Omit = omit,
ignore_eos: bool | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AIRunResponse]:
if not account_id:
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")

View file

@ -4,7 +4,7 @@ from __future__ import annotations
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._types import Body, Query, Headers, NotGiven, not_given
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import (
@ -48,7 +48,7 @@ class AuthorsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncSinglePage[object]:
"""
Author Search
@ -103,7 +103,7 @@ class AsyncAuthorsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[object, AsyncSinglePage[object]]:
"""
Author Search

View file

@ -6,7 +6,7 @@ from typing import Mapping, cast
import httpx
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes
from ...._types import Body, Omit, Query, Headers, NotGiven, FileTypes, omit, not_given
from ...._utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@ -48,14 +48,14 @@ class AssetsResource(SyncAPIResource):
finetune_id: str,
*,
account_id: str,
file: FileTypes | NotGiven = NOT_GIVEN,
file_name: str | NotGiven = NOT_GIVEN,
file: FileTypes | Omit = omit,
file_name: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AssetCreateResponse:
"""
Upload a Finetune Asset
@ -120,14 +120,14 @@ class AsyncAssetsResource(AsyncAPIResource):
finetune_id: str,
*,
account_id: str,
file: FileTypes | NotGiven = NOT_GIVEN,
file_name: str | NotGiven = NOT_GIVEN,
file: FileTypes | Omit = omit,
file_name: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AssetCreateResponse:
"""
Upload a Finetune Asset

View file

@ -22,7 +22,7 @@ from .public import (
PublicResourceWithStreamingResponse,
AsyncPublicResourceWithStreamingResponse,
)
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ....types.ai import finetune_create_params
@ -75,14 +75,14 @@ class FinetunesResource(SyncAPIResource):
account_id: str,
model: str,
name: str,
description: str | NotGiven = NOT_GIVEN,
public: bool | NotGiven = NOT_GIVEN,
description: str | Omit = omit,
public: bool | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> FinetuneCreateResponse:
"""
Create a new Finetune
@ -128,7 +128,7 @@ class FinetunesResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> FinetuneListResponse:
"""
List Finetunes
@ -191,14 +191,14 @@ class AsyncFinetunesResource(AsyncAPIResource):
account_id: str,
model: str,
name: str,
description: str | NotGiven = NOT_GIVEN,
public: bool | NotGiven = NOT_GIVEN,
description: str | Omit = omit,
public: bool | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> FinetuneCreateResponse:
"""
Create a new Finetune
@ -244,7 +244,7 @@ class AsyncFinetunesResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> FinetuneListResponse:
"""
List Finetunes

View file

@ -4,7 +4,7 @@ from __future__ import annotations
import httpx
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ...._utils import maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@ -46,15 +46,15 @@ class PublicResource(SyncAPIResource):
self,
*,
account_id: str,
limit: float | NotGiven = NOT_GIVEN,
offset: float | NotGiven = NOT_GIVEN,
order_by: str | NotGiven = NOT_GIVEN,
limit: float | Omit = omit,
offset: float | Omit = omit,
order_by: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncSinglePage[PublicListResponse]:
"""
List Public Finetunes
@ -121,15 +121,15 @@ class AsyncPublicResource(AsyncAPIResource):
self,
*,
account_id: str,
limit: float | NotGiven = NOT_GIVEN,
offset: float | NotGiven = NOT_GIVEN,
order_by: str | NotGiven = NOT_GIVEN,
limit: float | Omit = omit,
offset: float | Omit = omit,
order_by: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[PublicListResponse, AsyncSinglePage[PublicListResponse]]:
"""
List Public Finetunes

View file

@ -12,7 +12,7 @@ from .schema import (
SchemaResourceWithStreamingResponse,
AsyncSchemaResourceWithStreamingResponse,
)
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ...._utils import maybe_transform
from ...._compat import cached_property
from ....types.ai import model_list_params
@ -57,19 +57,19 @@ class ModelsResource(SyncAPIResource):
self,
*,
account_id: str,
author: str | NotGiven = NOT_GIVEN,
hide_experimental: bool | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
search: str | NotGiven = NOT_GIVEN,
source: float | NotGiven = NOT_GIVEN,
task: str | NotGiven = NOT_GIVEN,
author: str | Omit = omit,
hide_experimental: bool | Omit = omit,
page: int | Omit = omit,
per_page: int | Omit = omit,
search: str | Omit = omit,
source: float | Omit = omit,
task: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncV4PagePaginationArray[object]:
"""
Model Search
@ -148,19 +148,19 @@ class AsyncModelsResource(AsyncAPIResource):
self,
*,
account_id: str,
author: str | NotGiven = NOT_GIVEN,
hide_experimental: bool | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
search: str | NotGiven = NOT_GIVEN,
source: float | NotGiven = NOT_GIVEN,
task: str | NotGiven = NOT_GIVEN,
author: str | Omit = omit,
hide_experimental: bool | Omit = omit,
page: int | Omit = omit,
per_page: int | Omit = omit,
search: str | Omit = omit,
source: float | Omit = omit,
task: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[object, AsyncV4PagePaginationArray[object]]:
"""
Model Search

View file

@ -6,7 +6,7 @@ from typing import Type, cast
import httpx
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._types import Body, Query, Headers, NotGiven, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@ -53,7 +53,7 @@ class SchemaResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> object:
"""
Get Model Schema
@ -115,7 +115,7 @@ class AsyncSchemaResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> object:
"""
Get Model Schema

View file

@ -4,7 +4,7 @@ from __future__ import annotations
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._types import Body, Query, Headers, NotGiven, not_given
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import (
@ -48,7 +48,7 @@ class TasksResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncSinglePage[object]:
"""
Task Search
@ -103,7 +103,7 @@ class AsyncTasksResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[object, AsyncSinglePage[object]]:
"""
Task Search

View file

@ -23,7 +23,7 @@ from .urls import (
URLsResourceWithStreamingResponse,
AsyncURLsResourceWithStreamingResponse,
)
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from .datasets import (
DatasetsResource,
@ -121,17 +121,17 @@ class AIGatewayResource(SyncAPIResource):
rate_limiting_interval: Optional[int],
rate_limiting_limit: Optional[int],
rate_limiting_technique: Literal["fixed", "sliding"],
authentication: bool | NotGiven = NOT_GIVEN,
log_management: Optional[int] | NotGiven = NOT_GIVEN,
log_management_strategy: Optional[Literal["STOP_INSERTING", "DELETE_OLDEST"]] | NotGiven = NOT_GIVEN,
logpush: bool | NotGiven = NOT_GIVEN,
logpush_public_key: Optional[str] | NotGiven = NOT_GIVEN,
authentication: bool | Omit = omit,
log_management: Optional[int] | Omit = omit,
log_management_strategy: Optional[Literal["STOP_INSERTING", "DELETE_OLDEST"]] | Omit = omit,
logpush: bool | Omit = omit,
logpush_public_key: Optional[str] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AIGatewayCreateResponse:
"""
Create a new Gateway
@ -189,19 +189,19 @@ class AIGatewayResource(SyncAPIResource):
rate_limiting_interval: Optional[int],
rate_limiting_limit: Optional[int],
rate_limiting_technique: Literal["fixed", "sliding"],
authentication: bool | NotGiven = NOT_GIVEN,
dlp: ai_gateway_update_params.DLP | NotGiven = NOT_GIVEN,
log_management: Optional[int] | NotGiven = NOT_GIVEN,
log_management_strategy: Optional[Literal["STOP_INSERTING", "DELETE_OLDEST"]] | NotGiven = NOT_GIVEN,
logpush: bool | NotGiven = NOT_GIVEN,
logpush_public_key: Optional[str] | NotGiven = NOT_GIVEN,
store_id: Optional[str] | NotGiven = NOT_GIVEN,
authentication: bool | Omit = omit,
dlp: ai_gateway_update_params.DLP | Omit = omit,
log_management: Optional[int] | Omit = omit,
log_management_strategy: Optional[Literal["STOP_INSERTING", "DELETE_OLDEST"]] | Omit = omit,
logpush: bool | Omit = omit,
logpush_public_key: Optional[str] | Omit = omit,
store_id: Optional[str] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AIGatewayUpdateResponse:
"""
Update a Gateway
@ -255,15 +255,15 @@ class AIGatewayResource(SyncAPIResource):
self,
*,
account_id: str,
page: int | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
search: str | NotGiven = NOT_GIVEN,
page: int | Omit = omit,
per_page: int | Omit = omit,
search: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncV4PagePaginationArray[AIGatewayListResponse]:
"""
List Gateways
@ -311,7 +311,7 @@ class AIGatewayResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AIGatewayDeleteResponse:
"""
Delete a Gateway
@ -353,7 +353,7 @@ class AIGatewayResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AIGatewayGetResponse:
"""
Fetch a Gateway
@ -437,17 +437,17 @@ class AsyncAIGatewayResource(AsyncAPIResource):
rate_limiting_interval: Optional[int],
rate_limiting_limit: Optional[int],
rate_limiting_technique: Literal["fixed", "sliding"],
authentication: bool | NotGiven = NOT_GIVEN,
log_management: Optional[int] | NotGiven = NOT_GIVEN,
log_management_strategy: Optional[Literal["STOP_INSERTING", "DELETE_OLDEST"]] | NotGiven = NOT_GIVEN,
logpush: bool | NotGiven = NOT_GIVEN,
logpush_public_key: Optional[str] | NotGiven = NOT_GIVEN,
authentication: bool | Omit = omit,
log_management: Optional[int] | Omit = omit,
log_management_strategy: Optional[Literal["STOP_INSERTING", "DELETE_OLDEST"]] | Omit = omit,
logpush: bool | Omit = omit,
logpush_public_key: Optional[str] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AIGatewayCreateResponse:
"""
Create a new Gateway
@ -505,19 +505,19 @@ class AsyncAIGatewayResource(AsyncAPIResource):
rate_limiting_interval: Optional[int],
rate_limiting_limit: Optional[int],
rate_limiting_technique: Literal["fixed", "sliding"],
authentication: bool | NotGiven = NOT_GIVEN,
dlp: ai_gateway_update_params.DLP | NotGiven = NOT_GIVEN,
log_management: Optional[int] | NotGiven = NOT_GIVEN,
log_management_strategy: Optional[Literal["STOP_INSERTING", "DELETE_OLDEST"]] | NotGiven = NOT_GIVEN,
logpush: bool | NotGiven = NOT_GIVEN,
logpush_public_key: Optional[str] | NotGiven = NOT_GIVEN,
store_id: Optional[str] | NotGiven = NOT_GIVEN,
authentication: bool | Omit = omit,
dlp: ai_gateway_update_params.DLP | Omit = omit,
log_management: Optional[int] | Omit = omit,
log_management_strategy: Optional[Literal["STOP_INSERTING", "DELETE_OLDEST"]] | Omit = omit,
logpush: bool | Omit = omit,
logpush_public_key: Optional[str] | Omit = omit,
store_id: Optional[str] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AIGatewayUpdateResponse:
"""
Update a Gateway
@ -571,15 +571,15 @@ class AsyncAIGatewayResource(AsyncAPIResource):
self,
*,
account_id: str,
page: int | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
search: str | NotGiven = NOT_GIVEN,
page: int | Omit = omit,
per_page: int | Omit = omit,
search: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[AIGatewayListResponse, AsyncV4PagePaginationArray[AIGatewayListResponse]]:
"""
List Gateways
@ -627,7 +627,7 @@ class AsyncAIGatewayResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AIGatewayDeleteResponse:
"""
Delete a Gateway
@ -669,7 +669,7 @@ class AsyncAIGatewayResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AIGatewayGetResponse:
"""
Fetch a Gateway

View file

@ -6,7 +6,7 @@ from typing import Type, Iterable, cast
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -62,7 +62,7 @@ class DatasetsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> DatasetCreateResponse:
"""
Create a new Dataset
@ -116,7 +116,7 @@ class DatasetsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> DatasetUpdateResponse:
"""
Update a Dataset
@ -163,17 +163,17 @@ class DatasetsResource(SyncAPIResource):
gateway_id: str,
*,
account_id: str,
enable: bool | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
search: str | NotGiven = NOT_GIVEN,
enable: bool | Omit = omit,
name: str | Omit = omit,
page: int | Omit = omit,
per_page: int | Omit = omit,
search: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncV4PagePaginationArray[DatasetListResponse]:
"""
List Datasets
@ -228,7 +228,7 @@ class DatasetsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> DatasetDeleteResponse:
"""
Delete a Dataset
@ -273,7 +273,7 @@ class DatasetsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> DatasetGetResponse:
"""
Fetch a Dataset
@ -341,7 +341,7 @@ class AsyncDatasetsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> DatasetCreateResponse:
"""
Create a new Dataset
@ -395,7 +395,7 @@ class AsyncDatasetsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> DatasetUpdateResponse:
"""
Update a Dataset
@ -442,17 +442,17 @@ class AsyncDatasetsResource(AsyncAPIResource):
gateway_id: str,
*,
account_id: str,
enable: bool | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
search: str | NotGiven = NOT_GIVEN,
enable: bool | Omit = omit,
name: str | Omit = omit,
page: int | Omit = omit,
per_page: int | Omit = omit,
search: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[DatasetListResponse, AsyncV4PagePaginationArray[DatasetListResponse]]:
"""
List Datasets
@ -507,7 +507,7 @@ class AsyncDatasetsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> DatasetDeleteResponse:
"""
Delete a Dataset
@ -552,7 +552,7 @@ class AsyncDatasetsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> DatasetGetResponse:
"""
Fetch a Dataset

View file

@ -6,7 +6,7 @@ from typing_extensions import Literal
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ..._utils import maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -48,16 +48,16 @@ class EvaluationTypesResource(SyncAPIResource):
self,
*,
account_id: str,
order_by: str | NotGiven = NOT_GIVEN,
order_by_direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
order_by: str | Omit = omit,
order_by_direction: Literal["asc", "desc"] | Omit = omit,
page: int | Omit = omit,
per_page: int | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncV4PagePaginationArray[EvaluationTypeListResponse]:
"""
List Evaluators
@ -119,16 +119,16 @@ class AsyncEvaluationTypesResource(AsyncAPIResource):
self,
*,
account_id: str,
order_by: str | NotGiven = NOT_GIVEN,
order_by_direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
order_by: str | Omit = omit,
order_by_direction: Literal["asc", "desc"] | Omit = omit,
page: int | Omit = omit,
per_page: int | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[EvaluationTypeListResponse, AsyncV4PagePaginationArray[EvaluationTypeListResponse]]:
"""
List Evaluators

View file

@ -6,7 +6,7 @@ from typing import Type, cast
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -61,7 +61,7 @@ class EvaluationsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> EvaluationCreateResponse:
"""
Create a new Evaluation
@ -106,17 +106,17 @@ class EvaluationsResource(SyncAPIResource):
gateway_id: str,
*,
account_id: str,
name: str | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
processed: bool | NotGiven = NOT_GIVEN,
search: str | NotGiven = NOT_GIVEN,
name: str | Omit = omit,
page: int | Omit = omit,
per_page: int | Omit = omit,
processed: bool | Omit = omit,
search: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncV4PagePaginationArray[EvaluationListResponse]:
"""
List Evaluations
@ -171,7 +171,7 @@ class EvaluationsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> EvaluationDeleteResponse:
"""
Delete a Evaluation
@ -216,7 +216,7 @@ class EvaluationsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> EvaluationGetResponse:
"""
Fetch a Evaluation
@ -284,7 +284,7 @@ class AsyncEvaluationsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> EvaluationCreateResponse:
"""
Create a new Evaluation
@ -329,17 +329,17 @@ class AsyncEvaluationsResource(AsyncAPIResource):
gateway_id: str,
*,
account_id: str,
name: str | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
processed: bool | NotGiven = NOT_GIVEN,
search: str | NotGiven = NOT_GIVEN,
name: str | Omit = omit,
page: int | Omit = omit,
per_page: int | Omit = omit,
processed: bool | Omit = omit,
search: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[EvaluationListResponse, AsyncV4PagePaginationArray[EvaluationListResponse]]:
"""
List Evaluations
@ -394,7 +394,7 @@ class AsyncEvaluationsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> EvaluationDeleteResponse:
"""
Delete a Evaluation
@ -439,7 +439,7 @@ class AsyncEvaluationsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> EvaluationGetResponse:
"""
Fetch a Evaluation

View file

@ -8,7 +8,7 @@ from typing_extensions import Literal
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -54,40 +54,40 @@ class LogsResource(SyncAPIResource):
gateway_id: str,
*,
account_id: str,
cached: bool | NotGiven = NOT_GIVEN,
direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
end_date: Union[str, datetime] | NotGiven = NOT_GIVEN,
feedback: Literal[0, 1] | NotGiven = NOT_GIVEN,
filters: Iterable[log_list_params.Filter] | NotGiven = NOT_GIVEN,
max_cost: float | NotGiven = NOT_GIVEN,
max_duration: float | NotGiven = NOT_GIVEN,
max_tokens_in: float | NotGiven = NOT_GIVEN,
max_tokens_out: float | NotGiven = NOT_GIVEN,
max_total_tokens: float | NotGiven = NOT_GIVEN,
meta_info: bool | NotGiven = NOT_GIVEN,
min_cost: float | NotGiven = NOT_GIVEN,
min_duration: float | NotGiven = NOT_GIVEN,
min_tokens_in: float | NotGiven = NOT_GIVEN,
min_tokens_out: float | NotGiven = NOT_GIVEN,
min_total_tokens: float | NotGiven = NOT_GIVEN,
model: str | NotGiven = NOT_GIVEN,
model_type: str | NotGiven = NOT_GIVEN,
order_by: Literal["created_at", "provider", "model", "model_type", "success", "cached"] | NotGiven = NOT_GIVEN,
order_by_direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
provider: str | NotGiven = NOT_GIVEN,
request_content_type: str | NotGiven = NOT_GIVEN,
response_content_type: str | NotGiven = NOT_GIVEN,
search: str | NotGiven = NOT_GIVEN,
start_date: Union[str, datetime] | NotGiven = NOT_GIVEN,
success: bool | NotGiven = NOT_GIVEN,
cached: bool | Omit = omit,
direction: Literal["asc", "desc"] | Omit = omit,
end_date: Union[str, datetime] | Omit = omit,
feedback: Literal[0, 1] | Omit = omit,
filters: Iterable[log_list_params.Filter] | Omit = omit,
max_cost: float | Omit = omit,
max_duration: float | Omit = omit,
max_tokens_in: float | Omit = omit,
max_tokens_out: float | Omit = omit,
max_total_tokens: float | Omit = omit,
meta_info: bool | Omit = omit,
min_cost: float | Omit = omit,
min_duration: float | Omit = omit,
min_tokens_in: float | Omit = omit,
min_tokens_out: float | Omit = omit,
min_total_tokens: float | Omit = omit,
model: str | Omit = omit,
model_type: str | Omit = omit,
order_by: Literal["created_at", "provider", "model", "model_type", "success", "cached"] | Omit = omit,
order_by_direction: Literal["asc", "desc"] | Omit = omit,
page: int | Omit = omit,
per_page: int | Omit = omit,
provider: str | Omit = omit,
request_content_type: str | Omit = omit,
response_content_type: str | Omit = omit,
search: str | Omit = omit,
start_date: Union[str, datetime] | Omit = omit,
success: bool | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncV4PagePaginationArray[LogListResponse]:
"""
List Gateway Logs
@ -157,8 +157,8 @@ class LogsResource(SyncAPIResource):
gateway_id: str,
*,
account_id: str,
filters: Iterable[log_delete_params.Filter] | NotGiven = NOT_GIVEN,
limit: int | NotGiven = NOT_GIVEN,
filters: Iterable[log_delete_params.Filter] | Omit = omit,
limit: int | Omit = omit,
order_by: Literal[
"created_at",
"provider",
@ -172,14 +172,14 @@ class LogsResource(SyncAPIResource):
"duration",
"feedback",
]
| NotGiven = NOT_GIVEN,
order_by_direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
| Omit = omit,
order_by_direction: Literal["asc", "desc"] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> LogDeleteResponse:
"""
Delete Gateway Logs
@ -225,15 +225,15 @@ class LogsResource(SyncAPIResource):
*,
account_id: str,
gateway_id: str,
feedback: Optional[float] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Union[str, float, bool]]] | NotGiven = NOT_GIVEN,
score: Optional[float] | NotGiven = NOT_GIVEN,
feedback: Optional[float] | Omit = omit,
metadata: Optional[Dict[str, Union[str, float, bool]]] | Omit = omit,
score: Optional[float] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> object:
"""
Patch Gateway Log
@ -286,7 +286,7 @@ class LogsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> LogGetResponse:
"""
Get Gateway Log Detail
@ -331,7 +331,7 @@ class LogsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> object:
"""
Get Gateway Log Request
@ -372,7 +372,7 @@ class LogsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> object:
"""
Get Gateway Log Response
@ -428,40 +428,40 @@ class AsyncLogsResource(AsyncAPIResource):
gateway_id: str,
*,
account_id: str,
cached: bool | NotGiven = NOT_GIVEN,
direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
end_date: Union[str, datetime] | NotGiven = NOT_GIVEN,
feedback: Literal[0, 1] | NotGiven = NOT_GIVEN,
filters: Iterable[log_list_params.Filter] | NotGiven = NOT_GIVEN,
max_cost: float | NotGiven = NOT_GIVEN,
max_duration: float | NotGiven = NOT_GIVEN,
max_tokens_in: float | NotGiven = NOT_GIVEN,
max_tokens_out: float | NotGiven = NOT_GIVEN,
max_total_tokens: float | NotGiven = NOT_GIVEN,
meta_info: bool | NotGiven = NOT_GIVEN,
min_cost: float | NotGiven = NOT_GIVEN,
min_duration: float | NotGiven = NOT_GIVEN,
min_tokens_in: float | NotGiven = NOT_GIVEN,
min_tokens_out: float | NotGiven = NOT_GIVEN,
min_total_tokens: float | NotGiven = NOT_GIVEN,
model: str | NotGiven = NOT_GIVEN,
model_type: str | NotGiven = NOT_GIVEN,
order_by: Literal["created_at", "provider", "model", "model_type", "success", "cached"] | NotGiven = NOT_GIVEN,
order_by_direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
provider: str | NotGiven = NOT_GIVEN,
request_content_type: str | NotGiven = NOT_GIVEN,
response_content_type: str | NotGiven = NOT_GIVEN,
search: str | NotGiven = NOT_GIVEN,
start_date: Union[str, datetime] | NotGiven = NOT_GIVEN,
success: bool | NotGiven = NOT_GIVEN,
cached: bool | Omit = omit,
direction: Literal["asc", "desc"] | Omit = omit,
end_date: Union[str, datetime] | Omit = omit,
feedback: Literal[0, 1] | Omit = omit,
filters: Iterable[log_list_params.Filter] | Omit = omit,
max_cost: float | Omit = omit,
max_duration: float | Omit = omit,
max_tokens_in: float | Omit = omit,
max_tokens_out: float | Omit = omit,
max_total_tokens: float | Omit = omit,
meta_info: bool | Omit = omit,
min_cost: float | Omit = omit,
min_duration: float | Omit = omit,
min_tokens_in: float | Omit = omit,
min_tokens_out: float | Omit = omit,
min_total_tokens: float | Omit = omit,
model: str | Omit = omit,
model_type: str | Omit = omit,
order_by: Literal["created_at", "provider", "model", "model_type", "success", "cached"] | Omit = omit,
order_by_direction: Literal["asc", "desc"] | Omit = omit,
page: int | Omit = omit,
per_page: int | Omit = omit,
provider: str | Omit = omit,
request_content_type: str | Omit = omit,
response_content_type: str | Omit = omit,
search: str | Omit = omit,
start_date: Union[str, datetime] | Omit = omit,
success: bool | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[LogListResponse, AsyncV4PagePaginationArray[LogListResponse]]:
"""
List Gateway Logs
@ -531,8 +531,8 @@ class AsyncLogsResource(AsyncAPIResource):
gateway_id: str,
*,
account_id: str,
filters: Iterable[log_delete_params.Filter] | NotGiven = NOT_GIVEN,
limit: int | NotGiven = NOT_GIVEN,
filters: Iterable[log_delete_params.Filter] | Omit = omit,
limit: int | Omit = omit,
order_by: Literal[
"created_at",
"provider",
@ -546,14 +546,14 @@ class AsyncLogsResource(AsyncAPIResource):
"duration",
"feedback",
]
| NotGiven = NOT_GIVEN,
order_by_direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
| Omit = omit,
order_by_direction: Literal["asc", "desc"] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> LogDeleteResponse:
"""
Delete Gateway Logs
@ -599,15 +599,15 @@ class AsyncLogsResource(AsyncAPIResource):
*,
account_id: str,
gateway_id: str,
feedback: Optional[float] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Union[str, float, bool]]] | NotGiven = NOT_GIVEN,
score: Optional[float] | NotGiven = NOT_GIVEN,
feedback: Optional[float] | Omit = omit,
metadata: Optional[Dict[str, Union[str, float, bool]]] | Omit = omit,
score: Optional[float] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> object:
"""
Patch Gateway Log
@ -660,7 +660,7 @@ class AsyncLogsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> LogGetResponse:
"""
Get Gateway Log Detail
@ -705,7 +705,7 @@ class AsyncLogsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> object:
"""
Get Gateway Log Request
@ -746,7 +746,7 @@ class AsyncLogsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> object:
"""
Get Gateway Log Response

View file

@ -6,7 +6,7 @@ from typing import Type, cast
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._types import Body, Query, Headers, NotGiven, not_given
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import (
@ -53,7 +53,7 @@ class URLsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> str:
"""
Get Gateway URL
@ -119,7 +119,7 @@ class AsyncURLsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> str:
"""
Get Gateway URL

View file

@ -6,7 +6,7 @@ from typing import Type, Optional, cast
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._types import Body, Query, Headers, NotGiven, not_given
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import (
@ -51,7 +51,7 @@ class AvailableAlertsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AvailableAlertListResponse]:
"""
Gets a list of all alert types for which an account is eligible.
@ -111,7 +111,7 @@ class AsyncAvailableAlertsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AvailableAlertListResponse]:
"""
Gets a list of all alert types for which an account is eligible.

View file

@ -6,7 +6,7 @@ from typing import Type, Optional, cast
import httpx
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._types import Body, Query, Headers, NotGiven, not_given
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
from ...._response import (
@ -51,7 +51,7 @@ class EligibleResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[EligibleGetResponse]:
"""
Get a list of all delivery mechanism types for which an account is eligible.
@ -111,7 +111,7 @@ class AsyncEligibleResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[EligibleGetResponse]:
"""
Get a list of all delivery mechanism types for which an account is eligible.

View file

@ -6,7 +6,7 @@ from typing import Type, Optional, cast
import httpx
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._types import Body, Query, Headers, NotGiven, not_given
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
from ...._response import (
@ -55,7 +55,7 @@ class PagerdutyResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[PagerdutyCreateResponse]:
"""
Creates a new token for integrating with PagerDuty.
@ -94,7 +94,7 @@ class PagerdutyResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> PagerdutyDeleteResponse:
"""
Deletes all the PagerDuty Services connected to the account.
@ -129,7 +129,7 @@ class PagerdutyResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncSinglePage[Pagerduty]:
"""
Get a list of all configured PagerDuty services.
@ -166,7 +166,7 @@ class PagerdutyResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[PagerdutyLinkResponse]:
"""
Links PagerDuty with the account using the integration token.
@ -230,7 +230,7 @@ class AsyncPagerdutyResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[PagerdutyCreateResponse]:
"""
Creates a new token for integrating with PagerDuty.
@ -269,7 +269,7 @@ class AsyncPagerdutyResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> PagerdutyDeleteResponse:
"""
Deletes all the PagerDuty Services connected to the account.
@ -304,7 +304,7 @@ class AsyncPagerdutyResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[Pagerduty, AsyncSinglePage[Pagerduty]]:
"""
Get a list of all configured PagerDuty services.
@ -341,7 +341,7 @@ class AsyncPagerdutyResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[PagerdutyLinkResponse]:
"""
Links PagerDuty with the account using the integration token.

View file

@ -6,7 +6,7 @@ from typing import Type, Optional, cast
import httpx
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@ -54,13 +54,13 @@ class WebhooksResource(SyncAPIResource):
account_id: str,
name: str,
url: str,
secret: str | NotGiven = NOT_GIVEN,
secret: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[WebhookCreateResponse]:
"""
Creates a new webhook destination.
@ -114,13 +114,13 @@ class WebhooksResource(SyncAPIResource):
account_id: str,
name: str,
url: str,
secret: str | NotGiven = NOT_GIVEN,
secret: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[WebhookUpdateResponse]:
"""
Update a webhook destination.
@ -180,7 +180,7 @@ class WebhooksResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncSinglePage[Webhooks]:
"""
Gets a list of all configured webhook destinations.
@ -217,7 +217,7 @@ class WebhooksResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> WebhookDeleteResponse:
"""
Delete a configured webhook destination.
@ -257,7 +257,7 @@ class WebhooksResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Webhooks]:
"""
Get details for a single webhooks destination.
@ -318,13 +318,13 @@ class AsyncWebhooksResource(AsyncAPIResource):
account_id: str,
name: str,
url: str,
secret: str | NotGiven = NOT_GIVEN,
secret: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[WebhookCreateResponse]:
"""
Creates a new webhook destination.
@ -378,13 +378,13 @@ class AsyncWebhooksResource(AsyncAPIResource):
account_id: str,
name: str,
url: str,
secret: str | NotGiven = NOT_GIVEN,
secret: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[WebhookUpdateResponse]:
"""
Update a webhook destination.
@ -444,7 +444,7 @@ class AsyncWebhooksResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[Webhooks, AsyncSinglePage[Webhooks]]:
"""
Gets a list of all configured webhook destinations.
@ -481,7 +481,7 @@ class AsyncWebhooksResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> WebhookDeleteResponse:
"""
Delete a configured webhook destination.
@ -521,7 +521,7 @@ class AsyncWebhooksResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Webhooks]:
"""
Get details for a single webhooks destination.

View file

@ -7,7 +7,7 @@ from datetime import datetime
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ..._utils import maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -49,16 +49,16 @@ class HistoryResource(SyncAPIResource):
self,
*,
account_id: str,
before: Union[str, datetime] | NotGiven = NOT_GIVEN,
page: float | NotGiven = NOT_GIVEN,
per_page: float | NotGiven = NOT_GIVEN,
since: Union[str, datetime] | NotGiven = NOT_GIVEN,
before: Union[str, datetime] | Omit = omit,
page: float | Omit = omit,
per_page: float | Omit = omit,
since: Union[str, datetime] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncV4PagePaginationArray[History]:
"""Gets a list of history records for notifications sent to an account.
@ -135,16 +135,16 @@ class AsyncHistoryResource(AsyncAPIResource):
self,
*,
account_id: str,
before: Union[str, datetime] | NotGiven = NOT_GIVEN,
page: float | NotGiven = NOT_GIVEN,
per_page: float | NotGiven = NOT_GIVEN,
since: Union[str, datetime] | NotGiven = NOT_GIVEN,
before: Union[str, datetime] | Omit = omit,
page: float | Omit = omit,
per_page: float | Omit = omit,
since: Union[str, datetime] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[History, AsyncV4PagePaginationArray[History]]:
"""Gets a list of history records for notifications sent to an account.

View file

@ -7,7 +7,7 @@ from typing_extensions import Literal
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -127,15 +127,15 @@ class PoliciesResource(SyncAPIResource):
enabled: bool,
mechanisms: MechanismParam,
name: str,
alert_interval: str | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
filters: PolicyFilterParam | NotGiven = NOT_GIVEN,
alert_interval: str | Omit = omit,
description: str | Omit = omit,
filters: PolicyFilterParam | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[PolicyCreateResponse]:
"""
Creates a new Notification policy.
@ -202,7 +202,7 @@ class PoliciesResource(SyncAPIResource):
policy_id: str,
*,
account_id: str,
alert_interval: str | NotGiven = NOT_GIVEN,
alert_interval: str | Omit = omit,
alert_type: Literal[
"access_custom_certificate_expiration_type",
"advanced_ddos_attack_l4_alert",
@ -272,18 +272,18 @@ class PoliciesResource(SyncAPIResource):
"web_analytics_metrics_update",
"zone_aop_custom_certificate_expiration_type",
]
| NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
enabled: bool | NotGiven = NOT_GIVEN,
filters: PolicyFilterParam | NotGiven = NOT_GIVEN,
mechanisms: MechanismParam | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
| Omit = omit,
description: str | Omit = omit,
enabled: bool | Omit = omit,
filters: PolicyFilterParam | Omit = omit,
mechanisms: MechanismParam | Omit = omit,
name: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[PolicyUpdateResponse]:
"""
Update a Notification policy.
@ -358,7 +358,7 @@ class PoliciesResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncSinglePage[Policy]:
"""
Get a list of all Notification policies.
@ -395,7 +395,7 @@ class PoliciesResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> PolicyDeleteResponse:
"""
Delete a Notification policy.
@ -435,7 +435,7 @@ class PoliciesResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Policy]:
"""
Get details for a single policy.
@ -566,15 +566,15 @@ class AsyncPoliciesResource(AsyncAPIResource):
enabled: bool,
mechanisms: MechanismParam,
name: str,
alert_interval: str | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
filters: PolicyFilterParam | NotGiven = NOT_GIVEN,
alert_interval: str | Omit = omit,
description: str | Omit = omit,
filters: PolicyFilterParam | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[PolicyCreateResponse]:
"""
Creates a new Notification policy.
@ -641,7 +641,7 @@ class AsyncPoliciesResource(AsyncAPIResource):
policy_id: str,
*,
account_id: str,
alert_interval: str | NotGiven = NOT_GIVEN,
alert_interval: str | Omit = omit,
alert_type: Literal[
"access_custom_certificate_expiration_type",
"advanced_ddos_attack_l4_alert",
@ -711,18 +711,18 @@ class AsyncPoliciesResource(AsyncAPIResource):
"web_analytics_metrics_update",
"zone_aop_custom_certificate_expiration_type",
]
| NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
enabled: bool | NotGiven = NOT_GIVEN,
filters: PolicyFilterParam | NotGiven = NOT_GIVEN,
mechanisms: MechanismParam | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
| Omit = omit,
description: str | Omit = omit,
enabled: bool | Omit = omit,
filters: PolicyFilterParam | Omit = omit,
mechanisms: MechanismParam | Omit = omit,
name: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[PolicyUpdateResponse]:
"""
Update a Notification policy.
@ -797,7 +797,7 @@ class AsyncPoliciesResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[Policy, AsyncSinglePage[Policy]]:
"""
Get a list of all Notification policies.
@ -834,7 +834,7 @@ class AsyncPoliciesResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> PolicyDeleteResponse:
"""
Delete a Notification policy.
@ -874,7 +874,7 @@ class AsyncPoliciesResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Policy]:
"""
Get details for a single policy.

View file

@ -7,7 +7,7 @@ from typing_extensions import Literal
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -56,7 +56,7 @@ class ConfigurationsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> ConfigurationUpdateResponse:
"""
Set configuration properties
@ -90,13 +90,13 @@ class ConfigurationsResource(SyncAPIResource):
self,
*,
zone_id: str,
properties: List[Literal["auth_id_characteristics"]] | NotGiven = NOT_GIVEN,
properties: List[Literal["auth_id_characteristics"]] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Configuration:
"""
Retrieve information about specific configuration properties
@ -160,7 +160,7 @@ class AsyncConfigurationsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> ConfigurationUpdateResponse:
"""
Set configuration properties
@ -194,13 +194,13 @@ class AsyncConfigurationsResource(AsyncAPIResource):
self,
*,
zone_id: str,
properties: List[Literal["auth_id_characteristics"]] | NotGiven = NOT_GIVEN,
properties: List[Literal["auth_id_characteristics"]] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Configuration:
"""
Retrieve information about specific configuration properties

View file

@ -6,7 +6,7 @@ from typing import Type, cast
import httpx
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._types import Body, Query, Headers, NotGiven, not_given
from ...._compat import cached_property
from .operations import (
OperationsResource,
@ -63,7 +63,7 @@ class DiscoveryResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> DiscoveryGetResponse:
"""
Retrieve the most up to date view of discovered operations, rendered as OpenAPI
@ -128,7 +128,7 @@ class AsyncDiscoveryResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> DiscoveryGetResponse:
"""
Retrieve the most up to date view of discovered operations, rendered as OpenAPI

View file

@ -7,7 +7,7 @@ from typing_extensions import Literal
import httpx
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
from ...._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@ -52,23 +52,23 @@ class OperationsResource(SyncAPIResource):
self,
*,
zone_id: str,
diff: bool | NotGiven = NOT_GIVEN,
direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
endpoint: str | NotGiven = NOT_GIVEN,
host: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
method: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
diff: bool | Omit = omit,
direction: Literal["asc", "desc"] | Omit = omit,
endpoint: str | Omit = omit,
host: SequenceNotStr[str] | Omit = omit,
method: SequenceNotStr[str] | Omit = omit,
order: Literal["host", "method", "endpoint", "traffic_stats.requests", "traffic_stats.last_updated"]
| NotGiven = NOT_GIVEN,
origin: Literal["ML", "SessionIdentifier", "LabelDiscovery"] | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
state: Literal["review", "saved", "ignored"] | NotGiven = NOT_GIVEN,
| Omit = omit,
origin: Literal["ML", "SessionIdentifier", "LabelDiscovery"] | Omit = omit,
page: int | Omit = omit,
per_page: int | Omit = omit,
state: Literal["review", "saved", "ignored"] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncV4PagePaginationArray[DiscoveryOperation]:
"""
Retrieve the most up to date view of discovered operations
@ -156,7 +156,7 @@ class OperationsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> OperationBulkEditResponse:
"""
Update the `state` on one or more discovered operations
@ -192,13 +192,13 @@ class OperationsResource(SyncAPIResource):
operation_id: str,
*,
zone_id: str,
state: Literal["review", "ignored"] | NotGiven = NOT_GIVEN,
state: Literal["review", "ignored"] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> OperationEditResponse:
"""
Update the `state` on a discovered operation
@ -263,23 +263,23 @@ class AsyncOperationsResource(AsyncAPIResource):
self,
*,
zone_id: str,
diff: bool | NotGiven = NOT_GIVEN,
direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
endpoint: str | NotGiven = NOT_GIVEN,
host: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
method: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
diff: bool | Omit = omit,
direction: Literal["asc", "desc"] | Omit = omit,
endpoint: str | Omit = omit,
host: SequenceNotStr[str] | Omit = omit,
method: SequenceNotStr[str] | Omit = omit,
order: Literal["host", "method", "endpoint", "traffic_stats.requests", "traffic_stats.last_updated"]
| NotGiven = NOT_GIVEN,
origin: Literal["ML", "SessionIdentifier", "LabelDiscovery"] | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
state: Literal["review", "saved", "ignored"] | NotGiven = NOT_GIVEN,
| Omit = omit,
origin: Literal["ML", "SessionIdentifier", "LabelDiscovery"] | Omit = omit,
page: int | Omit = omit,
per_page: int | Omit = omit,
state: Literal["review", "saved", "ignored"] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[DiscoveryOperation, AsyncV4PagePaginationArray[DiscoveryOperation]]:
"""
Retrieve the most up to date view of discovered operations
@ -367,7 +367,7 @@ class AsyncOperationsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> OperationBulkEditResponse:
"""
Update the `state` on one or more discovered operations
@ -403,13 +403,13 @@ class AsyncOperationsResource(AsyncAPIResource):
operation_id: str,
*,
zone_id: str,
state: Literal["review", "ignored"] | NotGiven = NOT_GIVEN,
state: Literal["review", "ignored"] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> OperationEditResponse:
"""
Update the `state` on a discovered operation

View file

@ -6,7 +6,7 @@ from typing import Type, cast
import httpx
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
from ...._types import Body, Query, Headers, NotGiven, SequenceNotStr, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@ -54,7 +54,7 @@ class FallthroughResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> FallthroughCreateResponse:
"""
Generate fallthrough WAF expression template from a set of API hosts
@ -118,7 +118,7 @@ class AsyncFallthroughResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> FallthroughCreateResponse:
"""
Generate fallthrough WAF expression template from a set of API hosts

View file

@ -7,7 +7,7 @@ from typing_extensions import Literal
import httpx
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
from ...._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@ -80,7 +80,7 @@ class OperationsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> OperationCreateResponse:
"""Add one operation to a zone.
@ -136,20 +136,20 @@ class OperationsResource(SyncAPIResource):
self,
*,
zone_id: str,
direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
endpoint: str | NotGiven = NOT_GIVEN,
feature: List[Literal["thresholds", "parameter_schemas", "schema_info"]] | NotGiven = NOT_GIVEN,
host: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
method: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
order: Literal["method", "host", "endpoint", "thresholds.$key"] | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
direction: Literal["asc", "desc"] | Omit = omit,
endpoint: str | Omit = omit,
feature: List[Literal["thresholds", "parameter_schemas", "schema_info"]] | Omit = omit,
host: SequenceNotStr[str] | Omit = omit,
method: SequenceNotStr[str] | Omit = omit,
order: Literal["method", "host", "endpoint", "thresholds.$key"] | Omit = omit,
page: int | Omit = omit,
per_page: int | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncV4PagePaginationArray[OperationListResponse]:
"""
Retrieve information about all operations on a zone
@ -221,7 +221,7 @@ class OperationsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> OperationDeleteResponse:
"""
Delete an operation
@ -261,7 +261,7 @@ class OperationsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncSinglePage[OperationBulkCreateResponse]:
"""Add one or more operations to a zone.
@ -304,7 +304,7 @@ class OperationsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> OperationBulkDeleteResponse:
"""
Delete multiple operations
@ -335,13 +335,13 @@ class OperationsResource(SyncAPIResource):
operation_id: str,
*,
zone_id: str,
feature: List[Literal["thresholds", "parameter_schemas", "schema_info"]] | NotGiven = NOT_GIVEN,
feature: List[Literal["thresholds", "parameter_schemas", "schema_info"]] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> OperationGetResponse:
"""
Retrieve information about an operation
@ -417,7 +417,7 @@ class AsyncOperationsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> OperationCreateResponse:
"""Add one operation to a zone.
@ -473,20 +473,20 @@ class AsyncOperationsResource(AsyncAPIResource):
self,
*,
zone_id: str,
direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
endpoint: str | NotGiven = NOT_GIVEN,
feature: List[Literal["thresholds", "parameter_schemas", "schema_info"]] | NotGiven = NOT_GIVEN,
host: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
method: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
order: Literal["method", "host", "endpoint", "thresholds.$key"] | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
direction: Literal["asc", "desc"] | Omit = omit,
endpoint: str | Omit = omit,
feature: List[Literal["thresholds", "parameter_schemas", "schema_info"]] | Omit = omit,
host: SequenceNotStr[str] | Omit = omit,
method: SequenceNotStr[str] | Omit = omit,
order: Literal["method", "host", "endpoint", "thresholds.$key"] | Omit = omit,
page: int | Omit = omit,
per_page: int | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[OperationListResponse, AsyncV4PagePaginationArray[OperationListResponse]]:
"""
Retrieve information about all operations on a zone
@ -558,7 +558,7 @@ class AsyncOperationsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> OperationDeleteResponse:
"""
Delete an operation
@ -598,7 +598,7 @@ class AsyncOperationsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[OperationBulkCreateResponse, AsyncSinglePage[OperationBulkCreateResponse]]:
"""Add one or more operations to a zone.
@ -641,7 +641,7 @@ class AsyncOperationsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> OperationBulkDeleteResponse:
"""
Delete multiple operations
@ -672,13 +672,13 @@ class AsyncOperationsResource(AsyncAPIResource):
operation_id: str,
*,
zone_id: str,
feature: List[Literal["thresholds", "parameter_schemas", "schema_info"]] | NotGiven = NOT_GIVEN,
feature: List[Literal["thresholds", "parameter_schemas", "schema_info"]] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> OperationGetResponse:
"""
Retrieve information about an operation

View file

@ -8,7 +8,7 @@ from typing_extensions import Literal
import httpx
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@ -61,13 +61,13 @@ class SchemaValidationResource(SyncAPIResource):
operation_id: str,
*,
zone_id: str,
mitigation_action: Optional[Literal["log", "block", "none"]] | NotGiven = NOT_GIVEN,
mitigation_action: Optional[Literal["log", "block", "none"]] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SchemaValidationUpdateResponse:
"""
Updates operation-level schema validation settings on the zone
@ -122,7 +122,7 @@ class SchemaValidationResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SettingsMultipleRequest:
"""
Updates multiple operation-level schema validation settings on the zone
@ -166,7 +166,7 @@ class SchemaValidationResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SchemaValidationGetResponse:
"""
Retrieves operation-level schema validation settings on the zone
@ -225,13 +225,13 @@ class AsyncSchemaValidationResource(AsyncAPIResource):
operation_id: str,
*,
zone_id: str,
mitigation_action: Optional[Literal["log", "block", "none"]] | NotGiven = NOT_GIVEN,
mitigation_action: Optional[Literal["log", "block", "none"]] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SchemaValidationUpdateResponse:
"""
Updates operation-level schema validation settings on the zone
@ -286,7 +286,7 @@ class AsyncSchemaValidationResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SettingsMultipleRequest:
"""
Updates multiple operation-level schema validation settings on the zone
@ -332,7 +332,7 @@ class AsyncSchemaValidationResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SchemaValidationGetResponse:
"""
Retrieves operation-level schema validation settings on the zone

View file

@ -7,7 +7,7 @@ from typing_extensions import Literal
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -49,14 +49,14 @@ class SchemasResource(SyncAPIResource):
self,
*,
zone_id: str,
feature: List[Literal["thresholds", "parameter_schemas", "schema_info"]] | NotGiven = NOT_GIVEN,
host: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
feature: List[Literal["thresholds", "parameter_schemas", "schema_info"]] | Omit = omit,
host: SequenceNotStr[str] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SchemaListResponse:
"""
Retrieve operations and features as OpenAPI schemas
@ -124,14 +124,14 @@ class AsyncSchemasResource(AsyncAPIResource):
self,
*,
zone_id: str,
feature: List[Literal["thresholds", "parameter_schemas", "schema_info"]] | NotGiven = NOT_GIVEN,
host: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
feature: List[Literal["thresholds", "parameter_schemas", "schema_info"]] | Omit = omit,
host: SequenceNotStr[str] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SchemaListResponse:
"""
Retrieve operations and features as OpenAPI schemas

View file

@ -8,7 +8,7 @@ from typing_extensions import Literal
import httpx
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@ -53,13 +53,13 @@ class SchemaValidationResource(SyncAPIResource):
*,
zone_id: str,
validation_default_mitigation_action: Literal["none", "log", "block"],
validation_override_mitigation_action: Optional[Literal["none", "disable_override"]] | NotGiven = NOT_GIVEN,
validation_override_mitigation_action: Optional[Literal["none", "disable_override"]] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Settings:
"""
Updates zone level schema validation settings on the zone
@ -117,14 +117,14 @@ class SchemaValidationResource(SyncAPIResource):
self,
*,
zone_id: str,
validation_default_mitigation_action: Optional[Literal["none", "log", "block"]] | NotGiven = NOT_GIVEN,
validation_override_mitigation_action: Optional[Literal["none", "disable_override"]] | NotGiven = NOT_GIVEN,
validation_default_mitigation_action: Optional[Literal["none", "log", "block"]] | Omit = omit,
validation_override_mitigation_action: Optional[Literal["none", "disable_override"]] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Settings:
"""
Updates zone level schema validation settings on the zone
@ -188,7 +188,7 @@ class SchemaValidationResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Settings:
"""
Retrieves zone level schema validation settings currently set on the zone
@ -243,13 +243,13 @@ class AsyncSchemaValidationResource(AsyncAPIResource):
*,
zone_id: str,
validation_default_mitigation_action: Literal["none", "log", "block"],
validation_override_mitigation_action: Optional[Literal["none", "disable_override"]] | NotGiven = NOT_GIVEN,
validation_override_mitigation_action: Optional[Literal["none", "disable_override"]] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Settings:
"""
Updates zone level schema validation settings on the zone
@ -307,14 +307,14 @@ class AsyncSchemaValidationResource(AsyncAPIResource):
self,
*,
zone_id: str,
validation_default_mitigation_action: Optional[Literal["none", "log", "block"]] | NotGiven = NOT_GIVEN,
validation_override_mitigation_action: Optional[Literal["none", "disable_override"]] | NotGiven = NOT_GIVEN,
validation_default_mitigation_action: Optional[Literal["none", "log", "block"]] | Omit = omit,
validation_override_mitigation_action: Optional[Literal["none", "disable_override"]] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Settings:
"""
Updates zone level schema validation settings on the zone
@ -378,7 +378,7 @@ class AsyncSchemaValidationResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Settings:
"""
Retrieves zone level schema validation settings currently set on the zone

View file

@ -6,7 +6,7 @@ import typing_extensions
import httpx
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ...._utils import maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@ -51,14 +51,14 @@ class HostsResource(SyncAPIResource):
self,
*,
zone_id: str,
page: int | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
page: int | Omit = omit,
per_page: int | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncV4PagePaginationArray[HostListResponse]:
"""
Retrieve schema hosts in a zone
@ -127,14 +127,14 @@ class AsyncHostsResource(AsyncAPIResource):
self,
*,
zone_id: str,
page: int | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
page: int | Omit = omit,
per_page: int | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[HostListResponse, AsyncV4PagePaginationArray[HostListResponse]]:
"""
Retrieve schema hosts in a zone

View file

@ -8,7 +8,7 @@ from typing_extensions import Literal
import httpx
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
from ...._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ...._utils import maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@ -54,19 +54,19 @@ class OperationsResource(SyncAPIResource):
schema_id: str,
*,
zone_id: str,
endpoint: str | NotGiven = NOT_GIVEN,
feature: List[Literal["thresholds", "parameter_schemas", "schema_info"]] | NotGiven = NOT_GIVEN,
host: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
method: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
operation_status: Literal["new", "existing"] | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
endpoint: str | Omit = omit,
feature: List[Literal["thresholds", "parameter_schemas", "schema_info"]] | Omit = omit,
host: SequenceNotStr[str] | Omit = omit,
method: SequenceNotStr[str] | Omit = omit,
operation_status: Literal["new", "existing"] | Omit = omit,
page: int | Omit = omit,
per_page: int | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncV4PagePaginationArray[OperationListResponse]:
"""Retrieves all operations from the schema.
@ -160,19 +160,19 @@ class AsyncOperationsResource(AsyncAPIResource):
schema_id: str,
*,
zone_id: str,
endpoint: str | NotGiven = NOT_GIVEN,
feature: List[Literal["thresholds", "parameter_schemas", "schema_info"]] | NotGiven = NOT_GIVEN,
host: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
method: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
operation_status: Literal["new", "existing"] | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
endpoint: str | Omit = omit,
feature: List[Literal["thresholds", "parameter_schemas", "schema_info"]] | Omit = omit,
host: SequenceNotStr[str] | Omit = omit,
method: SequenceNotStr[str] | Omit = omit,
operation_status: Literal["new", "existing"] | Omit = omit,
page: int | Omit = omit,
per_page: int | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[OperationListResponse, AsyncV4PagePaginationArray[OperationListResponse]]:
"""Retrieves all operations from the schema.

View file

@ -16,7 +16,7 @@ from .hosts import (
HostsResourceWithStreamingResponse,
AsyncHostsResourceWithStreamingResponse,
)
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes
from ...._types import Body, Omit, Query, Headers, NotGiven, FileTypes, omit, not_given
from ...._utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform
from ...._compat import cached_property
from .operations import (
@ -87,14 +87,14 @@ class UserSchemasResource(SyncAPIResource):
zone_id: str,
file: FileTypes,
kind: Literal["openapi_v3"],
name: str | NotGiven = NOT_GIVEN,
validation_enabled: Literal["true", "false"] | NotGiven = NOT_GIVEN,
name: str | Omit = omit,
validation_enabled: Literal["true", "false"] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SchemaUpload:
"""
Upload a schema to a zone
@ -154,16 +154,16 @@ class UserSchemasResource(SyncAPIResource):
self,
*,
zone_id: str,
omit_source: bool | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
validation_enabled: bool | NotGiven = NOT_GIVEN,
omit_source: bool | Omit = omit,
page: int | Omit = omit,
per_page: int | Omit = omit,
validation_enabled: bool | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncV4PagePaginationArray[PublicSchema]:
"""
Retrieve information about all schemas on a zone
@ -223,7 +223,7 @@ class UserSchemasResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> UserSchemaDeleteResponse:
"""
Delete a schema
@ -259,13 +259,13 @@ class UserSchemasResource(SyncAPIResource):
schema_id: str,
*,
zone_id: str,
validation_enabled: Literal[True] | NotGiven = NOT_GIVEN,
validation_enabled: Literal[True] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> PublicSchema:
"""
Enable validation for a schema
@ -310,13 +310,13 @@ class UserSchemasResource(SyncAPIResource):
schema_id: str,
*,
zone_id: str,
omit_source: bool | NotGiven = NOT_GIVEN,
omit_source: bool | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> PublicSchema:
"""
Retrieve information about a specific schema on a zone
@ -389,14 +389,14 @@ class AsyncUserSchemasResource(AsyncAPIResource):
zone_id: str,
file: FileTypes,
kind: Literal["openapi_v3"],
name: str | NotGiven = NOT_GIVEN,
validation_enabled: Literal["true", "false"] | NotGiven = NOT_GIVEN,
name: str | Omit = omit,
validation_enabled: Literal["true", "false"] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SchemaUpload:
"""
Upload a schema to a zone
@ -456,16 +456,16 @@ class AsyncUserSchemasResource(AsyncAPIResource):
self,
*,
zone_id: str,
omit_source: bool | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
validation_enabled: bool | NotGiven = NOT_GIVEN,
omit_source: bool | Omit = omit,
page: int | Omit = omit,
per_page: int | Omit = omit,
validation_enabled: bool | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[PublicSchema, AsyncV4PagePaginationArray[PublicSchema]]:
"""
Retrieve information about all schemas on a zone
@ -525,7 +525,7 @@ class AsyncUserSchemasResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> UserSchemaDeleteResponse:
"""
Delete a schema
@ -561,13 +561,13 @@ class AsyncUserSchemasResource(AsyncAPIResource):
schema_id: str,
*,
zone_id: str,
validation_enabled: Literal[True] | NotGiven = NOT_GIVEN,
validation_enabled: Literal[True] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> PublicSchema:
"""
Enable validation for a schema
@ -612,13 +612,13 @@ class AsyncUserSchemasResource(AsyncAPIResource):
schema_id: str,
*,
zone_id: str,
omit_source: bool | NotGiven = NOT_GIVEN,
omit_source: bool | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> PublicSchema:
"""
Retrieve information about a specific schema on a zone

View file

@ -7,7 +7,7 @@ from typing_extensions import Literal
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._types import Body, Query, Headers, NotGiven, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -56,7 +56,7 @@ class SmartRoutingResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SmartRoutingEditResponse:
"""
Configures the value of the Argo Smart Routing enablement setting.
@ -98,7 +98,7 @@ class SmartRoutingResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SmartRoutingGetResponse:
"""
Retrieves the value of Argo Smart Routing enablement setting.
@ -159,7 +159,7 @@ class AsyncSmartRoutingResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SmartRoutingEditResponse:
"""
Configures the value of the Argo Smart Routing enablement setting.
@ -201,7 +201,7 @@ class AsyncSmartRoutingResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SmartRoutingGetResponse:
"""
Retrieves the value of Argo Smart Routing enablement setting.

View file

@ -7,7 +7,7 @@ from typing_extensions import Literal
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._types import Body, Query, Headers, NotGiven, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -56,7 +56,7 @@ class TieredCachingResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[TieredCachingEditResponse]:
"""
Tiered Cache works by dividing Cloudflare's data centers into a hierarchy of
@ -108,7 +108,7 @@ class TieredCachingResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[TieredCachingGetResponse]:
"""
Tiered Cache works by dividing Cloudflare's data centers into a hierarchy of
@ -179,7 +179,7 @@ class AsyncTieredCachingResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[TieredCachingEditResponse]:
"""
Tiered Cache works by dividing Cloudflare's data centers into a hierarchy of
@ -231,7 +231,7 @@ class AsyncTieredCachingResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[TieredCachingGetResponse]:
"""
Tiered Cache works by dividing Cloudflare's data centers into a hierarchy of

View file

@ -8,7 +8,7 @@ from typing_extensions import Literal
import httpx
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from .._utils import maybe_transform
from .._compat import cached_property
from .._resource import SyncAPIResource, AsyncAPIResource
@ -50,23 +50,23 @@ class AuditLogsResource(SyncAPIResource):
self,
*,
account_id: str,
id: str | NotGiven = NOT_GIVEN,
action: audit_log_list_params.Action | NotGiven = NOT_GIVEN,
actor: audit_log_list_params.Actor | NotGiven = NOT_GIVEN,
before: Union[Union[str, date], Union[str, datetime]] | NotGiven = NOT_GIVEN,
direction: Literal["desc", "asc"] | NotGiven = NOT_GIVEN,
export: bool | NotGiven = NOT_GIVEN,
hide_user_logs: bool | NotGiven = NOT_GIVEN,
page: float | NotGiven = NOT_GIVEN,
per_page: float | NotGiven = NOT_GIVEN,
since: Union[Union[str, date], Union[str, datetime]] | NotGiven = NOT_GIVEN,
zone: audit_log_list_params.Zone | NotGiven = NOT_GIVEN,
id: str | Omit = omit,
action: audit_log_list_params.Action | Omit = omit,
actor: audit_log_list_params.Actor | Omit = omit,
before: Union[Union[str, date], Union[str, datetime]] | Omit = omit,
direction: Literal["desc", "asc"] | Omit = omit,
export: bool | Omit = omit,
hide_user_logs: bool | Omit = omit,
page: float | Omit = omit,
per_page: float | Omit = omit,
since: Union[Union[str, date], Union[str, datetime]] | Omit = omit,
zone: audit_log_list_params.Zone | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncV4PagePaginationArray[AuditLog]:
"""Gets a list of audit logs for an account.
@ -157,23 +157,23 @@ class AsyncAuditLogsResource(AsyncAPIResource):
self,
*,
account_id: str,
id: str | NotGiven = NOT_GIVEN,
action: audit_log_list_params.Action | NotGiven = NOT_GIVEN,
actor: audit_log_list_params.Actor | NotGiven = NOT_GIVEN,
before: Union[Union[str, date], Union[str, datetime]] | NotGiven = NOT_GIVEN,
direction: Literal["desc", "asc"] | NotGiven = NOT_GIVEN,
export: bool | NotGiven = NOT_GIVEN,
hide_user_logs: bool | NotGiven = NOT_GIVEN,
page: float | NotGiven = NOT_GIVEN,
per_page: float | NotGiven = NOT_GIVEN,
since: Union[Union[str, date], Union[str, datetime]] | NotGiven = NOT_GIVEN,
zone: audit_log_list_params.Zone | NotGiven = NOT_GIVEN,
id: str | Omit = omit,
action: audit_log_list_params.Action | Omit = omit,
actor: audit_log_list_params.Actor | Omit = omit,
before: Union[Union[str, date], Union[str, datetime]] | Omit = omit,
direction: Literal["desc", "asc"] | Omit = omit,
export: bool | Omit = omit,
hide_user_logs: bool | Omit = omit,
page: float | Omit = omit,
per_page: float | Omit = omit,
since: Union[Union[str, date], Union[str, datetime]] | Omit = omit,
zone: audit_log_list_params.Zone | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[AuditLog, AsyncV4PagePaginationArray[AuditLog]]:
"""Gets a list of audit logs for an account.

View file

@ -7,7 +7,7 @@ from typing import Type, cast
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._types import Body, Query, Headers, NotGiven, not_given
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import (
@ -53,7 +53,7 @@ class ProfilesResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> ProfileGetResponse:
"""
Gets the current billing profile for the account.
@ -114,7 +114,7 @@ class AsyncProfilesResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> ProfileGetResponse:
"""
Gets the current billing profile for the account.

View file

@ -7,7 +7,7 @@ from typing_extensions import Literal, overload
import httpx
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from .._utils import required_args, maybe_transform, async_maybe_transform
from .._compat import cached_property
from .._resource import SyncAPIResource, AsyncAPIResource
@ -51,17 +51,17 @@ class BotManagementResource(SyncAPIResource):
self,
*,
zone_id: str,
ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN,
crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
enable_js: bool | NotGiven = NOT_GIVEN,
fight_mode: bool | NotGiven = NOT_GIVEN,
is_robots_txt_managed: bool | NotGiven = NOT_GIVEN,
ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | Omit = omit,
crawler_protection: Literal["enabled", "disabled"] | Omit = omit,
enable_js: bool | Omit = omit,
fight_mode: bool | Omit = omit,
is_robots_txt_managed: bool | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[BotManagementUpdateResponse]:
"""
Updates the Bot Management configuration for a zone.
@ -157,20 +157,20 @@ class BotManagementResource(SyncAPIResource):
self,
*,
zone_id: str,
ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN,
crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
enable_js: bool | NotGiven = NOT_GIVEN,
is_robots_txt_managed: bool | NotGiven = NOT_GIVEN,
optimize_wordpress: bool | NotGiven = NOT_GIVEN,
sbfm_definitely_automated: Literal["allow", "block", "managed_challenge"] | NotGiven = NOT_GIVEN,
sbfm_static_resource_protection: bool | NotGiven = NOT_GIVEN,
sbfm_verified_bots: Literal["allow", "block"] | NotGiven = NOT_GIVEN,
ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | Omit = omit,
crawler_protection: Literal["enabled", "disabled"] | Omit = omit,
enable_js: bool | Omit = omit,
is_robots_txt_managed: bool | Omit = omit,
optimize_wordpress: bool | Omit = omit,
sbfm_definitely_automated: Literal["allow", "block", "managed_challenge"] | Omit = omit,
sbfm_static_resource_protection: bool | Omit = omit,
sbfm_verified_bots: Literal["allow", "block"] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[BotManagementUpdateResponse]:
"""
Updates the Bot Management configuration for a zone.
@ -274,21 +274,21 @@ class BotManagementResource(SyncAPIResource):
self,
*,
zone_id: str,
ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN,
crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
enable_js: bool | NotGiven = NOT_GIVEN,
is_robots_txt_managed: bool | NotGiven = NOT_GIVEN,
optimize_wordpress: bool | NotGiven = NOT_GIVEN,
sbfm_definitely_automated: Literal["allow", "block", "managed_challenge"] | NotGiven = NOT_GIVEN,
sbfm_likely_automated: Literal["allow", "block", "managed_challenge"] | NotGiven = NOT_GIVEN,
sbfm_static_resource_protection: bool | NotGiven = NOT_GIVEN,
sbfm_verified_bots: Literal["allow", "block"] | NotGiven = NOT_GIVEN,
ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | Omit = omit,
crawler_protection: Literal["enabled", "disabled"] | Omit = omit,
enable_js: bool | Omit = omit,
is_robots_txt_managed: bool | Omit = omit,
optimize_wordpress: bool | Omit = omit,
sbfm_definitely_automated: Literal["allow", "block", "managed_challenge"] | Omit = omit,
sbfm_likely_automated: Literal["allow", "block", "managed_challenge"] | Omit = omit,
sbfm_static_resource_protection: bool | Omit = omit,
sbfm_verified_bots: Literal["allow", "block"] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[BotManagementUpdateResponse]:
"""
Updates the Bot Management configuration for a zone.
@ -394,19 +394,19 @@ class BotManagementResource(SyncAPIResource):
self,
*,
zone_id: str,
ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN,
auto_update_model: bool | NotGiven = NOT_GIVEN,
bm_cookie_enabled: bool | NotGiven = NOT_GIVEN,
crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
enable_js: bool | NotGiven = NOT_GIVEN,
is_robots_txt_managed: bool | NotGiven = NOT_GIVEN,
suppress_session_score: bool | NotGiven = NOT_GIVEN,
ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | Omit = omit,
auto_update_model: bool | Omit = omit,
bm_cookie_enabled: bool | Omit = omit,
crawler_protection: Literal["enabled", "disabled"] | Omit = omit,
enable_js: bool | Omit = omit,
is_robots_txt_managed: bool | Omit = omit,
suppress_session_score: bool | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[BotManagementUpdateResponse]:
"""
Updates the Bot Management configuration for a zone.
@ -510,25 +510,25 @@ class BotManagementResource(SyncAPIResource):
self,
*,
zone_id: str,
ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN,
crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
enable_js: bool | NotGiven = NOT_GIVEN,
fight_mode: bool | NotGiven = NOT_GIVEN,
is_robots_txt_managed: bool | NotGiven = NOT_GIVEN,
optimize_wordpress: bool | NotGiven = NOT_GIVEN,
sbfm_definitely_automated: Literal["allow", "block", "managed_challenge"] | NotGiven = NOT_GIVEN,
sbfm_static_resource_protection: bool | NotGiven = NOT_GIVEN,
sbfm_verified_bots: Literal["allow", "block"] | NotGiven = NOT_GIVEN,
sbfm_likely_automated: Literal["allow", "block", "managed_challenge"] | NotGiven = NOT_GIVEN,
auto_update_model: bool | NotGiven = NOT_GIVEN,
bm_cookie_enabled: bool | NotGiven = NOT_GIVEN,
suppress_session_score: bool | NotGiven = NOT_GIVEN,
ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | Omit = omit,
crawler_protection: Literal["enabled", "disabled"] | Omit = omit,
enable_js: bool | Omit = omit,
fight_mode: bool | Omit = omit,
is_robots_txt_managed: bool | Omit = omit,
optimize_wordpress: bool | Omit = omit,
sbfm_definitely_automated: Literal["allow", "block", "managed_challenge"] | Omit = omit,
sbfm_static_resource_protection: bool | Omit = omit,
sbfm_verified_bots: Literal["allow", "block"] | Omit = omit,
sbfm_likely_automated: Literal["allow", "block", "managed_challenge"] | Omit = omit,
auto_update_model: bool | Omit = omit,
bm_cookie_enabled: bool | Omit = omit,
suppress_session_score: bool | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[BotManagementUpdateResponse]:
if not zone_id:
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
@ -576,7 +576,7 @@ class BotManagementResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[BotManagementGetResponse]:
"""
Retrieve a zone's Bot Management Config
@ -637,17 +637,17 @@ class AsyncBotManagementResource(AsyncAPIResource):
self,
*,
zone_id: str,
ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN,
crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
enable_js: bool | NotGiven = NOT_GIVEN,
fight_mode: bool | NotGiven = NOT_GIVEN,
is_robots_txt_managed: bool | NotGiven = NOT_GIVEN,
ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | Omit = omit,
crawler_protection: Literal["enabled", "disabled"] | Omit = omit,
enable_js: bool | Omit = omit,
fight_mode: bool | Omit = omit,
is_robots_txt_managed: bool | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[BotManagementUpdateResponse]:
"""
Updates the Bot Management configuration for a zone.
@ -743,20 +743,20 @@ class AsyncBotManagementResource(AsyncAPIResource):
self,
*,
zone_id: str,
ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN,
crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
enable_js: bool | NotGiven = NOT_GIVEN,
is_robots_txt_managed: bool | NotGiven = NOT_GIVEN,
optimize_wordpress: bool | NotGiven = NOT_GIVEN,
sbfm_definitely_automated: Literal["allow", "block", "managed_challenge"] | NotGiven = NOT_GIVEN,
sbfm_static_resource_protection: bool | NotGiven = NOT_GIVEN,
sbfm_verified_bots: Literal["allow", "block"] | NotGiven = NOT_GIVEN,
ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | Omit = omit,
crawler_protection: Literal["enabled", "disabled"] | Omit = omit,
enable_js: bool | Omit = omit,
is_robots_txt_managed: bool | Omit = omit,
optimize_wordpress: bool | Omit = omit,
sbfm_definitely_automated: Literal["allow", "block", "managed_challenge"] | Omit = omit,
sbfm_static_resource_protection: bool | Omit = omit,
sbfm_verified_bots: Literal["allow", "block"] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[BotManagementUpdateResponse]:
"""
Updates the Bot Management configuration for a zone.
@ -860,21 +860,21 @@ class AsyncBotManagementResource(AsyncAPIResource):
self,
*,
zone_id: str,
ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN,
crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
enable_js: bool | NotGiven = NOT_GIVEN,
is_robots_txt_managed: bool | NotGiven = NOT_GIVEN,
optimize_wordpress: bool | NotGiven = NOT_GIVEN,
sbfm_definitely_automated: Literal["allow", "block", "managed_challenge"] | NotGiven = NOT_GIVEN,
sbfm_likely_automated: Literal["allow", "block", "managed_challenge"] | NotGiven = NOT_GIVEN,
sbfm_static_resource_protection: bool | NotGiven = NOT_GIVEN,
sbfm_verified_bots: Literal["allow", "block"] | NotGiven = NOT_GIVEN,
ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | Omit = omit,
crawler_protection: Literal["enabled", "disabled"] | Omit = omit,
enable_js: bool | Omit = omit,
is_robots_txt_managed: bool | Omit = omit,
optimize_wordpress: bool | Omit = omit,
sbfm_definitely_automated: Literal["allow", "block", "managed_challenge"] | Omit = omit,
sbfm_likely_automated: Literal["allow", "block", "managed_challenge"] | Omit = omit,
sbfm_static_resource_protection: bool | Omit = omit,
sbfm_verified_bots: Literal["allow", "block"] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[BotManagementUpdateResponse]:
"""
Updates the Bot Management configuration for a zone.
@ -980,19 +980,19 @@ class AsyncBotManagementResource(AsyncAPIResource):
self,
*,
zone_id: str,
ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN,
auto_update_model: bool | NotGiven = NOT_GIVEN,
bm_cookie_enabled: bool | NotGiven = NOT_GIVEN,
crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
enable_js: bool | NotGiven = NOT_GIVEN,
is_robots_txt_managed: bool | NotGiven = NOT_GIVEN,
suppress_session_score: bool | NotGiven = NOT_GIVEN,
ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | Omit = omit,
auto_update_model: bool | Omit = omit,
bm_cookie_enabled: bool | Omit = omit,
crawler_protection: Literal["enabled", "disabled"] | Omit = omit,
enable_js: bool | Omit = omit,
is_robots_txt_managed: bool | Omit = omit,
suppress_session_score: bool | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[BotManagementUpdateResponse]:
"""
Updates the Bot Management configuration for a zone.
@ -1096,25 +1096,25 @@ class AsyncBotManagementResource(AsyncAPIResource):
self,
*,
zone_id: str,
ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN,
crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
enable_js: bool | NotGiven = NOT_GIVEN,
fight_mode: bool | NotGiven = NOT_GIVEN,
is_robots_txt_managed: bool | NotGiven = NOT_GIVEN,
optimize_wordpress: bool | NotGiven = NOT_GIVEN,
sbfm_definitely_automated: Literal["allow", "block", "managed_challenge"] | NotGiven = NOT_GIVEN,
sbfm_static_resource_protection: bool | NotGiven = NOT_GIVEN,
sbfm_verified_bots: Literal["allow", "block"] | NotGiven = NOT_GIVEN,
sbfm_likely_automated: Literal["allow", "block", "managed_challenge"] | NotGiven = NOT_GIVEN,
auto_update_model: bool | NotGiven = NOT_GIVEN,
bm_cookie_enabled: bool | NotGiven = NOT_GIVEN,
suppress_session_score: bool | NotGiven = NOT_GIVEN,
ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | Omit = omit,
crawler_protection: Literal["enabled", "disabled"] | Omit = omit,
enable_js: bool | Omit = omit,
fight_mode: bool | Omit = omit,
is_robots_txt_managed: bool | Omit = omit,
optimize_wordpress: bool | Omit = omit,
sbfm_definitely_automated: Literal["allow", "block", "managed_challenge"] | Omit = omit,
sbfm_static_resource_protection: bool | Omit = omit,
sbfm_verified_bots: Literal["allow", "block"] | Omit = omit,
sbfm_likely_automated: Literal["allow", "block", "managed_challenge"] | Omit = omit,
auto_update_model: bool | Omit = omit,
bm_cookie_enabled: bool | Omit = omit,
suppress_session_score: bool | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[BotManagementUpdateResponse]:
if not zone_id:
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
@ -1162,7 +1162,7 @@ class AsyncBotManagementResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[BotManagementGetResponse]:
"""
Retrieve a zone's Bot Management Config

View file

@ -7,7 +7,7 @@ from datetime import datetime
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -51,13 +51,13 @@ class ASNResource(SyncAPIResource):
asn_id: int,
*,
account_id: str,
date: Union[str, datetime] | NotGiven = NOT_GIVEN,
date: Union[str, datetime] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[ASNDayReportResponse]:
"""
Gets all the data the botnet tracking database has for a given ASN registered to
@ -100,7 +100,7 @@ class ASNResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[ASNFullReportResponse]:
"""
Gets all the data the botnet threat feed tracking database has for a given ASN
@ -157,13 +157,13 @@ class AsyncASNResource(AsyncAPIResource):
asn_id: int,
*,
account_id: str,
date: Union[str, datetime] | NotGiven = NOT_GIVEN,
date: Union[str, datetime] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[ASNDayReportResponse]:
"""
Gets all the data the botnet tracking database has for a given ASN registered to
@ -206,7 +206,7 @@ class AsyncASNResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[ASNFullReportResponse]:
"""
Gets all the data the botnet threat feed tracking database has for a given ASN

View file

@ -6,7 +6,7 @@ from typing import Type, Optional, cast
import httpx
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._types import Body, Query, Headers, NotGiven, not_given
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
from ...._response import (
@ -53,7 +53,7 @@ class ASNResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[ASNDeleteResponse]:
"""
Delete an ASN from botnet threat feed for a given user.
@ -92,7 +92,7 @@ class ASNResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[ASNGetResponse]:
"""
Gets a list of all ASNs registered for a user for the DDoS Botnet Feed API.
@ -153,7 +153,7 @@ class AsyncASNResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[ASNDeleteResponse]:
"""
Delete an ASN from botnet threat feed for a given user.
@ -192,7 +192,7 @@ class AsyncASNResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[ASNGetResponse]:
"""
Gets a list of all ASNs registered for a user for the DDoS Botnet Feed API.

View file

@ -28,7 +28,7 @@ from .queries import (
QueriesResourceWithStreamingResponse,
AsyncQueriesResourceWithStreamingResponse,
)
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._types import Body, Query, Headers, NotGiven, not_given
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import (
@ -98,7 +98,7 @@ class BrandProtectionResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BrandProtectionSubmitResponse:
"""
Return new URL submissions
@ -131,7 +131,7 @@ class BrandProtectionResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncSinglePage[BrandProtectionURLInfoResponse]:
"""
Return submitted URLs based on ID
@ -202,7 +202,7 @@ class AsyncBrandProtectionResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BrandProtectionSubmitResponse:
"""
Return new URL submissions
@ -235,7 +235,7 @@ class AsyncBrandProtectionResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[BrandProtectionURLInfoResponse, AsyncSinglePage[BrandProtectionURLInfoResponse]]:
"""
Return submitted URLs based on ID

View file

@ -4,7 +4,7 @@ from __future__ import annotations
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -46,15 +46,15 @@ class LogoMatchesResource(SyncAPIResource):
self,
*,
account_id: str,
limit: str | NotGiven = NOT_GIVEN,
logo_id: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
offset: str | NotGiven = NOT_GIVEN,
limit: str | Omit = omit,
logo_id: SequenceNotStr[str] | Omit = omit,
offset: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> LogoMatchDownloadResponse:
"""
Return matches as CSV for logo queries based on ID
@ -93,15 +93,15 @@ class LogoMatchesResource(SyncAPIResource):
self,
*,
account_id: str,
limit: str | NotGiven = NOT_GIVEN,
logo_id: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
offset: str | NotGiven = NOT_GIVEN,
limit: str | Omit = omit,
logo_id: SequenceNotStr[str] | Omit = omit,
offset: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> LogoMatchGetResponse:
"""
Return matches for logo queries based on ID
@ -161,15 +161,15 @@ class AsyncLogoMatchesResource(AsyncAPIResource):
self,
*,
account_id: str,
limit: str | NotGiven = NOT_GIVEN,
logo_id: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
offset: str | NotGiven = NOT_GIVEN,
limit: str | Omit = omit,
logo_id: SequenceNotStr[str] | Omit = omit,
offset: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> LogoMatchDownloadResponse:
"""
Return matches as CSV for logo queries based on ID
@ -208,15 +208,15 @@ class AsyncLogoMatchesResource(AsyncAPIResource):
self,
*,
account_id: str,
limit: str | NotGiven = NOT_GIVEN,
logo_id: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
offset: str | NotGiven = NOT_GIVEN,
limit: str | Omit = omit,
logo_id: SequenceNotStr[str] | Omit = omit,
offset: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> LogoMatchGetResponse:
"""
Return matches for logo queries based on ID

View file

@ -4,7 +4,7 @@ from __future__ import annotations
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven, FileTypes
from ..._types import Body, Omit, Query, Headers, NoneType, NotGiven, FileTypes, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -45,16 +45,16 @@ class LogosResource(SyncAPIResource):
self,
*,
account_id: str,
match_type: str | NotGiven = NOT_GIVEN,
tag: str | NotGiven = NOT_GIVEN,
threshold: float | NotGiven = NOT_GIVEN,
image: FileTypes | NotGiven = NOT_GIVEN,
match_type: str | Omit = omit,
tag: str | Omit = omit,
threshold: float | Omit = omit,
image: FileTypes | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> LogoCreateResponse:
"""
Return new saved logo queries created from image files
@ -100,7 +100,7 @@ class LogosResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> None:
"""
Return a success message after deleting saved logo queries by ID
@ -152,16 +152,16 @@ class AsyncLogosResource(AsyncAPIResource):
self,
*,
account_id: str,
match_type: str | NotGiven = NOT_GIVEN,
tag: str | NotGiven = NOT_GIVEN,
threshold: float | NotGiven = NOT_GIVEN,
image: FileTypes | NotGiven = NOT_GIVEN,
match_type: str | Omit = omit,
tag: str | Omit = omit,
threshold: float | Omit = omit,
image: FileTypes | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> LogoCreateResponse:
"""
Return new saved logo queries created from image files
@ -207,7 +207,7 @@ class AsyncLogosResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> None:
"""
Return a success message after deleting saved logo queries by ID

View file

@ -4,7 +4,7 @@ from __future__ import annotations
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -46,16 +46,16 @@ class MatchesResource(SyncAPIResource):
self,
*,
account_id: str,
id: str | NotGiven = NOT_GIVEN,
include_domain_id: bool | NotGiven = NOT_GIVEN,
limit: int | NotGiven = NOT_GIVEN,
offset: int | NotGiven = NOT_GIVEN,
id: str | Omit = omit,
include_domain_id: bool | Omit = omit,
limit: int | Omit = omit,
offset: int | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> MatchDownloadResponse:
"""
Return matches as CSV for string queries based on ID
@ -95,16 +95,16 @@ class MatchesResource(SyncAPIResource):
self,
*,
account_id: str,
id: str | NotGiven = NOT_GIVEN,
include_domain_id: bool | NotGiven = NOT_GIVEN,
limit: int | NotGiven = NOT_GIVEN,
offset: int | NotGiven = NOT_GIVEN,
id: str | Omit = omit,
include_domain_id: bool | Omit = omit,
limit: int | Omit = omit,
offset: int | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> MatchGetResponse:
"""
Return matches for string queries based on ID
@ -165,16 +165,16 @@ class AsyncMatchesResource(AsyncAPIResource):
self,
*,
account_id: str,
id: str | NotGiven = NOT_GIVEN,
include_domain_id: bool | NotGiven = NOT_GIVEN,
limit: int | NotGiven = NOT_GIVEN,
offset: int | NotGiven = NOT_GIVEN,
id: str | Omit = omit,
include_domain_id: bool | Omit = omit,
limit: int | Omit = omit,
offset: int | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> MatchDownloadResponse:
"""
Return matches as CSV for string queries based on ID
@ -214,16 +214,16 @@ class AsyncMatchesResource(AsyncAPIResource):
self,
*,
account_id: str,
id: str | NotGiven = NOT_GIVEN,
include_domain_id: bool | NotGiven = NOT_GIVEN,
limit: int | NotGiven = NOT_GIVEN,
offset: int | NotGiven = NOT_GIVEN,
id: str | Omit = omit,
include_domain_id: bool | Omit = omit,
limit: int | Omit = omit,
offset: int | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> MatchGetResponse:
"""
Return matches for string queries based on ID

View file

@ -7,7 +7,7 @@ from datetime import datetime
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
from ..._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -47,20 +47,20 @@ class QueriesResource(SyncAPIResource):
self,
*,
account_id: str,
id: str | NotGiven = NOT_GIVEN,
query_scan: bool | NotGiven = NOT_GIVEN,
query_tag: str | NotGiven = NOT_GIVEN,
max_time: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
min_time: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
body_scan: bool | NotGiven = NOT_GIVEN,
string_matches: object | NotGiven = NOT_GIVEN,
body_tag: str | NotGiven = NOT_GIVEN,
id: str | Omit = omit,
query_scan: bool | Omit = omit,
query_tag: str | Omit = omit,
max_time: Union[str, datetime, None] | Omit = omit,
min_time: Union[str, datetime, None] | Omit = omit,
body_scan: bool | Omit = omit,
string_matches: object | Omit = omit,
body_tag: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> None:
"""
Return a success message after creating new saved string queries
@ -110,15 +110,15 @@ class QueriesResource(SyncAPIResource):
self,
*,
account_id: str,
id: str | NotGiven = NOT_GIVEN,
scan: bool | NotGiven = NOT_GIVEN,
tag: str | NotGiven = NOT_GIVEN,
id: str | Omit = omit,
scan: bool | Omit = omit,
tag: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> None:
"""
Return a success message after deleting saved string queries by ID
@ -158,13 +158,13 @@ class QueriesResource(SyncAPIResource):
self,
*,
account_id: str,
queries: Iterable[Dict[str, object]] | NotGiven = NOT_GIVEN,
queries: Iterable[Dict[str, object]] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> None:
"""
Return a success message after creating new saved string queries in bulk
@ -215,20 +215,20 @@ class AsyncQueriesResource(AsyncAPIResource):
self,
*,
account_id: str,
id: str | NotGiven = NOT_GIVEN,
query_scan: bool | NotGiven = NOT_GIVEN,
query_tag: str | NotGiven = NOT_GIVEN,
max_time: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
min_time: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
body_scan: bool | NotGiven = NOT_GIVEN,
string_matches: object | NotGiven = NOT_GIVEN,
body_tag: str | NotGiven = NOT_GIVEN,
id: str | Omit = omit,
query_scan: bool | Omit = omit,
query_tag: str | Omit = omit,
max_time: Union[str, datetime, None] | Omit = omit,
min_time: Union[str, datetime, None] | Omit = omit,
body_scan: bool | Omit = omit,
string_matches: object | Omit = omit,
body_tag: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> None:
"""
Return a success message after creating new saved string queries
@ -278,15 +278,15 @@ class AsyncQueriesResource(AsyncAPIResource):
self,
*,
account_id: str,
id: str | NotGiven = NOT_GIVEN,
scan: bool | NotGiven = NOT_GIVEN,
tag: str | NotGiven = NOT_GIVEN,
id: str | Omit = omit,
scan: bool | Omit = omit,
tag: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> None:
"""
Return a success message after deleting saved string queries by ID
@ -326,13 +326,13 @@ class AsyncQueriesResource(AsyncAPIResource):
self,
*,
account_id: str,
queries: Iterable[Dict[str, object]] | NotGiven = NOT_GIVEN,
queries: Iterable[Dict[str, object]] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> None:
"""
Return a success message after creating new saved string queries in bulk

View file

@ -7,7 +7,7 @@ from typing_extensions import Literal
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -49,11 +49,11 @@ class ContentResource(SyncAPIResource):
self,
*,
account_id: str,
cache_ttl: float | NotGiven = NOT_GIVEN,
action_timeout: float | NotGiven = NOT_GIVEN,
add_script_tag: Iterable[content_create_params.AddScriptTag] | NotGiven = NOT_GIVEN,
add_style_tag: Iterable[content_create_params.AddStyleTag] | NotGiven = NOT_GIVEN,
allow_request_pattern: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
cache_ttl: float | Omit = omit,
action_timeout: float | Omit = omit,
add_script_tag: Iterable[content_create_params.AddScriptTag] | Omit = omit,
add_style_tag: Iterable[content_create_params.AddStyleTag] | Omit = omit,
allow_request_pattern: SequenceNotStr[str] | Omit = omit,
allow_resource_types: List[
Literal[
"document",
@ -76,14 +76,14 @@ class ContentResource(SyncAPIResource):
"other",
]
]
| NotGiven = NOT_GIVEN,
authenticate: content_create_params.Authenticate | NotGiven = NOT_GIVEN,
best_attempt: bool | NotGiven = NOT_GIVEN,
cookies: Iterable[content_create_params.Cookie] | NotGiven = NOT_GIVEN,
emulate_media_type: str | NotGiven = NOT_GIVEN,
goto_options: content_create_params.GotoOptions | NotGiven = NOT_GIVEN,
html: str | NotGiven = NOT_GIVEN,
reject_request_pattern: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
| Omit = omit,
authenticate: content_create_params.Authenticate | Omit = omit,
best_attempt: bool | Omit = omit,
cookies: Iterable[content_create_params.Cookie] | Omit = omit,
emulate_media_type: str | Omit = omit,
goto_options: content_create_params.GotoOptions | Omit = omit,
html: str | Omit = omit,
reject_request_pattern: SequenceNotStr[str] | Omit = omit,
reject_resource_types: List[
Literal[
"document",
@ -106,20 +106,20 @@ class ContentResource(SyncAPIResource):
"other",
]
]
| NotGiven = NOT_GIVEN,
set_extra_http_headers: Dict[str, str] | NotGiven = NOT_GIVEN,
set_java_script_enabled: bool | NotGiven = NOT_GIVEN,
url: str | NotGiven = NOT_GIVEN,
user_agent: str | NotGiven = NOT_GIVEN,
viewport: content_create_params.Viewport | NotGiven = NOT_GIVEN,
wait_for_selector: content_create_params.WaitForSelector | NotGiven = NOT_GIVEN,
wait_for_timeout: float | NotGiven = NOT_GIVEN,
| Omit = omit,
set_extra_http_headers: Dict[str, str] | Omit = omit,
set_java_script_enabled: bool | Omit = omit,
url: str | Omit = omit,
user_agent: str | Omit = omit,
viewport: content_create_params.Viewport | Omit = omit,
wait_for_selector: content_create_params.WaitForSelector | Omit = omit,
wait_for_timeout: float | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> str:
"""Fetches rendered HTML content from provided URL or HTML.
@ -244,11 +244,11 @@ class AsyncContentResource(AsyncAPIResource):
self,
*,
account_id: str,
cache_ttl: float | NotGiven = NOT_GIVEN,
action_timeout: float | NotGiven = NOT_GIVEN,
add_script_tag: Iterable[content_create_params.AddScriptTag] | NotGiven = NOT_GIVEN,
add_style_tag: Iterable[content_create_params.AddStyleTag] | NotGiven = NOT_GIVEN,
allow_request_pattern: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
cache_ttl: float | Omit = omit,
action_timeout: float | Omit = omit,
add_script_tag: Iterable[content_create_params.AddScriptTag] | Omit = omit,
add_style_tag: Iterable[content_create_params.AddStyleTag] | Omit = omit,
allow_request_pattern: SequenceNotStr[str] | Omit = omit,
allow_resource_types: List[
Literal[
"document",
@ -271,14 +271,14 @@ class AsyncContentResource(AsyncAPIResource):
"other",
]
]
| NotGiven = NOT_GIVEN,
authenticate: content_create_params.Authenticate | NotGiven = NOT_GIVEN,
best_attempt: bool | NotGiven = NOT_GIVEN,
cookies: Iterable[content_create_params.Cookie] | NotGiven = NOT_GIVEN,
emulate_media_type: str | NotGiven = NOT_GIVEN,
goto_options: content_create_params.GotoOptions | NotGiven = NOT_GIVEN,
html: str | NotGiven = NOT_GIVEN,
reject_request_pattern: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
| Omit = omit,
authenticate: content_create_params.Authenticate | Omit = omit,
best_attempt: bool | Omit = omit,
cookies: Iterable[content_create_params.Cookie] | Omit = omit,
emulate_media_type: str | Omit = omit,
goto_options: content_create_params.GotoOptions | Omit = omit,
html: str | Omit = omit,
reject_request_pattern: SequenceNotStr[str] | Omit = omit,
reject_resource_types: List[
Literal[
"document",
@ -301,20 +301,20 @@ class AsyncContentResource(AsyncAPIResource):
"other",
]
]
| NotGiven = NOT_GIVEN,
set_extra_http_headers: Dict[str, str] | NotGiven = NOT_GIVEN,
set_java_script_enabled: bool | NotGiven = NOT_GIVEN,
url: str | NotGiven = NOT_GIVEN,
user_agent: str | NotGiven = NOT_GIVEN,
viewport: content_create_params.Viewport | NotGiven = NOT_GIVEN,
wait_for_selector: content_create_params.WaitForSelector | NotGiven = NOT_GIVEN,
wait_for_timeout: float | NotGiven = NOT_GIVEN,
| Omit = omit,
set_extra_http_headers: Dict[str, str] | Omit = omit,
set_java_script_enabled: bool | Omit = omit,
url: str | Omit = omit,
user_agent: str | Omit = omit,
viewport: content_create_params.Viewport | Omit = omit,
wait_for_selector: content_create_params.WaitForSelector | Omit = omit,
wait_for_timeout: float | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> str:
"""Fetches rendered HTML content from provided URL or HTML.

View file

@ -7,7 +7,7 @@ from typing_extensions import Literal
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -49,11 +49,11 @@ class JsonResource(SyncAPIResource):
self,
*,
account_id: str,
cache_ttl: float | NotGiven = NOT_GIVEN,
action_timeout: float | NotGiven = NOT_GIVEN,
add_script_tag: Iterable[json_create_params.AddScriptTag] | NotGiven = NOT_GIVEN,
add_style_tag: Iterable[json_create_params.AddStyleTag] | NotGiven = NOT_GIVEN,
allow_request_pattern: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
cache_ttl: float | Omit = omit,
action_timeout: float | Omit = omit,
add_script_tag: Iterable[json_create_params.AddScriptTag] | Omit = omit,
add_style_tag: Iterable[json_create_params.AddStyleTag] | Omit = omit,
allow_request_pattern: SequenceNotStr[str] | Omit = omit,
allow_resource_types: List[
Literal[
"document",
@ -76,16 +76,16 @@ class JsonResource(SyncAPIResource):
"other",
]
]
| NotGiven = NOT_GIVEN,
authenticate: json_create_params.Authenticate | NotGiven = NOT_GIVEN,
best_attempt: bool | NotGiven = NOT_GIVEN,
cookies: Iterable[json_create_params.Cookie] | NotGiven = NOT_GIVEN,
custom_ai: Iterable[json_create_params.CustomAI] | NotGiven = NOT_GIVEN,
emulate_media_type: str | NotGiven = NOT_GIVEN,
goto_options: json_create_params.GotoOptions | NotGiven = NOT_GIVEN,
html: str | NotGiven = NOT_GIVEN,
prompt: str | NotGiven = NOT_GIVEN,
reject_request_pattern: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
| Omit = omit,
authenticate: json_create_params.Authenticate | Omit = omit,
best_attempt: bool | Omit = omit,
cookies: Iterable[json_create_params.Cookie] | Omit = omit,
custom_ai: Iterable[json_create_params.CustomAI] | Omit = omit,
emulate_media_type: str | Omit = omit,
goto_options: json_create_params.GotoOptions | Omit = omit,
html: str | Omit = omit,
prompt: str | Omit = omit,
reject_request_pattern: SequenceNotStr[str] | Omit = omit,
reject_resource_types: List[
Literal[
"document",
@ -108,21 +108,21 @@ class JsonResource(SyncAPIResource):
"other",
]
]
| NotGiven = NOT_GIVEN,
response_format: json_create_params.ResponseFormat | NotGiven = NOT_GIVEN,
set_extra_http_headers: Dict[str, str] | NotGiven = NOT_GIVEN,
set_java_script_enabled: bool | NotGiven = NOT_GIVEN,
url: str | NotGiven = NOT_GIVEN,
user_agent: str | NotGiven = NOT_GIVEN,
viewport: json_create_params.Viewport | NotGiven = NOT_GIVEN,
wait_for_selector: json_create_params.WaitForSelector | NotGiven = NOT_GIVEN,
wait_for_timeout: float | NotGiven = NOT_GIVEN,
| Omit = omit,
response_format: json_create_params.ResponseFormat | Omit = omit,
set_extra_http_headers: Dict[str, str] | Omit = omit,
set_java_script_enabled: bool | Omit = omit,
url: str | Omit = omit,
user_agent: str | Omit = omit,
viewport: json_create_params.Viewport | Omit = omit,
wait_for_selector: json_create_params.WaitForSelector | Omit = omit,
wait_for_timeout: float | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> JsonCreateResponse:
"""Gets json from a webpage from a provided URL or HTML.
@ -254,11 +254,11 @@ class AsyncJsonResource(AsyncAPIResource):
self,
*,
account_id: str,
cache_ttl: float | NotGiven = NOT_GIVEN,
action_timeout: float | NotGiven = NOT_GIVEN,
add_script_tag: Iterable[json_create_params.AddScriptTag] | NotGiven = NOT_GIVEN,
add_style_tag: Iterable[json_create_params.AddStyleTag] | NotGiven = NOT_GIVEN,
allow_request_pattern: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
cache_ttl: float | Omit = omit,
action_timeout: float | Omit = omit,
add_script_tag: Iterable[json_create_params.AddScriptTag] | Omit = omit,
add_style_tag: Iterable[json_create_params.AddStyleTag] | Omit = omit,
allow_request_pattern: SequenceNotStr[str] | Omit = omit,
allow_resource_types: List[
Literal[
"document",
@ -281,16 +281,16 @@ class AsyncJsonResource(AsyncAPIResource):
"other",
]
]
| NotGiven = NOT_GIVEN,
authenticate: json_create_params.Authenticate | NotGiven = NOT_GIVEN,
best_attempt: bool | NotGiven = NOT_GIVEN,
cookies: Iterable[json_create_params.Cookie] | NotGiven = NOT_GIVEN,
custom_ai: Iterable[json_create_params.CustomAI] | NotGiven = NOT_GIVEN,
emulate_media_type: str | NotGiven = NOT_GIVEN,
goto_options: json_create_params.GotoOptions | NotGiven = NOT_GIVEN,
html: str | NotGiven = NOT_GIVEN,
prompt: str | NotGiven = NOT_GIVEN,
reject_request_pattern: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
| Omit = omit,
authenticate: json_create_params.Authenticate | Omit = omit,
best_attempt: bool | Omit = omit,
cookies: Iterable[json_create_params.Cookie] | Omit = omit,
custom_ai: Iterable[json_create_params.CustomAI] | Omit = omit,
emulate_media_type: str | Omit = omit,
goto_options: json_create_params.GotoOptions | Omit = omit,
html: str | Omit = omit,
prompt: str | Omit = omit,
reject_request_pattern: SequenceNotStr[str] | Omit = omit,
reject_resource_types: List[
Literal[
"document",
@ -313,21 +313,21 @@ class AsyncJsonResource(AsyncAPIResource):
"other",
]
]
| NotGiven = NOT_GIVEN,
response_format: json_create_params.ResponseFormat | NotGiven = NOT_GIVEN,
set_extra_http_headers: Dict[str, str] | NotGiven = NOT_GIVEN,
set_java_script_enabled: bool | NotGiven = NOT_GIVEN,
url: str | NotGiven = NOT_GIVEN,
user_agent: str | NotGiven = NOT_GIVEN,
viewport: json_create_params.Viewport | NotGiven = NOT_GIVEN,
wait_for_selector: json_create_params.WaitForSelector | NotGiven = NOT_GIVEN,
wait_for_timeout: float | NotGiven = NOT_GIVEN,
| Omit = omit,
response_format: json_create_params.ResponseFormat | Omit = omit,
set_extra_http_headers: Dict[str, str] | Omit = omit,
set_java_script_enabled: bool | Omit = omit,
url: str | Omit = omit,
user_agent: str | Omit = omit,
viewport: json_create_params.Viewport | Omit = omit,
wait_for_selector: json_create_params.WaitForSelector | Omit = omit,
wait_for_timeout: float | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> JsonCreateResponse:
"""Gets json from a webpage from a provided URL or HTML.

View file

@ -7,7 +7,7 @@ from typing_extensions import Literal
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -49,11 +49,11 @@ class LinksResource(SyncAPIResource):
self,
*,
account_id: str,
cache_ttl: float | NotGiven = NOT_GIVEN,
action_timeout: float | NotGiven = NOT_GIVEN,
add_script_tag: Iterable[link_create_params.AddScriptTag] | NotGiven = NOT_GIVEN,
add_style_tag: Iterable[link_create_params.AddStyleTag] | NotGiven = NOT_GIVEN,
allow_request_pattern: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
cache_ttl: float | Omit = omit,
action_timeout: float | Omit = omit,
add_script_tag: Iterable[link_create_params.AddScriptTag] | Omit = omit,
add_style_tag: Iterable[link_create_params.AddStyleTag] | Omit = omit,
allow_request_pattern: SequenceNotStr[str] | Omit = omit,
allow_resource_types: List[
Literal[
"document",
@ -76,15 +76,15 @@ class LinksResource(SyncAPIResource):
"other",
]
]
| NotGiven = NOT_GIVEN,
authenticate: link_create_params.Authenticate | NotGiven = NOT_GIVEN,
best_attempt: bool | NotGiven = NOT_GIVEN,
cookies: Iterable[link_create_params.Cookie] | NotGiven = NOT_GIVEN,
emulate_media_type: str | NotGiven = NOT_GIVEN,
exclude_external_links: bool | NotGiven = NOT_GIVEN,
goto_options: link_create_params.GotoOptions | NotGiven = NOT_GIVEN,
html: str | NotGiven = NOT_GIVEN,
reject_request_pattern: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
| Omit = omit,
authenticate: link_create_params.Authenticate | Omit = omit,
best_attempt: bool | Omit = omit,
cookies: Iterable[link_create_params.Cookie] | Omit = omit,
emulate_media_type: str | Omit = omit,
exclude_external_links: bool | Omit = omit,
goto_options: link_create_params.GotoOptions | Omit = omit,
html: str | Omit = omit,
reject_request_pattern: SequenceNotStr[str] | Omit = omit,
reject_resource_types: List[
Literal[
"document",
@ -107,21 +107,21 @@ class LinksResource(SyncAPIResource):
"other",
]
]
| NotGiven = NOT_GIVEN,
set_extra_http_headers: Dict[str, str] | NotGiven = NOT_GIVEN,
set_java_script_enabled: bool | NotGiven = NOT_GIVEN,
url: str | NotGiven = NOT_GIVEN,
user_agent: str | NotGiven = NOT_GIVEN,
viewport: link_create_params.Viewport | NotGiven = NOT_GIVEN,
visible_links_only: bool | NotGiven = NOT_GIVEN,
wait_for_selector: link_create_params.WaitForSelector | NotGiven = NOT_GIVEN,
wait_for_timeout: float | NotGiven = NOT_GIVEN,
| Omit = omit,
set_extra_http_headers: Dict[str, str] | Omit = omit,
set_java_script_enabled: bool | Omit = omit,
url: str | Omit = omit,
user_agent: str | Omit = omit,
viewport: link_create_params.Viewport | Omit = omit,
visible_links_only: bool | Omit = omit,
wait_for_selector: link_create_params.WaitForSelector | Omit = omit,
wait_for_timeout: float | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> LinkCreateResponse:
"""
Get links from a web page.
@ -246,11 +246,11 @@ class AsyncLinksResource(AsyncAPIResource):
self,
*,
account_id: str,
cache_ttl: float | NotGiven = NOT_GIVEN,
action_timeout: float | NotGiven = NOT_GIVEN,
add_script_tag: Iterable[link_create_params.AddScriptTag] | NotGiven = NOT_GIVEN,
add_style_tag: Iterable[link_create_params.AddStyleTag] | NotGiven = NOT_GIVEN,
allow_request_pattern: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
cache_ttl: float | Omit = omit,
action_timeout: float | Omit = omit,
add_script_tag: Iterable[link_create_params.AddScriptTag] | Omit = omit,
add_style_tag: Iterable[link_create_params.AddStyleTag] | Omit = omit,
allow_request_pattern: SequenceNotStr[str] | Omit = omit,
allow_resource_types: List[
Literal[
"document",
@ -273,15 +273,15 @@ class AsyncLinksResource(AsyncAPIResource):
"other",
]
]
| NotGiven = NOT_GIVEN,
authenticate: link_create_params.Authenticate | NotGiven = NOT_GIVEN,
best_attempt: bool | NotGiven = NOT_GIVEN,
cookies: Iterable[link_create_params.Cookie] | NotGiven = NOT_GIVEN,
emulate_media_type: str | NotGiven = NOT_GIVEN,
exclude_external_links: bool | NotGiven = NOT_GIVEN,
goto_options: link_create_params.GotoOptions | NotGiven = NOT_GIVEN,
html: str | NotGiven = NOT_GIVEN,
reject_request_pattern: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
| Omit = omit,
authenticate: link_create_params.Authenticate | Omit = omit,
best_attempt: bool | Omit = omit,
cookies: Iterable[link_create_params.Cookie] | Omit = omit,
emulate_media_type: str | Omit = omit,
exclude_external_links: bool | Omit = omit,
goto_options: link_create_params.GotoOptions | Omit = omit,
html: str | Omit = omit,
reject_request_pattern: SequenceNotStr[str] | Omit = omit,
reject_resource_types: List[
Literal[
"document",
@ -304,21 +304,21 @@ class AsyncLinksResource(AsyncAPIResource):
"other",
]
]
| NotGiven = NOT_GIVEN,
set_extra_http_headers: Dict[str, str] | NotGiven = NOT_GIVEN,
set_java_script_enabled: bool | NotGiven = NOT_GIVEN,
url: str | NotGiven = NOT_GIVEN,
user_agent: str | NotGiven = NOT_GIVEN,
viewport: link_create_params.Viewport | NotGiven = NOT_GIVEN,
visible_links_only: bool | NotGiven = NOT_GIVEN,
wait_for_selector: link_create_params.WaitForSelector | NotGiven = NOT_GIVEN,
wait_for_timeout: float | NotGiven = NOT_GIVEN,
| Omit = omit,
set_extra_http_headers: Dict[str, str] | Omit = omit,
set_java_script_enabled: bool | Omit = omit,
url: str | Omit = omit,
user_agent: str | Omit = omit,
viewport: link_create_params.Viewport | Omit = omit,
visible_links_only: bool | Omit = omit,
wait_for_selector: link_create_params.WaitForSelector | Omit = omit,
wait_for_timeout: float | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> LinkCreateResponse:
"""
Get links from a web page.

View file

@ -7,7 +7,7 @@ from typing_extensions import Literal
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -49,11 +49,11 @@ class MarkdownResource(SyncAPIResource):
self,
*,
account_id: str,
cache_ttl: float | NotGiven = NOT_GIVEN,
action_timeout: float | NotGiven = NOT_GIVEN,
add_script_tag: Iterable[markdown_create_params.AddScriptTag] | NotGiven = NOT_GIVEN,
add_style_tag: Iterable[markdown_create_params.AddStyleTag] | NotGiven = NOT_GIVEN,
allow_request_pattern: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
cache_ttl: float | Omit = omit,
action_timeout: float | Omit = omit,
add_script_tag: Iterable[markdown_create_params.AddScriptTag] | Omit = omit,
add_style_tag: Iterable[markdown_create_params.AddStyleTag] | Omit = omit,
allow_request_pattern: SequenceNotStr[str] | Omit = omit,
allow_resource_types: List[
Literal[
"document",
@ -76,14 +76,14 @@ class MarkdownResource(SyncAPIResource):
"other",
]
]
| NotGiven = NOT_GIVEN,
authenticate: markdown_create_params.Authenticate | NotGiven = NOT_GIVEN,
best_attempt: bool | NotGiven = NOT_GIVEN,
cookies: Iterable[markdown_create_params.Cookie] | NotGiven = NOT_GIVEN,
emulate_media_type: str | NotGiven = NOT_GIVEN,
goto_options: markdown_create_params.GotoOptions | NotGiven = NOT_GIVEN,
html: str | NotGiven = NOT_GIVEN,
reject_request_pattern: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
| Omit = omit,
authenticate: markdown_create_params.Authenticate | Omit = omit,
best_attempt: bool | Omit = omit,
cookies: Iterable[markdown_create_params.Cookie] | Omit = omit,
emulate_media_type: str | Omit = omit,
goto_options: markdown_create_params.GotoOptions | Omit = omit,
html: str | Omit = omit,
reject_request_pattern: SequenceNotStr[str] | Omit = omit,
reject_resource_types: List[
Literal[
"document",
@ -106,20 +106,20 @@ class MarkdownResource(SyncAPIResource):
"other",
]
]
| NotGiven = NOT_GIVEN,
set_extra_http_headers: Dict[str, str] | NotGiven = NOT_GIVEN,
set_java_script_enabled: bool | NotGiven = NOT_GIVEN,
url: str | NotGiven = NOT_GIVEN,
user_agent: str | NotGiven = NOT_GIVEN,
viewport: markdown_create_params.Viewport | NotGiven = NOT_GIVEN,
wait_for_selector: markdown_create_params.WaitForSelector | NotGiven = NOT_GIVEN,
wait_for_timeout: float | NotGiven = NOT_GIVEN,
| Omit = omit,
set_extra_http_headers: Dict[str, str] | Omit = omit,
set_java_script_enabled: bool | Omit = omit,
url: str | Omit = omit,
user_agent: str | Omit = omit,
viewport: markdown_create_params.Viewport | Omit = omit,
wait_for_selector: markdown_create_params.WaitForSelector | Omit = omit,
wait_for_timeout: float | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> str:
"""Gets markdown of a webpage from provided URL or HTML.
@ -244,11 +244,11 @@ class AsyncMarkdownResource(AsyncAPIResource):
self,
*,
account_id: str,
cache_ttl: float | NotGiven = NOT_GIVEN,
action_timeout: float | NotGiven = NOT_GIVEN,
add_script_tag: Iterable[markdown_create_params.AddScriptTag] | NotGiven = NOT_GIVEN,
add_style_tag: Iterable[markdown_create_params.AddStyleTag] | NotGiven = NOT_GIVEN,
allow_request_pattern: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
cache_ttl: float | Omit = omit,
action_timeout: float | Omit = omit,
add_script_tag: Iterable[markdown_create_params.AddScriptTag] | Omit = omit,
add_style_tag: Iterable[markdown_create_params.AddStyleTag] | Omit = omit,
allow_request_pattern: SequenceNotStr[str] | Omit = omit,
allow_resource_types: List[
Literal[
"document",
@ -271,14 +271,14 @@ class AsyncMarkdownResource(AsyncAPIResource):
"other",
]
]
| NotGiven = NOT_GIVEN,
authenticate: markdown_create_params.Authenticate | NotGiven = NOT_GIVEN,
best_attempt: bool | NotGiven = NOT_GIVEN,
cookies: Iterable[markdown_create_params.Cookie] | NotGiven = NOT_GIVEN,
emulate_media_type: str | NotGiven = NOT_GIVEN,
goto_options: markdown_create_params.GotoOptions | NotGiven = NOT_GIVEN,
html: str | NotGiven = NOT_GIVEN,
reject_request_pattern: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
| Omit = omit,
authenticate: markdown_create_params.Authenticate | Omit = omit,
best_attempt: bool | Omit = omit,
cookies: Iterable[markdown_create_params.Cookie] | Omit = omit,
emulate_media_type: str | Omit = omit,
goto_options: markdown_create_params.GotoOptions | Omit = omit,
html: str | Omit = omit,
reject_request_pattern: SequenceNotStr[str] | Omit = omit,
reject_resource_types: List[
Literal[
"document",
@ -301,20 +301,20 @@ class AsyncMarkdownResource(AsyncAPIResource):
"other",
]
]
| NotGiven = NOT_GIVEN,
set_extra_http_headers: Dict[str, str] | NotGiven = NOT_GIVEN,
set_java_script_enabled: bool | NotGiven = NOT_GIVEN,
url: str | NotGiven = NOT_GIVEN,
user_agent: str | NotGiven = NOT_GIVEN,
viewport: markdown_create_params.Viewport | NotGiven = NOT_GIVEN,
wait_for_selector: markdown_create_params.WaitForSelector | NotGiven = NOT_GIVEN,
wait_for_timeout: float | NotGiven = NOT_GIVEN,
| Omit = omit,
set_extra_http_headers: Dict[str, str] | Omit = omit,
set_java_script_enabled: bool | Omit = omit,
url: str | Omit = omit,
user_agent: str | Omit = omit,
viewport: markdown_create_params.Viewport | Omit = omit,
wait_for_selector: markdown_create_params.WaitForSelector | Omit = omit,
wait_for_timeout: float | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> str:
"""Gets markdown of a webpage from provided URL or HTML.

View file

@ -7,7 +7,7 @@ from typing_extensions import Literal
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -51,11 +51,11 @@ class PDFResource(SyncAPIResource):
self,
*,
account_id: str,
cache_ttl: float | NotGiven = NOT_GIVEN,
action_timeout: float | NotGiven = NOT_GIVEN,
add_script_tag: Iterable[pdf_create_params.AddScriptTag] | NotGiven = NOT_GIVEN,
add_style_tag: Iterable[pdf_create_params.AddStyleTag] | NotGiven = NOT_GIVEN,
allow_request_pattern: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
cache_ttl: float | Omit = omit,
action_timeout: float | Omit = omit,
add_script_tag: Iterable[pdf_create_params.AddScriptTag] | Omit = omit,
add_style_tag: Iterable[pdf_create_params.AddStyleTag] | Omit = omit,
allow_request_pattern: SequenceNotStr[str] | Omit = omit,
allow_resource_types: List[
Literal[
"document",
@ -78,15 +78,15 @@ class PDFResource(SyncAPIResource):
"other",
]
]
| NotGiven = NOT_GIVEN,
authenticate: pdf_create_params.Authenticate | NotGiven = NOT_GIVEN,
best_attempt: bool | NotGiven = NOT_GIVEN,
cookies: Iterable[pdf_create_params.Cookie] | NotGiven = NOT_GIVEN,
emulate_media_type: str | NotGiven = NOT_GIVEN,
goto_options: pdf_create_params.GotoOptions | NotGiven = NOT_GIVEN,
html: str | NotGiven = NOT_GIVEN,
pdf_options: pdf_create_params.PDFOptions | NotGiven = NOT_GIVEN,
reject_request_pattern: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
| Omit = omit,
authenticate: pdf_create_params.Authenticate | Omit = omit,
best_attempt: bool | Omit = omit,
cookies: Iterable[pdf_create_params.Cookie] | Omit = omit,
emulate_media_type: str | Omit = omit,
goto_options: pdf_create_params.GotoOptions | Omit = omit,
html: str | Omit = omit,
pdf_options: pdf_create_params.PDFOptions | Omit = omit,
reject_request_pattern: SequenceNotStr[str] | Omit = omit,
reject_resource_types: List[
Literal[
"document",
@ -109,20 +109,20 @@ class PDFResource(SyncAPIResource):
"other",
]
]
| NotGiven = NOT_GIVEN,
set_extra_http_headers: Dict[str, str] | NotGiven = NOT_GIVEN,
set_java_script_enabled: bool | NotGiven = NOT_GIVEN,
url: str | NotGiven = NOT_GIVEN,
user_agent: str | NotGiven = NOT_GIVEN,
viewport: pdf_create_params.Viewport | NotGiven = NOT_GIVEN,
wait_for_selector: pdf_create_params.WaitForSelector | NotGiven = NOT_GIVEN,
wait_for_timeout: float | NotGiven = NOT_GIVEN,
| Omit = omit,
set_extra_http_headers: Dict[str, str] | Omit = omit,
set_java_script_enabled: bool | Omit = omit,
url: str | Omit = omit,
user_agent: str | Omit = omit,
viewport: pdf_create_params.Viewport | Omit = omit,
wait_for_selector: pdf_create_params.WaitForSelector | Omit = omit,
wait_for_timeout: float | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BinaryAPIResponse:
"""Fetches rendered PDF from provided URL or HTML.
@ -250,11 +250,11 @@ class AsyncPDFResource(AsyncAPIResource):
self,
*,
account_id: str,
cache_ttl: float | NotGiven = NOT_GIVEN,
action_timeout: float | NotGiven = NOT_GIVEN,
add_script_tag: Iterable[pdf_create_params.AddScriptTag] | NotGiven = NOT_GIVEN,
add_style_tag: Iterable[pdf_create_params.AddStyleTag] | NotGiven = NOT_GIVEN,
allow_request_pattern: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
cache_ttl: float | Omit = omit,
action_timeout: float | Omit = omit,
add_script_tag: Iterable[pdf_create_params.AddScriptTag] | Omit = omit,
add_style_tag: Iterable[pdf_create_params.AddStyleTag] | Omit = omit,
allow_request_pattern: SequenceNotStr[str] | Omit = omit,
allow_resource_types: List[
Literal[
"document",
@ -277,15 +277,15 @@ class AsyncPDFResource(AsyncAPIResource):
"other",
]
]
| NotGiven = NOT_GIVEN,
authenticate: pdf_create_params.Authenticate | NotGiven = NOT_GIVEN,
best_attempt: bool | NotGiven = NOT_GIVEN,
cookies: Iterable[pdf_create_params.Cookie] | NotGiven = NOT_GIVEN,
emulate_media_type: str | NotGiven = NOT_GIVEN,
goto_options: pdf_create_params.GotoOptions | NotGiven = NOT_GIVEN,
html: str | NotGiven = NOT_GIVEN,
pdf_options: pdf_create_params.PDFOptions | NotGiven = NOT_GIVEN,
reject_request_pattern: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
| Omit = omit,
authenticate: pdf_create_params.Authenticate | Omit = omit,
best_attempt: bool | Omit = omit,
cookies: Iterable[pdf_create_params.Cookie] | Omit = omit,
emulate_media_type: str | Omit = omit,
goto_options: pdf_create_params.GotoOptions | Omit = omit,
html: str | Omit = omit,
pdf_options: pdf_create_params.PDFOptions | Omit = omit,
reject_request_pattern: SequenceNotStr[str] | Omit = omit,
reject_resource_types: List[
Literal[
"document",
@ -308,20 +308,20 @@ class AsyncPDFResource(AsyncAPIResource):
"other",
]
]
| NotGiven = NOT_GIVEN,
set_extra_http_headers: Dict[str, str] | NotGiven = NOT_GIVEN,
set_java_script_enabled: bool | NotGiven = NOT_GIVEN,
url: str | NotGiven = NOT_GIVEN,
user_agent: str | NotGiven = NOT_GIVEN,
viewport: pdf_create_params.Viewport | NotGiven = NOT_GIVEN,
wait_for_selector: pdf_create_params.WaitForSelector | NotGiven = NOT_GIVEN,
wait_for_timeout: float | NotGiven = NOT_GIVEN,
| Omit = omit,
set_extra_http_headers: Dict[str, str] | Omit = omit,
set_java_script_enabled: bool | Omit = omit,
url: str | Omit = omit,
user_agent: str | Omit = omit,
viewport: pdf_create_params.Viewport | Omit = omit,
wait_for_selector: pdf_create_params.WaitForSelector | Omit = omit,
wait_for_timeout: float | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncBinaryAPIResponse:
"""Fetches rendered PDF from provided URL or HTML.

View file

@ -7,7 +7,7 @@ from typing_extensions import Literal
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -50,11 +50,11 @@ class ScrapeResource(SyncAPIResource):
*,
account_id: str,
elements: Iterable[scrape_create_params.Element],
cache_ttl: float | NotGiven = NOT_GIVEN,
action_timeout: float | NotGiven = NOT_GIVEN,
add_script_tag: Iterable[scrape_create_params.AddScriptTag] | NotGiven = NOT_GIVEN,
add_style_tag: Iterable[scrape_create_params.AddStyleTag] | NotGiven = NOT_GIVEN,
allow_request_pattern: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
cache_ttl: float | Omit = omit,
action_timeout: float | Omit = omit,
add_script_tag: Iterable[scrape_create_params.AddScriptTag] | Omit = omit,
add_style_tag: Iterable[scrape_create_params.AddStyleTag] | Omit = omit,
allow_request_pattern: SequenceNotStr[str] | Omit = omit,
allow_resource_types: List[
Literal[
"document",
@ -77,14 +77,14 @@ class ScrapeResource(SyncAPIResource):
"other",
]
]
| NotGiven = NOT_GIVEN,
authenticate: scrape_create_params.Authenticate | NotGiven = NOT_GIVEN,
best_attempt: bool | NotGiven = NOT_GIVEN,
cookies: Iterable[scrape_create_params.Cookie] | NotGiven = NOT_GIVEN,
emulate_media_type: str | NotGiven = NOT_GIVEN,
goto_options: scrape_create_params.GotoOptions | NotGiven = NOT_GIVEN,
html: str | NotGiven = NOT_GIVEN,
reject_request_pattern: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
| Omit = omit,
authenticate: scrape_create_params.Authenticate | Omit = omit,
best_attempt: bool | Omit = omit,
cookies: Iterable[scrape_create_params.Cookie] | Omit = omit,
emulate_media_type: str | Omit = omit,
goto_options: scrape_create_params.GotoOptions | Omit = omit,
html: str | Omit = omit,
reject_request_pattern: SequenceNotStr[str] | Omit = omit,
reject_resource_types: List[
Literal[
"document",
@ -107,20 +107,20 @@ class ScrapeResource(SyncAPIResource):
"other",
]
]
| NotGiven = NOT_GIVEN,
set_extra_http_headers: Dict[str, str] | NotGiven = NOT_GIVEN,
set_java_script_enabled: bool | NotGiven = NOT_GIVEN,
url: str | NotGiven = NOT_GIVEN,
user_agent: str | NotGiven = NOT_GIVEN,
viewport: scrape_create_params.Viewport | NotGiven = NOT_GIVEN,
wait_for_selector: scrape_create_params.WaitForSelector | NotGiven = NOT_GIVEN,
wait_for_timeout: float | NotGiven = NOT_GIVEN,
| Omit = omit,
set_extra_http_headers: Dict[str, str] | Omit = omit,
set_java_script_enabled: bool | Omit = omit,
url: str | Omit = omit,
user_agent: str | Omit = omit,
viewport: scrape_create_params.Viewport | Omit = omit,
wait_for_selector: scrape_create_params.WaitForSelector | Omit = omit,
wait_for_timeout: float | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> ScrapeCreateResponse:
"""
Get meta attributes like height, width, text and others of selected elements.
@ -245,11 +245,11 @@ class AsyncScrapeResource(AsyncAPIResource):
*,
account_id: str,
elements: Iterable[scrape_create_params.Element],
cache_ttl: float | NotGiven = NOT_GIVEN,
action_timeout: float | NotGiven = NOT_GIVEN,
add_script_tag: Iterable[scrape_create_params.AddScriptTag] | NotGiven = NOT_GIVEN,
add_style_tag: Iterable[scrape_create_params.AddStyleTag] | NotGiven = NOT_GIVEN,
allow_request_pattern: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
cache_ttl: float | Omit = omit,
action_timeout: float | Omit = omit,
add_script_tag: Iterable[scrape_create_params.AddScriptTag] | Omit = omit,
add_style_tag: Iterable[scrape_create_params.AddStyleTag] | Omit = omit,
allow_request_pattern: SequenceNotStr[str] | Omit = omit,
allow_resource_types: List[
Literal[
"document",
@ -272,14 +272,14 @@ class AsyncScrapeResource(AsyncAPIResource):
"other",
]
]
| NotGiven = NOT_GIVEN,
authenticate: scrape_create_params.Authenticate | NotGiven = NOT_GIVEN,
best_attempt: bool | NotGiven = NOT_GIVEN,
cookies: Iterable[scrape_create_params.Cookie] | NotGiven = NOT_GIVEN,
emulate_media_type: str | NotGiven = NOT_GIVEN,
goto_options: scrape_create_params.GotoOptions | NotGiven = NOT_GIVEN,
html: str | NotGiven = NOT_GIVEN,
reject_request_pattern: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
| Omit = omit,
authenticate: scrape_create_params.Authenticate | Omit = omit,
best_attempt: bool | Omit = omit,
cookies: Iterable[scrape_create_params.Cookie] | Omit = omit,
emulate_media_type: str | Omit = omit,
goto_options: scrape_create_params.GotoOptions | Omit = omit,
html: str | Omit = omit,
reject_request_pattern: SequenceNotStr[str] | Omit = omit,
reject_resource_types: List[
Literal[
"document",
@ -302,20 +302,20 @@ class AsyncScrapeResource(AsyncAPIResource):
"other",
]
]
| NotGiven = NOT_GIVEN,
set_extra_http_headers: Dict[str, str] | NotGiven = NOT_GIVEN,
set_java_script_enabled: bool | NotGiven = NOT_GIVEN,
url: str | NotGiven = NOT_GIVEN,
user_agent: str | NotGiven = NOT_GIVEN,
viewport: scrape_create_params.Viewport | NotGiven = NOT_GIVEN,
wait_for_selector: scrape_create_params.WaitForSelector | NotGiven = NOT_GIVEN,
wait_for_timeout: float | NotGiven = NOT_GIVEN,
| Omit = omit,
set_extra_http_headers: Dict[str, str] | Omit = omit,
set_java_script_enabled: bool | Omit = omit,
url: str | Omit = omit,
user_agent: str | Omit = omit,
viewport: scrape_create_params.Viewport | Omit = omit,
wait_for_selector: scrape_create_params.WaitForSelector | Omit = omit,
wait_for_timeout: float | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> ScrapeCreateResponse:
"""
Get meta attributes like height, width, text and others of selected elements.

View file

@ -7,7 +7,7 @@ from typing_extensions import Literal
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -48,11 +48,11 @@ class ScreenshotResource(SyncAPIResource):
self,
*,
account_id: str,
cache_ttl: float | NotGiven = NOT_GIVEN,
action_timeout: float | NotGiven = NOT_GIVEN,
add_script_tag: Iterable[screenshot_create_params.AddScriptTag] | NotGiven = NOT_GIVEN,
add_style_tag: Iterable[screenshot_create_params.AddStyleTag] | NotGiven = NOT_GIVEN,
allow_request_pattern: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
cache_ttl: float | Omit = omit,
action_timeout: float | Omit = omit,
add_script_tag: Iterable[screenshot_create_params.AddScriptTag] | Omit = omit,
add_style_tag: Iterable[screenshot_create_params.AddStyleTag] | Omit = omit,
allow_request_pattern: SequenceNotStr[str] | Omit = omit,
allow_resource_types: List[
Literal[
"document",
@ -75,14 +75,14 @@ class ScreenshotResource(SyncAPIResource):
"other",
]
]
| NotGiven = NOT_GIVEN,
authenticate: screenshot_create_params.Authenticate | NotGiven = NOT_GIVEN,
best_attempt: bool | NotGiven = NOT_GIVEN,
cookies: Iterable[screenshot_create_params.Cookie] | NotGiven = NOT_GIVEN,
emulate_media_type: str | NotGiven = NOT_GIVEN,
goto_options: screenshot_create_params.GotoOptions | NotGiven = NOT_GIVEN,
html: str | NotGiven = NOT_GIVEN,
reject_request_pattern: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
| Omit = omit,
authenticate: screenshot_create_params.Authenticate | Omit = omit,
best_attempt: bool | Omit = omit,
cookies: Iterable[screenshot_create_params.Cookie] | Omit = omit,
emulate_media_type: str | Omit = omit,
goto_options: screenshot_create_params.GotoOptions | Omit = omit,
html: str | Omit = omit,
reject_request_pattern: SequenceNotStr[str] | Omit = omit,
reject_resource_types: List[
Literal[
"document",
@ -105,23 +105,23 @@ class ScreenshotResource(SyncAPIResource):
"other",
]
]
| NotGiven = NOT_GIVEN,
screenshot_options: screenshot_create_params.ScreenshotOptions | NotGiven = NOT_GIVEN,
scroll_page: bool | NotGiven = NOT_GIVEN,
selector: str | NotGiven = NOT_GIVEN,
set_extra_http_headers: Dict[str, str] | NotGiven = NOT_GIVEN,
set_java_script_enabled: bool | NotGiven = NOT_GIVEN,
url: str | NotGiven = NOT_GIVEN,
user_agent: str | NotGiven = NOT_GIVEN,
viewport: screenshot_create_params.Viewport | NotGiven = NOT_GIVEN,
wait_for_selector: screenshot_create_params.WaitForSelector | NotGiven = NOT_GIVEN,
wait_for_timeout: float | NotGiven = NOT_GIVEN,
| Omit = omit,
screenshot_options: screenshot_create_params.ScreenshotOptions | Omit = omit,
scroll_page: bool | Omit = omit,
selector: str | Omit = omit,
set_extra_http_headers: Dict[str, str] | Omit = omit,
set_java_script_enabled: bool | Omit = omit,
url: str | Omit = omit,
user_agent: str | Omit = omit,
viewport: screenshot_create_params.Viewport | Omit = omit,
wait_for_selector: screenshot_create_params.WaitForSelector | Omit = omit,
wait_for_timeout: float | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> ScreenshotCreateResponse:
"""Takes a screenshot of a webpage from provided URL or HTML.
@ -251,11 +251,11 @@ class AsyncScreenshotResource(AsyncAPIResource):
self,
*,
account_id: str,
cache_ttl: float | NotGiven = NOT_GIVEN,
action_timeout: float | NotGiven = NOT_GIVEN,
add_script_tag: Iterable[screenshot_create_params.AddScriptTag] | NotGiven = NOT_GIVEN,
add_style_tag: Iterable[screenshot_create_params.AddStyleTag] | NotGiven = NOT_GIVEN,
allow_request_pattern: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
cache_ttl: float | Omit = omit,
action_timeout: float | Omit = omit,
add_script_tag: Iterable[screenshot_create_params.AddScriptTag] | Omit = omit,
add_style_tag: Iterable[screenshot_create_params.AddStyleTag] | Omit = omit,
allow_request_pattern: SequenceNotStr[str] | Omit = omit,
allow_resource_types: List[
Literal[
"document",
@ -278,14 +278,14 @@ class AsyncScreenshotResource(AsyncAPIResource):
"other",
]
]
| NotGiven = NOT_GIVEN,
authenticate: screenshot_create_params.Authenticate | NotGiven = NOT_GIVEN,
best_attempt: bool | NotGiven = NOT_GIVEN,
cookies: Iterable[screenshot_create_params.Cookie] | NotGiven = NOT_GIVEN,
emulate_media_type: str | NotGiven = NOT_GIVEN,
goto_options: screenshot_create_params.GotoOptions | NotGiven = NOT_GIVEN,
html: str | NotGiven = NOT_GIVEN,
reject_request_pattern: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
| Omit = omit,
authenticate: screenshot_create_params.Authenticate | Omit = omit,
best_attempt: bool | Omit = omit,
cookies: Iterable[screenshot_create_params.Cookie] | Omit = omit,
emulate_media_type: str | Omit = omit,
goto_options: screenshot_create_params.GotoOptions | Omit = omit,
html: str | Omit = omit,
reject_request_pattern: SequenceNotStr[str] | Omit = omit,
reject_resource_types: List[
Literal[
"document",
@ -308,23 +308,23 @@ class AsyncScreenshotResource(AsyncAPIResource):
"other",
]
]
| NotGiven = NOT_GIVEN,
screenshot_options: screenshot_create_params.ScreenshotOptions | NotGiven = NOT_GIVEN,
scroll_page: bool | NotGiven = NOT_GIVEN,
selector: str | NotGiven = NOT_GIVEN,
set_extra_http_headers: Dict[str, str] | NotGiven = NOT_GIVEN,
set_java_script_enabled: bool | NotGiven = NOT_GIVEN,
url: str | NotGiven = NOT_GIVEN,
user_agent: str | NotGiven = NOT_GIVEN,
viewport: screenshot_create_params.Viewport | NotGiven = NOT_GIVEN,
wait_for_selector: screenshot_create_params.WaitForSelector | NotGiven = NOT_GIVEN,
wait_for_timeout: float | NotGiven = NOT_GIVEN,
| Omit = omit,
screenshot_options: screenshot_create_params.ScreenshotOptions | Omit = omit,
scroll_page: bool | Omit = omit,
selector: str | Omit = omit,
set_extra_http_headers: Dict[str, str] | Omit = omit,
set_java_script_enabled: bool | Omit = omit,
url: str | Omit = omit,
user_agent: str | Omit = omit,
viewport: screenshot_create_params.Viewport | Omit = omit,
wait_for_selector: screenshot_create_params.WaitForSelector | Omit = omit,
wait_for_timeout: float | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> ScreenshotCreateResponse:
"""Takes a screenshot of a webpage from provided URL or HTML.

View file

@ -7,7 +7,7 @@ from typing_extensions import Literal
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -49,11 +49,11 @@ class SnapshotResource(SyncAPIResource):
self,
*,
account_id: str,
cache_ttl: float | NotGiven = NOT_GIVEN,
action_timeout: float | NotGiven = NOT_GIVEN,
add_script_tag: Iterable[snapshot_create_params.AddScriptTag] | NotGiven = NOT_GIVEN,
add_style_tag: Iterable[snapshot_create_params.AddStyleTag] | NotGiven = NOT_GIVEN,
allow_request_pattern: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
cache_ttl: float | Omit = omit,
action_timeout: float | Omit = omit,
add_script_tag: Iterable[snapshot_create_params.AddScriptTag] | Omit = omit,
add_style_tag: Iterable[snapshot_create_params.AddStyleTag] | Omit = omit,
allow_request_pattern: SequenceNotStr[str] | Omit = omit,
allow_resource_types: List[
Literal[
"document",
@ -76,14 +76,14 @@ class SnapshotResource(SyncAPIResource):
"other",
]
]
| NotGiven = NOT_GIVEN,
authenticate: snapshot_create_params.Authenticate | NotGiven = NOT_GIVEN,
best_attempt: bool | NotGiven = NOT_GIVEN,
cookies: Iterable[snapshot_create_params.Cookie] | NotGiven = NOT_GIVEN,
emulate_media_type: str | NotGiven = NOT_GIVEN,
goto_options: snapshot_create_params.GotoOptions | NotGiven = NOT_GIVEN,
html: str | NotGiven = NOT_GIVEN,
reject_request_pattern: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
| Omit = omit,
authenticate: snapshot_create_params.Authenticate | Omit = omit,
best_attempt: bool | Omit = omit,
cookies: Iterable[snapshot_create_params.Cookie] | Omit = omit,
emulate_media_type: str | Omit = omit,
goto_options: snapshot_create_params.GotoOptions | Omit = omit,
html: str | Omit = omit,
reject_request_pattern: SequenceNotStr[str] | Omit = omit,
reject_resource_types: List[
Literal[
"document",
@ -106,21 +106,21 @@ class SnapshotResource(SyncAPIResource):
"other",
]
]
| NotGiven = NOT_GIVEN,
screenshot_options: snapshot_create_params.ScreenshotOptions | NotGiven = NOT_GIVEN,
set_extra_http_headers: Dict[str, str] | NotGiven = NOT_GIVEN,
set_java_script_enabled: bool | NotGiven = NOT_GIVEN,
url: str | NotGiven = NOT_GIVEN,
user_agent: str | NotGiven = NOT_GIVEN,
viewport: snapshot_create_params.Viewport | NotGiven = NOT_GIVEN,
wait_for_selector: snapshot_create_params.WaitForSelector | NotGiven = NOT_GIVEN,
wait_for_timeout: float | NotGiven = NOT_GIVEN,
| Omit = omit,
screenshot_options: snapshot_create_params.ScreenshotOptions | Omit = omit,
set_extra_http_headers: Dict[str, str] | Omit = omit,
set_java_script_enabled: bool | Omit = omit,
url: str | Omit = omit,
user_agent: str | Omit = omit,
viewport: snapshot_create_params.Viewport | Omit = omit,
wait_for_selector: snapshot_create_params.WaitForSelector | Omit = omit,
wait_for_timeout: float | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[SnapshotCreateResponse]:
"""Returns the page's HTML content and screenshot.
@ -247,11 +247,11 @@ class AsyncSnapshotResource(AsyncAPIResource):
self,
*,
account_id: str,
cache_ttl: float | NotGiven = NOT_GIVEN,
action_timeout: float | NotGiven = NOT_GIVEN,
add_script_tag: Iterable[snapshot_create_params.AddScriptTag] | NotGiven = NOT_GIVEN,
add_style_tag: Iterable[snapshot_create_params.AddStyleTag] | NotGiven = NOT_GIVEN,
allow_request_pattern: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
cache_ttl: float | Omit = omit,
action_timeout: float | Omit = omit,
add_script_tag: Iterable[snapshot_create_params.AddScriptTag] | Omit = omit,
add_style_tag: Iterable[snapshot_create_params.AddStyleTag] | Omit = omit,
allow_request_pattern: SequenceNotStr[str] | Omit = omit,
allow_resource_types: List[
Literal[
"document",
@ -274,14 +274,14 @@ class AsyncSnapshotResource(AsyncAPIResource):
"other",
]
]
| NotGiven = NOT_GIVEN,
authenticate: snapshot_create_params.Authenticate | NotGiven = NOT_GIVEN,
best_attempt: bool | NotGiven = NOT_GIVEN,
cookies: Iterable[snapshot_create_params.Cookie] | NotGiven = NOT_GIVEN,
emulate_media_type: str | NotGiven = NOT_GIVEN,
goto_options: snapshot_create_params.GotoOptions | NotGiven = NOT_GIVEN,
html: str | NotGiven = NOT_GIVEN,
reject_request_pattern: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
| Omit = omit,
authenticate: snapshot_create_params.Authenticate | Omit = omit,
best_attempt: bool | Omit = omit,
cookies: Iterable[snapshot_create_params.Cookie] | Omit = omit,
emulate_media_type: str | Omit = omit,
goto_options: snapshot_create_params.GotoOptions | Omit = omit,
html: str | Omit = omit,
reject_request_pattern: SequenceNotStr[str] | Omit = omit,
reject_resource_types: List[
Literal[
"document",
@ -304,21 +304,21 @@ class AsyncSnapshotResource(AsyncAPIResource):
"other",
]
]
| NotGiven = NOT_GIVEN,
screenshot_options: snapshot_create_params.ScreenshotOptions | NotGiven = NOT_GIVEN,
set_extra_http_headers: Dict[str, str] | NotGiven = NOT_GIVEN,
set_java_script_enabled: bool | NotGiven = NOT_GIVEN,
url: str | NotGiven = NOT_GIVEN,
user_agent: str | NotGiven = NOT_GIVEN,
viewport: snapshot_create_params.Viewport | NotGiven = NOT_GIVEN,
wait_for_selector: snapshot_create_params.WaitForSelector | NotGiven = NOT_GIVEN,
wait_for_timeout: float | NotGiven = NOT_GIVEN,
| Omit = omit,
screenshot_options: snapshot_create_params.ScreenshotOptions | Omit = omit,
set_extra_http_headers: Dict[str, str] | Omit = omit,
set_java_script_enabled: bool | Omit = omit,
url: str | Omit = omit,
user_agent: str | Omit = omit,
viewport: snapshot_create_params.Viewport | Omit = omit,
wait_for_selector: snapshot_create_params.WaitForSelector | Omit = omit,
wait_for_timeout: float | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[SnapshotCreateResponse]:
"""Returns the page's HTML content and screenshot.

View file

@ -7,7 +7,7 @@ from typing_extensions import overload
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ..._utils import required_args, maybe_transform, async_maybe_transform
from .variants import (
VariantsResource,
@ -98,13 +98,13 @@ class CacheResource(SyncAPIResource):
self,
*,
zone_id: str,
tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
tags: SequenceNotStr[str] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[CachePurgeResponse]:
"""### Purge All Cached Content
@ -200,13 +200,13 @@ class CacheResource(SyncAPIResource):
self,
*,
zone_id: str,
hosts: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
hosts: SequenceNotStr[str] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[CachePurgeResponse]:
"""### Purge All Cached Content
@ -302,13 +302,13 @@ class CacheResource(SyncAPIResource):
self,
*,
zone_id: str,
prefixes: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
prefixes: SequenceNotStr[str] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[CachePurgeResponse]:
"""### Purge All Cached Content
@ -404,13 +404,13 @@ class CacheResource(SyncAPIResource):
self,
*,
zone_id: str,
purge_everything: bool | NotGiven = NOT_GIVEN,
purge_everything: bool | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[CachePurgeResponse]:
"""### Purge All Cached Content
@ -506,13 +506,13 @@ class CacheResource(SyncAPIResource):
self,
*,
zone_id: str,
files: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
files: SequenceNotStr[str] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[CachePurgeResponse]:
"""### Purge All Cached Content
@ -608,13 +608,13 @@ class CacheResource(SyncAPIResource):
self,
*,
zone_id: str,
files: Iterable[cache_purge_params.CachePurgeSingleFileWithURLAndHeadersFile] | NotGiven = NOT_GIVEN,
files: Iterable[cache_purge_params.CachePurgeSingleFileWithURLAndHeadersFile] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[CachePurgeResponse]:
"""### Purge All Cached Content
@ -710,19 +710,19 @@ class CacheResource(SyncAPIResource):
self,
*,
zone_id: str,
tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
hosts: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
prefixes: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
purge_everything: bool | NotGiven = NOT_GIVEN,
tags: SequenceNotStr[str] | Omit = omit,
hosts: SequenceNotStr[str] | Omit = omit,
prefixes: SequenceNotStr[str] | Omit = omit,
purge_everything: bool | Omit = omit,
files: SequenceNotStr[str]
| Iterable[cache_purge_params.CachePurgeSingleFileWithURLAndHeadersFile]
| NotGiven = NOT_GIVEN,
| Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[CachePurgeResponse]:
if not zone_id:
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
@ -790,13 +790,13 @@ class AsyncCacheResource(AsyncAPIResource):
self,
*,
zone_id: str,
tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
tags: SequenceNotStr[str] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[CachePurgeResponse]:
"""### Purge All Cached Content
@ -892,13 +892,13 @@ class AsyncCacheResource(AsyncAPIResource):
self,
*,
zone_id: str,
hosts: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
hosts: SequenceNotStr[str] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[CachePurgeResponse]:
"""### Purge All Cached Content
@ -994,13 +994,13 @@ class AsyncCacheResource(AsyncAPIResource):
self,
*,
zone_id: str,
prefixes: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
prefixes: SequenceNotStr[str] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[CachePurgeResponse]:
"""### Purge All Cached Content
@ -1096,13 +1096,13 @@ class AsyncCacheResource(AsyncAPIResource):
self,
*,
zone_id: str,
purge_everything: bool | NotGiven = NOT_GIVEN,
purge_everything: bool | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[CachePurgeResponse]:
"""### Purge All Cached Content
@ -1198,13 +1198,13 @@ class AsyncCacheResource(AsyncAPIResource):
self,
*,
zone_id: str,
files: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
files: SequenceNotStr[str] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[CachePurgeResponse]:
"""### Purge All Cached Content
@ -1300,13 +1300,13 @@ class AsyncCacheResource(AsyncAPIResource):
self,
*,
zone_id: str,
files: Iterable[cache_purge_params.CachePurgeSingleFileWithURLAndHeadersFile] | NotGiven = NOT_GIVEN,
files: Iterable[cache_purge_params.CachePurgeSingleFileWithURLAndHeadersFile] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[CachePurgeResponse]:
"""### Purge All Cached Content
@ -1402,19 +1402,19 @@ class AsyncCacheResource(AsyncAPIResource):
self,
*,
zone_id: str,
tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
hosts: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
prefixes: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
purge_everything: bool | NotGiven = NOT_GIVEN,
tags: SequenceNotStr[str] | Omit = omit,
hosts: SequenceNotStr[str] | Omit = omit,
prefixes: SequenceNotStr[str] | Omit = omit,
purge_everything: bool | Omit = omit,
files: SequenceNotStr[str]
| Iterable[cache_purge_params.CachePurgeSingleFileWithURLAndHeadersFile]
| NotGiven = NOT_GIVEN,
| Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[CachePurgeResponse]:
if not zone_id:
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")

View file

@ -7,7 +7,7 @@ from typing_extensions import Literal
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._types import Body, Query, Headers, NotGiven, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -58,7 +58,7 @@ class CacheReserveResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[CacheReserveClearResponse]:
"""
You can use Cache Reserve Clear to clear your Cache Reserve, but you must first
@ -102,7 +102,7 @@ class CacheReserveResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[CacheReserveEditResponse]:
"""
Increase cache lifetimes by automatically storing all cacheable files into
@ -149,7 +149,7 @@ class CacheReserveResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[CacheReserveGetResponse]:
"""
Increase cache lifetimes by automatically storing all cacheable files into
@ -193,7 +193,7 @@ class CacheReserveResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[CacheReserveStatusResponse]:
"""
You can use Cache Reserve Clear to clear your Cache Reserve, but you must first
@ -257,7 +257,7 @@ class AsyncCacheReserveResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[CacheReserveClearResponse]:
"""
You can use Cache Reserve Clear to clear your Cache Reserve, but you must first
@ -301,7 +301,7 @@ class AsyncCacheReserveResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[CacheReserveEditResponse]:
"""
Increase cache lifetimes by automatically storing all cacheable files into
@ -348,7 +348,7 @@ class AsyncCacheReserveResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[CacheReserveGetResponse]:
"""
Increase cache lifetimes by automatically storing all cacheable files into
@ -392,7 +392,7 @@ class AsyncCacheReserveResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[CacheReserveStatusResponse]:
"""
You can use Cache Reserve Clear to clear your Cache Reserve, but you must first

View file

@ -7,7 +7,7 @@ from typing_extensions import Literal
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._types import Body, Query, Headers, NotGiven, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -56,7 +56,7 @@ class RegionalTieredCacheResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[RegionalTieredCacheEditResponse]:
"""
Instructs Cloudflare to check a regional hub data center on the way to your
@ -102,7 +102,7 @@ class RegionalTieredCacheResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[RegionalTieredCacheGetResponse]:
"""
Instructs Cloudflare to check a regional hub data center on the way to your
@ -165,7 +165,7 @@ class AsyncRegionalTieredCacheResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[RegionalTieredCacheEditResponse]:
"""
Instructs Cloudflare to check a regional hub data center on the way to your
@ -213,7 +213,7 @@ class AsyncRegionalTieredCacheResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[RegionalTieredCacheGetResponse]:
"""
Instructs Cloudflare to check a regional hub data center on the way to your

View file

@ -7,7 +7,7 @@ from typing_extensions import Literal
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._types import Body, Query, Headers, NotGiven, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -56,7 +56,7 @@ class SmartTieredCacheResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[SmartTieredCacheDeleteResponse]:
"""
Smart Tiered Cache dynamically selects the single closest upper tier for each of
@ -101,7 +101,7 @@ class SmartTieredCacheResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[SmartTieredCacheEditResponse]:
"""
Smart Tiered Cache dynamically selects the single closest upper tier for each of
@ -148,7 +148,7 @@ class SmartTieredCacheResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[SmartTieredCacheGetResponse]:
"""
Smart Tiered Cache dynamically selects the single closest upper tier for each of
@ -213,7 +213,7 @@ class AsyncSmartTieredCacheResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[SmartTieredCacheDeleteResponse]:
"""
Smart Tiered Cache dynamically selects the single closest upper tier for each of
@ -258,7 +258,7 @@ class AsyncSmartTieredCacheResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[SmartTieredCacheEditResponse]:
"""
Smart Tiered Cache dynamically selects the single closest upper tier for each of
@ -307,7 +307,7 @@ class AsyncSmartTieredCacheResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[SmartTieredCacheGetResponse]:
"""
Smart Tiered Cache dynamically selects the single closest upper tier for each of

View file

@ -6,7 +6,7 @@ from typing import Type, Optional, cast
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._types import Body, Query, Headers, NotGiven, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -55,7 +55,7 @@ class VariantsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[VariantDeleteResponse]:
"""
Variant support enables caching variants of images with certain file extensions
@ -99,7 +99,7 @@ class VariantsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[VariantEditResponse]:
"""
Variant support enables caching variants of images with certain file extensions
@ -145,7 +145,7 @@ class VariantsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[VariantGetResponse]:
"""
Variant support enables caching variants of images with certain file extensions
@ -209,7 +209,7 @@ class AsyncVariantsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[VariantDeleteResponse]:
"""
Variant support enables caching variants of images with certain file extensions
@ -253,7 +253,7 @@ class AsyncVariantsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[VariantEditResponse]:
"""
Variant support enables caching variants of images with certain file extensions
@ -299,7 +299,7 @@ class AsyncVariantsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[VariantGetResponse]:
"""
Variant support enables caching variants of images with certain file extensions

View file

@ -6,7 +6,7 @@ from typing import Type, Optional, cast
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -53,13 +53,13 @@ class SFUResource(SyncAPIResource):
self,
*,
account_id: str,
name: str | NotGiven = NOT_GIVEN,
name: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[SFUCreateResponse]:
"""Creates a new Cloudflare calls app.
@ -99,13 +99,13 @@ class SFUResource(SyncAPIResource):
app_id: str,
*,
account_id: str,
name: str | NotGiven = NOT_GIVEN,
name: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[SFUUpdateResponse]:
"""
Edit details for a single app.
@ -151,7 +151,7 @@ class SFUResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncSinglePage[SFUListResponse]:
"""
Lists all apps in the Cloudflare account
@ -188,7 +188,7 @@ class SFUResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[SFUDeleteResponse]:
"""
Deletes an app from Cloudflare Calls
@ -232,7 +232,7 @@ class SFUResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[SFUGetResponse]:
"""
Fetches details for a single Calls app.
@ -291,13 +291,13 @@ class AsyncSFUResource(AsyncAPIResource):
self,
*,
account_id: str,
name: str | NotGiven = NOT_GIVEN,
name: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[SFUCreateResponse]:
"""Creates a new Cloudflare calls app.
@ -337,13 +337,13 @@ class AsyncSFUResource(AsyncAPIResource):
app_id: str,
*,
account_id: str,
name: str | NotGiven = NOT_GIVEN,
name: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[SFUUpdateResponse]:
"""
Edit details for a single app.
@ -389,7 +389,7 @@ class AsyncSFUResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[SFUListResponse, AsyncSinglePage[SFUListResponse]]:
"""
Lists all apps in the Cloudflare account
@ -426,7 +426,7 @@ class AsyncSFUResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[SFUDeleteResponse]:
"""
Deletes an app from Cloudflare Calls
@ -470,7 +470,7 @@ class AsyncSFUResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[SFUGetResponse]:
"""
Fetches details for a single Calls app.

View file

@ -6,7 +6,7 @@ from typing import Type, Optional, cast
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -53,13 +53,13 @@ class TURNResource(SyncAPIResource):
self,
*,
account_id: str,
name: str | NotGiven = NOT_GIVEN,
name: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[TURNCreateResponse]:
"""
Creates a new Cloudflare Calls TURN key.
@ -97,13 +97,13 @@ class TURNResource(SyncAPIResource):
key_id: str,
*,
account_id: str,
name: str | NotGiven = NOT_GIVEN,
name: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[TURNUpdateResponse]:
"""
Edit details for a single TURN key.
@ -149,7 +149,7 @@ class TURNResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncSinglePage[TURNListResponse]:
"""
Lists all TURN keys in the Cloudflare account
@ -186,7 +186,7 @@ class TURNResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[TURNDeleteResponse]:
"""
Deletes a TURN key from Cloudflare Calls
@ -230,7 +230,7 @@ class TURNResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[TURNGetResponse]:
"""
Fetches details for a single TURN key.
@ -289,13 +289,13 @@ class AsyncTURNResource(AsyncAPIResource):
self,
*,
account_id: str,
name: str | NotGiven = NOT_GIVEN,
name: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[TURNCreateResponse]:
"""
Creates a new Cloudflare Calls TURN key.
@ -333,13 +333,13 @@ class AsyncTURNResource(AsyncAPIResource):
key_id: str,
*,
account_id: str,
name: str | NotGiven = NOT_GIVEN,
name: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[TURNUpdateResponse]:
"""
Edit details for a single TURN key.
@ -385,7 +385,7 @@ class AsyncTURNResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[TURNListResponse, AsyncSinglePage[TURNListResponse]]:
"""
Lists all TURN keys in the Cloudflare account
@ -422,7 +422,7 @@ class AsyncTURNResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[TURNDeleteResponse]:
"""
Deletes a TURN key from Cloudflare Calls
@ -466,7 +466,7 @@ class AsyncTURNResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[TURNGetResponse]:
"""
Fetches details for a single TURN key.

View file

@ -6,7 +6,7 @@ from typing import Type, Optional, cast
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -50,14 +50,14 @@ class HostnameAssociationsResource(SyncAPIResource):
self,
*,
zone_id: str,
hostnames: SequenceNotStr[HostnameAssociation] | NotGiven = NOT_GIVEN,
mtls_certificate_id: str | NotGiven = NOT_GIVEN,
hostnames: SequenceNotStr[HostnameAssociation] | Omit = omit,
mtls_certificate_id: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[HostnameAssociationUpdateResponse]:
"""
Replace Hostname Associations
@ -104,13 +104,13 @@ class HostnameAssociationsResource(SyncAPIResource):
self,
*,
zone_id: str,
mtls_certificate_id: str | NotGiven = NOT_GIVEN,
mtls_certificate_id: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[HostnameAssociationGetResponse]:
"""
List Hostname Associations
@ -173,14 +173,14 @@ class AsyncHostnameAssociationsResource(AsyncAPIResource):
self,
*,
zone_id: str,
hostnames: SequenceNotStr[HostnameAssociation] | NotGiven = NOT_GIVEN,
mtls_certificate_id: str | NotGiven = NOT_GIVEN,
hostnames: SequenceNotStr[HostnameAssociation] | Omit = omit,
mtls_certificate_id: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[HostnameAssociationUpdateResponse]:
"""
Replace Hostname Associations
@ -227,13 +227,13 @@ class AsyncHostnameAssociationsResource(AsyncAPIResource):
self,
*,
zone_id: str,
mtls_certificate_id: str | NotGiven = NOT_GIVEN,
mtls_certificate_id: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[HostnameAssociationGetResponse]:
"""
List Hostname Associations

View file

@ -7,7 +7,7 @@ from typing_extensions import Literal
import httpx
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from .._utils import maybe_transform, async_maybe_transform
from .._compat import cached_property
from .._resource import SyncAPIResource, AsyncAPIResource
@ -57,7 +57,7 @@ class ClientCertificatesResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[ClientCertificate]:
"""
Create a new API Shield mTLS Client Certificate
@ -102,18 +102,17 @@ class ClientCertificatesResource(SyncAPIResource):
self,
*,
zone_id: str,
limit: int | NotGiven = NOT_GIVEN,
offset: int | NotGiven = NOT_GIVEN,
page: float | NotGiven = NOT_GIVEN,
per_page: float | NotGiven = NOT_GIVEN,
status: Literal["all", "active", "pending_reactivation", "pending_revocation", "revoked"]
| NotGiven = NOT_GIVEN,
limit: int | Omit = omit,
offset: int | Omit = omit,
page: float | Omit = omit,
per_page: float | Omit = omit,
status: Literal["all", "active", "pending_reactivation", "pending_revocation", "revoked"] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncV4PagePaginationArray[ClientCertificate]:
"""
List all of your Zone's API Shield mTLS Client Certificates by Status and/or
@ -174,7 +173,7 @@ class ClientCertificatesResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[ClientCertificate]:
"""
Set a API Shield mTLS Client Certificate to pending_revocation status for
@ -221,7 +220,7 @@ class ClientCertificatesResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[ClientCertificate]:
"""
If a API Shield mTLS Client Certificate is in a pending_revocation state, you
@ -268,7 +267,7 @@ class ClientCertificatesResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[ClientCertificate]:
"""
Get Details for a single mTLS API Shield Client Certificate
@ -336,7 +335,7 @@ class AsyncClientCertificatesResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[ClientCertificate]:
"""
Create a new API Shield mTLS Client Certificate
@ -381,18 +380,17 @@ class AsyncClientCertificatesResource(AsyncAPIResource):
self,
*,
zone_id: str,
limit: int | NotGiven = NOT_GIVEN,
offset: int | NotGiven = NOT_GIVEN,
page: float | NotGiven = NOT_GIVEN,
per_page: float | NotGiven = NOT_GIVEN,
status: Literal["all", "active", "pending_reactivation", "pending_revocation", "revoked"]
| NotGiven = NOT_GIVEN,
limit: int | Omit = omit,
offset: int | Omit = omit,
page: float | Omit = omit,
per_page: float | Omit = omit,
status: Literal["all", "active", "pending_reactivation", "pending_revocation", "revoked"] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[ClientCertificate, AsyncV4PagePaginationArray[ClientCertificate]]:
"""
List all of your Zone's API Shield mTLS Client Certificates by Status and/or
@ -453,7 +451,7 @@ class AsyncClientCertificatesResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[ClientCertificate]:
"""
Set a API Shield mTLS Client Certificate to pending_revocation status for
@ -500,7 +498,7 @@ class AsyncClientCertificatesResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[ClientCertificate]:
"""
If a API Shield mTLS Client Certificate is in a pending_revocation state, you
@ -547,7 +545,7 @@ class AsyncClientCertificatesResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[ClientCertificate]:
"""
Get Details for a single mTLS API Shield Client Certificate

View file

@ -6,7 +6,7 @@ from typing import Iterable
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ..._utils import maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -49,13 +49,13 @@ class RulesResource(SyncAPIResource):
self,
*,
zone_id: str,
rules: Iterable[rule_update_params.Rule] | NotGiven = NOT_GIVEN,
rules: Iterable[rule_update_params.Rule] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncSinglePage[RuleUpdateResponse]:
"""
Put Rules
@ -93,7 +93,7 @@ class RulesResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncSinglePage[RuleListResponse]:
"""
Rules
@ -145,13 +145,13 @@ class AsyncRulesResource(AsyncAPIResource):
self,
*,
zone_id: str,
rules: Iterable[rule_update_params.Rule] | NotGiven = NOT_GIVEN,
rules: Iterable[rule_update_params.Rule] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[RuleUpdateResponse, AsyncSinglePage[RuleUpdateResponse]]:
"""
Put Rules
@ -189,7 +189,7 @@ class AsyncRulesResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[RuleListResponse, AsyncSinglePage[RuleListResponse]]:
"""
Rules

View file

@ -6,7 +6,7 @@ from typing import Mapping, cast
import httpx
from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven, FileTypes
from ..._types import Body, Query, Headers, NoneType, NotGiven, FileTypes, not_given
from ..._utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@ -53,7 +53,7 @@ class BinaryStorageResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BinaryStorageCreateResponse:
"""
Posts a file to Binary Storage
@ -99,7 +99,7 @@ class BinaryStorageResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> None:
"""
Retrieves a file from Binary Storage
@ -161,7 +161,7 @@ class AsyncBinaryStorageResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BinaryStorageCreateResponse:
"""
Posts a file to Binary Storage
@ -207,7 +207,7 @@ class AsyncBinaryStorageResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> None:
"""
Retrieves a file from Binary Storage

View file

@ -6,7 +6,7 @@ from typing import Type, Optional, cast
import httpx
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@ -60,7 +60,7 @@ class AssetsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncSinglePage[AssetCreateResponse]:
"""
List Request Assets
@ -109,13 +109,13 @@ class AssetsResource(SyncAPIResource):
*,
account_id: str,
request_id: str,
source: str | NotGiven = NOT_GIVEN,
source: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AssetUpdateResponse]:
"""
Update a Request Asset
@ -167,7 +167,7 @@ class AssetsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AssetDeleteResponse:
"""
Delete a Request Asset
@ -212,7 +212,7 @@ class AssetsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncSinglePage[AssetGetResponse]:
"""
Get a Request Asset
@ -280,7 +280,7 @@ class AsyncAssetsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[AssetCreateResponse, AsyncSinglePage[AssetCreateResponse]]:
"""
List Request Assets
@ -329,13 +329,13 @@ class AsyncAssetsResource(AsyncAPIResource):
*,
account_id: str,
request_id: str,
source: str | NotGiven = NOT_GIVEN,
source: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[AssetUpdateResponse]:
"""
Update a Request Asset
@ -387,7 +387,7 @@ class AsyncAssetsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AssetDeleteResponse:
"""
Delete a Request Asset
@ -432,7 +432,7 @@ class AsyncAssetsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[AssetGetResponse, AsyncSinglePage[AssetGetResponse]]:
"""
Get a Request Asset

View file

@ -8,7 +8,7 @@ from typing_extensions import Literal
import httpx
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@ -53,13 +53,13 @@ class MessageResource(SyncAPIResource):
request_id: str,
*,
account_id: str,
content: str | NotGiven = NOT_GIVEN,
content: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Message]:
"""
Create a New Request Message
@ -102,13 +102,13 @@ class MessageResource(SyncAPIResource):
*,
account_id: str,
request_id: str,
content: str | NotGiven = NOT_GIVEN,
content: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Message]:
"""
Update a Request Message
@ -156,7 +156,7 @@ class MessageResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> MessageDeleteResponse:
"""
Delete a Request Message
@ -193,16 +193,16 @@ class MessageResource(SyncAPIResource):
account_id: str,
page: int,
per_page: int,
after: Union[str, datetime] | NotGiven = NOT_GIVEN,
before: Union[str, datetime] | NotGiven = NOT_GIVEN,
sort_by: str | NotGiven = NOT_GIVEN,
sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
after: Union[str, datetime] | Omit = omit,
before: Union[str, datetime] | Omit = omit,
sort_by: str | Omit = omit,
sort_order: Literal["asc", "desc"] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncSinglePage[Message]:
"""
List Request Messages
@ -283,13 +283,13 @@ class AsyncMessageResource(AsyncAPIResource):
request_id: str,
*,
account_id: str,
content: str | NotGiven = NOT_GIVEN,
content: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Message]:
"""
Create a New Request Message
@ -332,13 +332,13 @@ class AsyncMessageResource(AsyncAPIResource):
*,
account_id: str,
request_id: str,
content: str | NotGiven = NOT_GIVEN,
content: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Message]:
"""
Update a Request Message
@ -386,7 +386,7 @@ class AsyncMessageResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> MessageDeleteResponse:
"""
Delete a Request Message
@ -423,16 +423,16 @@ class AsyncMessageResource(AsyncAPIResource):
account_id: str,
page: int,
per_page: int,
after: Union[str, datetime] | NotGiven = NOT_GIVEN,
before: Union[str, datetime] | NotGiven = NOT_GIVEN,
sort_by: str | NotGiven = NOT_GIVEN,
sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
after: Union[str, datetime] | Omit = omit,
before: Union[str, datetime] | Omit = omit,
sort_by: str | Omit = omit,
sort_order: Literal["asc", "desc"] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[Message, AsyncSinglePage[Message]]:
"""
List Request Messages

View file

@ -7,7 +7,7 @@ from typing_extensions import Literal
import httpx
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
from ...._types import Body, Query, Headers, NotGiven, SequenceNotStr, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@ -62,7 +62,7 @@ class PriorityResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Priority]:
"""
Create a New Priority Intelligence Requirement
@ -123,7 +123,7 @@ class PriorityResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Item]:
"""
Update a Priority Intelligence Requirement
@ -184,7 +184,7 @@ class PriorityResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> PriorityDeleteResponse:
"""
Delete a Priority Intelligence Requirement
@ -224,7 +224,7 @@ class PriorityResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Item]:
"""
Get a Priority Intelligence Requirement
@ -267,7 +267,7 @@ class PriorityResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Quota]:
"""
Get Priority Intelligence Requirement Quota
@ -331,7 +331,7 @@ class AsyncPriorityResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Priority]:
"""
Create a New Priority Intelligence Requirement
@ -392,7 +392,7 @@ class AsyncPriorityResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Item]:
"""
Update a Priority Intelligence Requirement
@ -453,7 +453,7 @@ class AsyncPriorityResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> PriorityDeleteResponse:
"""
Delete a Priority Intelligence Requirement
@ -493,7 +493,7 @@ class AsyncPriorityResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Item]:
"""
Get a Priority Intelligence Requirement
@ -536,7 +536,7 @@ class AsyncPriorityResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Quota]:
"""
Get Priority Intelligence Requirement Quota

View file

@ -32,7 +32,7 @@ from .priority import (
PriorityResourceWithStreamingResponse,
AsyncPriorityResourceWithStreamingResponse,
)
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@ -92,17 +92,17 @@ class RequestsResource(SyncAPIResource):
self,
*,
account_id: str,
content: str | NotGiven = NOT_GIVEN,
priority: str | NotGiven = NOT_GIVEN,
request_type: str | NotGiven = NOT_GIVEN,
summary: str | NotGiven = NOT_GIVEN,
tlp: Literal["clear", "amber", "amber-strict", "green", "red"] | NotGiven = NOT_GIVEN,
content: str | Omit = omit,
priority: str | Omit = omit,
request_type: str | Omit = omit,
summary: str | Omit = omit,
tlp: Literal["clear", "amber", "amber-strict", "green", "red"] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Item]:
"""
Creating a request adds the request into the Cloudforce One queue for analysis.
@ -159,17 +159,17 @@ class RequestsResource(SyncAPIResource):
request_id: str,
*,
account_id: str,
content: str | NotGiven = NOT_GIVEN,
priority: str | NotGiven = NOT_GIVEN,
request_type: str | NotGiven = NOT_GIVEN,
summary: str | NotGiven = NOT_GIVEN,
tlp: Literal["clear", "amber", "amber-strict", "green", "red"] | NotGiven = NOT_GIVEN,
content: str | Omit = omit,
priority: str | Omit = omit,
request_type: str | Omit = omit,
summary: str | Omit = omit,
tlp: Literal["clear", "amber", "amber-strict", "green", "red"] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Item]:
"""Updating a request alters the request in the Cloudforce One queue.
@ -232,20 +232,20 @@ class RequestsResource(SyncAPIResource):
account_id: str,
page: int,
per_page: int,
completed_after: Union[str, datetime] | NotGiven = NOT_GIVEN,
completed_before: Union[str, datetime] | NotGiven = NOT_GIVEN,
created_after: Union[str, datetime] | NotGiven = NOT_GIVEN,
created_before: Union[str, datetime] | NotGiven = NOT_GIVEN,
request_type: str | NotGiven = NOT_GIVEN,
sort_by: str | NotGiven = NOT_GIVEN,
sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
status: Literal["open", "accepted", "reported", "approved", "completed", "declined"] | NotGiven = NOT_GIVEN,
completed_after: Union[str, datetime] | Omit = omit,
completed_before: Union[str, datetime] | Omit = omit,
created_after: Union[str, datetime] | Omit = omit,
created_before: Union[str, datetime] | Omit = omit,
request_type: str | Omit = omit,
sort_by: str | Omit = omit,
sort_order: Literal["asc", "desc"] | Omit = omit,
status: Literal["open", "accepted", "reported", "approved", "completed", "declined"] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncSinglePage[ListItem]:
"""
List Requests
@ -318,7 +318,7 @@ class RequestsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> RequestDeleteResponse:
"""
Delete a Request
@ -357,7 +357,7 @@ class RequestsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[RequestConstants]:
"""
Get Request Priority, Status, and TLP constants
@ -397,7 +397,7 @@ class RequestsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Item]:
"""
Get a Request
@ -440,7 +440,7 @@ class RequestsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Quota]:
"""
Get Request Quota
@ -479,7 +479,7 @@ class RequestsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncSinglePage[RequestTypesResponse]:
"""
Get Request Types
@ -543,17 +543,17 @@ class AsyncRequestsResource(AsyncAPIResource):
self,
*,
account_id: str,
content: str | NotGiven = NOT_GIVEN,
priority: str | NotGiven = NOT_GIVEN,
request_type: str | NotGiven = NOT_GIVEN,
summary: str | NotGiven = NOT_GIVEN,
tlp: Literal["clear", "amber", "amber-strict", "green", "red"] | NotGiven = NOT_GIVEN,
content: str | Omit = omit,
priority: str | Omit = omit,
request_type: str | Omit = omit,
summary: str | Omit = omit,
tlp: Literal["clear", "amber", "amber-strict", "green", "red"] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Item]:
"""
Creating a request adds the request into the Cloudforce One queue for analysis.
@ -610,17 +610,17 @@ class AsyncRequestsResource(AsyncAPIResource):
request_id: str,
*,
account_id: str,
content: str | NotGiven = NOT_GIVEN,
priority: str | NotGiven = NOT_GIVEN,
request_type: str | NotGiven = NOT_GIVEN,
summary: str | NotGiven = NOT_GIVEN,
tlp: Literal["clear", "amber", "amber-strict", "green", "red"] | NotGiven = NOT_GIVEN,
content: str | Omit = omit,
priority: str | Omit = omit,
request_type: str | Omit = omit,
summary: str | Omit = omit,
tlp: Literal["clear", "amber", "amber-strict", "green", "red"] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Item]:
"""Updating a request alters the request in the Cloudforce One queue.
@ -683,20 +683,20 @@ class AsyncRequestsResource(AsyncAPIResource):
account_id: str,
page: int,
per_page: int,
completed_after: Union[str, datetime] | NotGiven = NOT_GIVEN,
completed_before: Union[str, datetime] | NotGiven = NOT_GIVEN,
created_after: Union[str, datetime] | NotGiven = NOT_GIVEN,
created_before: Union[str, datetime] | NotGiven = NOT_GIVEN,
request_type: str | NotGiven = NOT_GIVEN,
sort_by: str | NotGiven = NOT_GIVEN,
sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
status: Literal["open", "accepted", "reported", "approved", "completed", "declined"] | NotGiven = NOT_GIVEN,
completed_after: Union[str, datetime] | Omit = omit,
completed_before: Union[str, datetime] | Omit = omit,
created_after: Union[str, datetime] | Omit = omit,
created_before: Union[str, datetime] | Omit = omit,
request_type: str | Omit = omit,
sort_by: str | Omit = omit,
sort_order: Literal["asc", "desc"] | Omit = omit,
status: Literal["open", "accepted", "reported", "approved", "completed", "declined"] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[ListItem, AsyncSinglePage[ListItem]]:
"""
List Requests
@ -769,7 +769,7 @@ class AsyncRequestsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> RequestDeleteResponse:
"""
Delete a Request
@ -808,7 +808,7 @@ class AsyncRequestsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[RequestConstants]:
"""
Get Request Priority, Status, and TLP constants
@ -848,7 +848,7 @@ class AsyncRequestsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Item]:
"""
Get a Request
@ -891,7 +891,7 @@ class AsyncRequestsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[Quota]:
"""
Get Request Quota
@ -930,7 +930,7 @@ class AsyncRequestsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[RequestTypesResponse, AsyncSinglePage[RequestTypesResponse]]:
"""
Get Request Types

View file

@ -6,7 +6,7 @@ from typing import Type, Optional, cast
import httpx
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
from ...._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@ -52,14 +52,14 @@ class ConfigResource(SyncAPIResource):
*,
account_id: str,
ips: SequenceNotStr[str],
frequency: float | NotGiven = NOT_GIVEN,
ports: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
frequency: float | Omit = omit,
ports: SequenceNotStr[str] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[ConfigCreateResponse]:
"""
Create a new Scan Config
@ -115,7 +115,7 @@ class ConfigResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncSinglePage[ConfigListResponse]:
"""
List Scan Configs
@ -152,7 +152,7 @@ class ConfigResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> object:
"""
Delete a Scan Config
@ -191,15 +191,15 @@ class ConfigResource(SyncAPIResource):
config_id: str,
*,
account_id: str,
frequency: float | NotGiven = NOT_GIVEN,
ips: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
ports: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
frequency: float | Omit = omit,
ips: SequenceNotStr[str] | Omit = omit,
ports: SequenceNotStr[str] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[ConfigEditResponse]:
"""
Update an existing Scan Config
@ -276,14 +276,14 @@ class AsyncConfigResource(AsyncAPIResource):
*,
account_id: str,
ips: SequenceNotStr[str],
frequency: float | NotGiven = NOT_GIVEN,
ports: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
frequency: float | Omit = omit,
ports: SequenceNotStr[str] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[ConfigCreateResponse]:
"""
Create a new Scan Config
@ -339,7 +339,7 @@ class AsyncConfigResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[ConfigListResponse, AsyncSinglePage[ConfigListResponse]]:
"""
List Scan Configs
@ -376,7 +376,7 @@ class AsyncConfigResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> object:
"""
Delete a Scan Config
@ -415,15 +415,15 @@ class AsyncConfigResource(AsyncAPIResource):
config_id: str,
*,
account_id: str,
frequency: float | NotGiven = NOT_GIVEN,
ips: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
ports: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
frequency: float | Omit = omit,
ips: SequenceNotStr[str] | Omit = omit,
ports: SequenceNotStr[str] | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Optional[ConfigEditResponse]:
"""
Update an existing Scan Config

View file

@ -6,7 +6,7 @@ from typing import Type, cast
import httpx
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._types import Body, Query, Headers, NotGiven, not_given
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
from ...._response import (
@ -52,7 +52,7 @@ class ResultsResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> ResultGetResponse:
"""
Get the Latest Scan Result
@ -117,7 +117,7 @@ class AsyncResultsResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> ResultGetResponse:
"""
Get the Latest Scan Result

View file

@ -4,7 +4,7 @@ from __future__ import annotations
import httpx
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._types import Body, Query, Headers, NotGiven, not_given
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
from ...._response import (
@ -48,7 +48,7 @@ class AttackersResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AttackerListResponse:
"""
Lists attackers
@ -104,7 +104,7 @@ class AsyncAttackersResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AttackerListResponse:
"""
Lists attackers

View file

@ -4,7 +4,7 @@ from __future__ import annotations
import httpx
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
from ...._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@ -51,14 +51,14 @@ class CategoriesResource(SyncAPIResource):
account_id: str,
kill_chain: float,
name: str,
mitre_attack: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
shortname: str | NotGiven = NOT_GIVEN,
mitre_attack: SequenceNotStr[str] | Omit = omit,
shortname: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> CategoryCreateResponse:
"""
Creates a new category
@ -102,7 +102,7 @@ class CategoriesResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> CategoryListResponse:
"""
Lists categories
@ -138,7 +138,7 @@ class CategoriesResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> CategoryDeleteResponse:
"""
Deletes a category
@ -173,16 +173,16 @@ class CategoriesResource(SyncAPIResource):
category_id: str,
*,
account_id: str,
kill_chain: float | NotGiven = NOT_GIVEN,
mitre_attack: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
shortname: str | NotGiven = NOT_GIVEN,
kill_chain: float | Omit = omit,
mitre_attack: SequenceNotStr[str] | Omit = omit,
name: str | Omit = omit,
shortname: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> CategoryEditResponse:
"""
Updates a category
@ -231,7 +231,7 @@ class CategoriesResource(SyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> CategoryGetResponse:
"""
Reads a category
@ -288,14 +288,14 @@ class AsyncCategoriesResource(AsyncAPIResource):
account_id: str,
kill_chain: float,
name: str,
mitre_attack: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
shortname: str | NotGiven = NOT_GIVEN,
mitre_attack: SequenceNotStr[str] | Omit = omit,
shortname: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> CategoryCreateResponse:
"""
Creates a new category
@ -339,7 +339,7 @@ class AsyncCategoriesResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> CategoryListResponse:
"""
Lists categories
@ -375,7 +375,7 @@ class AsyncCategoriesResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> CategoryDeleteResponse:
"""
Deletes a category
@ -410,16 +410,16 @@ class AsyncCategoriesResource(AsyncAPIResource):
category_id: str,
*,
account_id: str,
kill_chain: float | NotGiven = NOT_GIVEN,
mitre_attack: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
shortname: str | NotGiven = NOT_GIVEN,
kill_chain: float | Omit = omit,
mitre_attack: SequenceNotStr[str] | Omit = omit,
name: str | Omit = omit,
shortname: str | Omit = omit,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> CategoryEditResponse:
"""
Updates a category
@ -468,7 +468,7 @@ class AsyncCategoriesResource(AsyncAPIResource):
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> CategoryGetResponse:
"""
Reads a category

Some files were not shown because too many files have changed in this diff Show more