Skip to content
32 changes: 32 additions & 0 deletions google/cloud/aiplatform_v1/types/reasoning_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,35 @@ class ReasoningEngineSpec(proto.Message):
develop the agent. Currently supported values:
"google-adk", "langchain", "langgraph", "ag2",
"llama-index", "custom".
identity_type (google.cloud.aiplatform_v1.types.ReasoningEngineSpec.IdentityType):
Optional. The identity type to use for the Reasoning Engine.
If not specified, the ``service_account`` field will be used
if set, otherwise the default Vertex AI Reasoning Engine
Service Agent in the project will be used.
"""

class IdentityType(proto.Enum):
r"""The identity type to use for the Reasoning Engine.

Values:
IDENTITY_TYPE_UNSPECIFIED (0):
Default value. Use a custom service account if the
``service_account`` field is set, otherwise use the default
Vertex AI Reasoning Engine Service Agent in the project.
Same behavior as SERVICE_ACCOUNT.
SERVICE_ACCOUNT (2):
Use a custom service account if the ``service_account``
field is set, otherwise use the default Vertex AI Reasoning
Engine Service Agent in the project.
AGENT_IDENTITY (3):
Use Agent Identity. The ``service_account`` field must not
be set.
"""

IDENTITY_TYPE_UNSPECIFIED = 0
SERVICE_ACCOUNT = 2
AGENT_IDENTITY = 3

class PackageSpec(proto.Message):
r"""User-provided package specification, containing pickled
object and package requirements.
Expand Down Expand Up @@ -453,6 +480,11 @@ class ContainerSpec(proto.Message):
proto.STRING,
number=5,
)
identity_type: IdentityType = proto.Field(
proto.ENUM,
number=12,
enum=IdentityType,
)


class ReasoningEngine(proto.Message):
Expand Down
32 changes: 32 additions & 0 deletions google/cloud/aiplatform_v1beta1/types/reasoning_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,35 @@ class ReasoningEngineSpec(proto.Message):
develop the agent. Currently supported values:
"google-adk", "langchain", "langgraph", "ag2",
"llama-index", "custom".
identity_type (google.cloud.aiplatform_v1beta1.types.ReasoningEngineSpec.IdentityType):
Optional. The identity type to use for the Reasoning Engine.
If not specified, the ``service_account`` field will be used
if set, otherwise the default Vertex AI Reasoning Engine
Service Agent in the project will be used.
"""

class IdentityType(proto.Enum):
r"""The identity type to use for the Reasoning Engine.

Values:
IDENTITY_TYPE_UNSPECIFIED (0):
Default value. Use a custom service account if the
``service_account`` field is set, otherwise use the default
Vertex AI Reasoning Engine Service Agent in the project.
Same behavior as SERVICE_ACCOUNT.
SERVICE_ACCOUNT (2):
Use a custom service account if the ``service_account``
field is set, otherwise use the default Vertex AI Reasoning
Engine Service Agent in the project.
AGENT_IDENTITY (3):
Use Agent Identity. The ``service_account`` field must not
be set.
"""

IDENTITY_TYPE_UNSPECIFIED = 0
SERVICE_ACCOUNT = 2
AGENT_IDENTITY = 3

class PackageSpec(proto.Message):
r"""User-provided package specification, containing pickled
object and package requirements.
Expand Down Expand Up @@ -455,6 +482,11 @@ class ContainerSpec(proto.Message):
proto.STRING,
number=5,
)
identity_type: IdentityType = proto.Field(
proto.ENUM,
number=12,
enum=IdentityType,
)


class ReasoningEngine(proto.Message):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-aiplatform",
"version": "1.159.0"
"version": "0.0.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-aiplatform",
"version": "1.159.0"
"version": "0.0.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4102,7 +4102,7 @@ def test_create_reasoning_engine_rest_call_success(request_type):

# send a request that will satisfy transcoding
request_init = {'parent': 'projects/sample1/locations/sample2'}
request_init["reasoning_engine"] = {'name': 'name_value', 'display_name': 'display_name_value', 'description': 'description_value', 'spec': {'source_code_spec': {'inline_source': {'source_archive': b'source_archive_blob'}, 'developer_connect_source': {'config': {'git_repository_link': 'git_repository_link_value', 'dir_': 'dir__value', 'revision': 'revision_value'}}, 'python_spec': {'version': 'version_value', 'entrypoint_module': 'entrypoint_module_value', 'entrypoint_object': 'entrypoint_object_value', 'requirements_file': 'requirements_file_value'}, 'image_spec': {'build_args': {}}}, 'container_spec': {'image_uri': 'image_uri_value'}, 'service_account': 'service_account_value', 'package_spec': {'pickle_object_gcs_uri': 'pickle_object_gcs_uri_value', 'dependency_files_gcs_uri': 'dependency_files_gcs_uri_value', 'requirements_gcs_uri': 'requirements_gcs_uri_value', 'python_version': 'python_version_value'}, 'deployment_spec': {'env': [{'name': 'name_value', 'value': 'value_value'}], 'secret_env': [{'name': 'name_value', 'secret_ref': {'secret': 'secret_value', 'version': 'version_value'}}], 'psc_interface_config': {'network_attachment': 'network_attachment_value', 'dns_peering_configs': [{'domain': 'domain_value', 'target_project': 'target_project_value', 'target_network': 'target_network_value'}]}, 'min_instances': 1387, 'max_instances': 1389, 'resource_limits': {}, 'container_concurrency': 2253}, 'class_methods': [{'fields': {}}], 'agent_framework': 'agent_framework_value'}, 'create_time': {'seconds': 751, 'nanos': 543}, 'update_time': {}, 'etag': 'etag_value', 'encryption_spec': {'kms_key_name': 'kms_key_name_value'}, 'labels': {}}
request_init["reasoning_engine"] = {'name': 'name_value', 'display_name': 'display_name_value', 'description': 'description_value', 'spec': {'source_code_spec': {'inline_source': {'source_archive': b'source_archive_blob'}, 'developer_connect_source': {'config': {'git_repository_link': 'git_repository_link_value', 'dir_': 'dir__value', 'revision': 'revision_value'}}, 'python_spec': {'version': 'version_value', 'entrypoint_module': 'entrypoint_module_value', 'entrypoint_object': 'entrypoint_object_value', 'requirements_file': 'requirements_file_value'}, 'image_spec': {'build_args': {}}}, 'container_spec': {'image_uri': 'image_uri_value'}, 'service_account': 'service_account_value', 'package_spec': {'pickle_object_gcs_uri': 'pickle_object_gcs_uri_value', 'dependency_files_gcs_uri': 'dependency_files_gcs_uri_value', 'requirements_gcs_uri': 'requirements_gcs_uri_value', 'python_version': 'python_version_value'}, 'deployment_spec': {'env': [{'name': 'name_value', 'value': 'value_value'}], 'secret_env': [{'name': 'name_value', 'secret_ref': {'secret': 'secret_value', 'version': 'version_value'}}], 'psc_interface_config': {'network_attachment': 'network_attachment_value', 'dns_peering_configs': [{'domain': 'domain_value', 'target_project': 'target_project_value', 'target_network': 'target_network_value'}]}, 'min_instances': 1387, 'max_instances': 1389, 'resource_limits': {}, 'container_concurrency': 2253}, 'class_methods': [{'fields': {}}], 'agent_framework': 'agent_framework_value', 'identity_type': 2}, 'create_time': {'seconds': 751, 'nanos': 543}, 'update_time': {}, 'etag': 'etag_value', 'encryption_spec': {'kms_key_name': 'kms_key_name_value'}, 'labels': {}}
# The version of a generated dependency at test runtime may differ from the version used during generation.
# Delete any fields which are not present in the current runtime dependency
# See https://github.com/googleapis/gapic-generator-python/issues/1748
Expand Down Expand Up @@ -4485,7 +4485,7 @@ def test_update_reasoning_engine_rest_call_success(request_type):

# send a request that will satisfy transcoding
request_init = {'reasoning_engine': {'name': 'projects/sample1/locations/sample2/reasoningEngines/sample3'}}
request_init["reasoning_engine"] = {'name': 'projects/sample1/locations/sample2/reasoningEngines/sample3', 'display_name': 'display_name_value', 'description': 'description_value', 'spec': {'source_code_spec': {'inline_source': {'source_archive': b'source_archive_blob'}, 'developer_connect_source': {'config': {'git_repository_link': 'git_repository_link_value', 'dir_': 'dir__value', 'revision': 'revision_value'}}, 'python_spec': {'version': 'version_value', 'entrypoint_module': 'entrypoint_module_value', 'entrypoint_object': 'entrypoint_object_value', 'requirements_file': 'requirements_file_value'}, 'image_spec': {'build_args': {}}}, 'container_spec': {'image_uri': 'image_uri_value'}, 'service_account': 'service_account_value', 'package_spec': {'pickle_object_gcs_uri': 'pickle_object_gcs_uri_value', 'dependency_files_gcs_uri': 'dependency_files_gcs_uri_value', 'requirements_gcs_uri': 'requirements_gcs_uri_value', 'python_version': 'python_version_value'}, 'deployment_spec': {'env': [{'name': 'name_value', 'value': 'value_value'}], 'secret_env': [{'name': 'name_value', 'secret_ref': {'secret': 'secret_value', 'version': 'version_value'}}], 'psc_interface_config': {'network_attachment': 'network_attachment_value', 'dns_peering_configs': [{'domain': 'domain_value', 'target_project': 'target_project_value', 'target_network': 'target_network_value'}]}, 'min_instances': 1387, 'max_instances': 1389, 'resource_limits': {}, 'container_concurrency': 2253}, 'class_methods': [{'fields': {}}], 'agent_framework': 'agent_framework_value'}, 'create_time': {'seconds': 751, 'nanos': 543}, 'update_time': {}, 'etag': 'etag_value', 'encryption_spec': {'kms_key_name': 'kms_key_name_value'}, 'labels': {}}
request_init["reasoning_engine"] = {'name': 'projects/sample1/locations/sample2/reasoningEngines/sample3', 'display_name': 'display_name_value', 'description': 'description_value', 'spec': {'source_code_spec': {'inline_source': {'source_archive': b'source_archive_blob'}, 'developer_connect_source': {'config': {'git_repository_link': 'git_repository_link_value', 'dir_': 'dir__value', 'revision': 'revision_value'}}, 'python_spec': {'version': 'version_value', 'entrypoint_module': 'entrypoint_module_value', 'entrypoint_object': 'entrypoint_object_value', 'requirements_file': 'requirements_file_value'}, 'image_spec': {'build_args': {}}}, 'container_spec': {'image_uri': 'image_uri_value'}, 'service_account': 'service_account_value', 'package_spec': {'pickle_object_gcs_uri': 'pickle_object_gcs_uri_value', 'dependency_files_gcs_uri': 'dependency_files_gcs_uri_value', 'requirements_gcs_uri': 'requirements_gcs_uri_value', 'python_version': 'python_version_value'}, 'deployment_spec': {'env': [{'name': 'name_value', 'value': 'value_value'}], 'secret_env': [{'name': 'name_value', 'secret_ref': {'secret': 'secret_value', 'version': 'version_value'}}], 'psc_interface_config': {'network_attachment': 'network_attachment_value', 'dns_peering_configs': [{'domain': 'domain_value', 'target_project': 'target_project_value', 'target_network': 'target_network_value'}]}, 'min_instances': 1387, 'max_instances': 1389, 'resource_limits': {}, 'container_concurrency': 2253}, 'class_methods': [{'fields': {}}], 'agent_framework': 'agent_framework_value', 'identity_type': 2}, 'create_time': {'seconds': 751, 'nanos': 543}, 'update_time': {}, 'etag': 'etag_value', 'encryption_spec': {'kms_key_name': 'kms_key_name_value'}, 'labels': {}}
# The version of a generated dependency at test runtime may differ from the version used during generation.
# Delete any fields which are not present in the current runtime dependency
# See https://github.com/googleapis/gapic-generator-python/issues/1748
Expand Down Expand Up @@ -5423,7 +5423,7 @@ async def test_create_reasoning_engine_rest_asyncio_call_success(request_type):

# send a request that will satisfy transcoding
request_init = {'parent': 'projects/sample1/locations/sample2'}
request_init["reasoning_engine"] = {'name': 'name_value', 'display_name': 'display_name_value', 'description': 'description_value', 'spec': {'source_code_spec': {'inline_source': {'source_archive': b'source_archive_blob'}, 'developer_connect_source': {'config': {'git_repository_link': 'git_repository_link_value', 'dir_': 'dir__value', 'revision': 'revision_value'}}, 'python_spec': {'version': 'version_value', 'entrypoint_module': 'entrypoint_module_value', 'entrypoint_object': 'entrypoint_object_value', 'requirements_file': 'requirements_file_value'}, 'image_spec': {'build_args': {}}}, 'container_spec': {'image_uri': 'image_uri_value'}, 'service_account': 'service_account_value', 'package_spec': {'pickle_object_gcs_uri': 'pickle_object_gcs_uri_value', 'dependency_files_gcs_uri': 'dependency_files_gcs_uri_value', 'requirements_gcs_uri': 'requirements_gcs_uri_value', 'python_version': 'python_version_value'}, 'deployment_spec': {'env': [{'name': 'name_value', 'value': 'value_value'}], 'secret_env': [{'name': 'name_value', 'secret_ref': {'secret': 'secret_value', 'version': 'version_value'}}], 'psc_interface_config': {'network_attachment': 'network_attachment_value', 'dns_peering_configs': [{'domain': 'domain_value', 'target_project': 'target_project_value', 'target_network': 'target_network_value'}]}, 'min_instances': 1387, 'max_instances': 1389, 'resource_limits': {}, 'container_concurrency': 2253}, 'class_methods': [{'fields': {}}], 'agent_framework': 'agent_framework_value'}, 'create_time': {'seconds': 751, 'nanos': 543}, 'update_time': {}, 'etag': 'etag_value', 'encryption_spec': {'kms_key_name': 'kms_key_name_value'}, 'labels': {}}
request_init["reasoning_engine"] = {'name': 'name_value', 'display_name': 'display_name_value', 'description': 'description_value', 'spec': {'source_code_spec': {'inline_source': {'source_archive': b'source_archive_blob'}, 'developer_connect_source': {'config': {'git_repository_link': 'git_repository_link_value', 'dir_': 'dir__value', 'revision': 'revision_value'}}, 'python_spec': {'version': 'version_value', 'entrypoint_module': 'entrypoint_module_value', 'entrypoint_object': 'entrypoint_object_value', 'requirements_file': 'requirements_file_value'}, 'image_spec': {'build_args': {}}}, 'container_spec': {'image_uri': 'image_uri_value'}, 'service_account': 'service_account_value', 'package_spec': {'pickle_object_gcs_uri': 'pickle_object_gcs_uri_value', 'dependency_files_gcs_uri': 'dependency_files_gcs_uri_value', 'requirements_gcs_uri': 'requirements_gcs_uri_value', 'python_version': 'python_version_value'}, 'deployment_spec': {'env': [{'name': 'name_value', 'value': 'value_value'}], 'secret_env': [{'name': 'name_value', 'secret_ref': {'secret': 'secret_value', 'version': 'version_value'}}], 'psc_interface_config': {'network_attachment': 'network_attachment_value', 'dns_peering_configs': [{'domain': 'domain_value', 'target_project': 'target_project_value', 'target_network': 'target_network_value'}]}, 'min_instances': 1387, 'max_instances': 1389, 'resource_limits': {}, 'container_concurrency': 2253}, 'class_methods': [{'fields': {}}], 'agent_framework': 'agent_framework_value', 'identity_type': 2}, 'create_time': {'seconds': 751, 'nanos': 543}, 'update_time': {}, 'etag': 'etag_value', 'encryption_spec': {'kms_key_name': 'kms_key_name_value'}, 'labels': {}}
# The version of a generated dependency at test runtime may differ from the version used during generation.
# Delete any fields which are not present in the current runtime dependency
# See https://github.com/googleapis/gapic-generator-python/issues/1748
Expand Down Expand Up @@ -5827,7 +5827,7 @@ async def test_update_reasoning_engine_rest_asyncio_call_success(request_type):

# send a request that will satisfy transcoding
request_init = {'reasoning_engine': {'name': 'projects/sample1/locations/sample2/reasoningEngines/sample3'}}
request_init["reasoning_engine"] = {'name': 'projects/sample1/locations/sample2/reasoningEngines/sample3', 'display_name': 'display_name_value', 'description': 'description_value', 'spec': {'source_code_spec': {'inline_source': {'source_archive': b'source_archive_blob'}, 'developer_connect_source': {'config': {'git_repository_link': 'git_repository_link_value', 'dir_': 'dir__value', 'revision': 'revision_value'}}, 'python_spec': {'version': 'version_value', 'entrypoint_module': 'entrypoint_module_value', 'entrypoint_object': 'entrypoint_object_value', 'requirements_file': 'requirements_file_value'}, 'image_spec': {'build_args': {}}}, 'container_spec': {'image_uri': 'image_uri_value'}, 'service_account': 'service_account_value', 'package_spec': {'pickle_object_gcs_uri': 'pickle_object_gcs_uri_value', 'dependency_files_gcs_uri': 'dependency_files_gcs_uri_value', 'requirements_gcs_uri': 'requirements_gcs_uri_value', 'python_version': 'python_version_value'}, 'deployment_spec': {'env': [{'name': 'name_value', 'value': 'value_value'}], 'secret_env': [{'name': 'name_value', 'secret_ref': {'secret': 'secret_value', 'version': 'version_value'}}], 'psc_interface_config': {'network_attachment': 'network_attachment_value', 'dns_peering_configs': [{'domain': 'domain_value', 'target_project': 'target_project_value', 'target_network': 'target_network_value'}]}, 'min_instances': 1387, 'max_instances': 1389, 'resource_limits': {}, 'container_concurrency': 2253}, 'class_methods': [{'fields': {}}], 'agent_framework': 'agent_framework_value'}, 'create_time': {'seconds': 751, 'nanos': 543}, 'update_time': {}, 'etag': 'etag_value', 'encryption_spec': {'kms_key_name': 'kms_key_name_value'}, 'labels': {}}
request_init["reasoning_engine"] = {'name': 'projects/sample1/locations/sample2/reasoningEngines/sample3', 'display_name': 'display_name_value', 'description': 'description_value', 'spec': {'source_code_spec': {'inline_source': {'source_archive': b'source_archive_blob'}, 'developer_connect_source': {'config': {'git_repository_link': 'git_repository_link_value', 'dir_': 'dir__value', 'revision': 'revision_value'}}, 'python_spec': {'version': 'version_value', 'entrypoint_module': 'entrypoint_module_value', 'entrypoint_object': 'entrypoint_object_value', 'requirements_file': 'requirements_file_value'}, 'image_spec': {'build_args': {}}}, 'container_spec': {'image_uri': 'image_uri_value'}, 'service_account': 'service_account_value', 'package_spec': {'pickle_object_gcs_uri': 'pickle_object_gcs_uri_value', 'dependency_files_gcs_uri': 'dependency_files_gcs_uri_value', 'requirements_gcs_uri': 'requirements_gcs_uri_value', 'python_version': 'python_version_value'}, 'deployment_spec': {'env': [{'name': 'name_value', 'value': 'value_value'}], 'secret_env': [{'name': 'name_value', 'secret_ref': {'secret': 'secret_value', 'version': 'version_value'}}], 'psc_interface_config': {'network_attachment': 'network_attachment_value', 'dns_peering_configs': [{'domain': 'domain_value', 'target_project': 'target_project_value', 'target_network': 'target_network_value'}]}, 'min_instances': 1387, 'max_instances': 1389, 'resource_limits': {}, 'container_concurrency': 2253}, 'class_methods': [{'fields': {}}], 'agent_framework': 'agent_framework_value', 'identity_type': 2}, 'create_time': {'seconds': 751, 'nanos': 543}, 'update_time': {}, 'etag': 'etag_value', 'encryption_spec': {'kms_key_name': 'kms_key_name_value'}, 'labels': {}}
# The version of a generated dependency at test runtime may differ from the version used during generation.
# Delete any fields which are not present in the current runtime dependency
# See https://github.com/googleapis/gapic-generator-python/issues/1748
Expand Down
Loading
Loading