<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/run/v2/k8s.min.proto

namespace Google\Cloud\Run\V2;

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

/**
 * TCPSocketAction describes an action based on opening a socket
 *
 * Generated from protobuf message <code>google.cloud.run.v2.TCPSocketAction</code>
 */
class TCPSocketAction extends \Google\Protobuf\Internal\Message
{
    /**
     * Port number to access on the container. Must be in the range 1 to 65535.
     * If not specified, defaults to 8080.
     *
     * Generated from protobuf field <code>int32 port = 1;</code>
     */
    private $port = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $port
     *           Port number to access on the container. Must be in the range 1 to 65535.
     *           If not specified, defaults to 8080.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Run\V2\K8SMin::initOnce();
        parent::__construct($data);
    }

    /**
     * Port number to access on the container. Must be in the range 1 to 65535.
     * If not specified, defaults to 8080.
     *
     * Generated from protobuf field <code>int32 port = 1;</code>
     * @return int
     */
    public function getPort()
    {
        return $this->port;
    }

    /**
     * Port number to access on the container. Must be in the range 1 to 65535.
     * If not specified, defaults to 8080.
     *
     * 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;
    }

}

