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

namespace Google\Cloud\BareMetalSolution\V2\NfsShare;

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

/**
 * Represents an 'access point' for the share.
 *
 * Generated from protobuf message <code>google.cloud.baremetalsolution.v2.NfsShare.AllowedClient</code>
 */
class AllowedClient extends \Google\Protobuf\Internal\Message
{
    /**
     * The network the access point sits on.
     *
     * Generated from protobuf field <code>string network = 1 [(.google.api.resource_reference) = {</code>
     */
    private $network = '';
    /**
     * The IP address of the share on this network.
     *
     * Generated from protobuf field <code>string share_ip = 2;</code>
     */
    private $share_ip = '';
    /**
     * The subnet of IP addresses permitted to access the share.
     *
     * Generated from protobuf field <code>string allowed_clients_cidr = 3;</code>
     */
    private $allowed_clients_cidr = '';
    /**
     * Mount permissions.
     *
     * Generated from protobuf field <code>.google.cloud.baremetalsolution.v2.NfsShare.MountPermissions mount_permissions = 4;</code>
     */
    private $mount_permissions = 0;
    /**
     * Allow dev flag.  Which controls whether to allow creation of devices.
     *
     * Generated from protobuf field <code>bool allow_dev = 5;</code>
     */
    private $allow_dev = false;
    /**
     * Allow the setuid flag.
     *
     * Generated from protobuf field <code>bool allow_suid = 6;</code>
     */
    private $allow_suid = false;
    /**
     * Disable root squashing, which is a feature of NFS.
     * Root squash is a special mapping of the remote superuser (root) identity
     * when using identity authentication.
     *
     * Generated from protobuf field <code>bool no_root_squash = 7;</code>
     */
    private $no_root_squash = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $network
     *           The network the access point sits on.
     *     @type string $share_ip
     *           The IP address of the share on this network.
     *     @type string $allowed_clients_cidr
     *           The subnet of IP addresses permitted to access the share.
     *     @type int $mount_permissions
     *           Mount permissions.
     *     @type bool $allow_dev
     *           Allow dev flag.  Which controls whether to allow creation of devices.
     *     @type bool $allow_suid
     *           Allow the setuid flag.
     *     @type bool $no_root_squash
     *           Disable root squashing, which is a feature of NFS.
     *           Root squash is a special mapping of the remote superuser (root) identity
     *           when using identity authentication.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Baremetalsolution\V2\NfsShare::initOnce();
        parent::__construct($data);
    }

    /**
     * The network the access point sits on.
     *
     * Generated from protobuf field <code>string network = 1 [(.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getNetwork()
    {
        return $this->network;
    }

    /**
     * The network the access point sits on.
     *
     * Generated from protobuf field <code>string network = 1 [(.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setNetwork($var)
    {
        GPBUtil::checkString($var, True);
        $this->network = $var;

        return $this;
    }

    /**
     * The IP address of the share on this network.
     *
     * Generated from protobuf field <code>string share_ip = 2;</code>
     * @return string
     */
    public function getShareIp()
    {
        return $this->share_ip;
    }

    /**
     * The IP address of the share on this network.
     *
     * Generated from protobuf field <code>string share_ip = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setShareIp($var)
    {
        GPBUtil::checkString($var, True);
        $this->share_ip = $var;

        return $this;
    }

    /**
     * The subnet of IP addresses permitted to access the share.
     *
     * Generated from protobuf field <code>string allowed_clients_cidr = 3;</code>
     * @return string
     */
    public function getAllowedClientsCidr()
    {
        return $this->allowed_clients_cidr;
    }

    /**
     * The subnet of IP addresses permitted to access the share.
     *
     * Generated from protobuf field <code>string allowed_clients_cidr = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setAllowedClientsCidr($var)
    {
        GPBUtil::checkString($var, True);
        $this->allowed_clients_cidr = $var;

        return $this;
    }

    /**
     * Mount permissions.
     *
     * Generated from protobuf field <code>.google.cloud.baremetalsolution.v2.NfsShare.MountPermissions mount_permissions = 4;</code>
     * @return int
     */
    public function getMountPermissions()
    {
        return $this->mount_permissions;
    }

    /**
     * Mount permissions.
     *
     * Generated from protobuf field <code>.google.cloud.baremetalsolution.v2.NfsShare.MountPermissions mount_permissions = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setMountPermissions($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\NfsShare\MountPermissions::class);
        $this->mount_permissions = $var;

        return $this;
    }

    /**
     * Allow dev flag.  Which controls whether to allow creation of devices.
     *
     * Generated from protobuf field <code>bool allow_dev = 5;</code>
     * @return bool
     */
    public function getAllowDev()
    {
        return $this->allow_dev;
    }

    /**
     * Allow dev flag.  Which controls whether to allow creation of devices.
     *
     * Generated from protobuf field <code>bool allow_dev = 5;</code>
     * @param bool $var
     * @return $this
     */
    public function setAllowDev($var)
    {
        GPBUtil::checkBool($var);
        $this->allow_dev = $var;

        return $this;
    }

    /**
     * Allow the setuid flag.
     *
     * Generated from protobuf field <code>bool allow_suid = 6;</code>
     * @return bool
     */
    public function getAllowSuid()
    {
        return $this->allow_suid;
    }

    /**
     * Allow the setuid flag.
     *
     * Generated from protobuf field <code>bool allow_suid = 6;</code>
     * @param bool $var
     * @return $this
     */
    public function setAllowSuid($var)
    {
        GPBUtil::checkBool($var);
        $this->allow_suid = $var;

        return $this;
    }

    /**
     * Disable root squashing, which is a feature of NFS.
     * Root squash is a special mapping of the remote superuser (root) identity
     * when using identity authentication.
     *
     * Generated from protobuf field <code>bool no_root_squash = 7;</code>
     * @return bool
     */
    public function getNoRootSquash()
    {
        return $this->no_root_squash;
    }

    /**
     * Disable root squashing, which is a feature of NFS.
     * Root squash is a special mapping of the remote superuser (root) identity
     * when using identity authentication.
     *
     * Generated from protobuf field <code>bool no_root_squash = 7;</code>
     * @param bool $var
     * @return $this
     */
    public function setNoRootSquash($var)
    {
        GPBUtil::checkBool($var);
        $this->no_root_squash = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AllowedClient::class, \Google\Cloud\BareMetalSolution\V2\NfsShare_AllowedClient::class);

