<?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;

/**
 * Specification of resources to be created at some time in the future within an
 * optionally specified set of locations, and within the specified time range.
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.FutureResourcesSpec</code>
 */
class FutureResourcesSpec extends \Google\Protobuf\Internal\Message
{
    /**
     * Indicates if the reservation allocation strategy is static (DENSE) or
     * dynamic (STANDARD). Defaults to DENSE.
     * Check the DeploymentType enum for the list of possible values.
     *
     * Generated from protobuf field <code>optional string deployment_type = 396722292;</code>
     */
    protected $deployment_type = null;
    /**
     * Optional location policy allowing to exclude some zone(s) in which
     * the resources must not be created.
     *
     * Generated from protobuf field <code>optional .google.cloud.compute.v1.FutureResourcesSpecLocationPolicy location_policy = 465689852;</code>
     */
    protected $location_policy = null;
    /**
     * Specification of the reserved resources.
     *
     * Generated from protobuf field <code>optional .google.cloud.compute.v1.FutureResourcesSpecTargetResources target_resources = 528230647;</code>
     */
    protected $target_resources = null;
    /**
     * Specification of a time range in which the resources may be created.
     * The time range specifies start of resource use and planned end of resource
     * use.
     *
     * Generated from protobuf field <code>optional .google.cloud.compute.v1.FlexibleTimeRange time_range_spec = 116516399;</code>
     */
    protected $time_range_spec = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $deployment_type
     *           Indicates if the reservation allocation strategy is static (DENSE) or
     *           dynamic (STANDARD). Defaults to DENSE.
     *           Check the DeploymentType enum for the list of possible values.
     *     @type \Google\Cloud\Compute\V1\FutureResourcesSpecLocationPolicy $location_policy
     *           Optional location policy allowing to exclude some zone(s) in which
     *           the resources must not be created.
     *     @type \Google\Cloud\Compute\V1\FutureResourcesSpecTargetResources $target_resources
     *           Specification of the reserved resources.
     *     @type \Google\Cloud\Compute\V1\FlexibleTimeRange $time_range_spec
     *           Specification of a time range in which the resources may be created.
     *           The time range specifies start of resource use and planned end of resource
     *           use.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * Indicates if the reservation allocation strategy is static (DENSE) or
     * dynamic (STANDARD). Defaults to DENSE.
     * Check the DeploymentType enum for the list of possible values.
     *
     * Generated from protobuf field <code>optional string deployment_type = 396722292;</code>
     * @return string
     */
    public function getDeploymentType()
    {
        return isset($this->deployment_type) ? $this->deployment_type : '';
    }

    public function hasDeploymentType()
    {
        return isset($this->deployment_type);
    }

    public function clearDeploymentType()
    {
        unset($this->deployment_type);
    }

    /**
     * Indicates if the reservation allocation strategy is static (DENSE) or
     * dynamic (STANDARD). Defaults to DENSE.
     * Check the DeploymentType enum for the list of possible values.
     *
     * Generated from protobuf field <code>optional string deployment_type = 396722292;</code>
     * @param string $var
     * @return $this
     */
    public function setDeploymentType($var)
    {
        GPBUtil::checkString($var, True);
        $this->deployment_type = $var;

        return $this;
    }

    /**
     * Optional location policy allowing to exclude some zone(s) in which
     * the resources must not be created.
     *
     * Generated from protobuf field <code>optional .google.cloud.compute.v1.FutureResourcesSpecLocationPolicy location_policy = 465689852;</code>
     * @return \Google\Cloud\Compute\V1\FutureResourcesSpecLocationPolicy|null
     */
    public function getLocationPolicy()
    {
        return $this->location_policy;
    }

    public function hasLocationPolicy()
    {
        return isset($this->location_policy);
    }

    public function clearLocationPolicy()
    {
        unset($this->location_policy);
    }

    /**
     * Optional location policy allowing to exclude some zone(s) in which
     * the resources must not be created.
     *
     * Generated from protobuf field <code>optional .google.cloud.compute.v1.FutureResourcesSpecLocationPolicy location_policy = 465689852;</code>
     * @param \Google\Cloud\Compute\V1\FutureResourcesSpecLocationPolicy $var
     * @return $this
     */
    public function setLocationPolicy($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\FutureResourcesSpecLocationPolicy::class);
        $this->location_policy = $var;

        return $this;
    }

    /**
     * Specification of the reserved resources.
     *
     * Generated from protobuf field <code>optional .google.cloud.compute.v1.FutureResourcesSpecTargetResources target_resources = 528230647;</code>
     * @return \Google\Cloud\Compute\V1\FutureResourcesSpecTargetResources|null
     */
    public function getTargetResources()
    {
        return $this->target_resources;
    }

    public function hasTargetResources()
    {
        return isset($this->target_resources);
    }

    public function clearTargetResources()
    {
        unset($this->target_resources);
    }

    /**
     * Specification of the reserved resources.
     *
     * Generated from protobuf field <code>optional .google.cloud.compute.v1.FutureResourcesSpecTargetResources target_resources = 528230647;</code>
     * @param \Google\Cloud\Compute\V1\FutureResourcesSpecTargetResources $var
     * @return $this
     */
    public function setTargetResources($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\FutureResourcesSpecTargetResources::class);
        $this->target_resources = $var;

        return $this;
    }

    /**
     * Specification of a time range in which the resources may be created.
     * The time range specifies start of resource use and planned end of resource
     * use.
     *
     * Generated from protobuf field <code>optional .google.cloud.compute.v1.FlexibleTimeRange time_range_spec = 116516399;</code>
     * @return \Google\Cloud\Compute\V1\FlexibleTimeRange|null
     */
    public function getTimeRangeSpec()
    {
        return $this->time_range_spec;
    }

    public function hasTimeRangeSpec()
    {
        return isset($this->time_range_spec);
    }

    public function clearTimeRangeSpec()
    {
        unset($this->time_range_spec);
    }

    /**
     * Specification of a time range in which the resources may be created.
     * The time range specifies start of resource use and planned end of resource
     * use.
     *
     * Generated from protobuf field <code>optional .google.cloud.compute.v1.FlexibleTimeRange time_range_spec = 116516399;</code>
     * @param \Google\Cloud\Compute\V1\FlexibleTimeRange $var
     * @return $this
     */
    public function setTimeRangeSpec($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\FlexibleTimeRange::class);
        $this->time_range_spec = $var;

        return $this;
    }

}

