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

namespace Google\Cloud\Dataform\V1beta1;

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

/**
 * Represents a single entry in a directory.
 *
 * Generated from protobuf message <code>google.cloud.dataform.v1beta1.DirectoryEntry</code>
 */
class DirectoryEntry extends \Google\Protobuf\Internal\Message
{
    protected $entry;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $file
     *           A file in the directory.
     *     @type string $directory
     *           A child directory in the directory.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataform\V1Beta1\Dataform::initOnce();
        parent::__construct($data);
    }

    /**
     * A file in the directory.
     *
     * Generated from protobuf field <code>string file = 1;</code>
     * @return string
     */
    public function getFile()
    {
        return $this->readOneof(1);
    }

    public function hasFile()
    {
        return $this->hasOneof(1);
    }

    /**
     * A file in the directory.
     *
     * Generated from protobuf field <code>string file = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setFile($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * A child directory in the directory.
     *
     * Generated from protobuf field <code>string directory = 2;</code>
     * @return string
     */
    public function getDirectory()
    {
        return $this->readOneof(2);
    }

    public function hasDirectory()
    {
        return $this->hasOneof(2);
    }

    /**
     * A child directory in the directory.
     *
     * Generated from protobuf field <code>string directory = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setDirectory($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getEntry()
    {
        return $this->whichOneof("entry");
    }

}

