<?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;

/**
 * VM networking options.
 *
 * Generated from protobuf message <code>google.cloud.lifesciences.v2beta.Network</code>
 */
class Network extends \Google\Protobuf\Internal\Message
{
    /**
     * The network name to attach the VM's network interface to. The value will
     * be prefixed with `global/networks/` unless it contains a `/`, in which
     * case it is assumed to be a fully specified network resource URL.
     * If unspecified, the global default network is used.
     *
     * Generated from protobuf field <code>string network = 1;</code>
     */
    private $network = '';
    /**
     * If set to true, do not attach a public IP address to the VM. Note that
     * without a public IP address, additional configuration is required to
     * allow the VM to access Google services.
     * See https://cloud.google.com/vpc/docs/configure-private-google-access
     * for more information.
     *
     * Generated from protobuf field <code>bool use_private_address = 2;</code>
     */
    private $use_private_address = false;
    /**
     * If the specified network is configured for custom subnet creation, the
     * name of the subnetwork to attach the instance to must be specified here.
     * The value is prefixed with `regions/&#42;&#47;subnetworks/` unless it contains a
     * `/`, in which case it is assumed to be a fully specified subnetwork
     * resource URL.
     * If the `*` character appears in the value, it is replaced with the region
     * that the virtual machine has been allocated in.
     *
     * Generated from protobuf field <code>string subnetwork = 3;</code>
     */
    private $subnetwork = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $network
     *           The network name to attach the VM's network interface to. The value will
     *           be prefixed with `global/networks/` unless it contains a `/`, in which
     *           case it is assumed to be a fully specified network resource URL.
     *           If unspecified, the global default network is used.
     *     @type bool $use_private_address
     *           If set to true, do not attach a public IP address to the VM. Note that
     *           without a public IP address, additional configuration is required to
     *           allow the VM to access Google services.
     *           See https://cloud.google.com/vpc/docs/configure-private-google-access
     *           for more information.
     *     @type string $subnetwork
     *           If the specified network is configured for custom subnet creation, the
     *           name of the subnetwork to attach the instance to must be specified here.
     *           The value is prefixed with `regions/&#42;&#47;subnetworks/` unless it contains a
     *           `/`, in which case it is assumed to be a fully specified subnetwork
     *           resource URL.
     *           If the `*` character appears in the value, it is replaced with the region
     *           that the virtual machine has been allocated in.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Lifesciences\V2Beta\Workflows::initOnce();
        parent::__construct($data);
    }

    /**
     * The network name to attach the VM's network interface to. The value will
     * be prefixed with `global/networks/` unless it contains a `/`, in which
     * case it is assumed to be a fully specified network resource URL.
     * If unspecified, the global default network is used.
     *
     * Generated from protobuf field <code>string network = 1;</code>
     * @return string
     */
    public function getNetwork()
    {
        return $this->network;
    }

    /**
     * The network name to attach the VM's network interface to. The value will
     * be prefixed with `global/networks/` unless it contains a `/`, in which
     * case it is assumed to be a fully specified network resource URL.
     * If unspecified, the global default network is used.
     *
     * Generated from protobuf field <code>string network = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setNetwork($var)
    {
        GPBUtil::checkString($var, True);
        $this->network = $var;

        return $this;
    }

    /**
     * If set to true, do not attach a public IP address to the VM. Note that
     * without a public IP address, additional configuration is required to
     * allow the VM to access Google services.
     * See https://cloud.google.com/vpc/docs/configure-private-google-access
     * for more information.
     *
     * Generated from protobuf field <code>bool use_private_address = 2;</code>
     * @return bool
     */
    public function getUsePrivateAddress()
    {
        return $this->use_private_address;
    }

    /**
     * If set to true, do not attach a public IP address to the VM. Note that
     * without a public IP address, additional configuration is required to
     * allow the VM to access Google services.
     * See https://cloud.google.com/vpc/docs/configure-private-google-access
     * for more information.
     *
     * Generated from protobuf field <code>bool use_private_address = 2;</code>
     * @param bool $var
     * @return $this
     */
    public function setUsePrivateAddress($var)
    {
        GPBUtil::checkBool($var);
        $this->use_private_address = $var;

        return $this;
    }

    /**
     * If the specified network is configured for custom subnet creation, the
     * name of the subnetwork to attach the instance to must be specified here.
     * The value is prefixed with `regions/&#42;&#47;subnetworks/` unless it contains a
     * `/`, in which case it is assumed to be a fully specified subnetwork
     * resource URL.
     * If the `*` character appears in the value, it is replaced with the region
     * that the virtual machine has been allocated in.
     *
     * Generated from protobuf field <code>string subnetwork = 3;</code>
     * @return string
     */
    public function getSubnetwork()
    {
        return $this->subnetwork;
    }

    /**
     * If the specified network is configured for custom subnet creation, the
     * name of the subnetwork to attach the instance to must be specified here.
     * The value is prefixed with `regions/&#42;&#47;subnetworks/` unless it contains a
     * `/`, in which case it is assumed to be a fully specified subnetwork
     * resource URL.
     * If the `*` character appears in the value, it is replaced with the region
     * that the virtual machine has been allocated in.
     *
     * Generated from protobuf field <code>string subnetwork = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setSubnetwork($var)
    {
        GPBUtil::checkString($var, True);
        $this->subnetwork = $var;

        return $this;
    }

}

