<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: temporal/api/schedule/v1/message.proto

namespace Temporal\Api\Schedule\V1;

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

/**
 * Generated from protobuf message <code>temporal.api.schedule.v1.BackfillRequest</code>
 */
class BackfillRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Time range to evaluate schedule in. Currently, this time range is
     * exclusive on start_time and inclusive on end_time. (This is admittedly
     * counterintuitive and it may change in the future, so to be safe, use a
     * start time strictly before a scheduled time.) Also note that an action
     * nominally scheduled in the interval but with jitter that pushes it after
     * end_time will not be included.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp start_time = 1;</code>
     */
    protected $start_time = null;
    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp end_time = 2;</code>
     */
    protected $end_time = null;
    /**
     * If set, override overlap policy for this request.
     *
     * Generated from protobuf field <code>.temporal.api.enums.v1.ScheduleOverlapPolicy overlap_policy = 3;</code>
     */
    protected $overlap_policy = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Protobuf\Timestamp $start_time
     *           Time range to evaluate schedule in. Currently, this time range is
     *           exclusive on start_time and inclusive on end_time. (This is admittedly
     *           counterintuitive and it may change in the future, so to be safe, use a
     *           start time strictly before a scheduled time.) Also note that an action
     *           nominally scheduled in the interval but with jitter that pushes it after
     *           end_time will not be included.
     *     @type \Google\Protobuf\Timestamp $end_time
     *     @type int $overlap_policy
     *           If set, override overlap policy for this request.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Schedule\V1\Message::initOnce();
        parent::__construct($data);
    }

    /**
     * Time range to evaluate schedule in. Currently, this time range is
     * exclusive on start_time and inclusive on end_time. (This is admittedly
     * counterintuitive and it may change in the future, so to be safe, use a
     * start time strictly before a scheduled time.) Also note that an action
     * nominally scheduled in the interval but with jitter that pushes it after
     * end_time will not be included.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp start_time = 1;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getStartTime()
    {
        return $this->start_time;
    }

    public function hasStartTime()
    {
        return isset($this->start_time);
    }

    public function clearStartTime()
    {
        unset($this->start_time);
    }

    /**
     * Time range to evaluate schedule in. Currently, this time range is
     * exclusive on start_time and inclusive on end_time. (This is admittedly
     * counterintuitive and it may change in the future, so to be safe, use a
     * start time strictly before a scheduled time.) Also note that an action
     * nominally scheduled in the interval but with jitter that pushes it after
     * end_time will not be included.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp start_time = 1;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setStartTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->start_time = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp end_time = 2;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getEndTime()
    {
        return $this->end_time;
    }

    public function hasEndTime()
    {
        return isset($this->end_time);
    }

    public function clearEndTime()
    {
        unset($this->end_time);
    }

    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp end_time = 2;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setEndTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->end_time = $var;

        return $this;
    }

    /**
     * If set, override overlap policy for this request.
     *
     * Generated from protobuf field <code>.temporal.api.enums.v1.ScheduleOverlapPolicy overlap_policy = 3;</code>
     * @return int
     */
    public function getOverlapPolicy()
    {
        return $this->overlap_policy;
    }

    /**
     * If set, override overlap policy for this request.
     *
     * Generated from protobuf field <code>.temporal.api.enums.v1.ScheduleOverlapPolicy overlap_policy = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setOverlapPolicy($var)
    {
        GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\ScheduleOverlapPolicy::class);
        $this->overlap_policy = $var;

        return $this;
    }

}

