Skip to content
Merged
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
10 changes: 3 additions & 7 deletions google/genai/_gaos/resources/environments/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,16 @@
from ...types.environments.getenvironmentfilesresponse import (
GetEnvironmentFilesResponse,
)
from ...types.environments.listenvironmentsresponse import (
ListEnvironmentsResponse as EnvironmentListResponse,
)
from ...types.environments.listenvironmentsresponse import ListEnvironmentsResponse
from ...types.interactions.empty import Empty as EnvironmentDeleteResponse
from . import createenvironmentrequest
from . import environment

EnvironmentListResponse = ListEnvironmentsResponse
__all__ = [
"CreateEnvironmentRequest",
"Environment",
"EnvironmentDeleteResponse",
"EnvironmentFile",
"EnvironmentListResponse",
"GetEnvironmentFilesResponse",
"createenvironmentrequest",
"environment",
"ListEnvironmentsResponse",
]
22 changes: 0 additions & 22 deletions google/genai/_gaos/resources/environments/environment/__init__.py

This file was deleted.

12 changes: 10 additions & 2 deletions google/genai/_gaos/resources/interactions/environment/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,16 @@

"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from ....types.interactions.environmentnetworkegressallowlist import Allowlist
from ....types.interactions.environmentnetworkegressallowlist import (
EnvironmentNetworkEgressAllowlist,
)
from ....types.interactions.envvar import EnvVar
from ....types.interactions.source import Source
from . import environmentnetworkegressallowlist

__all__ = ["Allowlist", "EnvVar", "Source"]
__all__ = [
"EnvVar",
"EnvironmentNetworkEgressAllowlist",
"Source",
"environmentnetworkegressallowlist",
]
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@

"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from ....types.interactions.environmentnetworkegressallowlist import Allowlist
from .....types.interactions.allowlistentry import AllowlistEntry

__all__ = ["Allowlist"]
__all__ = ["AllowlistEntry"]
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,38 @@


Disabled = Literal["disabled",]
r"""Turns all network off."""


class AllowlistParam(TypedDict):
r"""Outbound networking configuration for the sandbox. When specified, restricts which external domains the sandbox can reach. Omit entirely to allow all outbound traffic with no header injection."""
AllowlistParam = TypeAliasType(
"AllowlistParam", Union[List[AllowlistEntryParam], Disabled]
)
r"""List of allowed domains and their configurations. Set to `\"disabled\"`
to block all network egress.
"""


Allowlist = TypeAliasType("Allowlist", Union[List[AllowlistEntry], Disabled])
r"""List of allowed domains and their configurations. Set to `\"disabled\"`
to block all network egress.
"""

allowlist: NotRequired[List[AllowlistEntryParam]]
r"""List of allowed outbound domains. Only requests to listed domains are permitted. Use [{'domain': '*'}] to allow all domains while still injecting headers on specific ones."""

class EnvironmentNetworkEgressAllowlistParam(TypedDict):
r"""Network egress configuration for the environment."""

class Allowlist(BaseModel):
r"""Outbound networking configuration for the sandbox. When specified, restricts which external domains the sandbox can reach. Omit entirely to allow all outbound traffic with no header injection."""
allowlist: NotRequired[AllowlistParam]
r"""List of allowed domains and their configurations. Set to `\"disabled\"`
to block all network egress.
"""

allowlist: Optional[List[AllowlistEntry]] = None
r"""List of allowed outbound domains. Only requests to listed domains are permitted. Use [{'domain': '*'}] to allow all domains while still injecting headers on specific ones."""

class EnvironmentNetworkEgressAllowlist(BaseModel):
r"""Network egress configuration for the environment."""

allowlist: Optional[Allowlist] = None
r"""List of allowed domains and their configurations. Set to `\"disabled\"`
to block all network egress.
"""

@model_serializer(mode="wrap")
def serialize_model(self, handler):
Expand All @@ -57,15 +74,3 @@ def serialize_model(self, handler):
m[k] = val

return m


EnvironmentNetworkEgressAllowlistParam = TypeAliasType(
"EnvironmentNetworkEgressAllowlistParam", Union[AllowlistParam, Disabled]
)
r"""Outbound networking configuration for the sandbox. Accepts an object with an 'allowlist' array to restrict traffic, or the string 'disabled' to turn off all network access. Omit entirely to allow all outbound traffic with no header injection."""


EnvironmentNetworkEgressAllowlist = TypeAliasType(
"EnvironmentNetworkEgressAllowlist", Union[Allowlist, Disabled]
)
r"""Outbound networking configuration for the sandbox. Accepts an object with an 'allowlist' array to restrict traffic, or the string 'disabled' to turn off all network access. Omit entirely to allow all outbound traffic with no header injection."""
Loading