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

namespace Google\Cloud\Compute\V1;

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

/**
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.FutureReservationTimeWindow</code>
 */
class FutureReservationTimeWindow extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional .google.cloud.compute.v1.Duration duration = 155471252;</code>
     */
    protected $duration = null;
    /**
     * Generated from protobuf field <code>optional string end_time = 114938801;</code>
     */
    protected $end_time = null;
    /**
     * Start time of the Future Reservation. The start_time is an RFC3339
     * string.
     *
     * Generated from protobuf field <code>optional string start_time = 37467274;</code>
     */
    protected $start_time = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Compute\V1\Duration $duration
     *     @type string $end_time
     *     @type string $start_time
     *           Start time of the Future Reservation. The start_time is an RFC3339
     *           string.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional .google.cloud.compute.v1.Duration duration = 155471252;</code>
     * @return \Google\Cloud\Compute\V1\Duration|null
     */
    public function getDuration()
    {
        return $this->duration;
    }

    public function hasDuration()
    {
        return isset($this->duration);
    }

    public function clearDuration()
    {
        unset($this->duration);
    }

    /**
     * Generated from protobuf field <code>optional .google.cloud.compute.v1.Duration duration = 155471252;</code>
     * @param \Google\Cloud\Compute\V1\Duration $var
     * @return $this
     */
    public function setDuration($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\Duration::class);
        $this->duration = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string end_time = 114938801;</code>
     * @return string
     */
    public function getEndTime()
    {
        return isset($this->end_time) ? $this->end_time : '';
    }

    public function hasEndTime()
    {
        return isset($this->end_time);
    }

    public function clearEndTime()
    {
        unset($this->end_time);
    }

    /**
     * Generated from protobuf field <code>optional string end_time = 114938801;</code>
     * @param string $var
     * @return $this
     */
    public function setEndTime($var)
    {
        GPBUtil::checkString($var, True);
        $this->end_time = $var;

        return $this;
    }

    /**
     * Start time of the Future Reservation. The start_time is an RFC3339
     * string.
     *
     * Generated from protobuf field <code>optional string start_time = 37467274;</code>
     * @return string
     */
    public function getStartTime()
    {
        return isset($this->start_time) ? $this->start_time : '';
    }

    public function hasStartTime()
    {
        return isset($this->start_time);
    }

    public function clearStartTime()
    {
        unset($this->start_time);
    }

    /**
     * Start time of the Future Reservation. The start_time is an RFC3339
     * string.
     *
     * Generated from protobuf field <code>optional string start_time = 37467274;</code>
     * @param string $var
     * @return $this
     */
    public function setStartTime($var)
    {
        GPBUtil::checkString($var, True);
        $this->start_time = $var;

        return $this;
    }

}

