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

/**
 * Time window specified for weekly operations.
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.ResourcePolicyWeeklyCycle</code>
 */
class ResourcePolicyWeeklyCycle extends \Google\Protobuf\Internal\Message
{
    /**
     * Up to 7 intervals/windows, one for each day of the week.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.ResourcePolicyWeeklyCycleDayOfWeek day_of_weeks = 257871834;</code>
     */
    private $day_of_weeks;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\Compute\V1\ResourcePolicyWeeklyCycleDayOfWeek>|\Google\Protobuf\Internal\RepeatedField $day_of_weeks
     *           Up to 7 intervals/windows, one for each day of the week.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * Up to 7 intervals/windows, one for each day of the week.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.ResourcePolicyWeeklyCycleDayOfWeek day_of_weeks = 257871834;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getDayOfWeeks()
    {
        return $this->day_of_weeks;
    }

    /**
     * Up to 7 intervals/windows, one for each day of the week.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.ResourcePolicyWeeklyCycleDayOfWeek day_of_weeks = 257871834;</code>
     * @param array<\Google\Cloud\Compute\V1\ResourcePolicyWeeklyCycleDayOfWeek>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setDayOfWeeks($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Compute\V1\ResourcePolicyWeeklyCycleDayOfWeek::class);
        $this->day_of_weeks = $arr;

        return $this;
    }

}

