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

namespace Google\Cloud\Memorystore\V1\AutomatedBackupConfig;

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

/**
 * This schedule allows the backup to be triggered at a fixed frequency
 * (currently only daily is supported).
 *
 * Generated from protobuf message <code>google.cloud.memorystore.v1.AutomatedBackupConfig.FixedFrequencySchedule</code>
 */
class FixedFrequencySchedule extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The start time of every automated backup in UTC. It must be set
     * to the start of an hour. This field is required.
     *
     * Generated from protobuf field <code>.google.type.TimeOfDay start_time = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $start_time = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Type\TimeOfDay $start_time
     *           Required. The start time of every automated backup in UTC. It must be set
     *           to the start of an hour. This field is required.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The start time of every automated backup in UTC. It must be set
     * to the start of an hour. This field is required.
     *
     * Generated from protobuf field <code>.google.type.TimeOfDay start_time = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Type\TimeOfDay|null
     */
    public function getStartTime()
    {
        return $this->start_time;
    }

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

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

    /**
     * Required. The start time of every automated backup in UTC. It must be set
     * to the start of an hour. This field is required.
     *
     * Generated from protobuf field <code>.google.type.TimeOfDay start_time = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Type\TimeOfDay $var
     * @return $this
     */
    public function setStartTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Type\TimeOfDay::class);
        $this->start_time = $var;

        return $this;
    }

}


