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

namespace Google\Cloud\CapacityPlanner\V1beta;

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

/**
 * The metadata associated with a capacity demand.
 *
 * Generated from protobuf message <code>google.cloud.capacityplanner.v1beta.DemandMetadata</code>
 */
class DemandMetadata extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. The preferences associated with a capacity demand.
     *
     * Generated from protobuf field <code>repeated .google.cloud.capacityplanner.v1beta.DemandPreference demand_preferences = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $demand_preferences;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\CapacityPlanner\V1beta\DemandPreference>|\Google\Protobuf\Internal\RepeatedField $demand_preferences
     *           Optional. The preferences associated with a capacity demand.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Capacityplanner\V1Beta\CapacityPlanningService::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. The preferences associated with a capacity demand.
     *
     * Generated from protobuf field <code>repeated .google.cloud.capacityplanner.v1beta.DemandPreference demand_preferences = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getDemandPreferences()
    {
        return $this->demand_preferences;
    }

    /**
     * Optional. The preferences associated with a capacity demand.
     *
     * Generated from protobuf field <code>repeated .google.cloud.capacityplanner.v1beta.DemandPreference demand_preferences = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array<\Google\Cloud\CapacityPlanner\V1beta\DemandPreference>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setDemandPreferences($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\CapacityPlanner\V1beta\DemandPreference::class);
        $this->demand_preferences = $arr;

        return $this;
    }

}

