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

namespace Google\Cloud\Firestore\Admin\V1;

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

/**
 * Represents a recurring schedule that runs on a specified day of the week.
 * The time zone is UTC.
 *
 * Generated from protobuf message <code>google.firestore.admin.v1.WeeklyRecurrence</code>
 */
class WeeklyRecurrence extends \Google\Protobuf\Internal\Message
{
    /**
     * The day of week to run.
     * DAY_OF_WEEK_UNSPECIFIED is not allowed.
     *
     * Generated from protobuf field <code>.google.type.DayOfWeek day = 2;</code>
     */
    private $day = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $day
     *           The day of week to run.
     *           DAY_OF_WEEK_UNSPECIFIED is not allowed.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Firestore\Admin\V1\Schedule::initOnce();
        parent::__construct($data);
    }

    /**
     * The day of week to run.
     * DAY_OF_WEEK_UNSPECIFIED is not allowed.
     *
     * Generated from protobuf field <code>.google.type.DayOfWeek day = 2;</code>
     * @return int
     */
    public function getDay()
    {
        return $this->day;
    }

    /**
     * The day of week to run.
     * DAY_OF_WEEK_UNSPECIFIED is not allowed.
     *
     * Generated from protobuf field <code>.google.type.DayOfWeek day = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setDay($var)
    {
        GPBUtil::checkEnum($var, \Google\Type\DayOfWeek::class);
        $this->day = $var;

        return $this;
    }

}

