# Agent Registry V1 API - Class Google::Cloud::AgentRegistry::V1::Service (v0.1.0)

Reference documentation and code samples for the Agent Registry V1 API class Google::Cloud::AgentRegistry::V1::Service.

Represents a user-defined Service.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #agent_spec

    def agent_spec() -> ::Google::Cloud::AgentRegistry::V1::Service::AgentSpec

**Returns**

- ([::Google::Cloud::AgentRegistry::V1::Service::AgentSpec](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-agent_registry-v1/latest/Google-Cloud-AgentRegistry-V1-Service-AgentSpec)) --- Optional. The spec of the Agent. When `agent_spec` is set, the type of the service is Agent.


  Note: The following fields are mutually exclusive: `agent_spec`, `mcp_server_spec`, `endpoint_spec`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #agent_spec=

    def agent_spec=(value) -> ::Google::Cloud::AgentRegistry::V1::Service::AgentSpec

**Parameter**

- **value** ([::Google::Cloud::AgentRegistry::V1::Service::AgentSpec](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-agent_registry-v1/latest/Google-Cloud-AgentRegistry-V1-Service-AgentSpec)) --- Optional. The spec of the Agent. When `agent_spec` is set, the type of the service is Agent.


  Note: The following fields are mutually exclusive: `agent_spec`, `mcp_server_spec`, `endpoint_spec`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::AgentRegistry::V1::Service::AgentSpec](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-agent_registry-v1/latest/Google-Cloud-AgentRegistry-V1-Service-AgentSpec)) --- Optional. The spec of the Agent. When `agent_spec` is set, the type of the service is Agent.


  Note: The following fields are mutually exclusive: `agent_spec`, `mcp_server_spec`, `endpoint_spec`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #create_time

    def create_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-agent_registry-v1/latest/Google-Protobuf-Timestamp)) --- Output only. Create time.

### #description

    def description() -> ::String

**Returns**

- (::String) --- Optional. User-defined description of an Service. Can have a maximum length of `2048` characters.

### #description=

    def description=(value) -> ::String

**Parameter**

- **value** (::String) --- Optional. User-defined description of an Service. Can have a maximum length of `2048` characters.
**Returns**

- (::String) --- Optional. User-defined description of an Service. Can have a maximum length of `2048` characters.

### #display_name

    def display_name() -> ::String

**Returns**

- (::String) --- Optional. User-defined display name for the Service. Can have a maximum length of `63` characters.

### #display_name=

    def display_name=(value) -> ::String

**Parameter**

- **value** (::String) --- Optional. User-defined display name for the Service. Can have a maximum length of `63` characters.
**Returns**

- (::String) --- Optional. User-defined display name for the Service. Can have a maximum length of `63` characters.

### #endpoint_spec

    def endpoint_spec() -> ::Google::Cloud::AgentRegistry::V1::Service::EndpointSpec

**Returns**

- ([::Google::Cloud::AgentRegistry::V1::Service::EndpointSpec](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-agent_registry-v1/latest/Google-Cloud-AgentRegistry-V1-Service-EndpointSpec)) --- Optional. The spec of the Endpoint. When `endpoint_spec` is set, the type of the service is Endpoint.


  Note: The following fields are mutually exclusive: `endpoint_spec`, `agent_spec`, `mcp_server_spec`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #endpoint_spec=

    def endpoint_spec=(value) -> ::Google::Cloud::AgentRegistry::V1::Service::EndpointSpec

**Parameter**

- **value** ([::Google::Cloud::AgentRegistry::V1::Service::EndpointSpec](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-agent_registry-v1/latest/Google-Cloud-AgentRegistry-V1-Service-EndpointSpec)) --- Optional. The spec of the Endpoint. When `endpoint_spec` is set, the type of the service is Endpoint.


  Note: The following fields are mutually exclusive: `endpoint_spec`, `agent_spec`, `mcp_server_spec`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::AgentRegistry::V1::Service::EndpointSpec](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-agent_registry-v1/latest/Google-Cloud-AgentRegistry-V1-Service-EndpointSpec)) --- Optional. The spec of the Endpoint. When `endpoint_spec` is set, the type of the service is Endpoint.


  Note: The following fields are mutually exclusive: `endpoint_spec`, `agent_spec`, `mcp_server_spec`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #interfaces

    def interfaces() -> ::Array<::Google::Cloud::AgentRegistry::V1::Interface>

**Returns**

- (::Array\<[::Google::Cloud::AgentRegistry::V1::Interface](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-agent_registry-v1/latest/Google-Cloud-AgentRegistry-V1-Interface)\>) --- Optional. The connection details for the Service.

### #interfaces=

    def interfaces=(value) -> ::Array<::Google::Cloud::AgentRegistry::V1::Interface>

**Parameter**

- **value** (::Array\<[::Google::Cloud::AgentRegistry::V1::Interface](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-agent_registry-v1/latest/Google-Cloud-AgentRegistry-V1-Interface)\>) --- Optional. The connection details for the Service.
**Returns**

- (::Array\<[::Google::Cloud::AgentRegistry::V1::Interface](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-agent_registry-v1/latest/Google-Cloud-AgentRegistry-V1-Interface)\>) --- Optional. The connection details for the Service.

### #mcp_server_spec

    def mcp_server_spec() -> ::Google::Cloud::AgentRegistry::V1::Service::McpServerSpec

**Returns**

- ([::Google::Cloud::AgentRegistry::V1::Service::McpServerSpec](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-agent_registry-v1/latest/Google-Cloud-AgentRegistry-V1-Service-McpServerSpec)) --- Optional. The spec of the MCP Server. When `mcp_server_spec` is set, the type of the service is MCP Server.


  Note: The following fields are mutually exclusive: `mcp_server_spec`, `agent_spec`, `endpoint_spec`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #mcp_server_spec=

    def mcp_server_spec=(value) -> ::Google::Cloud::AgentRegistry::V1::Service::McpServerSpec

**Parameter**

- **value** ([::Google::Cloud::AgentRegistry::V1::Service::McpServerSpec](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-agent_registry-v1/latest/Google-Cloud-AgentRegistry-V1-Service-McpServerSpec)) --- Optional. The spec of the MCP Server. When `mcp_server_spec` is set, the type of the service is MCP Server.


  Note: The following fields are mutually exclusive: `mcp_server_spec`, `agent_spec`, `endpoint_spec`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::AgentRegistry::V1::Service::McpServerSpec](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-agent_registry-v1/latest/Google-Cloud-AgentRegistry-V1-Service-McpServerSpec)) --- Optional. The spec of the MCP Server. When `mcp_server_spec` is set, the type of the service is MCP Server.


  Note: The following fields are mutually exclusive: `mcp_server_spec`, `agent_spec`, `endpoint_spec`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #name

    def name() -> ::String

**Returns**

- (::String) --- Identifier. The resource name of the Service. Format: `projects/{project}/locations/{location}/services/{service}`.

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::String) --- Identifier. The resource name of the Service. Format: `projects/{project}/locations/{location}/services/{service}`.
**Returns**

- (::String) --- Identifier. The resource name of the Service. Format: `projects/{project}/locations/{location}/services/{service}`.

### #registry_resource

    def registry_resource() -> ::String

**Returns**

- (::String) --- Output only. The resource name of the resulting Agent, MCP Server, or
  Endpoint. Format:

  - `projects/{project}/locations/{location}/mcpServers/{mcp_server}`
  - `projects/{project}/locations/{location}/agents/{agent}`
  - `projects/{project}/locations/{location}/endpoints/{endpoint}`

### #update_time

    def update_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-agent_registry-v1/latest/Google-Protobuf-Timestamp)) --- Output only. Update time.