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

namespace Google\Cloud\Dataplex\V1;

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

/**
 * Describes the access mechanism of the data within its storage location.
 *
 * Generated from protobuf message <code>google.cloud.dataplex.v1.StorageAccess</code>
 */
class StorageAccess extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. Describes the read access mechanism of the data. Not user
     * settable.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.StorageAccess.AccessMode read = 21 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $read = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $read
     *           Output only. Describes the read access mechanism of the data. Not user
     *           settable.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. Describes the read access mechanism of the data. Not user
     * settable.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.StorageAccess.AccessMode read = 21 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getRead()
    {
        return $this->read;
    }

    /**
     * Output only. Describes the read access mechanism of the data. Not user
     * settable.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.StorageAccess.AccessMode read = 21 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setRead($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\StorageAccess\AccessMode::class);
        $this->read = $var;

        return $this;
    }

}

