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

namespace Google\Cloud\CapacityPlanner\V1beta;

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

/**
 * The `ExportReservationsUsage` request
 *
 * Generated from protobuf message <code>google.cloud.capacityplanner.v1beta.ExportReservationsUsageRequest</code>
 */
class ExportReservationsUsageRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The compute engine resource and location of the
     * reservationsusage. The format is:
     *    projects/{project}/locations/{location} or
     *    organizations/{organization}/locations/{location} or
     *    folders/{folder}/locations/{location}
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $parent = '';
    /**
     * Optional. The location level of the reservations usage timeseries.
     *
     * Generated from protobuf field <code>.google.cloud.capacityplanner.v1beta.TimeSeries.LocationType location_level = 11 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $location_level = 0;
    /**
     * Required. The resource for the `ReservationsUsage` values to return.
     * Possible values include "gce-vcpus", "gce-ram", "gce-local-ssd", and
     * "gce-gpu".
     *
     * Generated from protobuf field <code>string cloud_resource_type = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $cloud_resource_type = '';
    /**
     * Required. The method that should be used to convert sampled reservations
     * data to daily usage values.
     *
     * Generated from protobuf field <code>.google.cloud.capacityplanner.v1beta.UsageHistory.AggregationMethod usage_aggregation_method = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $usage_aggregation_method = 0;
    /**
     * Optional. Type of share settings to filter reservations in response. If
     * unspecified, all types are included.
     *
     * Generated from protobuf field <code>.google.cloud.capacityplanner.v1beta.ExportReservationsUsageRequest.ShareType share_type = 7 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $share_type = 0;
    /**
     * Optional. The start date of reservations usage.
     *
     * Generated from protobuf field <code>.google.type.Date start_date = 8 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $start_date = null;
    /**
     * Optional. The end date of reservations usage.
     *
     * Generated from protobuf field <code>.google.type.Date end_date = 9 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $end_date = null;
    /**
     * Required. Output configuration indicating where the results will be output
     * to.
     *
     * Generated from protobuf field <code>.google.cloud.capacityplanner.v1beta.OutputConfig output_config = 10 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $output_config = null;
    protected $resource;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $machine_family
     *           Optional. The machine family to query reservations and usage by. For
     *           example: n1, n2d.
     *     @type \Google\Cloud\CapacityPlanner\V1beta\MachineShape $machine_shape
     *           Optional. The machine_shape as a filter to select matching reservations
     *           and its usage.
     *     @type string $gpu_type
     *           Optional. The GPU type to query reservations and usage  by. For example:
     *           NVIDIA T4.
     *     @type string $parent
     *           Required. The compute engine resource and location of the
     *           reservationsusage. The format is:
     *              projects/{project}/locations/{location} or
     *              organizations/{organization}/locations/{location} or
     *              folders/{folder}/locations/{location}
     *     @type int $location_level
     *           Optional. The location level of the reservations usage timeseries.
     *     @type string $cloud_resource_type
     *           Required. The resource for the `ReservationsUsage` values to return.
     *           Possible values include "gce-vcpus", "gce-ram", "gce-local-ssd", and
     *           "gce-gpu".
     *     @type int $usage_aggregation_method
     *           Required. The method that should be used to convert sampled reservations
     *           data to daily usage values.
     *     @type int $share_type
     *           Optional. Type of share settings to filter reservations in response. If
     *           unspecified, all types are included.
     *     @type \Google\Type\Date $start_date
     *           Optional. The start date of reservations usage.
     *     @type \Google\Type\Date $end_date
     *           Optional. The end date of reservations usage.
     *     @type \Google\Cloud\CapacityPlanner\V1beta\OutputConfig $output_config
     *           Required. Output configuration indicating where the results will be output
     *           to.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Capacityplanner\V1Beta\UsageService::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. The machine family to query reservations and usage by. For
     * example: n1, n2d.
     *
     * Generated from protobuf field <code>string machine_family = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getMachineFamily()
    {
        return $this->readOneof(2);
    }

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

    /**
     * Optional. The machine family to query reservations and usage by. For
     * example: n1, n2d.
     *
     * Generated from protobuf field <code>string machine_family = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setMachineFamily($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * Optional. The machine_shape as a filter to select matching reservations
     * and its usage.
     *
     * Generated from protobuf field <code>.google.cloud.capacityplanner.v1beta.MachineShape machine_shape = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\CapacityPlanner\V1beta\MachineShape|null
     */
    public function getMachineShape()
    {
        return $this->readOneof(3);
    }

    public function hasMachineShape()
    {
        return $this->hasOneof(3);
    }

    /**
     * Optional. The machine_shape as a filter to select matching reservations
     * and its usage.
     *
     * Generated from protobuf field <code>.google.cloud.capacityplanner.v1beta.MachineShape machine_shape = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\CapacityPlanner\V1beta\MachineShape $var
     * @return $this
     */
    public function setMachineShape($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\CapacityPlanner\V1beta\MachineShape::class);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * Optional. The GPU type to query reservations and usage  by. For example:
     * NVIDIA T4.
     *
     * Generated from protobuf field <code>string gpu_type = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getGpuType()
    {
        return $this->readOneof(4);
    }

    public function hasGpuType()
    {
        return $this->hasOneof(4);
    }

    /**
     * Optional. The GPU type to query reservations and usage  by. For example:
     * NVIDIA T4.
     *
     * Generated from protobuf field <code>string gpu_type = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setGpuType($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(4, $var);

        return $this;
    }

    /**
     * Required. The compute engine resource and location of the
     * reservationsusage. The format is:
     *    projects/{project}/locations/{location} or
     *    organizations/{organization}/locations/{location} or
     *    folders/{folder}/locations/{location}
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * Required. The compute engine resource and location of the
     * reservationsusage. The format is:
     *    projects/{project}/locations/{location} or
     *    organizations/{organization}/locations/{location} or
     *    folders/{folder}/locations/{location}
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * Optional. The location level of the reservations usage timeseries.
     *
     * Generated from protobuf field <code>.google.cloud.capacityplanner.v1beta.TimeSeries.LocationType location_level = 11 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getLocationLevel()
    {
        return $this->location_level;
    }

    /**
     * Optional. The location level of the reservations usage timeseries.
     *
     * Generated from protobuf field <code>.google.cloud.capacityplanner.v1beta.TimeSeries.LocationType location_level = 11 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setLocationLevel($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\CapacityPlanner\V1beta\TimeSeries\LocationType::class);
        $this->location_level = $var;

        return $this;
    }

    /**
     * Required. The resource for the `ReservationsUsage` values to return.
     * Possible values include "gce-vcpus", "gce-ram", "gce-local-ssd", and
     * "gce-gpu".
     *
     * Generated from protobuf field <code>string cloud_resource_type = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getCloudResourceType()
    {
        return $this->cloud_resource_type;
    }

    /**
     * Required. The resource for the `ReservationsUsage` values to return.
     * Possible values include "gce-vcpus", "gce-ram", "gce-local-ssd", and
     * "gce-gpu".
     *
     * Generated from protobuf field <code>string cloud_resource_type = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setCloudResourceType($var)
    {
        GPBUtil::checkString($var, True);
        $this->cloud_resource_type = $var;

        return $this;
    }

    /**
     * Required. The method that should be used to convert sampled reservations
     * data to daily usage values.
     *
     * Generated from protobuf field <code>.google.cloud.capacityplanner.v1beta.UsageHistory.AggregationMethod usage_aggregation_method = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getUsageAggregationMethod()
    {
        return $this->usage_aggregation_method;
    }

    /**
     * Required. The method that should be used to convert sampled reservations
     * data to daily usage values.
     *
     * Generated from protobuf field <code>.google.cloud.capacityplanner.v1beta.UsageHistory.AggregationMethod usage_aggregation_method = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setUsageAggregationMethod($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\CapacityPlanner\V1beta\UsageHistory\AggregationMethod::class);
        $this->usage_aggregation_method = $var;

        return $this;
    }

    /**
     * Optional. Type of share settings to filter reservations in response. If
     * unspecified, all types are included.
     *
     * Generated from protobuf field <code>.google.cloud.capacityplanner.v1beta.ExportReservationsUsageRequest.ShareType share_type = 7 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getShareType()
    {
        return $this->share_type;
    }

    /**
     * Optional. Type of share settings to filter reservations in response. If
     * unspecified, all types are included.
     *
     * Generated from protobuf field <code>.google.cloud.capacityplanner.v1beta.ExportReservationsUsageRequest.ShareType share_type = 7 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setShareType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\CapacityPlanner\V1beta\ExportReservationsUsageRequest\ShareType::class);
        $this->share_type = $var;

        return $this;
    }

    /**
     * Optional. The start date of reservations usage.
     *
     * Generated from protobuf field <code>.google.type.Date start_date = 8 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Type\Date|null
     */
    public function getStartDate()
    {
        return $this->start_date;
    }

    public function hasStartDate()
    {
        return isset($this->start_date);
    }

    public function clearStartDate()
    {
        unset($this->start_date);
    }

    /**
     * Optional. The start date of reservations usage.
     *
     * Generated from protobuf field <code>.google.type.Date start_date = 8 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Type\Date $var
     * @return $this
     */
    public function setStartDate($var)
    {
        GPBUtil::checkMessage($var, \Google\Type\Date::class);
        $this->start_date = $var;

        return $this;
    }

    /**
     * Optional. The end date of reservations usage.
     *
     * Generated from protobuf field <code>.google.type.Date end_date = 9 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Type\Date|null
     */
    public function getEndDate()
    {
        return $this->end_date;
    }

    public function hasEndDate()
    {
        return isset($this->end_date);
    }

    public function clearEndDate()
    {
        unset($this->end_date);
    }

    /**
     * Optional. The end date of reservations usage.
     *
     * Generated from protobuf field <code>.google.type.Date end_date = 9 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Type\Date $var
     * @return $this
     */
    public function setEndDate($var)
    {
        GPBUtil::checkMessage($var, \Google\Type\Date::class);
        $this->end_date = $var;

        return $this;
    }

    /**
     * Required. Output configuration indicating where the results will be output
     * to.
     *
     * Generated from protobuf field <code>.google.cloud.capacityplanner.v1beta.OutputConfig output_config = 10 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\CapacityPlanner\V1beta\OutputConfig|null
     */
    public function getOutputConfig()
    {
        return $this->output_config;
    }

    public function hasOutputConfig()
    {
        return isset($this->output_config);
    }

    public function clearOutputConfig()
    {
        unset($this->output_config);
    }

    /**
     * Required. Output configuration indicating where the results will be output
     * to.
     *
     * Generated from protobuf field <code>.google.cloud.capacityplanner.v1beta.OutputConfig output_config = 10 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\CapacityPlanner\V1beta\OutputConfig $var
     * @return $this
     */
    public function setOutputConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\CapacityPlanner\V1beta\OutputConfig::class);
        $this->output_config = $var;

        return $this;
    }

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

}

