inttegro.file_link
Models, requests, and enums for the Inttegro file link resource.
The primary returned object is inttegro.file_link.FileLink. Related request types, nested response shapes, and string-backed enums are exported from this singular namespace. Public members load lazily, so importing one resource does not eagerly import the entire SDK.
1"""Models, requests, and enums for the Inttegro file link resource. 2 3The primary returned object is ``inttegro.file_link.FileLink``. Related request types, nested response shapes, and string-backed enums are exported from this singular namespace. Public members load lazily, so importing one resource does not eagerly import the entire SDK.""" 4 5from importlib import import_module 6from typing import TYPE_CHECKING, Any 7 8if TYPE_CHECKING: 9 from .access import Access as Access 10 from .access_request import AccessRequest as AccessRequest 11 from .actor import Actor as Actor 12 from .create_request import CreateRequest as CreateRequest 13 from .creation import Creation as Creation 14 from .delivery import Delivery as Delivery 15 from .delivery_input import DeliveryInput as DeliveryInput 16 from .delivery_mode import DeliveryMode as DeliveryMode 17 from .file_link import FileLink as FileLink 18 from .kind import Kind as Kind 19 from .lookup_request import LookupRequest as LookupRequest 20 from .page import Page as Page 21 from .page_request import PageRequest as PageRequest 22 from .page_response import PageResponse as PageResponse 23 from .response import Response as Response 24 from .revoke_request import RevokeRequest as RevokeRequest 25 from .status import Status as Status 26 27 28_EXPORTS: dict[str, tuple[str, str]] = { 29 "Access": ("inttegro.file_link.access", "Access"), 30 "AccessRequest": ("inttegro.file_link.access_request", "AccessRequest"), 31 "Actor": ("inttegro.file_link.actor", "Actor"), 32 "CreateRequest": ("inttegro.file_link.create_request", "CreateRequest"), 33 "Creation": ("inttegro.file_link.creation", "Creation"), 34 "Delivery": ("inttegro.file_link.delivery", "Delivery"), 35 "DeliveryInput": ("inttegro.file_link.delivery_input", "DeliveryInput"), 36 "DeliveryMode": ("inttegro.file_link.delivery_mode", "DeliveryMode"), 37 "FileLink": ("inttegro.file_link.file_link", "FileLink"), 38 "Kind": ("inttegro.file_link.kind", "Kind"), 39 "LookupRequest": ("inttegro.file_link.lookup_request", "LookupRequest"), 40 "Page": ("inttegro.file_link.page", "Page"), 41 "PageRequest": ("inttegro.file_link.page_request", "PageRequest"), 42 "PageResponse": ("inttegro.file_link.page_response", "PageResponse"), 43 "Response": ("inttegro.file_link.response", "Response"), 44 "RevokeRequest": ("inttegro.file_link.revoke_request", "RevokeRequest"), 45 "Status": ("inttegro.file_link.status", "Status"), 46} 47 48__all__ = [ 49 "Access", 50 "AccessRequest", 51 "Actor", 52 "CreateRequest", 53 "Creation", 54 "Delivery", 55 "DeliveryInput", 56 "DeliveryMode", 57 "FileLink", 58 "Kind", 59 "LookupRequest", 60 "Page", 61 "PageRequest", 62 "PageResponse", 63 "Response", 64 "RevokeRequest", 65 "Status", 66] 67 68 69def __getattr__(name: str) -> Any: 70 """Load a public resource type on first access.""" 71 try: 72 module_name, attribute_name = _EXPORTS[name] 73 except KeyError: 74 raise AttributeError(f"module {__name__!r} has no attribute {name!r}") from None 75 value = getattr(import_module(module_name), attribute_name) 76 globals()[name] = value 77 return value
13@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 14class Access(ApiModel): 15 """Typed access data in the file link resource namespace. 16 17 Instances are immutable API responses. ``from_dict()`` decodes nested 18 objects, string-backed enums, and timezone-aware ISO-8601 timestamps; 19 ``to_dict()`` returns the corresponding JSON-compatible wire shape. 20 Fields not returned by the API remain absent and can still be queried 21 through mapping-style access. 22 23 API contract schema: ``FileLinkAccess``. 24 """ 25 max_accesses: int | None = field(init=False) 26 """The max accesses associated with this access. Optional; nullable. Python type: ``int | None``; wire name: ``max_accesses``; JSON type: integer (int64)""" 27 access_count: int | None = field(init=False) 28 """The access count associated with this access. Optional; nullable. Python type: ``int | None``; wire name: ``access_count``; JSON type: integer (int64)""" 29 last_accessed_at: datetime | None = field(init=False) 30 """Timestamp for last accessed at. Optional; nullable. Python type: ``datetime | None``; wire name: ``last_accessed_at``; JSON type: string (date-time)""" 31 allow_download: bool | None = field(init=False) 32 """Whether allow download. Optional; nullable. Python type: ``bool | None``; wire name: ``allow_download``; JSON type: boolean""" 33 allowed_origins: list[str] | None = field(init=False) 34 """The allowed origins associated with this access. Optional; nullable. Python type: ``list[str] | None``; wire name: ``allowed_origins``; JSON type: array of string values"""
Typed access data in the file link resource namespace.
Instances are immutable API responses. from_dict() decodes nested
objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
to_dict() returns the corresponding JSON-compatible wire shape.
Fields not returned by the API remain absent and can still be queried
through mapping-style access.
API contract schema: FileLinkAccess.
The max accesses associated with this access. Optional; nullable. Python type: int | None; wire name: max_accesses; JSON type: integer (int64)
The access count associated with this access. Optional; nullable. Python type: int | None; wire name: access_count; JSON type: integer (int64)
Timestamp for last accessed at. Optional; nullable. Python type: datetime | None; wire name: last_accessed_at; JSON type: string (date-time)
Whether allow download. Optional; nullable. Python type: bool | None; wire name: allow_download; JSON type: boolean
The allowed origins associated with this access. Optional; nullable. Python type: list[str] | None; wire name: allowed_origins; JSON type: array of string values
12@dataclass(frozen=True, slots=True, kw_only=True) 13class AccessRequest(ApiRequest): 14 """Parameters accepted by the access request operation. 15 16 This is an immutable, keyword-only request object. ``to_dict()`` uses 17 the documented wire names, omits fields left as ``UNSET``, serializes 18 string-backed enums by value, and requires timezone-aware datetimes. 19 20 API contract schema: ``FileLinkAccessRequest``. 21 """ 22 max_accesses: int | UnsetType = field(default=UNSET) 23 """The max accesses associated with this access request. Optional. Python type: ``int``; wire name: ``max_accesses``; JSON type: integer (int64)""" 24 allow_download: bool | UnsetType = field(default=UNSET) 25 """Whether allow download. Optional. Python type: ``bool``; wire name: ``allow_download``; JSON type: boolean""" 26 allowed_origins: list[str] | UnsetType = field(default=UNSET) 27 """The allowed origins associated with this access request. Optional. Python type: ``list[str]``; wire name: ``allowed_origins``; JSON type: array of string values""" 28 allowed_ip_ranges: list[str] | UnsetType = field(default=UNSET) 29 """The allowed ip ranges associated with this access request. Optional. Python type: ``list[str]``; wire name: ``allowed_ip_ranges``; JSON type: array of string values"""
Parameters accepted by the access request operation.
This is an immutable, keyword-only request object. to_dict() uses
the documented wire names, omits fields left as UNSET, serializes
string-backed enums by value, and requires timezone-aware datetimes.
API contract schema: FileLinkAccessRequest.
The max accesses associated with this access request. Optional. Python type: int; wire name: max_accesses; JSON type: integer (int64)
Whether allow download. Optional. Python type: bool; wire name: allow_download; JSON type: boolean
The allowed origins associated with this access request. Optional. Python type: list[str]; wire name: allowed_origins; JSON type: array of string values
The allowed ip ranges associated with this access request. Optional. Python type: list[str]; wire name: allowed_ip_ranges; JSON type: array of string values
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 13class Actor(ApiModel): 14 """Typed actor data in the file link resource namespace. 15 16 Instances are immutable API responses. ``from_dict()`` decodes nested 17 objects, string-backed enums, and timezone-aware ISO-8601 timestamps; 18 ``to_dict()`` returns the corresponding JSON-compatible wire shape. 19 Fields not returned by the API remain absent and can still be queried 20 through mapping-style access. 21 22 API contract schema: ``FileLinkActor``. 23 """ 24 email: str | None = field(init=False) 25 """The email associated with this actor. Optional; nullable. Python type: ``str | None``; wire name: ``email``; JSON type: string (email)""" 26 id: str | None = field(init=False) 27 """Unique identifier for this actor. Optional; nullable. Python type: ``str | None``; wire name: ``id``; JSON type: string""" 28 name: str | None = field(init=False) 29 """Human-readable name of the actor. Optional; nullable. Python type: ``str | None``; wire name: ``name``; JSON type: string""" 30 type: str = field(init=False) 31 """Discriminator identifying the actor type. Required. Python type: ``str``; wire name: ``type``; JSON type: string"""
Typed actor data in the file link resource namespace.
Instances are immutable API responses. from_dict() decodes nested
objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
to_dict() returns the corresponding JSON-compatible wire shape.
Fields not returned by the API remain absent and can still be queried
through mapping-style access.
API contract schema: FileLinkActor.
The email associated with this actor. Optional; nullable. Python type: str | None; wire name: email; JSON type: string (email)
Unique identifier for this actor. Optional; nullable. Python type: str | None; wire name: id; JSON type: string
Human-readable name of the actor. Optional; nullable. Python type: str | None; wire name: name; JSON type: string
Discriminator identifying the actor type. Required. Python type: str; wire name: type; JSON type: string
13@dataclass(frozen=True, slots=True, kw_only=True) 14class CreateRequest(ApiRequest): 15 """Parameters accepted by the create request operation. 16 17 This is an immutable, keyword-only request object. ``to_dict()`` uses 18 the documented wire names, omits fields left as ``UNSET``, serializes 19 string-backed enums by value, and requires timezone-aware datetimes. 20 21 API contract schema: ``CreateFileLinkRequest``. 22 """ 23 delivery: FileLinkDeliveryInput | UnsetType = field(default=UNSET) 24 """The delivery associated with this create request. Optional. Python type: ``FileLinkDeliveryInput``; wire name: ``delivery``; JSON type: object (FileLinkDelivery)""" 25 access: FileLinkAccessRequest | UnsetType = field(default=UNSET) 26 """The access associated with this create request. Optional. Python type: ``FileLinkAccessRequest``; wire name: ``access``; JSON type: object (FileLinkAccessRequest)""" 27 created_by: FileActorInput | UnsetType = field(default=UNSET) 28 """The created by associated with this create request. Optional. Python type: ``FileActorInput``; wire name: ``created_by``; JSON type: object (FileActorInput)""" 29 custom_data: CustomData | UnsetType = field(default=UNSET) 30 """Merchant-defined string values attached to a resource. SDKs expose this as a semantic collection rather than a raw map. Optional. Python type: ``CustomData``; wire name: ``custom_data``; JSON type: object (CustomData)""" 31 expires_at: datetime | UnsetType = field(default=UNSET) 32 """Timestamp for expires at. Optional. Python type: ``datetime``; wire name: ``expires_at``; JSON type: string (date-time)""" 33 file_id: str 34 """Identifier of the related file. Required. Python type: ``str``; wire name: ``file_id``; JSON type: string"""
Parameters accepted by the create request operation.
This is an immutable, keyword-only request object. to_dict() uses
the documented wire names, omits fields left as UNSET, serializes
string-backed enums by value, and requires timezone-aware datetimes.
API contract schema: CreateFileLinkRequest.
The delivery associated with this create request. Optional. Python type: FileLinkDeliveryInput; wire name: delivery; JSON type: object (FileLinkDelivery)
The access associated with this create request. Optional. Python type: FileLinkAccessRequest; wire name: access; JSON type: object (FileLinkAccessRequest)
The created by associated with this create request. Optional. Python type: FileActorInput; wire name: created_by; JSON type: object (FileActorInput)
Merchant-defined string values attached to a resource. SDKs expose this as a semantic collection rather than a raw map. Optional. Python type: CustomData; wire name: custom_data; JSON type: object (CustomData)
Timestamp for expires at. Optional. Python type: datetime; wire name: expires_at; JSON type: string (date-time)
Identifier of the related file. Required. Python type: str; wire name: file_id; JSON type: string
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 13class Creation(ApiModel): 14 """Typed creation data in the file link resource namespace. 15 16 Instances are immutable API responses. ``from_dict()`` decodes nested 17 objects, string-backed enums, and timezone-aware ISO-8601 timestamps; 18 ``to_dict()`` returns the corresponding JSON-compatible wire shape. 19 Fields not returned by the API remain absent and can still be queried 20 through mapping-style access. 21 22 API contract schema: ``FileLinkCreation``. 23 """ 24 file_link: FileLink = field(init=False) 25 """Public file link metadata. Token hashes and provider URLs are not exposed. Required. Python type: ``FileLink``; wire name: ``file_link``; JSON type: object (FileLinkObject)""" 26 url: str = field(init=False) 27 """Public capability URL. Treat as bearer-secret material. Required. Python type: ``str``; wire name: ``url``; JSON type: string (uri)"""
Typed creation data in the file link resource namespace.
Instances are immutable API responses. from_dict() decodes nested
objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
to_dict() returns the corresponding JSON-compatible wire shape.
Fields not returned by the API remain absent and can still be queried
through mapping-style access.
API contract schema: FileLinkCreation.
Public capability URL. Treat as bearer-secret material. Required. Python type: str; wire name: url; JSON type: string (uri)
13@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 14class Delivery(ApiModel): 15 """Typed delivery data in the file link resource namespace. 16 17 Instances are immutable API responses. ``from_dict()`` decodes nested 18 objects, string-backed enums, and timezone-aware ISO-8601 timestamps; 19 ``to_dict()`` returns the corresponding JSON-compatible wire shape. 20 Fields not returned by the API remain absent and can still be queried 21 through mapping-style access. 22 23 API contract schema: ``FileLinkDelivery``. 24 """ 25 mode: Literal['redirect', 'download', 'inline'] | None = field(init=False) 26 """The mode associated with this delivery. Optional; nullable. Python type: ``Literal['redirect', 'download', 'inline'] | None``; wire name: ``mode``; JSON type: string. Constraints: allowed values ``redirect``, ``download``, ``inline``""" 27 filename: str | None = field(init=False) 28 """The filename associated with this delivery. Optional; nullable. Python type: ``str | None``; wire name: ``filename``; JSON type: string""" 29 content_type: str | None = field(init=False) 30 """The content type associated with this delivery. Optional; nullable. Python type: ``str | None``; wire name: ``content_type``; JSON type: string""" 31 disposition: str | None = field(init=False) 32 """The disposition associated with this delivery. Optional; nullable. Python type: ``str | None``; wire name: ``disposition``; JSON type: string"""
Typed delivery data in the file link resource namespace.
Instances are immutable API responses. from_dict() decodes nested
objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
to_dict() returns the corresponding JSON-compatible wire shape.
Fields not returned by the API remain absent and can still be queried
through mapping-style access.
API contract schema: FileLinkDelivery.
The mode associated with this delivery. Optional; nullable. Python type: Literal['redirect', 'download', 'inline'] | None; wire name: mode; JSON type: string. Constraints: allowed values redirect, download, inline
The filename associated with this delivery. Optional; nullable. Python type: str | None; wire name: filename; JSON type: string
The content type associated with this delivery. Optional; nullable. Python type: str | None; wire name: content_type; JSON type: string
The disposition associated with this delivery. Optional; nullable. Python type: str | None; wire name: disposition; JSON type: string
13@dataclass(frozen=True, slots=True, kw_only=True) 14class DeliveryInput(ApiRequest): 15 """Parameters accepted by the delivery input operation. 16 17 This is an immutable, keyword-only request object. ``to_dict()`` uses 18 the documented wire names, omits fields left as ``UNSET``, serializes 19 string-backed enums by value, and requires timezone-aware datetimes. 20 21 API contract schema: ``FileLinkDeliveryInput``. 22 """ 23 mode: Literal['redirect', 'download', 'inline', FileLinkDeliveryMode.REDIRECT, FileLinkDeliveryMode.DOWNLOAD, FileLinkDeliveryMode.INLINE] | UnsetType = field(default=UNSET) 24 """The mode associated with this delivery input. Optional. Python type: ``Literal['redirect', 'download', 'inline', FileLinkDeliveryMode.REDIRECT, FileLinkDeliveryMode.DOWNLOAD, FileLinkDeliveryMode.INLINE]``; wire name: ``mode``; JSON type: string. Constraints: allowed values ``redirect``, ``download``, ``inline``""" 25 filename: str | UnsetType = field(default=UNSET) 26 """The filename associated with this delivery input. Optional. Python type: ``str``; wire name: ``filename``; JSON type: string""" 27 content_type: str | UnsetType = field(default=UNSET) 28 """The content type associated with this delivery input. Optional. Python type: ``str``; wire name: ``content_type``; JSON type: string""" 29 disposition: str | UnsetType = field(default=UNSET) 30 """The disposition associated with this delivery input. Optional. Python type: ``str``; wire name: ``disposition``; JSON type: string"""
Parameters accepted by the delivery input operation.
This is an immutable, keyword-only request object. to_dict() uses
the documented wire names, omits fields left as UNSET, serializes
string-backed enums by value, and requires timezone-aware datetimes.
API contract schema: FileLinkDeliveryInput.
The mode associated with this delivery input. Optional. Python type: Literal['redirect', 'download', 'inline', FileLinkDeliveryMode.REDIRECT, FileLinkDeliveryMode.DOWNLOAD, FileLinkDeliveryMode.INLINE]; wire name: mode; JSON type: string. Constraints: allowed values redirect, download, inline
The filename associated with this delivery input. Optional. Python type: str; wire name: filename; JSON type: string
The content type associated with this delivery input. Optional. Python type: str; wire name: content_type; JSON type: string
The disposition associated with this delivery input. Optional. Python type: str; wire name: disposition; JSON type: string
11class DeliveryMode(WireEnum): 12 """Typed delivery mode data in the file link resource namespace. 13 14 Members are strings as well as enum values, so they compare naturally 15 with API payloads and serialize to the lowercase wire value shown below. 16 17 API contract schema: ``FileLinkDeliveryMode``. 18 """ 19 REDIRECT = "redirect" 20 """Wire value ``redirect`` (redirect)""" 21 DOWNLOAD = "download" 22 """Wire value ``download`` (download)""" 23 INLINE = "inline" 24 """Wire value ``inline`` (inline)"""
Typed delivery mode data in the file link resource namespace.
Members are strings as well as enum values, so they compare naturally with API payloads and serialize to the lowercase wire value shown below.
API contract schema: FileLinkDeliveryMode.
14@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 15class FileLink(ApiModel): 16 """Public file link metadata. Token hashes and provider URLs are not exposed. 17 18 Instances are immutable API responses. ``from_dict()`` decodes nested 19 objects, string-backed enums, and timezone-aware ISO-8601 timestamps; 20 ``to_dict()`` returns the corresponding JSON-compatible wire shape. 21 Fields not returned by the API remain absent and can still be queried 22 through mapping-style access. 23 """ 24 id: str = field(init=False) 25 """Unique identifier for this file link. Required. Python type: ``str``; wire name: ``id``; JSON type: string""" 26 kind: Literal['public'] = field(init=False) 27 """The kind associated with this file link. Required. Python type: ``Literal['public']``; wire name: ``kind``; JSON type: string. Constraints: allowed values ``public``""" 28 file_id: str = field(init=False) 29 """Identifier of the related file. Required. Python type: ``str``; wire name: ``file_id``; JSON type: string""" 30 purpose: str = field(init=False) 31 """The purpose associated with this file link. Required. Python type: ``str``; wire name: ``purpose``; JSON type: string""" 32 status: Literal['active', 'revoked', 'expired', 'disabled'] = field(init=False) 33 """Current lifecycle status of the file link. Required. Python type: ``Literal['active', 'revoked', 'expired', 'disabled']``; wire name: ``status``; JSON type: string. Constraints: allowed values ``active``, ``revoked``, ``expired``, ``disabled``""" 34 active: bool = field(init=False) 35 """Whether the file link is active. Required. Python type: ``bool``; wire name: ``active``; JSON type: boolean""" 36 delivery: FileLinkDelivery = field(init=False) 37 """The delivery associated with this file link. Required. Python type: ``FileLinkDelivery``; wire name: ``delivery``; JSON type: object (FileLinkDelivery)""" 38 access: FileLinkAccess = field(init=False) 39 """The access associated with this file link. Required. Python type: ``FileLinkAccess``; wire name: ``access``; JSON type: object (FileLinkAccess)""" 40 created_by: FileLinkActor = field(init=False) 41 """The created by associated with this file link. Required. Python type: ``FileLinkActor``; wire name: ``created_by``; JSON type: object (FileLinkActor)""" 42 revoked_by: FileLinkActor | None = field(init=False) 43 """The revoked by associated with this file link. Optional; nullable. Python type: ``FileLinkActor | None``; wire name: ``revoked_by``; JSON type: object (FileLinkActor)""" 44 custom_data: CustomData | None = field(init=False) 45 """Merchant-defined string values attached to a resource. SDKs expose this as a semantic collection rather than a raw map. Optional; nullable. Python type: ``CustomData | None``; wire name: ``custom_data``; JSON type: object (CustomData)""" 46 metadata: dict[str, str] | None = field(init=False) 47 """System-managed string metadata attached to a file resource. Optional; nullable. Python type: ``dict[str, str] | None``; wire name: ``metadata``; JSON type: object (FileMetadata)""" 48 created_at: datetime = field(init=False) 49 """When the file link was created. Required. Python type: ``datetime``; wire name: ``created_at``; JSON type: string (date-time)""" 50 updated_at: datetime = field(init=False) 51 """When the file link was last updated. Required. Python type: ``datetime``; wire name: ``updated_at``; JSON type: string (date-time)""" 52 expires_at: datetime = field(init=False) 53 """Timestamp for expires at. Required. Python type: ``datetime``; wire name: ``expires_at``; JSON type: string (date-time)""" 54 revoked_at: datetime | None = field(init=False) 55 """Timestamp for revoked at. Optional; nullable. Python type: ``datetime | None``; wire name: ``revoked_at``; JSON type: string (date-time)"""
Public file link metadata. Token hashes and provider URLs are not exposed.
Instances are immutable API responses. from_dict() decodes nested
objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
to_dict() returns the corresponding JSON-compatible wire shape.
Fields not returned by the API remain absent and can still be queried
through mapping-style access.
Unique identifier for this file link. Required. Python type: str; wire name: id; JSON type: string
The kind associated with this file link. Required. Python type: Literal['public']; wire name: kind; JSON type: string. Constraints: allowed values public
Identifier of the related file. Required. Python type: str; wire name: file_id; JSON type: string
The purpose associated with this file link. Required. Python type: str; wire name: purpose; JSON type: string
Whether the file link is active. Required. Python type: bool; wire name: active; JSON type: boolean
The delivery associated with this file link. Required. Python type: FileLinkDelivery; wire name: delivery; JSON type: object (FileLinkDelivery)
The access associated with this file link. Required. Python type: FileLinkAccess; wire name: access; JSON type: object (FileLinkAccess)
The created by associated with this file link. Required. Python type: FileLinkActor; wire name: created_by; JSON type: object (FileLinkActor)
The revoked by associated with this file link. Optional; nullable. Python type: FileLinkActor | None; wire name: revoked_by; JSON type: object (FileLinkActor)
Merchant-defined string values attached to a resource. SDKs expose this as a semantic collection rather than a raw map. Optional; nullable. Python type: CustomData | None; wire name: custom_data; JSON type: object (CustomData)
System-managed string metadata attached to a file resource. Optional; nullable. Python type: dict[str, str] | None; wire name: metadata; JSON type: object (FileMetadata)
When the file link was created. Required. Python type: datetime; wire name: created_at; JSON type: string (date-time)
When the file link was last updated. Required. Python type: datetime; wire name: updated_at; JSON type: string (date-time)
Timestamp for expires at. Required. Python type: datetime; wire name: expires_at; JSON type: string (date-time)
Timestamp for revoked at. Optional; nullable. Python type: datetime | None; wire name: revoked_at; JSON type: string (date-time)
11class Kind(WireEnum): 12 """Typed kind data in the file link resource namespace. 13 14 Members are strings as well as enum values, so they compare naturally 15 with API payloads and serialize to the lowercase wire value shown below. 16 17 API contract schema: ``FileLinkKind``. 18 """ 19 PUBLIC = "public" 20 """Wire value ``public`` (public)"""
Typed kind data in the file link resource namespace.
Members are strings as well as enum values, so they compare naturally with API payloads and serialize to the lowercase wire value shown below.
API contract schema: FileLinkKind.
12@dataclass(frozen=True, slots=True, kw_only=True) 13class LookupRequest(ApiRequest): 14 """Parameters accepted by the lookup request operation. 15 16 This is an immutable, keyword-only request object. ``to_dict()`` uses 17 the documented wire names, omits fields left as ``UNSET``, serializes 18 string-backed enums by value, and requires timezone-aware datetimes. 19 20 API contract schema: ``LookupFileLinkRequest``. 21 """ 22 id: str 23 """Unique identifier for this lookup request. Required. Python type: ``str``; wire name: ``id``; JSON type: string"""
Parameters accepted by the lookup request operation.
This is an immutable, keyword-only request object. to_dict() uses
the documented wire names, omits fields left as UNSET, serializes
string-backed enums by value, and requires timezone-aware datetimes.
API contract schema: LookupFileLinkRequest.
Unique identifier for this lookup request. Required. Python type: str; wire name: id; JSON type: string
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 13class Page(ApiModel): 14 """One page of page resources. 15 16 Instances are immutable API responses. ``from_dict()`` decodes nested 17 objects, string-backed enums, and timezone-aware ISO-8601 timestamps; 18 ``to_dict()`` returns the corresponding JSON-compatible wire shape. 19 Fields not returned by the API remain absent and can still be queried 20 through mapping-style access. 21 22 API contract schema: ``FileLinkPage``. 23 """ 24 number: int = field(init=False) 25 """Human-readable number assigned to the page. Required. Python type: ``int``; wire name: ``number``; JSON type: integer""" 26 size: int = field(init=False) 27 """Numeric size used by this operation. Required. Python type: ``int``; wire name: ``size``; JSON type: integer""" 28 file_links: list[FileLink] = field(init=False) 29 """The file links associated with this page. Required. Python type: ``list[FileLink]``; wire name: ``file_links``; JSON type: array of object (FileLinkObject) values"""
One page of page resources.
Instances are immutable API responses. from_dict() decodes nested
objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
to_dict() returns the corresponding JSON-compatible wire shape.
Fields not returned by the API remain absent and can still be queried
through mapping-style access.
API contract schema: FileLinkPage.
Human-readable number assigned to the page. Required. Python type: int; wire name: number; JSON type: integer
Numeric size used by this operation. Required. Python type: int; wire name: size; JSON type: integer
The file links associated with this page. Required. Python type: list[FileLink]; wire name: file_links; JSON type: array of object (FileLinkObject) values
13@dataclass(frozen=True, slots=True, kw_only=True) 14class PageRequest(ApiRequest): 15 """Parameters accepted by the page request operation. 16 17 This is an immutable, keyword-only request object. ``to_dict()`` uses 18 the documented wire names, omits fields left as ``UNSET``, serializes 19 string-backed enums by value, and requires timezone-aware datetimes. 20 21 API contract schema: ``PageFileLinksRequest``. 22 """ 23 file_id: str | UnsetType = field(default=UNSET) 24 """Identifier of the related file. Optional. Python type: ``str``; wire name: ``file_id``; JSON type: string""" 25 status: Literal['active', 'revoked', 'expired', 'disabled', FileLinkStatus.ACTIVE, FileLinkStatus.REVOKED, FileLinkStatus.EXPIRED, FileLinkStatus.DISABLED] | UnsetType = field(default=UNSET) 26 """Current lifecycle status of the page request. Optional. Python type: ``Literal['active', 'revoked', 'expired', 'disabled', FileLinkStatus.ACTIVE, FileLinkStatus.REVOKED, FileLinkStatus.EXPIRED, FileLinkStatus.DISABLED]``; wire name: ``status``; JSON type: string. Constraints: allowed values ``active``, ``revoked``, ``expired``, ``disabled``""" 27 page_number: int | UnsetType = field(default=UNSET) 28 """The page number associated with this page request. Optional. Python type: ``int``; wire name: ``page_number``; JSON type: integer. Constraints: minimum 1""" 29 page_size: int | UnsetType = field(default=UNSET) 30 """The page size associated with this page request. Optional. Python type: ``int``; wire name: ``page_size``; JSON type: integer. Constraints: minimum 1"""
Parameters accepted by the page request operation.
This is an immutable, keyword-only request object. to_dict() uses
the documented wire names, omits fields left as UNSET, serializes
string-backed enums by value, and requires timezone-aware datetimes.
API contract schema: PageFileLinksRequest.
Identifier of the related file. Optional. Python type: str; wire name: file_id; JSON type: string
Current lifecycle status of the page request. Optional. Python type: Literal['active', 'revoked', 'expired', 'disabled', FileLinkStatus.ACTIVE, FileLinkStatus.REVOKED, FileLinkStatus.EXPIRED, FileLinkStatus.DISABLED]; wire name: status; JSON type: string. Constraints: allowed values active, revoked, expired, disabled
The page number associated with this page request. Optional. Python type: int; wire name: page_number; JSON type: integer. Constraints: minimum 1
The page size associated with this page request. Optional. Python type: int; wire name: page_size; JSON type: integer. Constraints: minimum 1
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 13class PageResponse(ApiModel): 14 """Typed response returned by the page operation. 15 16 Instances are immutable API responses. ``from_dict()`` decodes nested 17 objects, string-backed enums, and timezone-aware ISO-8601 timestamps; 18 ``to_dict()`` returns the corresponding JSON-compatible wire shape. 19 Fields not returned by the API remain absent and can still be queried 20 through mapping-style access. 21 22 API contract schema: ``FileLinkPageResponse``. 23 """ 24 page: FileLinkPage = field(init=False) 25 """Numeric page used by this operation. Required. Python type: ``FileLinkPage``; wire name: ``page``; JSON type: object (FileLinkPage)"""
Typed response returned by the page operation.
Instances are immutable API responses. from_dict() decodes nested
objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
to_dict() returns the corresponding JSON-compatible wire shape.
Fields not returned by the API remain absent and can still be queried
through mapping-style access.
API contract schema: FileLinkPageResponse.
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 13class Response(ApiModel): 14 """Typed response returned by the response operation. 15 16 Instances are immutable API responses. ``from_dict()`` decodes nested 17 objects, string-backed enums, and timezone-aware ISO-8601 timestamps; 18 ``to_dict()`` returns the corresponding JSON-compatible wire shape. 19 Fields not returned by the API remain absent and can still be queried 20 through mapping-style access. 21 22 API contract schema: ``FileLinkResponse``. 23 """ 24 file_link: FileLink = field(init=False) 25 """Public file link metadata. Token hashes and provider URLs are not exposed. Required. Python type: ``FileLink``; wire name: ``file_link``; JSON type: object (FileLinkObject)"""
Typed response returned by the response operation.
Instances are immutable API responses. from_dict() decodes nested
objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
to_dict() returns the corresponding JSON-compatible wire shape.
Fields not returned by the API remain absent and can still be queried
through mapping-style access.
API contract schema: FileLinkResponse.
12@dataclass(frozen=True, slots=True, kw_only=True) 13class RevokeRequest(ApiRequest): 14 """Parameters accepted by the revoke request operation. 15 16 This is an immutable, keyword-only request object. ``to_dict()`` uses 17 the documented wire names, omits fields left as ``UNSET``, serializes 18 string-backed enums by value, and requires timezone-aware datetimes. 19 20 API contract schema: ``RevokeFileLinkRequest``. 21 """ 22 revoked_by: FileActorInput | UnsetType = field(default=UNSET) 23 """The revoked by associated with this revoke request. Optional. Python type: ``FileActorInput``; wire name: ``revoked_by``; JSON type: object (FileActorInput)""" 24 id: str 25 """Unique identifier for this revoke request. Required. Python type: ``str``; wire name: ``id``; JSON type: string"""
Parameters accepted by the revoke request operation.
This is an immutable, keyword-only request object. to_dict() uses
the documented wire names, omits fields left as UNSET, serializes
string-backed enums by value, and requires timezone-aware datetimes.
API contract schema: RevokeFileLinkRequest.
The revoked by associated with this revoke request. Optional. Python type: FileActorInput; wire name: revoked_by; JSON type: object (FileActorInput)
Unique identifier for this revoke request. Required. Python type: str; wire name: id; JSON type: string
11class Status(WireEnum): 12 """Typed status data in the file link resource namespace. 13 14 Members are strings as well as enum values, so they compare naturally 15 with API payloads and serialize to the lowercase wire value shown below. 16 17 API contract schema: ``FileLinkStatus``. 18 """ 19 ACTIVE = "active" 20 """Wire value ``active`` (active)""" 21 REVOKED = "revoked" 22 """Wire value ``revoked`` (revoked)""" 23 EXPIRED = "expired" 24 """Wire value ``expired`` (expired)""" 25 DISABLED = "disabled" 26 """Wire value ``disabled`` (disabled)"""
Typed status data in the file link resource namespace.
Members are strings as well as enum values, so they compare naturally with API payloads and serialize to the lowercase wire value shown below.
API contract schema: FileLinkStatus.