alchemy-python 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- alchemy/.fern/metadata.json +18 -0
- alchemy/CONTRIBUTING.md +125 -0
- alchemy/__init__.py +380 -0
- alchemy/_default_clients.py +30 -0
- alchemy/auth/__init__.py +4 -0
- alchemy/auth/client.py +767 -0
- alchemy/auth/raw_client.py +866 -0
- alchemy/client.py +717 -0
- alchemy/core/__init__.py +127 -0
- alchemy/core/api_error.py +23 -0
- alchemy/core/client_wrapper.py +155 -0
- alchemy/core/datetime_utils.py +70 -0
- alchemy/core/file.py +67 -0
- alchemy/core/force_multipart.py +18 -0
- alchemy/core/http_client.py +940 -0
- alchemy/core/http_response.py +63 -0
- alchemy/core/http_sse/__init__.py +42 -0
- alchemy/core/http_sse/_api.py +455 -0
- alchemy/core/http_sse/_decoders.py +74 -0
- alchemy/core/http_sse/_exceptions.py +7 -0
- alchemy/core/http_sse/_models.py +17 -0
- alchemy/core/jsonable_encoder.py +133 -0
- alchemy/core/logging.py +107 -0
- alchemy/core/oauth_token_provider.py +73 -0
- alchemy/core/parse_error.py +36 -0
- alchemy/core/pydantic_utilities.py +486 -0
- alchemy/core/query_encoder.py +58 -0
- alchemy/core/remove_none_from_dict.py +11 -0
- alchemy/core/request_options.py +40 -0
- alchemy/core/serialization.py +347 -0
- alchemy/environment.py +7 -0
- alchemy/function/__init__.py +34 -0
- alchemy/function/client.py +808 -0
- alchemy/function/raw_client.py +903 -0
- alchemy/function/version/__init__.py +4 -0
- alchemy/function/version/client.py +364 -0
- alchemy/function/version/raw_client.py +410 -0
- alchemy/host/__init__.py +4 -0
- alchemy/host/client.py +227 -0
- alchemy/host/raw_client.py +242 -0
- alchemy/instance/__init__.py +4 -0
- alchemy/instance/client.py +136 -0
- alchemy/instance/raw_client.py +141 -0
- alchemy/invocation/__init__.py +4 -0
- alchemy/invocation/client.py +570 -0
- alchemy/invocation/raw_client.py +636 -0
- alchemy/member/__init__.py +4 -0
- alchemy/member/client.py +441 -0
- alchemy/member/raw_client.py +504 -0
- alchemy/metrics/__init__.py +4 -0
- alchemy/metrics/client.py +428 -0
- alchemy/metrics/raw_client.py +478 -0
- alchemy/py.typed +0 -0
- alchemy/raw_client.py +138 -0
- alchemy/reference.md +3300 -0
- alchemy/runtime/__init__.py +4 -0
- alchemy/runtime/client.py +141 -0
- alchemy/runtime/raw_client.py +140 -0
- alchemy/service_account/__init__.py +4 -0
- alchemy/service_account/client.py +429 -0
- alchemy/service_account/raw_client.py +490 -0
- alchemy/template/__init__.py +4 -0
- alchemy/template/client.py +141 -0
- alchemy/template/raw_client.py +140 -0
- alchemy/types/__init__.py +344 -0
- alchemy/types/auth_v1accept_invite_response.py +5 -0
- alchemy/types/auth_v1create_service_account_response.py +34 -0
- alchemy/types/auth_v1get_auth_config_request.py +5 -0
- alchemy/types/auth_v1get_auth_config_response.py +53 -0
- alchemy/types/auth_v1get_session_request.py +9 -0
- alchemy/types/auth_v1get_session_response.py +28 -0
- alchemy/types/auth_v1get_token_response.py +29 -0
- alchemy/types/auth_v1invite_member_response.py +29 -0
- alchemy/types/auth_v1list_members_request.py +5 -0
- alchemy/types/auth_v1list_members_response.py +34 -0
- alchemy/types/auth_v1list_service_accounts_request.py +5 -0
- alchemy/types/auth_v1list_service_accounts_response.py +29 -0
- alchemy/types/auth_v1login_response.py +5 -0
- alchemy/types/auth_v1logout_request.py +8 -0
- alchemy/types/auth_v1logout_response.py +5 -0
- alchemy/types/auth_v1member.py +31 -0
- alchemy/types/auth_v1register_response.py +23 -0
- alchemy/types/auth_v1remove_member_response.py +5 -0
- alchemy/types/auth_v1remove_service_account_response.py +5 -0
- alchemy/types/auth_v1role.py +5 -0
- alchemy/types/auth_v1rotate_service_account_secret_response.py +31 -0
- alchemy/types/auth_v1service_account.py +35 -0
- alchemy/types/auth_v1set_member_role_response.py +5 -0
- alchemy/types/connect_error.py +38 -0
- alchemy/types/connect_error_code.py +25 -0
- alchemy/types/connect_error_details_any.py +36 -0
- alchemy/types/connect_protocol_version.py +5 -0
- alchemy/types/connect_timeout_header.py +6 -0
- alchemy/types/functions_v1arrow_contract.py +50 -0
- alchemy/types/functions_v1contract.py +8 -0
- alchemy/types/functions_v1contract_arrow.py +20 -0
- alchemy/types/functions_v1contract_json_schema.py +26 -0
- alchemy/types/functions_v1contract_violation.py +32 -0
- alchemy/types/functions_v1create_function_response.py +22 -0
- alchemy/types/functions_v1create_function_version_response.py +20 -0
- alchemy/types/functions_v1delete_function_response.py +5 -0
- alchemy/types/functions_v1function.py +100 -0
- alchemy/types/functions_v1function_error.py +30 -0
- alchemy/types/functions_v1function_error_kind.py +15 -0
- alchemy/types/functions_v1function_spec.py +58 -0
- alchemy/types/functions_v1function_version.py +81 -0
- alchemy/types/functions_v1function_version_status.py +13 -0
- alchemy/types/functions_v1get_function_response.py +20 -0
- alchemy/types/functions_v1get_function_version_response.py +20 -0
- alchemy/types/functions_v1get_host_request.py +5 -0
- alchemy/types/functions_v1get_host_response.py +20 -0
- alchemy/types/functions_v1get_invocation_logs_request.py +31 -0
- alchemy/types/functions_v1get_invocation_logs_response.py +24 -0
- alchemy/types/functions_v1get_invocation_response.py +20 -0
- alchemy/types/functions_v1get_version_request.py +5 -0
- alchemy/types/functions_v1get_version_response.py +25 -0
- alchemy/types/functions_v1host.py +58 -0
- alchemy/types/functions_v1instance.py +54 -0
- alchemy/types/functions_v1instance_status.py +14 -0
- alchemy/types/functions_v1invocation.py +106 -0
- alchemy/types/functions_v1invocation_protocol.py +8 -0
- alchemy/types/functions_v1invocation_stats.py +41 -0
- alchemy/types/functions_v1invocation_status.py +18 -0
- alchemy/types/functions_v1invoke_async_response.py +34 -0
- alchemy/types/functions_v1invoke_response.py +8 -0
- alchemy/types/functions_v1invoke_response_error.py +20 -0
- alchemy/types/functions_v1invoke_response_output.py +19 -0
- alchemy/types/functions_v1json_schema_contract.py +28 -0
- alchemy/types/functions_v1list_function_versions_response.py +22 -0
- alchemy/types/functions_v1list_functions_response.py +22 -0
- alchemy/types/functions_v1list_hosts_request.py +5 -0
- alchemy/types/functions_v1list_hosts_response.py +23 -0
- alchemy/types/functions_v1list_instances_response.py +20 -0
- alchemy/types/functions_v1list_invocations_response.py +22 -0
- alchemy/types/functions_v1list_runtimes_request.py +5 -0
- alchemy/types/functions_v1list_runtimes_response.py +22 -0
- alchemy/types/functions_v1list_templates_request.py +5 -0
- alchemy/types/functions_v1list_templates_response.py +20 -0
- alchemy/types/functions_v1network.py +5 -0
- alchemy/types/functions_v1pagination_request.py +31 -0
- alchemy/types/functions_v1pagination_response.py +33 -0
- alchemy/types/functions_v1resources.py +28 -0
- alchemy/types/functions_v1runtime.py +59 -0
- alchemy/types/functions_v1runtime_starters.py +29 -0
- alchemy/types/functions_v1source.py +31 -0
- alchemy/types/functions_v1source_file.py +28 -0
- alchemy/types/functions_v1source_layer.py +27 -0
- alchemy/types/functions_v1source_limits.py +30 -0
- alchemy/types/functions_v1start_kind.py +8 -0
- alchemy/types/functions_v1tail_invocations_request.py +32 -0
- alchemy/types/functions_v1tail_invocations_response.py +34 -0
- alchemy/types/functions_v1template.py +94 -0
- alchemy/types/functions_v1template_source.py +27 -0
- alchemy/types/functions_v1update_function_response.py +20 -0
- alchemy/types/google_protobuf_list_value.py +10 -0
- alchemy/types/google_protobuf_null_value.py +5 -0
- alchemy/types/google_protobuf_struct.py +10 -0
- alchemy/types/google_protobuf_value.py +5 -0
- alchemy/types/metrics_v1aggregate_row.py +24 -0
- alchemy/types/metrics_v1get_queue_response.py +25 -0
- alchemy/types/metrics_v1metric.py +16 -0
- alchemy/types/metrics_v1metric_dimension.py +14 -0
- alchemy/types/metrics_v1metric_filter.py +26 -0
- alchemy/types/metrics_v1metric_granularity.py +13 -0
- alchemy/types/metrics_v1query_aggregate_response.py +20 -0
- alchemy/types/metrics_v1query_timeseries_response.py +20 -0
- alchemy/types/metrics_v1timeseries.py +28 -0
- alchemy/types/metrics_v1timeseries_point.py +28 -0
- alchemy_python-0.1.0.dist-info/METADATA +196 -0
- alchemy_python-0.1.0.dist-info/RECORD +172 -0
- alchemy_python-0.1.0.dist-info/WHEEL +4 -0
- alchemy_python-0.1.0.dist-info/licenses/LICENSE +201 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .functions_v1source_file import FunctionsV1SourceFile
|
|
8
|
+
from .functions_v1source_layer import FunctionsV1SourceLayer
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class FunctionsV1Source(UniversalBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
Source is the files of a function built from source. A request carries
|
|
14
|
+
their content; the server keeps them as an archive in the artifacts bucket
|
|
15
|
+
and the version's spec names the archive and lists the files, with their
|
|
16
|
+
content again on GetFunctionVersion. A spec that names an archive and
|
|
17
|
+
carries no content, such as a version's own spec sent back to build it
|
|
18
|
+
again, reuses the archive.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
files: typing.Optional[typing.List[FunctionsV1SourceFile]] = None
|
|
22
|
+
layer: typing.Optional[FunctionsV1SourceLayer] = None
|
|
23
|
+
|
|
24
|
+
if IS_PYDANTIC_V2:
|
|
25
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
26
|
+
else:
|
|
27
|
+
|
|
28
|
+
class Config:
|
|
29
|
+
frozen = True
|
|
30
|
+
smart_union = True
|
|
31
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class FunctionsV1SourceFile(UniversalBaseModel):
|
|
10
|
+
path: typing.Optional[str] = pydantic.Field(default=None)
|
|
11
|
+
"""
|
|
12
|
+
path is relative to /app, e.g. handler.py.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
content: typing.Optional[str] = None
|
|
16
|
+
size: typing.Optional[str] = pydantic.Field(default=None)
|
|
17
|
+
"""
|
|
18
|
+
size is the content's length, set by the server.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
if IS_PYDANTIC_V2:
|
|
22
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
23
|
+
else:
|
|
24
|
+
|
|
25
|
+
class Config:
|
|
26
|
+
frozen = True
|
|
27
|
+
smart_union = True
|
|
28
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class FunctionsV1SourceLayer(UniversalBaseModel):
|
|
10
|
+
"""
|
|
11
|
+
SourceLayer is the archive of a Source's files in the artifacts bucket.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
key: typing.Optional[str] = None
|
|
15
|
+
sha256: typing.Optional[str] = pydantic.Field(default=None)
|
|
16
|
+
"""
|
|
17
|
+
sha256 is the archive's content digest, in hex.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
if IS_PYDANTIC_V2:
|
|
21
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
22
|
+
else:
|
|
23
|
+
|
|
24
|
+
class Config:
|
|
25
|
+
frozen = True
|
|
26
|
+
smart_union = True
|
|
27
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
import typing_extensions
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
8
|
+
from ..core.serialization import FieldMetadata
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class FunctionsV1SourceLimits(UniversalBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
SourceLimits bound a Source.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
max_files: typing_extensions.Annotated[
|
|
17
|
+
typing.Optional[int], FieldMetadata(alias="maxFiles"), pydantic.Field(alias="maxFiles")
|
|
18
|
+
] = None
|
|
19
|
+
max_bytes: typing_extensions.Annotated[
|
|
20
|
+
typing.Optional[str], FieldMetadata(alias="maxBytes"), pydantic.Field(alias="maxBytes")
|
|
21
|
+
] = None
|
|
22
|
+
|
|
23
|
+
if IS_PYDANTIC_V2:
|
|
24
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
25
|
+
else:
|
|
26
|
+
|
|
27
|
+
class Config:
|
|
28
|
+
frozen = True
|
|
29
|
+
smart_union = True
|
|
30
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
import typing_extensions
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
8
|
+
from ..core.serialization import FieldMetadata
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class FunctionsV1TailInvocationsRequest(UniversalBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
TailInvocations streams invocation changes. With should_replay the stream
|
|
14
|
+
first emits every non-terminal invocation (each marked replay=true) so a
|
|
15
|
+
reconnecting client is current before live events arrive.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
function_id: typing_extensions.Annotated[
|
|
19
|
+
typing.Optional[str], FieldMetadata(alias="functionId"), pydantic.Field(alias="functionId")
|
|
20
|
+
] = None
|
|
21
|
+
should_replay: typing_extensions.Annotated[
|
|
22
|
+
typing.Optional[bool], FieldMetadata(alias="shouldReplay"), pydantic.Field(alias="shouldReplay")
|
|
23
|
+
] = None
|
|
24
|
+
|
|
25
|
+
if IS_PYDANTIC_V2:
|
|
26
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
27
|
+
else:
|
|
28
|
+
|
|
29
|
+
class Config:
|
|
30
|
+
frozen = True
|
|
31
|
+
smart_union = True
|
|
32
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
import typing_extensions
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
8
|
+
from ..core.serialization import FieldMetadata
|
|
9
|
+
from .functions_v1invocation import FunctionsV1Invocation
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class FunctionsV1TailInvocationsResponse(UniversalBaseModel):
|
|
13
|
+
"""
|
|
14
|
+
TailInvocationsResponse is one lifecycle transition. event_type is the new
|
|
15
|
+
status as a wire token (e.g. "running", "succeeded").
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
invocation: typing.Optional[FunctionsV1Invocation] = None
|
|
19
|
+
event_type: typing_extensions.Annotated[
|
|
20
|
+
typing.Optional[str], FieldMetadata(alias="eventType"), pydantic.Field(alias="eventType")
|
|
21
|
+
] = None
|
|
22
|
+
replay: typing.Optional[bool] = None
|
|
23
|
+
emitted_at: typing_extensions.Annotated[
|
|
24
|
+
typing.Optional[str], FieldMetadata(alias="emittedAt"), pydantic.Field(alias="emittedAt")
|
|
25
|
+
] = None
|
|
26
|
+
|
|
27
|
+
if IS_PYDANTIC_V2:
|
|
28
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
29
|
+
else:
|
|
30
|
+
|
|
31
|
+
class Config:
|
|
32
|
+
frozen = True
|
|
33
|
+
smart_union = True
|
|
34
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
import typing_extensions
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
8
|
+
from ..core.serialization import FieldMetadata
|
|
9
|
+
from .functions_v1network import FunctionsV1Network
|
|
10
|
+
from .functions_v1template_source import FunctionsV1TemplateSource
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class FunctionsV1Template(UniversalBaseModel):
|
|
14
|
+
"""
|
|
15
|
+
Template is a function to build from: its source, a sample contract and the
|
|
16
|
+
settings the source needs.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
id: typing.Optional[str] = pydantic.Field(default=None)
|
|
20
|
+
"""
|
|
21
|
+
id names the template, e.g. call-decision-model.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
label: typing.Optional[str] = None
|
|
25
|
+
description: typing.Optional[str] = None
|
|
26
|
+
runtime: typing.Optional[str] = pydantic.Field(default=None)
|
|
27
|
+
"""
|
|
28
|
+
runtime is the id of the Runtime the files run on.
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
json_schema: typing_extensions.Annotated[
|
|
32
|
+
typing.Optional[FunctionsV1TemplateSource],
|
|
33
|
+
FieldMetadata(alias="jsonSchema"),
|
|
34
|
+
pydantic.Field(
|
|
35
|
+
alias="jsonSchema",
|
|
36
|
+
description="json_schema and arrow are the source and sample contract for each\n contract kind; a client offers the one matching the contract it builds.",
|
|
37
|
+
),
|
|
38
|
+
] = None
|
|
39
|
+
"""
|
|
40
|
+
json_schema and arrow are the source and sample contract for each
|
|
41
|
+
contract kind; a client offers the one matching the contract it builds.
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
arrow: typing.Optional[FunctionsV1TemplateSource] = None
|
|
45
|
+
env: typing.Optional[typing.Dict[str, str]] = pydantic.Field(default=None)
|
|
46
|
+
"""
|
|
47
|
+
env are the variables the source reads, with their defaults.
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
secrets: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
|
|
51
|
+
"""
|
|
52
|
+
secrets are the secrets the source reads, by variable name.
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
network: typing.Optional[FunctionsV1Network] = None
|
|
56
|
+
dark_lockup_url: typing_extensions.Annotated[
|
|
57
|
+
typing.Optional[str],
|
|
58
|
+
FieldMetadata(alias="darkLockupUrl"),
|
|
59
|
+
pydantic.Field(
|
|
60
|
+
alias="darkLockupUrl",
|
|
61
|
+
description="dark_lockup_url and light_lockup_url are the logo and name of the service\n the source calls.",
|
|
62
|
+
),
|
|
63
|
+
] = None
|
|
64
|
+
"""
|
|
65
|
+
dark_lockup_url and light_lockup_url are the logo and name of the service
|
|
66
|
+
the source calls.
|
|
67
|
+
"""
|
|
68
|
+
|
|
69
|
+
light_lockup_url: typing_extensions.Annotated[
|
|
70
|
+
typing.Optional[str], FieldMetadata(alias="lightLockupUrl"), pydantic.Field(alias="lightLockupUrl")
|
|
71
|
+
] = None
|
|
72
|
+
timeout_ms: typing_extensions.Annotated[
|
|
73
|
+
typing.Optional[str],
|
|
74
|
+
FieldMetadata(alias="timeoutMs"),
|
|
75
|
+
pydantic.Field(
|
|
76
|
+
alias="timeoutMs",
|
|
77
|
+
description="timeout_ms and retries are the function settings the source needs. Each\n call costs money, so a template does not retry by default.",
|
|
78
|
+
),
|
|
79
|
+
] = None
|
|
80
|
+
"""
|
|
81
|
+
timeout_ms and retries are the function settings the source needs. Each
|
|
82
|
+
call costs money, so a template does not retry by default.
|
|
83
|
+
"""
|
|
84
|
+
|
|
85
|
+
retries: typing.Optional[int] = None
|
|
86
|
+
|
|
87
|
+
if IS_PYDANTIC_V2:
|
|
88
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
89
|
+
else:
|
|
90
|
+
|
|
91
|
+
class Config:
|
|
92
|
+
frozen = True
|
|
93
|
+
smart_union = True
|
|
94
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .functions_v1contract import FunctionsV1Contract
|
|
8
|
+
from .functions_v1source_file import FunctionsV1SourceFile
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class FunctionsV1TemplateSource(UniversalBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
TemplateSource is a template's handler and sample contract for one contract
|
|
14
|
+
kind.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
files: typing.Optional[typing.List[FunctionsV1SourceFile]] = None
|
|
18
|
+
contract: typing.Optional[FunctionsV1Contract] = None
|
|
19
|
+
|
|
20
|
+
if IS_PYDANTIC_V2:
|
|
21
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
22
|
+
else:
|
|
23
|
+
|
|
24
|
+
class Config:
|
|
25
|
+
frozen = True
|
|
26
|
+
smart_union = True
|
|
27
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .functions_v1function import FunctionsV1Function
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class FunctionsV1UpdateFunctionResponse(UniversalBaseModel):
|
|
11
|
+
function: typing.Optional[FunctionsV1Function] = None
|
|
12
|
+
|
|
13
|
+
if IS_PYDANTIC_V2:
|
|
14
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
15
|
+
else:
|
|
16
|
+
|
|
17
|
+
class Config:
|
|
18
|
+
frozen = True
|
|
19
|
+
smart_union = True
|
|
20
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from .google_protobuf_value import GoogleProtobufValue
|
|
6
|
+
|
|
7
|
+
GoogleProtobufListValue = typing.List[typing.Optional[GoogleProtobufValue]]
|
|
8
|
+
"""
|
|
9
|
+
A JSON array whose elements may be any JSON value.
|
|
10
|
+
"""
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from .google_protobuf_value import GoogleProtobufValue
|
|
6
|
+
|
|
7
|
+
GoogleProtobufStruct = typing.Dict[str, typing.Optional[GoogleProtobufValue]]
|
|
8
|
+
"""
|
|
9
|
+
A JSON object whose property values may be any JSON value.
|
|
10
|
+
"""
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class MetricsV1AggregateRow(UniversalBaseModel):
|
|
10
|
+
"""
|
|
11
|
+
AggregateRow.values[i] is request.metrics[i] for this group.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
key: typing.Optional[str] = None
|
|
15
|
+
values: typing.Optional[typing.List[float]] = None
|
|
16
|
+
|
|
17
|
+
if IS_PYDANTIC_V2:
|
|
18
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
19
|
+
else:
|
|
20
|
+
|
|
21
|
+
class Config:
|
|
22
|
+
frozen = True
|
|
23
|
+
smart_union = True
|
|
24
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class MetricsV1GetQueueResponse(UniversalBaseModel):
|
|
10
|
+
queued: typing.Optional[str] = pydantic.Field(default=None)
|
|
11
|
+
"""
|
|
12
|
+
queued is invocations waiting to start: in the queue, or taken by a host
|
|
13
|
+
that is building the function or waiting on its max_concurrency.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
running: typing.Optional[str] = None
|
|
17
|
+
|
|
18
|
+
if IS_PYDANTIC_V2:
|
|
19
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
20
|
+
else:
|
|
21
|
+
|
|
22
|
+
class Config:
|
|
23
|
+
frozen = True
|
|
24
|
+
smart_union = True
|
|
25
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
MetricsV1Metric = typing.Union[
|
|
6
|
+
typing.Literal[
|
|
7
|
+
"METRIC_UNSPECIFIED",
|
|
8
|
+
"METRIC_INVOCATION_COUNT",
|
|
9
|
+
"METRIC_INVOCATION_ACQUIRE_DURATION",
|
|
10
|
+
"METRIC_INVOCATION_RUN_DURATION",
|
|
11
|
+
"METRIC_INVOCATION_TOTAL_DURATION",
|
|
12
|
+
"METRIC_INVOCATION_INPUT_BYTES",
|
|
13
|
+
"METRIC_INVOCATION_OUTPUT_BYTES",
|
|
14
|
+
],
|
|
15
|
+
typing.Any,
|
|
16
|
+
]
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
MetricsV1MetricDimension = typing.Union[
|
|
6
|
+
typing.Literal[
|
|
7
|
+
"METRIC_DIMENSION_UNSPECIFIED",
|
|
8
|
+
"METRIC_DIMENSION_TENANT_ID",
|
|
9
|
+
"METRIC_DIMENSION_FUNCTION_ID",
|
|
10
|
+
"METRIC_DIMENSION_STATUS",
|
|
11
|
+
"METRIC_DIMENSION_START_KIND",
|
|
12
|
+
],
|
|
13
|
+
typing.Any,
|
|
14
|
+
]
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .metrics_v1metric_dimension import MetricsV1MetricDimension
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class MetricsV1MetricFilter(UniversalBaseModel):
|
|
11
|
+
"""
|
|
12
|
+
MetricFilter narrows a query to invocations whose dimension is one of
|
|
13
|
+
values.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
dimension: typing.Optional[MetricsV1MetricDimension] = None
|
|
17
|
+
values: typing.Optional[typing.List[str]] = None
|
|
18
|
+
|
|
19
|
+
if IS_PYDANTIC_V2:
|
|
20
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
21
|
+
else:
|
|
22
|
+
|
|
23
|
+
class Config:
|
|
24
|
+
frozen = True
|
|
25
|
+
smart_union = True
|
|
26
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
MetricsV1MetricGranularity = typing.Union[
|
|
6
|
+
typing.Literal[
|
|
7
|
+
"METRIC_GRANULARITY_UNSPECIFIED",
|
|
8
|
+
"METRIC_GRANULARITY_MINUTE",
|
|
9
|
+
"METRIC_GRANULARITY_HOUR",
|
|
10
|
+
"METRIC_GRANULARITY_DAY",
|
|
11
|
+
],
|
|
12
|
+
typing.Any,
|
|
13
|
+
]
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .metrics_v1aggregate_row import MetricsV1AggregateRow
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class MetricsV1QueryAggregateResponse(UniversalBaseModel):
|
|
11
|
+
rows: typing.Optional[typing.List[MetricsV1AggregateRow]] = None
|
|
12
|
+
|
|
13
|
+
if IS_PYDANTIC_V2:
|
|
14
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
15
|
+
else:
|
|
16
|
+
|
|
17
|
+
class Config:
|
|
18
|
+
frozen = True
|
|
19
|
+
smart_union = True
|
|
20
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .metrics_v1timeseries import MetricsV1Timeseries
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class MetricsV1QueryTimeseriesResponse(UniversalBaseModel):
|
|
11
|
+
series: typing.Optional[typing.List[MetricsV1Timeseries]] = None
|
|
12
|
+
|
|
13
|
+
if IS_PYDANTIC_V2:
|
|
14
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
15
|
+
else:
|
|
16
|
+
|
|
17
|
+
class Config:
|
|
18
|
+
frozen = True
|
|
19
|
+
smart_union = True
|
|
20
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .metrics_v1timeseries_point import MetricsV1TimeseriesPoint
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class MetricsV1Timeseries(UniversalBaseModel):
|
|
11
|
+
"""
|
|
12
|
+
Timeseries.key is the group_by dimension's value. Points are dense: every
|
|
13
|
+
bucket in [since_ms, until_ms) is present, zero-filled, ascending; all
|
|
14
|
+
series of a response are index-aligned. When a filter covers the group_by
|
|
15
|
+
dimension, one series per requested value is returned in request order.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
key: typing.Optional[str] = None
|
|
19
|
+
points: typing.Optional[typing.List[MetricsV1TimeseriesPoint]] = None
|
|
20
|
+
|
|
21
|
+
if IS_PYDANTIC_V2:
|
|
22
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
23
|
+
else:
|
|
24
|
+
|
|
25
|
+
class Config:
|
|
26
|
+
frozen = True
|
|
27
|
+
smart_union = True
|
|
28
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
import typing_extensions
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
8
|
+
from ..core.serialization import FieldMetadata
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class MetricsV1TimeseriesPoint(UniversalBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
TimeseriesPoint.values[i] is request.metrics[i] for this bucket.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
bucket_start_ms: typing_extensions.Annotated[
|
|
17
|
+
typing.Optional[str], FieldMetadata(alias="bucketStartMs"), pydantic.Field(alias="bucketStartMs")
|
|
18
|
+
] = None
|
|
19
|
+
values: typing.Optional[typing.List[float]] = None
|
|
20
|
+
|
|
21
|
+
if IS_PYDANTIC_V2:
|
|
22
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
23
|
+
else:
|
|
24
|
+
|
|
25
|
+
class Config:
|
|
26
|
+
frozen = True
|
|
27
|
+
smart_union = True
|
|
28
|
+
extra = pydantic.Extra.allow
|