<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/lifesciences/v2beta/workflows.proto

namespace Google\Cloud\LifeSciences\V2beta;

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

/**
 * An event generated when a container starts.
 *
 * Generated from protobuf message <code>google.cloud.lifesciences.v2beta.ContainerStartedEvent</code>
 */
class ContainerStartedEvent extends \Google\Protobuf\Internal\Message
{
    /**
     * The numeric ID of the action that started this container.
     *
     * Generated from protobuf field <code>int32 action_id = 1;</code>
     */
    private $action_id = 0;
    /**
     * The container-to-host port mappings installed for this container. This
     * set will contain any ports exposed using the `PUBLISH_EXPOSED_PORTS` flag
     * as well as any specified in the `Action` definition.
     *
     * Generated from protobuf field <code>map<int32, int32> port_mappings = 2;</code>
     */
    private $port_mappings;
    /**
     * The public IP address that can be used to connect to the container. This
     * field is only populated when at least one port mapping is present. If the
     * instance was created with a private address, this field will be empty even
     * if port mappings exist.
     *
     * Generated from protobuf field <code>string ip_address = 3;</code>
     */
    private $ip_address = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $action_id
     *           The numeric ID of the action that started this container.
     *     @type array|\Google\Protobuf\Internal\MapField $port_mappings
     *           The container-to-host port mappings installed for this container. This
     *           set will contain any ports exposed using the `PUBLISH_EXPOSED_PORTS` flag
     *           as well as any specified in the `Action` definition.
     *     @type string $ip_address
     *           The public IP address that can be used to connect to the container. This
     *           field is only populated when at least one port mapping is present. If the
     *           instance was created with a private address, this field will be empty even
     *           if port mappings exist.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Lifesciences\V2Beta\Workflows::initOnce();
        parent::__construct($data);
    }

    /**
     * The numeric ID of the action that started this container.
     *
     * Generated from protobuf field <code>int32 action_id = 1;</code>
     * @return int
     */
    public function getActionId()
    {
        return $this->action_id;
    }

    /**
     * The numeric ID of the action that started this container.
     *
     * Generated from protobuf field <code>int32 action_id = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setActionId($var)
    {
        GPBUtil::checkInt32($var);
        $this->action_id = $var;

        return $this;
    }

    /**
     * The container-to-host port mappings installed for this container. This
     * set will contain any ports exposed using the `PUBLISH_EXPOSED_PORTS` flag
     * as well as any specified in the `Action` definition.
     *
     * Generated from protobuf field <code>map<int32, int32> port_mappings = 2;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getPortMappings()
    {
        return $this->port_mappings;
    }

    /**
     * The container-to-host port mappings installed for this container. This
     * set will contain any ports exposed using the `PUBLISH_EXPOSED_PORTS` flag
     * as well as any specified in the `Action` definition.
     *
     * Generated from protobuf field <code>map<int32, int32> port_mappings = 2;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setPortMappings($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::INT32, \Google\Protobuf\Internal\GPBType::INT32);
        $this->port_mappings = $arr;

        return $this;
    }

    /**
     * The public IP address that can be used to connect to the container. This
     * field is only populated when at least one port mapping is present. If the
     * instance was created with a private address, this field will be empty even
     * if port mappings exist.
     *
     * Generated from protobuf field <code>string ip_address = 3;</code>
     * @return string
     */
    public function getIpAddress()
    {
        return $this->ip_address;
    }

    /**
     * The public IP address that can be used to connect to the container. This
     * field is only populated when at least one port mapping is present. If the
     * instance was created with a private address, this field will be empty even
     * if port mappings exist.
     *
     * Generated from protobuf field <code>string ip_address = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setIpAddress($var)
    {
        GPBUtil::checkString($var, True);
        $this->ip_address = $var;

        return $this;
    }

}

