Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions google/genai/_gaos/types/interactions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
CreateModelInteractionResponseFormat,
CreateModelInteractionResponseFormatParam,
)
from .cronconfig import CronConfig, CronConfigTypedDict
from .deepresearchagentconfig import (
DeepResearchAgentConfig,
DeepResearchAgentConfigParam,
Expand Down Expand Up @@ -134,6 +135,7 @@
)
from .filesearchresultstep import FileSearchResultStep, FileSearchResultStepParam
from .filter_ import Filter, FilterParam
from .filterrule import FilterRule, FilterRuleTypedDict, Operator
from .findrequest import FindRequest, FindRequestParam, Mode
from .fixrequest import FixRequest, FixRequestParam
from .function import Function, FunctionParam
Expand Down Expand Up @@ -388,6 +390,7 @@
TranscriptionModeParam,
UnknownTranscriptionMode,
)
from .trigger import Script, ScriptTypedDict
from .urlcitation import URLCitation, URLCitationParam
from .urlcontext import URLContext, URLContextParam
from .urlcontextcallarguments import (
Expand Down Expand Up @@ -431,6 +434,14 @@
VideoResponseFormatParam,
)
from .webhookconfig import WebhookConfig, WebhookConfigParam
from .webhooktriggerconfig import (
Verification,
VerificationTypedDict,
WebhookTriggerConfig,
WebhookTriggerConfigFilter,
WebhookTriggerConfigFilterTypedDict,
WebhookTriggerConfigTypedDict,
)
from .wordinfo import WordInfo, WordInfoParam

__all__ = [
Expand Down Expand Up @@ -489,6 +500,8 @@
"CreateModelInteractionParam",
"CreateModelInteractionResponseFormat",
"CreateModelInteractionResponseFormatParam",
"CronConfig",
"CronConfigTypedDict",
"DeepResearchAgentConfig",
"DeepResearchAgentConfigParam",
"Disabled",
Expand Down Expand Up @@ -532,6 +545,8 @@
"FileSearchResultTypedDict",
"Filter",
"FilterParam",
"FilterRule",
"FilterRuleTypedDict",
"FindRequest",
"FindRequestParam",
"FixRequest",
Expand Down Expand Up @@ -667,6 +682,7 @@
"Network",
"NetworkEnum",
"NetworkParam",
"Operator",
"ParallelAISearchConfig",
"ParallelAISearchConfigParam",
"PlaceCitation",
Expand Down Expand Up @@ -708,6 +724,8 @@
"ReviewSnippetParam",
"SafetySetting",
"SafetySettingParam",
"Script",
"ScriptTypedDict",
"ServiceTier",
"SessionConfig",
"SessionConfigParam",
Expand Down Expand Up @@ -808,6 +826,8 @@
"UserInputStepParam",
"VerbatimTranscriptionMode",
"VerbatimTranscriptionModeParam",
"Verification",
"VerificationTypedDict",
"VertexAISearchConfig",
"VertexAISearchConfigParam",
"VideoConfig",
Expand All @@ -825,6 +845,10 @@
"Visualization",
"WebhookConfig",
"WebhookConfigParam",
"WebhookTriggerConfig",
"WebhookTriggerConfigFilter",
"WebhookTriggerConfigFilterTypedDict",
"WebhookTriggerConfigTypedDict",
"WordInfo",
"WordInfoParam",
]
Expand Down Expand Up @@ -890,6 +914,8 @@
"CreateModelInteractionParam": ".createmodelinteraction",
"CreateModelInteractionResponseFormat": ".createmodelinteraction",
"CreateModelInteractionResponseFormatParam": ".createmodelinteraction",
"CronConfig": ".cronconfig",
"CronConfigTypedDict": ".cronconfig",
"DeepResearchAgentConfig": ".deepresearchagentconfig",
"DeepResearchAgentConfigParam": ".deepresearchagentconfig",
"Visualization": ".deepresearchagentconfig",
Expand Down Expand Up @@ -937,6 +963,9 @@
"FileSearchResultStepParam": ".filesearchresultstep",
"Filter": ".filter_",
"FilterParam": ".filter_",
"FilterRule": ".filterrule",
"FilterRuleTypedDict": ".filterrule",
"Operator": ".filterrule",
"FindRequest": ".findrequest",
"FindRequestParam": ".findrequest",
"Mode": ".findrequest",
Expand Down Expand Up @@ -1177,6 +1206,8 @@
"TranscriptionMode": ".transcriptionmode",
"TranscriptionModeParam": ".transcriptionmode",
"UnknownTranscriptionMode": ".transcriptionmode",
"Script": ".trigger",
"ScriptTypedDict": ".trigger",
"URLCitation": ".urlcitation",
"URLCitationParam": ".urlcitation",
"URLContext": ".urlcontext",
Expand Down Expand Up @@ -1221,6 +1252,12 @@
"VideoResponseFormatParam": ".videoresponseformat",
"WebhookConfig": ".webhookconfig",
"WebhookConfigParam": ".webhookconfig",
"Verification": ".webhooktriggerconfig",
"VerificationTypedDict": ".webhooktriggerconfig",
"WebhookTriggerConfig": ".webhooktriggerconfig",
"WebhookTriggerConfigFilter": ".webhooktriggerconfig",
"WebhookTriggerConfigFilterTypedDict": ".webhooktriggerconfig",
"WebhookTriggerConfigTypedDict": ".webhooktriggerconfig",
"WordInfo": ".wordinfo",
"WordInfoParam": ".wordinfo",
}
Expand Down
40 changes: 40 additions & 0 deletions google/genai/_gaos/types/interactions/cronconfig.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# 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 .. import BaseModel
from typing_extensions import TypedDict


class CronConfigTypedDict(TypedDict):
r"""Cron-specific trigger configuration."""

schedule: str
r"""Required. Standard 5-part cron expression (e.g., \"0 2 * * 1-5\")."""
time_zone: str
r"""Required. IANA time zone identifier (e.g., \"America/Los_Angeles\", \"UTC\")."""


class CronConfig(BaseModel):
r"""Cron-specific trigger configuration."""

schedule: str
r"""Required. Standard 5-part cron expression (e.g., \"0 2 * * 1-5\")."""

time_zone: str
r"""Required. IANA time zone identifier (e.g., \"America/Los_Angeles\", \"UTC\")."""
57 changes: 57 additions & 0 deletions google/genai/_gaos/types/interactions/filterrule.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# 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 .. import BaseModel, UnrecognizedStr
from typing import List, Literal, Union
from typing_extensions import TypedDict


Operator = Union[
Literal[
"equals",
"in",
],
UnrecognizedStr,
]


class FilterRuleTypedDict(TypedDict):
r"""A single declarative filter rule for webhook payload evaluation."""

field_path: str
r"""Required. JSON path in the payload to evaluate (e.g., \"payload.action\").
Uses dot notation for nested fields.
"""
operator: Operator
values: List[str]
r"""Required. Values to match against. For EQUALS, only values[0] is used."""


class FilterRule(BaseModel):
r"""A single declarative filter rule for webhook payload evaluation."""

field_path: str
r"""Required. JSON path in the payload to evaluate (e.g., \"payload.action\").
Uses dot notation for nested fields.
"""

operator: Operator

values: List[str]
r"""Required. Values to match against. For EQUALS, only values[0] is used."""
58 changes: 58 additions & 0 deletions google/genai/_gaos/types/interactions/trigger.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# 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 .. import BaseModel, UNSET_SENTINEL
from pydantic import model_serializer
from typing import List, Optional
from typing_extensions import NotRequired, TypedDict


class ScriptTypedDict(TypedDict):
r"""Execute a script inside the agent's container environment."""

command: str
r"""Required. Command to execute in the container (e.g., \"node\", \"python3\", \"bash\")."""
args: NotRequired[List[str]]
r"""Arguments to pass to the command (e.g., [\".agents/triggers/handler.js\"])."""


class Script(BaseModel):
r"""Execute a script inside the agent's container environment."""

command: str
r"""Required. Command to execute in the container (e.g., \"node\", \"python3\", \"bash\")."""

args: Optional[List[str]] = None
r"""Arguments to pass to the command (e.g., [\".agents/triggers/handler.js\"])."""

@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["args"])
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
Loading
Loading