Skip to content

Commit e7c2b7b

Browse files
[TODO]: update generated models from apify-docs PR #2422
1 parent 261e2a3 commit e7c2b7b

File tree

1 file changed

+55
-168
lines changed

1 file changed

+55
-168
lines changed

src/apify_client/_models.py

Lines changed: 55 additions & 168 deletions
Original file line numberDiff line numberDiff line change
@@ -612,104 +612,6 @@ class VersionResponse(BaseModel):
612612
data: Version
613613

614614

615-
@docs_group('Models')
616-
class ErrorType(StrEnum):
617-
"""Machine-processable error type identifier."""
618-
619-
ACTOR_MEMORY_LIMIT_EXCEEDED = 'actor-memory-limit-exceeded'
620-
ACTOR_NOT_FOUND = 'actor-not-found'
621-
INVALID_INPUT = 'invalid-input'
622-
METHOD_NOT_ALLOWED = 'method-not-allowed'
623-
PERMISSION_DENIED = 'permission-denied'
624-
RATE_LIMIT_EXCEEDED = 'rate-limit-exceeded'
625-
RECORD_NOT_FOUND = 'record-not-found'
626-
RECORD_NOT_UNIQUE = 'record-not-unique'
627-
RECORD_OR_TOKEN_NOT_FOUND = 'record-or-token-not-found'
628-
REQUEST_ID_INVALID = 'request-id-invalid'
629-
REQUEST_TOO_LARGE = 'request-too-large'
630-
RUN_FAILED = 'run-failed'
631-
RUN_TIMEOUT_EXCEEDED = 'run-timeout-exceeded'
632-
TOKEN_NOT_VALID = 'token-not-valid'
633-
UNKNOWN_BUILD_TAG = 'unknown-build-tag'
634-
UNSUPPORTED_CONTENT_ENCODING = 'unsupported-content-encoding'
635-
636-
637-
@docs_group('Models')
638-
class ErrorDetail(BaseModel):
639-
model_config = ConfigDict(
640-
extra='allow',
641-
populate_by_name=True,
642-
)
643-
type: ErrorType | None = None
644-
message: str | None = None
645-
"""
646-
Human-readable error message describing what went wrong.
647-
"""
648-
649-
650-
@docs_group('Models')
651-
class ActorNotFoundErrorDetail(ErrorDetail):
652-
model_config = ConfigDict(
653-
extra='allow',
654-
populate_by_name=True,
655-
)
656-
type: Annotated[Literal['actor-not-found'], Field(title='ErrorType')] = 'actor-not-found'
657-
"""
658-
Machine-processable error type identifier.
659-
"""
660-
661-
662-
@docs_group('Models')
663-
class ActorNotFoundError(BaseModel):
664-
model_config = ConfigDict(
665-
extra='allow',
666-
populate_by_name=True,
667-
)
668-
error: ActorNotFoundErrorDetail | None = None
669-
670-
671-
@docs_group('Models')
672-
class RecordOrTokenNotFoundErrorDetail(ErrorDetail):
673-
model_config = ConfigDict(
674-
extra='allow',
675-
populate_by_name=True,
676-
)
677-
type: Annotated[Literal['record-or-token-not-found'], Field(title='ErrorType')] = 'record-or-token-not-found'
678-
"""
679-
Machine-processable error type identifier.
680-
"""
681-
682-
683-
@docs_group('Models')
684-
class RecordOrTokenNotFoundError(BaseModel):
685-
model_config = ConfigDict(
686-
extra='allow',
687-
populate_by_name=True,
688-
)
689-
error: RecordOrTokenNotFoundErrorDetail | None = None
690-
691-
692-
@docs_group('Models')
693-
class RecordNotFoundErrorDetail(ErrorDetail):
694-
model_config = ConfigDict(
695-
extra='allow',
696-
populate_by_name=True,
697-
)
698-
type: Annotated[Literal['record-not-found'], Field(title='ErrorType')] = 'record-not-found'
699-
"""
700-
Machine-processable error type identifier.
701-
"""
702-
703-
704-
@docs_group('Models')
705-
class ActorVersionNotFoundError(BaseModel):
706-
model_config = ConfigDict(
707-
extra='allow',
708-
populate_by_name=True,
709-
)
710-
error: RecordNotFoundErrorDetail | None = None
711-
712-
713615
@docs_group('Models')
714616
class ListOfEnvVars(BaseModel):
715617
model_config = ConfigDict(
@@ -738,15 +640,6 @@ class EnvVarResponse(BaseModel):
738640
data: EnvVar
739641

740642

741-
@docs_group('Models')
742-
class EnvironmentVariableNotFoundError(BaseModel):
743-
model_config = ConfigDict(
744-
extra='allow',
745-
populate_by_name=True,
746-
)
747-
error: RecordNotFoundErrorDetail | None = None
748-
749-
750643
@docs_group('Models')
751644
class WebhookEventType(StrEnum):
752645
"""Type of event that triggers the webhook."""
@@ -1075,33 +968,81 @@ class BuildResponse(BaseModel):
1075968

1076969

1077970
@docs_group('Models')
1078-
class UnknownBuildTagErrorDetail(ErrorDetail):
971+
class ErrorType(StrEnum):
972+
"""Machine-processable error type identifier."""
973+
974+
ACTOR_MEMORY_LIMIT_EXCEEDED = 'actor-memory-limit-exceeded'
975+
ACTOR_NOT_FOUND = 'actor-not-found'
976+
INVALID_INPUT = 'invalid-input'
977+
METHOD_NOT_ALLOWED = 'method-not-allowed'
978+
PERMISSION_DENIED = 'permission-denied'
979+
RATE_LIMIT_EXCEEDED = 'rate-limit-exceeded'
980+
RECORD_NOT_FOUND = 'record-not-found'
981+
RECORD_NOT_UNIQUE = 'record-not-unique'
982+
RECORD_OR_TOKEN_NOT_FOUND = 'record-or-token-not-found'
983+
REQUEST_ID_INVALID = 'request-id-invalid'
984+
REQUEST_TOO_LARGE = 'request-too-large'
985+
RUN_FAILED = 'run-failed'
986+
RUN_TIMEOUT_EXCEEDED = 'run-timeout-exceeded'
987+
TOKEN_NOT_VALID = 'token-not-valid'
988+
UNKNOWN_BUILD_TAG = 'unknown-build-tag'
989+
UNSUPPORTED_CONTENT_ENCODING = 'unsupported-content-encoding'
990+
991+
992+
@docs_group('Models')
993+
class ErrorDetail(BaseModel):
1079994
model_config = ConfigDict(
1080995
extra='allow',
1081996
populate_by_name=True,
1082997
)
1083-
type: Annotated[Literal['unknown-build-tag'], Field(title='ErrorType')] = 'unknown-build-tag'
998+
type: ErrorType | None = None
999+
message: str | None = None
10841000
"""
1085-
Machine-processable error type identifier.
1001+
Human-readable error message describing what went wrong.
10861002
"""
10871003

10881004

10891005
@docs_group('Models')
1090-
class UnknownBuildTagError(BaseModel):
1006+
class Type1(StrEnum):
1007+
"""Machine-processable error type identifier."""
1008+
1009+
ACTOR_MEMORY_LIMIT_EXCEEDED = 'actor-memory-limit-exceeded'
1010+
ACTOR_NOT_FOUND = 'actor-not-found'
1011+
INVALID_INPUT = 'invalid-input'
1012+
METHOD_NOT_ALLOWED = 'method-not-allowed'
1013+
PERMISSION_DENIED = 'permission-denied'
1014+
RATE_LIMIT_EXCEEDED = 'rate-limit-exceeded'
1015+
RECORD_NOT_FOUND = 'record-not-found'
1016+
RECORD_NOT_UNIQUE = 'record-not-unique'
1017+
RECORD_OR_TOKEN_NOT_FOUND = 'record-or-token-not-found'
1018+
REQUEST_ID_INVALID = 'request-id-invalid'
1019+
REQUEST_TOO_LARGE = 'request-too-large'
1020+
RUN_FAILED = 'run-failed'
1021+
RUN_TIMEOUT_EXCEEDED = 'run-timeout-exceeded'
1022+
TOKEN_NOT_VALID = 'token-not-valid'
1023+
UNKNOWN_BUILD_TAG = 'unknown-build-tag'
1024+
UNSUPPORTED_CONTENT_ENCODING = 'unsupported-content-encoding'
1025+
1026+
1027+
@docs_group('Models')
1028+
class UnknownBuildTagErrorDetail(ErrorDetail):
10911029
model_config = ConfigDict(
10921030
extra='allow',
10931031
populate_by_name=True,
10941032
)
1095-
error: UnknownBuildTagErrorDetail | None = None
1033+
type: Annotated[Literal['unknown-build-tag'], Field(title='ErrorType')] = 'unknown-build-tag'
1034+
"""
1035+
Machine-processable error type identifier.
1036+
"""
10961037

10971038

10981039
@docs_group('Models')
1099-
class ActorBuildNotFoundError(BaseModel):
1040+
class UnknownBuildTagError(BaseModel):
11001041
model_config = ConfigDict(
11011042
extra='allow',
11021043
populate_by_name=True,
11031044
)
1104-
error: RecordNotFoundErrorDetail | None = None
1045+
error: UnknownBuildTagErrorDetail | None = None
11051046

11061047

11071048
@docs_group('Models')
@@ -1554,15 +1495,6 @@ class ActorRunTimeoutExceededError(BaseModel):
15541495
error: RunTimeoutExceededErrorDetail | None = None
15551496

15561497

1557-
@docs_group('Models')
1558-
class ActorRunNotFoundError(BaseModel):
1559-
model_config = ConfigDict(
1560-
extra='allow',
1561-
populate_by_name=True,
1562-
)
1563-
error: RecordNotFoundErrorDetail | None = None
1564-
1565-
15661498
@docs_group('Models')
15671499
class TaskStats(BaseModel):
15681500
model_config = ConfigDict(
@@ -1830,15 +1762,6 @@ class KeyValueStoreResponse(BaseModel):
18301762
data: KeyValueStore
18311763

18321764

1833-
@docs_group('Models')
1834-
class KeyValueStoreNotFoundError(BaseModel):
1835-
model_config = ConfigDict(
1836-
extra='allow',
1837-
populate_by_name=True,
1838-
)
1839-
error: RecordNotFoundErrorDetail | None = None
1840-
1841-
18421765
@docs_group('Models')
18431766
class UpdateStoreRequest(BaseModel):
18441767
model_config = ConfigDict(
@@ -1905,15 +1828,6 @@ class RecordResponse(BaseModel):
19051828
)
19061829

19071830

1908-
@docs_group('Models')
1909-
class RecordNotFoundError(BaseModel):
1910-
model_config = ConfigDict(
1911-
extra='allow',
1912-
populate_by_name=True,
1913-
)
1914-
error: RecordNotFoundErrorDetail | None = None
1915-
1916-
19171831
@docs_group('Models')
19181832
class PutRecordRequest(BaseModel):
19191833
"""The request body contains the value to store in the record. The content type
@@ -2048,15 +1962,6 @@ class DatasetResponse(BaseModel):
20481962
data: Dataset
20491963

20501964

2051-
@docs_group('Models')
2052-
class DatasetNotFoundError(BaseModel):
2053-
model_config = ConfigDict(
2054-
extra='allow',
2055-
populate_by_name=True,
2056-
)
2057-
error: RecordNotFoundErrorDetail | None = None
2058-
2059-
20601965
@docs_group('Models')
20611966
class UpdateDatasetRequest(BaseModel):
20621967
model_config = ConfigDict(
@@ -2397,15 +2302,6 @@ class RequestQueueResponse(BaseModel):
23972302
data: RequestQueue
23982303

23992304

2400-
@docs_group('Models')
2401-
class RequestQueueNotFoundError(BaseModel):
2402-
model_config = ConfigDict(
2403-
extra='allow',
2404-
populate_by_name=True,
2405-
)
2406-
error: RecordNotFoundErrorDetail | None = None
2407-
2408-
24092305
@docs_group('Models')
24102306
class UpdateRequestQueueRequest(BaseModel):
24112307
"""Request object for updating a request queue."""
@@ -2825,15 +2721,6 @@ class RequestResponse(BaseModel):
28252721
data: Request
28262722

28272723

2828-
@docs_group('Models')
2829-
class RequestNotFoundError(BaseModel):
2830-
model_config = ConfigDict(
2831-
extra='allow',
2832-
populate_by_name=True,
2833-
)
2834-
error: RecordNotFoundErrorDetail | None = None
2835-
2836-
28372724
@docs_group('Models')
28382725
class UpdateRequestResponse(BaseModel):
28392726
"""Response containing the result of updating a request in the request queue."""

0 commit comments

Comments
 (0)