<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/aiplatform/v1/model.proto

namespace Google\Cloud\AIPlatform\V1\Probe;

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

/**
 * TcpSocketAction probes the health of a container by opening a TCP socket
 * connection.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.Probe.TcpSocketAction</code>
 */
class TcpSocketAction extends \Google\Protobuf\Internal\Message
{
    /**
     * Number of the port to access on the container.
     * Number must be in the range 1 to 65535.
     *
     * Generated from protobuf field <code>int32 port = 1;</code>
     */
    protected $port = 0;
    /**
     * Optional: Host name to connect to, defaults to the model serving
     * container's IP.
     *
     * Generated from protobuf field <code>string host = 2;</code>
     */
    protected $host = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $port
     *           Number of the port to access on the container.
     *           Number must be in the range 1 to 65535.
     *     @type string $host
     *           Optional: Host name to connect to, defaults to the model serving
     *           container's IP.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\Model::initOnce();
        parent::__construct($data);
    }

    /**
     * Number of the port to access on the container.
     * Number must be in the range 1 to 65535.
     *
     * Generated from protobuf field <code>int32 port = 1;</code>
     * @return int
     */
    public function getPort()
    {
        return $this->port;
    }

    /**
     * Number of the port to access on the container.
     * Number must be in the range 1 to 65535.
     *
     * Generated from protobuf field <code>int32 port = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setPort($var)
    {
        GPBUtil::checkInt32($var);
        $this->port = $var;

        return $this;
    }

    /**
     * Optional: Host name to connect to, defaults to the model serving
     * container's IP.
     *
     * Generated from protobuf field <code>string host = 2;</code>
     * @return string
     */
    public function getHost()
    {
        return $this->host;
    }

    /**
     * Optional: Host name to connect to, defaults to the model serving
     * container's IP.
     *
     * Generated from protobuf field <code>string host = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setHost($var)
    {
        GPBUtil::checkString($var, True);
        $this->host = $var;

        return $this;
    }

}


