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

namespace Google\Cloud\BareMetalSolution\V2\SnapshotSchedulePolicy;

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

/**
 * A snapshot schedule.
 *
 * Generated from protobuf message <code>google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule</code>
 */
class Schedule extends \Google\Protobuf\Internal\Message
{
    /**
     * A crontab-like specification that the schedule uses to take
     * snapshots.
     *
     * Generated from protobuf field <code>string crontab_spec = 1;</code>
     */
    private $crontab_spec = '';
    /**
     * The maximum number of snapshots to retain in this schedule.
     *
     * Generated from protobuf field <code>int32 retention_count = 2;</code>
     */
    private $retention_count = 0;
    /**
     * A list of snapshot names created in this schedule.
     *
     * Generated from protobuf field <code>string prefix = 3;</code>
     */
    private $prefix = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $crontab_spec
     *           A crontab-like specification that the schedule uses to take
     *           snapshots.
     *     @type int $retention_count
     *           The maximum number of snapshots to retain in this schedule.
     *     @type string $prefix
     *           A list of snapshot names created in this schedule.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Baremetalsolution::initOnce();
        parent::__construct($data);
    }

    /**
     * A crontab-like specification that the schedule uses to take
     * snapshots.
     *
     * Generated from protobuf field <code>string crontab_spec = 1;</code>
     * @return string
     */
    public function getCrontabSpec()
    {
        return $this->crontab_spec;
    }

    /**
     * A crontab-like specification that the schedule uses to take
     * snapshots.
     *
     * Generated from protobuf field <code>string crontab_spec = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setCrontabSpec($var)
    {
        GPBUtil::checkString($var, True);
        $this->crontab_spec = $var;

        return $this;
    }

    /**
     * The maximum number of snapshots to retain in this schedule.
     *
     * Generated from protobuf field <code>int32 retention_count = 2;</code>
     * @return int
     */
    public function getRetentionCount()
    {
        return $this->retention_count;
    }

    /**
     * The maximum number of snapshots to retain in this schedule.
     *
     * Generated from protobuf field <code>int32 retention_count = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setRetentionCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->retention_count = $var;

        return $this;
    }

    /**
     * A list of snapshot names created in this schedule.
     *
     * Generated from protobuf field <code>string prefix = 3;</code>
     * @return string
     */
    public function getPrefix()
    {
        return $this->prefix;
    }

    /**
     * A list of snapshot names created in this schedule.
     *
     * Generated from protobuf field <code>string prefix = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setPrefix($var)
    {
        GPBUtil::checkString($var, True);
        $this->prefix = $var;

        return $this;
    }

}


