<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/monitoring/v3/alert.proto

namespace Google\Cloud\Monitoring\V3\AlertPolicy\Condition\SqlCondition;

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

/**
 * Used to schedule the query to run every so many days.
 *
 * Generated from protobuf message <code>google.monitoring.v3.AlertPolicy.Condition.SqlCondition.Daily</code>
 */
class Daily extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The number of days between runs. Must be greater than or
     * equal to 1 day and less than or equal to 31 days.
     *
     * Generated from protobuf field <code>int32 periodicity = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $periodicity = 0;
    /**
     * Optional. The time of day (in UTC) at which the query should run. If
     * left unspecified, the server picks an arbitrary time of day and runs
     * the query at the same time each day.
     *
     * Generated from protobuf field <code>.google.type.TimeOfDay execution_time = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $execution_time = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $periodicity
     *           Required. The number of days between runs. Must be greater than or
     *           equal to 1 day and less than or equal to 31 days.
     *     @type \Google\Type\TimeOfDay $execution_time
     *           Optional. The time of day (in UTC) at which the query should run. If
     *           left unspecified, the server picks an arbitrary time of day and runs
     *           the query at the same time each day.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Monitoring\V3\Alert::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The number of days between runs. Must be greater than or
     * equal to 1 day and less than or equal to 31 days.
     *
     * Generated from protobuf field <code>int32 periodicity = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getPeriodicity()
    {
        return $this->periodicity;
    }

    /**
     * Required. The number of days between runs. Must be greater than or
     * equal to 1 day and less than or equal to 31 days.
     *
     * Generated from protobuf field <code>int32 periodicity = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setPeriodicity($var)
    {
        GPBUtil::checkInt32($var);
        $this->periodicity = $var;

        return $this;
    }

    /**
     * Optional. The time of day (in UTC) at which the query should run. If
     * left unspecified, the server picks an arbitrary time of day and runs
     * the query at the same time each day.
     *
     * Generated from protobuf field <code>.google.type.TimeOfDay execution_time = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Type\TimeOfDay|null
     */
    public function getExecutionTime()
    {
        return $this->execution_time;
    }

    public function hasExecutionTime()
    {
        return isset($this->execution_time);
    }

    public function clearExecutionTime()
    {
        unset($this->execution_time);
    }

    /**
     * Optional. The time of day (in UTC) at which the query should run. If
     * left unspecified, the server picks an arbitrary time of day and runs
     * the query at the same time each day.
     *
     * Generated from protobuf field <code>.google.type.TimeOfDay execution_time = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Type\TimeOfDay $var
     * @return $this
     */
    public function setExecutionTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Type\TimeOfDay::class);
        $this->execution_time = $var;

        return $this;
    }

}


