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

namespace Google\Cloud\GkeBackup\V1\BackupPlan;

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

/**
 * Schedule defines scheduling parameters for automatically creating Backups
 * via this BackupPlan.
 *
 * Generated from protobuf message <code>google.cloud.gkebackup.v1.BackupPlan.Schedule</code>
 */
class Schedule extends \Google\Protobuf\Internal\Message
{
    /**
     * A standard [cron](https://wikipedia.com/wiki/cron) string that defines a
     * repeating schedule for creating Backups via this BackupPlan.
     * Default (empty): no automatic backup creation will occur.
     *
     * Generated from protobuf field <code>string cron_schedule = 1;</code>
     */
    private $cron_schedule = '';
    /**
     * This flag denotes whether automatic Backup creation is paused for this
     * BackupPlan.
     * Default: False
     *
     * Generated from protobuf field <code>bool paused = 2;</code>
     */
    private $paused = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $cron_schedule
     *           A standard [cron](https://wikipedia.com/wiki/cron) string that defines a
     *           repeating schedule for creating Backups via this BackupPlan.
     *           Default (empty): no automatic backup creation will occur.
     *     @type bool $paused
     *           This flag denotes whether automatic Backup creation is paused for this
     *           BackupPlan.
     *           Default: False
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Gkebackup\V1\BackupPlan::initOnce();
        parent::__construct($data);
    }

    /**
     * A standard [cron](https://wikipedia.com/wiki/cron) string that defines a
     * repeating schedule for creating Backups via this BackupPlan.
     * Default (empty): no automatic backup creation will occur.
     *
     * Generated from protobuf field <code>string cron_schedule = 1;</code>
     * @return string
     */
    public function getCronSchedule()
    {
        return $this->cron_schedule;
    }

    /**
     * A standard [cron](https://wikipedia.com/wiki/cron) string that defines a
     * repeating schedule for creating Backups via this BackupPlan.
     * Default (empty): no automatic backup creation will occur.
     *
     * Generated from protobuf field <code>string cron_schedule = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setCronSchedule($var)
    {
        GPBUtil::checkString($var, True);
        $this->cron_schedule = $var;

        return $this;
    }

    /**
     * This flag denotes whether automatic Backup creation is paused for this
     * BackupPlan.
     * Default: False
     *
     * Generated from protobuf field <code>bool paused = 2;</code>
     * @return bool
     */
    public function getPaused()
    {
        return $this->paused;
    }

    /**
     * This flag denotes whether automatic Backup creation is paused for this
     * BackupPlan.
     * Default: False
     *
     * Generated from protobuf field <code>bool paused = 2;</code>
     * @param bool $var
     * @return $this
     */
    public function setPaused($var)
    {
        GPBUtil::checkBool($var);
        $this->paused = $var;

        return $this;
    }

}


