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
7 changes: 7 additions & 0 deletions agentplatform/_genai/sandbox_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ def _CreateSandboxEnvironmentTemplateConfig_to_vertex(
getv(from_object, ["egress_control_config"]),
)

if getv(from_object, ["ingress_control_config"]) is not None:
setv(
parent_object,
["ingressControlConfig"],
getv(from_object, ["ingress_control_config"]),
)

return to_object


Expand Down
6 changes: 3 additions & 3 deletions agentplatform/_genai/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3457,15 +3457,15 @@
"SandboxEnvironmentTemplateEgressControlConfig",
"SandboxEnvironmentTemplateEgressControlConfigDict",
"SandboxEnvironmentTemplateEgressControlConfigOrDict",
"CreateSandboxEnvironmentTemplateConfig",
"CreateSandboxEnvironmentTemplateConfigDict",
"CreateSandboxEnvironmentTemplateConfigOrDict",
"PSCAutomationConfig",
"PSCAutomationConfigDict",
"PSCAutomationConfigOrDict",
"PrivateServiceConnectConfig",
"PrivateServiceConnectConfigDict",
"PrivateServiceConnectConfigOrDict",
"CreateSandboxEnvironmentTemplateConfig",
"CreateSandboxEnvironmentTemplateConfigDict",
"CreateSandboxEnvironmentTemplateConfigOrDict",
"SandboxEnvironmentTemplate",
"SandboxEnvironmentTemplateDict",
"SandboxEnvironmentTemplateOrDict",
Expand Down
191 changes: 99 additions & 92 deletions agentplatform/_genai/types/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -17603,98 +17603,6 @@ class SandboxEnvironmentTemplateEgressControlConfigDict(TypedDict, total=False):
]


class CreateSandboxEnvironmentTemplateConfig(_common.BaseModel):
"""Config for creating a Sandbox Template."""

http_options: Optional[genai_types.HttpOptions] = Field(
default=None, description="""Used to override HTTP request options."""
)
wait_for_completion: Optional[bool] = Field(
default=True,
description="""Waits for the operation to complete before returning.""",
)
custom_container_environment: Optional[
SandboxEnvironmentTemplateCustomContainerEnvironment
] = Field(
default=None,
description="""The custom container environment for the sandbox template.""",
)
default_container_environment: Optional[
SandboxEnvironmentTemplateDefaultContainerEnvironment
] = Field(
default=None,
description="""The default container environment for the sandbox template.""",
)
egress_control_config: Optional[SandboxEnvironmentTemplateEgressControlConfig] = (
Field(
default=None,
description="""The egress control config for the sandbox template.""",
)
)


class CreateSandboxEnvironmentTemplateConfigDict(TypedDict, total=False):
"""Config for creating a Sandbox Template."""

http_options: Optional[genai_types.HttpOptions]
"""Used to override HTTP request options."""

wait_for_completion: Optional[bool]
"""Waits for the operation to complete before returning."""

custom_container_environment: Optional[
SandboxEnvironmentTemplateCustomContainerEnvironmentDict
]
"""The custom container environment for the sandbox template."""

default_container_environment: Optional[
SandboxEnvironmentTemplateDefaultContainerEnvironmentDict
]
"""The default container environment for the sandbox template."""

egress_control_config: Optional[SandboxEnvironmentTemplateEgressControlConfigDict]
"""The egress control config for the sandbox template."""


CreateSandboxEnvironmentTemplateConfigOrDict = Union[
CreateSandboxEnvironmentTemplateConfig, CreateSandboxEnvironmentTemplateConfigDict
]


class _CreateSandboxEnvironmentTemplateRequestParameters(_common.BaseModel):
"""Parameters for creating Sandbox Environment Templates."""

name: Optional[str] = Field(
default=None,
description="""Name of the agent runtime to create the template under.""",
)
display_name: Optional[str] = Field(
default=None, description="""The display name of the sandbox template."""
)
config: Optional[CreateSandboxEnvironmentTemplateConfig] = Field(
default=None, description=""""""
)


class _CreateSandboxEnvironmentTemplateRequestParametersDict(TypedDict, total=False):
"""Parameters for creating Sandbox Environment Templates."""

name: Optional[str]
"""Name of the agent runtime to create the template under."""

display_name: Optional[str]
"""The display name of the sandbox template."""

config: Optional[CreateSandboxEnvironmentTemplateConfigDict]
""""""


_CreateSandboxEnvironmentTemplateRequestParametersOrDict = Union[
_CreateSandboxEnvironmentTemplateRequestParameters,
_CreateSandboxEnvironmentTemplateRequestParametersDict,
]


class PSCAutomationConfig(_common.BaseModel):
"""PSC config that is used to automatically create PSC endpoints in the user projects."""

Expand Down Expand Up @@ -17798,6 +17706,105 @@ class PrivateServiceConnectConfigDict(TypedDict, total=False):
]


class CreateSandboxEnvironmentTemplateConfig(_common.BaseModel):
"""Config for creating a Sandbox Template."""

http_options: Optional[genai_types.HttpOptions] = Field(
default=None, description="""Used to override HTTP request options."""
)
wait_for_completion: Optional[bool] = Field(
default=True,
description="""Waits for the operation to complete before returning.""",
)
custom_container_environment: Optional[
SandboxEnvironmentTemplateCustomContainerEnvironment
] = Field(
default=None,
description="""The custom container environment for the sandbox template.""",
)
default_container_environment: Optional[
SandboxEnvironmentTemplateDefaultContainerEnvironment
] = Field(
default=None,
description="""The default container environment for the sandbox template.""",
)
egress_control_config: Optional[SandboxEnvironmentTemplateEgressControlConfig] = (
Field(
default=None,
description="""The egress control config for the sandbox template.""",
)
)
ingress_control_config: Optional[PrivateServiceConnectConfig] = Field(
default=None,
description="""The ingress control config for the sandbox template.""",
)


class CreateSandboxEnvironmentTemplateConfigDict(TypedDict, total=False):
"""Config for creating a Sandbox Template."""

http_options: Optional[genai_types.HttpOptions]
"""Used to override HTTP request options."""

wait_for_completion: Optional[bool]
"""Waits for the operation to complete before returning."""

custom_container_environment: Optional[
SandboxEnvironmentTemplateCustomContainerEnvironmentDict
]
"""The custom container environment for the sandbox template."""

default_container_environment: Optional[
SandboxEnvironmentTemplateDefaultContainerEnvironmentDict
]
"""The default container environment for the sandbox template."""

egress_control_config: Optional[SandboxEnvironmentTemplateEgressControlConfigDict]
"""The egress control config for the sandbox template."""

ingress_control_config: Optional[PrivateServiceConnectConfigDict]
"""The ingress control config for the sandbox template."""


CreateSandboxEnvironmentTemplateConfigOrDict = Union[
CreateSandboxEnvironmentTemplateConfig, CreateSandboxEnvironmentTemplateConfigDict
]


class _CreateSandboxEnvironmentTemplateRequestParameters(_common.BaseModel):
"""Parameters for creating Sandbox Environment Templates."""

name: Optional[str] = Field(
default=None,
description="""Name of the agent runtime to create the template under.""",
)
display_name: Optional[str] = Field(
default=None, description="""The display name of the sandbox template."""
)
config: Optional[CreateSandboxEnvironmentTemplateConfig] = Field(
default=None, description=""""""
)


class _CreateSandboxEnvironmentTemplateRequestParametersDict(TypedDict, total=False):
"""Parameters for creating Sandbox Environment Templates."""

name: Optional[str]
"""Name of the agent runtime to create the template under."""

display_name: Optional[str]
"""The display name of the sandbox template."""

config: Optional[CreateSandboxEnvironmentTemplateConfigDict]
""""""


_CreateSandboxEnvironmentTemplateRequestParametersOrDict = Union[
_CreateSandboxEnvironmentTemplateRequestParameters,
_CreateSandboxEnvironmentTemplateRequestParametersDict,
]


class SandboxEnvironmentTemplate(_common.BaseModel):
"""A sandbox environment template."""

Expand Down
Loading