<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/apiregistry/v1beta/resources.proto

namespace Google\Cloud\ApiRegistry\V1beta;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\RepeatedField;

/**
 * Represents an MCP Server. MCP Servers act as endpoints that expose a
 * collection of tools that can be invoked by agents.
 *
 * Generated from protobuf message <code>google.cloud.apiregistry.v1beta.McpServer</code>
 */
class McpServer extends \Google\Protobuf\Internal\Message
{
    /**
     * Identifier. The resource name of the MCP Server.
     * Format:
     * `projects/{project}/locations/{location}/mcpServers/{mcp_server}`.
     * Example:
     * projects/12345/locations/us-central1/mcpServers/google:bigquery.googleapis.com:mcp
     * for 1p
     * projects/12345/locations/us-central1/mcpServers/apphub:starbucks for
     * 2p
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     */
    protected $name = '';
    /**
     * Optional. A human readable name for the MCP server.
     *
     * Generated from protobuf field <code>string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $display_name = '';
    /**
     * Optional. A human-readable description of the MCP Server's functionality.
     *
     * Generated from protobuf field <code>string description = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $description = '';
    /**
     * The base URL of the MCP server. Example: [geolocation.googleapis.com/mcp].
     *
     * Generated from protobuf field <code>repeated string urls = 4;</code>
     */
    private $urls;
    /**
     * The capabilities that a server may support. Known capabilities defined in
     * https://modelcontextprotocol.io/specification/2025-06-18/schema#servercapabilities
     * and additional capabilities defined by the servers.
     *
     * Generated from protobuf field <code>.google.protobuf.Struct capabilities = 6;</code>
     */
    protected $capabilities = null;
    /**
     * Output only. The state of the MCP Server.
     *
     * Generated from protobuf field <code>.google.cloud.apiregistry.v1beta.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $state = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Identifier. The resource name of the MCP Server.
     *           Format:
     *           `projects/{project}/locations/{location}/mcpServers/{mcp_server}`.
     *           Example:
     *           projects/12345/locations/us-central1/mcpServers/google:bigquery.googleapis.com:mcp
     *           for 1p
     *           projects/12345/locations/us-central1/mcpServers/apphub:starbucks for
     *           2p
     *     @type string $display_name
     *           Optional. A human readable name for the MCP server.
     *     @type string $description
     *           Optional. A human-readable description of the MCP Server's functionality.
     *     @type string[] $urls
     *           The base URL of the MCP server. Example: [geolocation.googleapis.com/mcp].
     *     @type \Google\Protobuf\Struct $capabilities
     *           The capabilities that a server may support. Known capabilities defined in
     *           https://modelcontextprotocol.io/specification/2025-06-18/schema#servercapabilities
     *           and additional capabilities defined by the servers.
     *     @type int $state
     *           Output only. The state of the MCP Server.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Apiregistry\V1Beta\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * Identifier. The resource name of the MCP Server.
     * Format:
     * `projects/{project}/locations/{location}/mcpServers/{mcp_server}`.
     * Example:
     * projects/12345/locations/us-central1/mcpServers/google:bigquery.googleapis.com:mcp
     * for 1p
     * projects/12345/locations/us-central1/mcpServers/apphub:starbucks for
     * 2p
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Identifier. The resource name of the MCP Server.
     * Format:
     * `projects/{project}/locations/{location}/mcpServers/{mcp_server}`.
     * Example:
     * projects/12345/locations/us-central1/mcpServers/google:bigquery.googleapis.com:mcp
     * for 1p
     * projects/12345/locations/us-central1/mcpServers/apphub:starbucks for
     * 2p
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Optional. A human readable name for the MCP server.
     *
     * Generated from protobuf field <code>string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getDisplayName()
    {
        return $this->display_name;
    }

    /**
     * Optional. A human readable name for the MCP server.
     *
     * Generated from protobuf field <code>string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->display_name = $var;

        return $this;
    }

    /**
     * Optional. A human-readable description of the MCP Server's functionality.
     *
     * Generated from protobuf field <code>string description = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Optional. A human-readable description of the MCP Server's functionality.
     *
     * Generated from protobuf field <code>string description = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

    /**
     * The base URL of the MCP server. Example: [geolocation.googleapis.com/mcp].
     *
     * Generated from protobuf field <code>repeated string urls = 4;</code>
     * @return RepeatedField<string>
     */
    public function getUrls()
    {
        return $this->urls;
    }

    /**
     * The base URL of the MCP server. Example: [geolocation.googleapis.com/mcp].
     *
     * Generated from protobuf field <code>repeated string urls = 4;</code>
     * @param string[] $var
     * @return $this
     */
    public function setUrls($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->urls = $arr;

        return $this;
    }

    /**
     * The capabilities that a server may support. Known capabilities defined in
     * https://modelcontextprotocol.io/specification/2025-06-18/schema#servercapabilities
     * and additional capabilities defined by the servers.
     *
     * Generated from protobuf field <code>.google.protobuf.Struct capabilities = 6;</code>
     * @return \Google\Protobuf\Struct|null
     */
    public function getCapabilities()
    {
        return $this->capabilities;
    }

    public function hasCapabilities()
    {
        return isset($this->capabilities);
    }

    public function clearCapabilities()
    {
        unset($this->capabilities);
    }

    /**
     * The capabilities that a server may support. Known capabilities defined in
     * https://modelcontextprotocol.io/specification/2025-06-18/schema#servercapabilities
     * and additional capabilities defined by the servers.
     *
     * Generated from protobuf field <code>.google.protobuf.Struct capabilities = 6;</code>
     * @param \Google\Protobuf\Struct $var
     * @return $this
     */
    public function setCapabilities($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class);
        $this->capabilities = $var;

        return $this;
    }

    /**
     * Output only. The state of the MCP Server.
     *
     * Generated from protobuf field <code>.google.cloud.apiregistry.v1beta.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getState()
    {
        return $this->state;
    }

    /**
     * Output only. The state of the MCP Server.
     *
     * Generated from protobuf field <code>.google.cloud.apiregistry.v1beta.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setState($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\ApiRegistry\V1beta\State::class);
        $this->state = $var;

        return $this;
    }

}

