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

namespace Google\Cloud\Dataform\V1;

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

/**
 * Represents a single entry in a directory.
 *
 * Generated from protobuf message <code>google.cloud.dataform.v1.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\V1\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");
    }

}

