first vommit

This commit is contained in:
Till-Immer committed 2026-07-04 14:31:50 +02:00
commit a04e68bc95
4926 files changed
+764440

No files matched your search

@@ -0,0 +1,273 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# pyformat: disable
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from typing import Any, TYPE_CHECKING
from ..utils.dynamic_imports import lazy_getattr, lazy_dir
if TYPE_CHECKING:
from .cancelinteractionbyid import (
CancelInteractionByIDGlobals,
CancelInteractionByIDGlobalsTypedDict,
CancelInteractionByIDRequest,
CancelInteractionByIDRequestParam,
)
from .createagent import (
CreateAgentGlobals,
CreateAgentGlobalsTypedDict,
CreateAgentRequest,
CreateAgentRequestParam,
)
from .createinteraction import (
CreateInteractionGlobals,
CreateInteractionGlobalsTypedDict,
CreateInteractionRequest,
CreateInteractionRequestBody,
CreateInteractionRequestBodyParam,
CreateInteractionRequestParam,
CreateInteractionResponse,
CreateInteractionResponseTypedDict,
)
from .createwebhook import (
CreateWebhookGlobals,
CreateWebhookGlobalsTypedDict,
CreateWebhookRequest,
CreateWebhookRequestParam,
)
from .deleteagent import (
DeleteAgentGlobals,
DeleteAgentGlobalsTypedDict,
DeleteAgentRequest,
DeleteAgentRequestParam,
)
from .deleteinteraction import (
DeleteInteractionGlobals,
DeleteInteractionGlobalsTypedDict,
DeleteInteractionRequest,
DeleteInteractionRequestParam,
)
from .deletewebhook import (
DeleteWebhookGlobals,
DeleteWebhookGlobalsTypedDict,
DeleteWebhookRequest,
DeleteWebhookRequestParam,
)
from .getagent import (
GetAgentGlobals,
GetAgentGlobalsTypedDict,
GetAgentRequest,
GetAgentRequestParam,
)
from .getinteractionbyid import (
GetInteractionByIDGlobals,
GetInteractionByIDGlobalsTypedDict,
GetInteractionByIDRequest,
GetInteractionByIDRequestParam,
GetInteractionByIDResponse,
GetInteractionByIDResponseTypedDict,
)
from .getwebhook import (
GetWebhookGlobals,
GetWebhookGlobalsTypedDict,
GetWebhookRequest,
GetWebhookRequestParam,
)
from .listagents import (
ListAgentsGlobals,
ListAgentsGlobalsTypedDict,
ListAgentsRequest,
ListAgentsRequestParam,
)
from .listwebhooks import (
ListWebhooksGlobals,
ListWebhooksGlobalsTypedDict,
ListWebhooksRequest,
ListWebhooksRequestParam,
)
from .pingwebhook import (
PingWebhookGlobals,
PingWebhookGlobalsTypedDict,
PingWebhookRequest,
PingWebhookRequestParam,
)
from .rotatesigningsecret import (
RotateSigningSecretGlobals,
RotateSigningSecretGlobalsTypedDict,
RotateSigningSecretRequest,
RotateSigningSecretRequestParam,
)
from .updatewebhook import (
UpdateWebhookGlobals,
UpdateWebhookGlobalsTypedDict,
UpdateWebhookRequest,
UpdateWebhookRequestParam,
)
from . import internal
__all__ = [
"CancelInteractionByIDGlobals",
"CancelInteractionByIDGlobalsTypedDict",
"CancelInteractionByIDRequest",
"CancelInteractionByIDRequestParam",
"CreateAgentGlobals",
"CreateAgentGlobalsTypedDict",
"CreateAgentRequest",
"CreateAgentRequestParam",
"CreateInteractionGlobals",
"CreateInteractionGlobalsTypedDict",
"CreateInteractionRequest",
"CreateInteractionRequestBody",
"CreateInteractionRequestBodyParam",
"CreateInteractionRequestParam",
"CreateInteractionResponse",
"CreateInteractionResponseTypedDict",
"CreateWebhookGlobals",
"CreateWebhookGlobalsTypedDict",
"CreateWebhookRequest",
"CreateWebhookRequestParam",
"DeleteAgentGlobals",
"DeleteAgentGlobalsTypedDict",
"DeleteAgentRequest",
"DeleteAgentRequestParam",
"DeleteInteractionGlobals",
"DeleteInteractionGlobalsTypedDict",
"DeleteInteractionRequest",
"DeleteInteractionRequestParam",
"DeleteWebhookGlobals",
"DeleteWebhookGlobalsTypedDict",
"DeleteWebhookRequest",
"DeleteWebhookRequestParam",
"GetAgentGlobals",
"GetAgentGlobalsTypedDict",
"GetAgentRequest",
"GetAgentRequestParam",
"GetInteractionByIDGlobals",
"GetInteractionByIDGlobalsTypedDict",
"GetInteractionByIDRequest",
"GetInteractionByIDRequestParam",
"GetInteractionByIDResponse",
"GetInteractionByIDResponseTypedDict",
"GetWebhookGlobals",
"GetWebhookGlobalsTypedDict",
"GetWebhookRequest",
"GetWebhookRequestParam",
"ListAgentsGlobals",
"ListAgentsGlobalsTypedDict",
"ListAgentsRequest",
"ListAgentsRequestParam",
"ListWebhooksGlobals",
"ListWebhooksGlobalsTypedDict",
"ListWebhooksRequest",
"ListWebhooksRequestParam",
"PingWebhookGlobals",
"PingWebhookGlobalsTypedDict",
"PingWebhookRequest",
"PingWebhookRequestParam",
"RotateSigningSecretGlobals",
"RotateSigningSecretGlobalsTypedDict",
"RotateSigningSecretRequest",
"RotateSigningSecretRequestParam",
"UpdateWebhookGlobals",
"UpdateWebhookGlobalsTypedDict",
"UpdateWebhookRequest",
"UpdateWebhookRequestParam",
]
_dynamic_imports: dict[str, str] = {
"CancelInteractionByIDGlobals": ".cancelinteractionbyid",
"CancelInteractionByIDGlobalsTypedDict": ".cancelinteractionbyid",
"CancelInteractionByIDRequest": ".cancelinteractionbyid",
"CancelInteractionByIDRequestParam": ".cancelinteractionbyid",
"CreateAgentGlobals": ".createagent",
"CreateAgentGlobalsTypedDict": ".createagent",
"CreateAgentRequest": ".createagent",
"CreateAgentRequestParam": ".createagent",
"CreateInteractionGlobals": ".createinteraction",
"CreateInteractionGlobalsTypedDict": ".createinteraction",
"CreateInteractionRequest": ".createinteraction",
"CreateInteractionRequestBody": ".createinteraction",
"CreateInteractionRequestBodyParam": ".createinteraction",
"CreateInteractionRequestParam": ".createinteraction",
"CreateInteractionResponse": ".createinteraction",
"CreateInteractionResponseTypedDict": ".createinteraction",
"CreateWebhookGlobals": ".createwebhook",
"CreateWebhookGlobalsTypedDict": ".createwebhook",
"CreateWebhookRequest": ".createwebhook",
"CreateWebhookRequestParam": ".createwebhook",
"DeleteAgentGlobals": ".deleteagent",
"DeleteAgentGlobalsTypedDict": ".deleteagent",
"DeleteAgentRequest": ".deleteagent",
"DeleteAgentRequestParam": ".deleteagent",
"DeleteInteractionGlobals": ".deleteinteraction",
"DeleteInteractionGlobalsTypedDict": ".deleteinteraction",
"DeleteInteractionRequest": ".deleteinteraction",
"DeleteInteractionRequestParam": ".deleteinteraction",
"DeleteWebhookGlobals": ".deletewebhook",
"DeleteWebhookGlobalsTypedDict": ".deletewebhook",
"DeleteWebhookRequest": ".deletewebhook",
"DeleteWebhookRequestParam": ".deletewebhook",
"GetAgentGlobals": ".getagent",
"GetAgentGlobalsTypedDict": ".getagent",
"GetAgentRequest": ".getagent",
"GetAgentRequestParam": ".getagent",
"GetInteractionByIDGlobals": ".getinteractionbyid",
"GetInteractionByIDGlobalsTypedDict": ".getinteractionbyid",
"GetInteractionByIDRequest": ".getinteractionbyid",
"GetInteractionByIDRequestParam": ".getinteractionbyid",
"GetInteractionByIDResponse": ".getinteractionbyid",
"GetInteractionByIDResponseTypedDict": ".getinteractionbyid",
"GetWebhookGlobals": ".getwebhook",
"GetWebhookGlobalsTypedDict": ".getwebhook",
"GetWebhookRequest": ".getwebhook",
"GetWebhookRequestParam": ".getwebhook",
"ListAgentsGlobals": ".listagents",
"ListAgentsGlobalsTypedDict": ".listagents",
"ListAgentsRequest": ".listagents",
"ListAgentsRequestParam": ".listagents",
"ListWebhooksGlobals": ".listwebhooks",
"ListWebhooksGlobalsTypedDict": ".listwebhooks",
"ListWebhooksRequest": ".listwebhooks",
"ListWebhooksRequestParam": ".listwebhooks",
"PingWebhookGlobals": ".pingwebhook",
"PingWebhookGlobalsTypedDict": ".pingwebhook",
"PingWebhookRequest": ".pingwebhook",
"PingWebhookRequestParam": ".pingwebhook",
"RotateSigningSecretGlobals": ".rotatesigningsecret",
"RotateSigningSecretGlobalsTypedDict": ".rotatesigningsecret",
"RotateSigningSecretRequest": ".rotatesigningsecret",
"RotateSigningSecretRequestParam": ".rotatesigningsecret",
"UpdateWebhookGlobals": ".updatewebhook",
"UpdateWebhookGlobalsTypedDict": ".updatewebhook",
"UpdateWebhookRequest": ".updatewebhook",
"UpdateWebhookRequestParam": ".updatewebhook",
}
_sub_packages = ["internal"]
def __getattr__(attr_name: str) -> Any:
return lazy_getattr(
attr_name,
package=__package__,
dynamic_imports=_dynamic_imports,
sub_packages=_sub_packages,
)
def __dir__():
return lazy_dir(dynamic_imports=_dynamic_imports, sub_packages=_sub_packages)
@@ -0,0 +1,89 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# pyformat: disable
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
from ..types import BaseModel, UNSET_SENTINEL
from ..utils import FieldMetadata, PathParamMetadata
from pydantic import model_serializer
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class CancelInteractionByIDGlobalsTypedDict(TypedDict):
api_version: NotRequired[str]
r"""Which version of the API to use."""
class CancelInteractionByIDGlobals(BaseModel):
api_version: Annotated[
Optional[str],
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
] = None
r"""Which version of the API to use."""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["api_version"])
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k, serialized.get(n))
if val != UNSET_SENTINEL:
if val is not None or k not in optional_fields:
m[k] = val
return m
class CancelInteractionByIDRequestParam(TypedDict):
id: str
r"""The unique identifier of the interaction to cancel."""
api_version: NotRequired[str]
r"""Which version of the API to use."""
class CancelInteractionByIDRequest(BaseModel):
id: Annotated[
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
]
r"""The unique identifier of the interaction to cancel."""
api_version: Annotated[
Optional[str],
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
] = None
r"""Which version of the API to use."""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["api_version"])
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k, serialized.get(n))
if val != UNSET_SENTINEL:
if val is not None or k not in optional_fields:
m[k] = val
return m
@@ -0,0 +1,91 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# pyformat: disable
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
from ..types import BaseModel, UNSET_SENTINEL
from ..types.agents import agent as agents_agent
from ..utils import FieldMetadata, PathParamMetadata, RequestMetadata
from pydantic import model_serializer
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class CreateAgentGlobalsTypedDict(TypedDict):
api_version: NotRequired[str]
r"""Which version of the API to use."""
class CreateAgentGlobals(BaseModel):
api_version: Annotated[
Optional[str],
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
] = None
r"""Which version of the API to use."""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["api_version"])
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k, serialized.get(n))
if val != UNSET_SENTINEL:
if val is not None or k not in optional_fields:
m[k] = val
return m
class CreateAgentRequestParam(TypedDict):
body: agents_agent.AgentParam
r"""The request body."""
api_version: NotRequired[str]
r"""Which version of the API to use."""
class CreateAgentRequest(BaseModel):
body: Annotated[
agents_agent.Agent,
FieldMetadata(request=RequestMetadata(media_type="application/json")),
]
r"""The request body."""
api_version: Annotated[
Optional[str],
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
] = None
r"""Which version of the API to use."""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["api_version"])
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k, serialized.get(n))
if val != UNSET_SENTINEL:
if val is not None or k not in optional_fields:
m[k] = val
return m
@@ -0,0 +1,141 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# pyformat: disable
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
from ..types import BaseModel, UNSET_SENTINEL
from ..types.interactions import (
createagentinteraction as interactions_createagentinteraction,
createmodelinteraction as interactions_createmodelinteraction,
interaction as interactions_interaction,
interactionsseevent as interactions_interactionsseevent,
)
from ..utils import FieldMetadata, PathParamMetadata, RequestMetadata
from ..utils.eventstreaming import AsyncStream, Stream
from pydantic import model_serializer
from typing import Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
class CreateInteractionGlobalsTypedDict(TypedDict):
api_version: NotRequired[str]
r"""Which version of the API to use."""
class CreateInteractionGlobals(BaseModel):
api_version: Annotated[
Optional[str],
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
] = None
r"""Which version of the API to use."""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["api_version"])
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k, serialized.get(n))
if val != UNSET_SENTINEL:
if val is not None or k not in optional_fields:
m[k] = val
return m
CreateInteractionRequestBodyParam = TypeAliasType(
"CreateInteractionRequestBodyParam",
Union[
interactions_createagentinteraction.CreateAgentInteractionParam,
interactions_createmodelinteraction.CreateModelInteractionParam,
],
)
r"""The request body."""
CreateInteractionRequestBody = TypeAliasType(
"CreateInteractionRequestBody",
Union[
interactions_createagentinteraction.CreateAgentInteraction,
interactions_createmodelinteraction.CreateModelInteraction,
],
)
r"""The request body."""
class CreateInteractionRequestParam(TypedDict):
body: CreateInteractionRequestBodyParam
r"""The request body."""
api_version: NotRequired[str]
r"""Which version of the API to use."""
class CreateInteractionRequest(BaseModel):
body: Annotated[
CreateInteractionRequestBody,
FieldMetadata(request=RequestMetadata(media_type="application/json")),
]
r"""The request body."""
api_version: Annotated[
Optional[str],
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
] = None
r"""Which version of the API to use."""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["api_version"])
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k, serialized.get(n))
if val != UNSET_SENTINEL:
if val is not None or k not in optional_fields:
m[k] = val
return m
CreateInteractionResponseTypedDict = TypeAliasType(
"CreateInteractionResponseTypedDict",
Union[
interactions_interaction.InteractionTypedDict,
Union[
Stream[interactions_interactionsseevent.InteractionSSEEventTypedDict],
AsyncStream[interactions_interactionsseevent.InteractionSSEEventTypedDict],
],
],
)
CreateInteractionResponse = TypeAliasType(
"CreateInteractionResponse",
Union[
interactions_interaction.Interaction,
Union[
Stream[interactions_interactionsseevent.InteractionSSEEvent],
AsyncStream[interactions_interactionsseevent.InteractionSSEEvent],
],
],
)
@@ -0,0 +1,91 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# pyformat: disable
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
from ..types import BaseModel, UNSET_SENTINEL
from ..types.webhooks import webhook as webhooks_webhook
from ..utils import FieldMetadata, PathParamMetadata, RequestMetadata
from pydantic import model_serializer
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class CreateWebhookGlobalsTypedDict(TypedDict):
api_version: NotRequired[str]
r"""Which version of the API to use."""
class CreateWebhookGlobals(BaseModel):
api_version: Annotated[
Optional[str],
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
] = None
r"""Which version of the API to use."""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["api_version"])
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k, serialized.get(n))
if val != UNSET_SENTINEL:
if val is not None or k not in optional_fields:
m[k] = val
return m
class CreateWebhookRequestParam(TypedDict):
body: webhooks_webhook.WebhookInputParam
r"""Required. The webhook to create."""
api_version: NotRequired[str]
r"""Which version of the API to use."""
class CreateWebhookRequest(BaseModel):
body: Annotated[
webhooks_webhook.WebhookInput,
FieldMetadata(request=RequestMetadata(media_type="application/json")),
]
r"""Required. The webhook to create."""
api_version: Annotated[
Optional[str],
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
] = None
r"""Which version of the API to use."""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["api_version"])
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k, serialized.get(n))
if val != UNSET_SENTINEL:
if val is not None or k not in optional_fields:
m[k] = val
return m
@@ -0,0 +1,87 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# pyformat: disable
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
from ..types import BaseModel, UNSET_SENTINEL
from ..utils import FieldMetadata, PathParamMetadata
from pydantic import model_serializer
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class DeleteAgentGlobalsTypedDict(TypedDict):
api_version: NotRequired[str]
r"""Which version of the API to use."""
class DeleteAgentGlobals(BaseModel):
api_version: Annotated[
Optional[str],
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
] = None
r"""Which version of the API to use."""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["api_version"])
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k, serialized.get(n))
if val != UNSET_SENTINEL:
if val is not None or k not in optional_fields:
m[k] = val
return m
class DeleteAgentRequestParam(TypedDict):
id: str
api_version: NotRequired[str]
r"""Which version of the API to use."""
class DeleteAgentRequest(BaseModel):
id: Annotated[
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
]
api_version: Annotated[
Optional[str],
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
] = None
r"""Which version of the API to use."""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["api_version"])
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k, serialized.get(n))
if val != UNSET_SENTINEL:
if val is not None or k not in optional_fields:
m[k] = val
return m
@@ -0,0 +1,89 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# pyformat: disable
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
from ..types import BaseModel, UNSET_SENTINEL
from ..utils import FieldMetadata, PathParamMetadata
from pydantic import model_serializer
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class DeleteInteractionGlobalsTypedDict(TypedDict):
api_version: NotRequired[str]
r"""Which version of the API to use."""
class DeleteInteractionGlobals(BaseModel):
api_version: Annotated[
Optional[str],
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
] = None
r"""Which version of the API to use."""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["api_version"])
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k, serialized.get(n))
if val != UNSET_SENTINEL:
if val is not None or k not in optional_fields:
m[k] = val
return m
class DeleteInteractionRequestParam(TypedDict):
id: str
r"""The unique identifier of the interaction to delete."""
api_version: NotRequired[str]
r"""Which version of the API to use."""
class DeleteInteractionRequest(BaseModel):
id: Annotated[
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
]
r"""The unique identifier of the interaction to delete."""
api_version: Annotated[
Optional[str],
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
] = None
r"""Which version of the API to use."""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["api_version"])
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k, serialized.get(n))
if val != UNSET_SENTINEL:
if val is not None or k not in optional_fields:
m[k] = val
return m
@@ -0,0 +1,93 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# pyformat: disable
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
from ..types import BaseModel, UNSET_SENTINEL
from ..utils import FieldMetadata, PathParamMetadata
from pydantic import model_serializer
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class DeleteWebhookGlobalsTypedDict(TypedDict):
api_version: NotRequired[str]
r"""Which version of the API to use."""
class DeleteWebhookGlobals(BaseModel):
api_version: Annotated[
Optional[str],
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
] = None
r"""Which version of the API to use."""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["api_version"])
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k, serialized.get(n))
if val != UNSET_SENTINEL:
if val is not None or k not in optional_fields:
m[k] = val
return m
class DeleteWebhookRequestParam(TypedDict):
id: str
r"""Required. The ID of the webhook to delete.
Format: `{webhook_id}`
"""
api_version: NotRequired[str]
r"""Which version of the API to use."""
class DeleteWebhookRequest(BaseModel):
id: Annotated[
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
]
r"""Required. The ID of the webhook to delete.
Format: `{webhook_id}`
"""
api_version: Annotated[
Optional[str],
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
] = None
r"""Which version of the API to use."""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["api_version"])
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k, serialized.get(n))
if val != UNSET_SENTINEL:
if val is not None or k not in optional_fields:
m[k] = val
return m
@@ -0,0 +1,87 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# pyformat: disable
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
from ..types import BaseModel, UNSET_SENTINEL
from ..utils import FieldMetadata, PathParamMetadata
from pydantic import model_serializer
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class GetAgentGlobalsTypedDict(TypedDict):
api_version: NotRequired[str]
r"""Which version of the API to use."""
class GetAgentGlobals(BaseModel):
api_version: Annotated[
Optional[str],
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
] = None
r"""Which version of the API to use."""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["api_version"])
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k, serialized.get(n))
if val != UNSET_SENTINEL:
if val is not None or k not in optional_fields:
m[k] = val
return m
class GetAgentRequestParam(TypedDict):
id: str
api_version: NotRequired[str]
r"""Which version of the API to use."""
class GetAgentRequest(BaseModel):
id: Annotated[
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
]
api_version: Annotated[
Optional[str],
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
] = None
r"""Which version of the API to use."""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["api_version"])
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k, serialized.get(n))
if val != UNSET_SENTINEL:
if val is not None or k not in optional_fields:
m[k] = val
return m
@@ -0,0 +1,148 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# pyformat: disable
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
from ..types import BaseModel, UNSET_SENTINEL
from ..types.interactions import (
interaction as interactions_interaction,
interactionsseevent as interactions_interactionsseevent,
)
from ..utils import FieldMetadata, PathParamMetadata, QueryParamMetadata
from ..utils.eventstreaming import AsyncStream, Stream
import pydantic
from pydantic import model_serializer
from typing import Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
class GetInteractionByIDGlobalsTypedDict(TypedDict):
api_version: NotRequired[str]
r"""Which version of the API to use."""
class GetInteractionByIDGlobals(BaseModel):
api_version: Annotated[
Optional[str],
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
] = None
r"""Which version of the API to use."""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["api_version"])
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k, serialized.get(n))
if val != UNSET_SENTINEL:
if val is not None or k not in optional_fields:
m[k] = val
return m
class GetInteractionByIDRequestParam(TypedDict):
id: str
r"""The unique identifier of the interaction to retrieve."""
stream: NotRequired[bool]
r"""If set to true, the generated content will be streamed incrementally."""
last_event_id: NotRequired[str]
r"""Optional. If set, resumes the interaction stream from the next chunk after the event marked by the event id. Can only be used if `stream` is true."""
include_input: NotRequired[bool]
r"""If set to true, includes the input in the response."""
api_version: NotRequired[str]
r"""Which version of the API to use."""
class GetInteractionByIDRequest(BaseModel):
id: Annotated[
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
]
r"""The unique identifier of the interaction to retrieve."""
stream: Annotated[
Optional[bool],
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
] = False
r"""If set to true, the generated content will be streamed incrementally."""
last_event_id: Annotated[
Optional[str],
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
] = None
r"""Optional. If set, resumes the interaction stream from the next chunk after the event marked by the event id. Can only be used if `stream` is true."""
include_input: Annotated[
Optional[bool],
pydantic.Field(
deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
),
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
] = False
r"""If set to true, includes the input in the response."""
api_version: Annotated[
Optional[str],
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
] = None
r"""Which version of the API to use."""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(
["stream", "last_event_id", "include_input", "api_version"]
)
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k, serialized.get(n))
if val != UNSET_SENTINEL:
if val is not None or k not in optional_fields:
m[k] = val
return m
GetInteractionByIDResponseTypedDict = TypeAliasType(
"GetInteractionByIDResponseTypedDict",
Union[
interactions_interaction.InteractionTypedDict,
Union[
Stream[interactions_interactionsseevent.InteractionSSEEventTypedDict],
AsyncStream[interactions_interactionsseevent.InteractionSSEEventTypedDict],
],
],
)
GetInteractionByIDResponse = TypeAliasType(
"GetInteractionByIDResponse",
Union[
interactions_interaction.Interaction,
Union[
Stream[interactions_interactionsseevent.InteractionSSEEvent],
AsyncStream[interactions_interactionsseevent.InteractionSSEEvent],
],
],
)
@@ -0,0 +1,89 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# pyformat: disable
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
from ..types import BaseModel, UNSET_SENTINEL
from ..utils import FieldMetadata, PathParamMetadata
from pydantic import model_serializer
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class GetWebhookGlobalsTypedDict(TypedDict):
api_version: NotRequired[str]
r"""Which version of the API to use."""
class GetWebhookGlobals(BaseModel):
api_version: Annotated[
Optional[str],
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
] = None
r"""Which version of the API to use."""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["api_version"])
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k, serialized.get(n))
if val != UNSET_SENTINEL:
if val is not None or k not in optional_fields:
m[k] = val
return m
class GetWebhookRequestParam(TypedDict):
id: str
r"""Required. The ID of the webhook to retrieve."""
api_version: NotRequired[str]
r"""Which version of the API to use."""
class GetWebhookRequest(BaseModel):
id: Annotated[
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
]
r"""Required. The ID of the webhook to retrieve."""
api_version: Annotated[
Optional[str],
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
] = None
r"""Which version of the API to use."""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["api_version"])
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k, serialized.get(n))
if val != UNSET_SENTINEL:
if val is not None or k not in optional_fields:
m[k] = val
return m
@@ -0,0 +1,41 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# pyformat: disable
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from typing import Any, TYPE_CHECKING
from ...utils.dynamic_imports import lazy_getattr, lazy_dir
if TYPE_CHECKING:
from .globals import Globals, GlobalsTypedDict
__all__ = ["Globals", "GlobalsTypedDict"]
_dynamic_imports: dict[str, str] = {
"Globals": ".globals",
"GlobalsTypedDict": ".globals",
}
def __getattr__(attr_name: str) -> Any:
return lazy_getattr(
attr_name, package=__package__, dynamic_imports=_dynamic_imports
)
def __dir__():
return lazy_dir(dynamic_imports=_dynamic_imports)
@@ -0,0 +1,72 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# pyformat: disable
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
from ...types import BaseModel, UNSET_SENTINEL
from ...utils import FieldMetadata, HeaderMetadata, PathParamMetadata
import pydantic
from pydantic import model_serializer
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class GlobalsTypedDict(TypedDict):
api_version: NotRequired[str]
r"""Which version of the API to use."""
api_revision: NotRequired[str]
r"""API revision header to send with Google GenAI API requests."""
user_project: NotRequired[str]
r"""Quota project header to send with Google GenAI API requests."""
class Globals(BaseModel):
api_version: Annotated[
Optional[str],
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
] = None
r"""Which version of the API to use."""
api_revision: Annotated[
Optional[str],
pydantic.Field(alias="Api-Revision"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""API revision header to send with Google GenAI API requests."""
user_project: Annotated[
Optional[str],
pydantic.Field(alias="x-goog-user-project"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""Quota project header to send with Google GenAI API requests."""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["api_version", "api_revision", "user_project"])
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k, serialized.get(n))
if val != UNSET_SENTINEL:
if val is not None or k not in optional_fields:
m[k] = val
return m
@@ -0,0 +1,100 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# pyformat: disable
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
from ..types import BaseModel, UNSET_SENTINEL
from ..utils import FieldMetadata, PathParamMetadata, QueryParamMetadata
from pydantic import model_serializer
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class ListAgentsGlobalsTypedDict(TypedDict):
api_version: NotRequired[str]
r"""Which version of the API to use."""
class ListAgentsGlobals(BaseModel):
api_version: Annotated[
Optional[str],
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
] = None
r"""Which version of the API to use."""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["api_version"])
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k, serialized.get(n))
if val != UNSET_SENTINEL:
if val is not None or k not in optional_fields:
m[k] = val
return m
class ListAgentsRequestParam(TypedDict):
api_version: NotRequired[str]
r"""Which version of the API to use."""
page_size: NotRequired[int]
page_token: NotRequired[str]
parent: NotRequired[str]
class ListAgentsRequest(BaseModel):
api_version: Annotated[
Optional[str],
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
] = None
r"""Which version of the API to use."""
page_size: Annotated[
Optional[int],
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
] = None
page_token: Annotated[
Optional[str],
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
] = None
parent: Annotated[
Optional[str],
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
] = None
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["api_version", "page_size", "page_token", "parent"])
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k, serialized.get(n))
if val != UNSET_SENTINEL:
if val is not None or k not in optional_fields:
m[k] = val
return m
@@ -0,0 +1,108 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# pyformat: disable
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
from ..types import BaseModel, UNSET_SENTINEL
from ..utils import FieldMetadata, PathParamMetadata, QueryParamMetadata
from pydantic import model_serializer
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class ListWebhooksGlobalsTypedDict(TypedDict):
api_version: NotRequired[str]
r"""Which version of the API to use."""
class ListWebhooksGlobals(BaseModel):
api_version: Annotated[
Optional[str],
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
] = None
r"""Which version of the API to use."""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["api_version"])
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k, serialized.get(n))
if val != UNSET_SENTINEL:
if val is not None or k not in optional_fields:
m[k] = val
return m
class ListWebhooksRequestParam(TypedDict):
api_version: NotRequired[str]
r"""Which version of the API to use."""
page_size: NotRequired[int]
r"""Optional. The maximum number of webhooks to return. The service may return fewer than
this value. If unspecified, at most 50 webhooks will be returned.
The maximum value is 1000.
"""
page_token: NotRequired[str]
r"""Optional. A page token, received from a previous `ListWebhooks` call.
Provide this to retrieve the subsequent page.
"""
class ListWebhooksRequest(BaseModel):
api_version: Annotated[
Optional[str],
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
] = None
r"""Which version of the API to use."""
page_size: Annotated[
Optional[int],
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
] = None
r"""Optional. The maximum number of webhooks to return. The service may return fewer than
this value. If unspecified, at most 50 webhooks will be returned.
The maximum value is 1000.
"""
page_token: Annotated[
Optional[str],
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
] = None
r"""Optional. A page token, received from a previous `ListWebhooks` call.
Provide this to retrieve the subsequent page.
"""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["api_version", "page_size", "page_token"])
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k, serialized.get(n))
if val != UNSET_SENTINEL:
if val is not None or k not in optional_fields:
m[k] = val
return m
@@ -0,0 +1,102 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# pyformat: disable
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
from ..types import BaseModel, UNSET_SENTINEL
from ..types.webhooks import pingwebhookrequest as webhooks_pingwebhookrequest
from ..utils import FieldMetadata, PathParamMetadata, RequestMetadata
from pydantic import model_serializer
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class PingWebhookGlobalsTypedDict(TypedDict):
api_version: NotRequired[str]
r"""Which version of the API to use."""
class PingWebhookGlobals(BaseModel):
api_version: Annotated[
Optional[str],
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
] = None
r"""Which version of the API to use."""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["api_version"])
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k, serialized.get(n))
if val != UNSET_SENTINEL:
if val is not None or k not in optional_fields:
m[k] = val
return m
class PingWebhookRequestParam(TypedDict):
id: str
r"""Required. The ID of the webhook to ping.
Format: `{webhook_id}`
"""
api_version: NotRequired[str]
r"""Which version of the API to use."""
body: NotRequired[webhooks_pingwebhookrequest.PingWebhookRequestParam]
r"""The request body."""
class PingWebhookRequest(BaseModel):
id: Annotated[
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
]
r"""Required. The ID of the webhook to ping.
Format: `{webhook_id}`
"""
api_version: Annotated[
Optional[str],
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
] = None
r"""Which version of the API to use."""
body: Annotated[
Optional[webhooks_pingwebhookrequest.PingWebhookRequest],
FieldMetadata(request=RequestMetadata(media_type="application/json")),
] = None
r"""The request body."""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["api_version", "body"])
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k, serialized.get(n))
if val != UNSET_SENTINEL:
if val is not None or k not in optional_fields:
m[k] = val
return m
@@ -0,0 +1,106 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# pyformat: disable
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
from ..types import BaseModel, UNSET_SENTINEL
from ..types.webhooks import (
rotatesigningsecretrequest as webhooks_rotatesigningsecretrequest,
)
from ..utils import FieldMetadata, PathParamMetadata, RequestMetadata
from pydantic import model_serializer
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class RotateSigningSecretGlobalsTypedDict(TypedDict):
api_version: NotRequired[str]
r"""Which version of the API to use."""
class RotateSigningSecretGlobals(BaseModel):
api_version: Annotated[
Optional[str],
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
] = None
r"""Which version of the API to use."""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["api_version"])
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k, serialized.get(n))
if val != UNSET_SENTINEL:
if val is not None or k not in optional_fields:
m[k] = val
return m
class RotateSigningSecretRequestParam(TypedDict):
id: str
r"""Required. The ID of the webhook for which to generate a signing secret.
Format: `{webhook_id}`
"""
api_version: NotRequired[str]
r"""Which version of the API to use."""
body: NotRequired[
webhooks_rotatesigningsecretrequest.RotateSigningSecretRequestParam
]
r"""The request body."""
class RotateSigningSecretRequest(BaseModel):
id: Annotated[
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
]
r"""Required. The ID of the webhook for which to generate a signing secret.
Format: `{webhook_id}`
"""
api_version: Annotated[
Optional[str],
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
] = None
r"""Which version of the API to use."""
body: Annotated[
Optional[webhooks_rotatesigningsecretrequest.RotateSigningSecretRequest],
FieldMetadata(request=RequestMetadata(media_type="application/json")),
] = None
r"""The request body."""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["api_version", "body"])
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k, serialized.get(n))
if val != UNSET_SENTINEL:
if val is not None or k not in optional_fields:
m[k] = val
return m
@@ -0,0 +1,111 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# pyformat: disable
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
from ..types import BaseModel, UNSET_SENTINEL
from ..types.webhooks import webhookupdate as webhooks_webhookupdate
from ..utils import (
FieldMetadata,
PathParamMetadata,
QueryParamMetadata,
RequestMetadata,
)
from pydantic import model_serializer
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class UpdateWebhookGlobalsTypedDict(TypedDict):
api_version: NotRequired[str]
r"""Which version of the API to use."""
class UpdateWebhookGlobals(BaseModel):
api_version: Annotated[
Optional[str],
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
] = None
r"""Which version of the API to use."""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["api_version"])
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k, serialized.get(n))
if val != UNSET_SENTINEL:
if val is not None or k not in optional_fields:
m[k] = val
return m
class UpdateWebhookRequestParam(TypedDict):
id: str
r"""Required. The ID of the webhook to update."""
api_version: NotRequired[str]
r"""Which version of the API to use."""
update_mask: NotRequired[str]
r"""Optional. The list of fields to update."""
body: NotRequired[webhooks_webhookupdate.WebhookUpdateParam]
r"""Required. The webhook to update."""
class UpdateWebhookRequest(BaseModel):
id: Annotated[
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
]
r"""Required. The ID of the webhook to update."""
api_version: Annotated[
Optional[str],
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
] = None
r"""Which version of the API to use."""
update_mask: Annotated[
Optional[str],
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
] = None
r"""Optional. The list of fields to update."""
body: Annotated[
Optional[webhooks_webhookupdate.WebhookUpdate],
FieldMetadata(request=RequestMetadata(media_type="application/json")),
] = None
r"""Required. The webhook to update."""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["api_version", "update_mask", "body"])
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k, serialized.get(n))
if val != UNSET_SENTINEL:
if val is not None or k not in optional_fields:
m[k] = val
return m