diff --git a/google/genai/_gaos/resources/environments/__init__.py b/google/genai/_gaos/resources/environments/__init__.py index 063ca40d4..1b033731b 100644 --- a/google/genai/_gaos/resources/environments/__init__.py +++ b/google/genai/_gaos/resources/environments/__init__.py @@ -23,13 +23,10 @@ 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", @@ -37,6 +34,5 @@ "EnvironmentFile", "EnvironmentListResponse", "GetEnvironmentFilesResponse", - "createenvironmentrequest", - "environment", + "ListEnvironmentsResponse", ] diff --git a/google/genai/_gaos/resources/environments/environment/__init__.py b/google/genai/_gaos/resources/environments/environment/__init__.py deleted file mode 100644 index 9e7495129..000000000 --- a/google/genai/_gaos/resources/environments/environment/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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 -# pylint: skip-file - -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from ....types.interactions.environmentnetworkegressallowlist import Allowlist - -__all__ = ["Allowlist"] diff --git a/google/genai/_gaos/resources/interactions/environment/__init__.py b/google/genai/_gaos/resources/interactions/environment/__init__.py index 1c0f12c81..cf41fe768 100644 --- a/google/genai/_gaos/resources/interactions/environment/__init__.py +++ b/google/genai/_gaos/resources/interactions/environment/__init__.py @@ -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", +] diff --git a/google/genai/_gaos/resources/environments/createenvironmentrequest/__init__.py b/google/genai/_gaos/resources/interactions/environment/environmentnetworkegressallowlist/__init__.py similarity index 87% rename from google/genai/_gaos/resources/environments/createenvironmentrequest/__init__.py rename to google/genai/_gaos/resources/interactions/environment/environmentnetworkegressallowlist/__init__.py index 9e7495129..2e9963fa9 100644 --- a/google/genai/_gaos/resources/environments/createenvironmentrequest/__init__.py +++ b/google/genai/_gaos/resources/interactions/environment/environmentnetworkegressallowlist/__init__.py @@ -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"] diff --git a/google/genai/_gaos/types/interactions/environmentnetworkegressallowlist.py b/google/genai/_gaos/types/interactions/environmentnetworkegressallowlist.py index 7b1da99bd..ad87d3b15 100644 --- a/google/genai/_gaos/types/interactions/environmentnetworkegressallowlist.py +++ b/google/genai/_gaos/types/interactions/environmentnetworkegressallowlist.py @@ -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): @@ -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."""