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

namespace Google\Cloud\BaremetalSolution\V2;

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

/**
 * A snapshot schedule policy.
 *
 * Generated from protobuf message <code>google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy</code>
 */
class SnapshotSchedulePolicy extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The name of the snapshot schedule policy.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $name = '';
    /**
     * The description of the snapshot schedule policy.
     *
     * Generated from protobuf field <code>string description = 2;</code>
     */
    private $description = '';
    /**
     * The snapshot schedules contained in this policy. You can specify a maximum
     *  of 5 schedules.
     *
     * Generated from protobuf field <code>repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule schedules = 3;</code>
     */
    private $schedules;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Output only. The name of the snapshot schedule policy.
     *     @type string $description
     *           The description of the snapshot schedule policy.
     *     @type \Google\Cloud\BaremetalSolution\V2\SnapshotSchedulePolicy\Schedule[]|\Google\Protobuf\Internal\RepeatedField $schedules
     *           The snapshot schedules contained in this policy. You can specify a maximum
     *            of 5 schedules.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Baremetalsolution::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The name of the snapshot schedule policy.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Output only. The name of the snapshot schedule policy.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * The description of the snapshot schedule policy.
     *
     * Generated from protobuf field <code>string description = 2;</code>
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * The description of the snapshot schedule policy.
     *
     * Generated from protobuf field <code>string description = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

    /**
     * The snapshot schedules contained in this policy. You can specify a maximum
     *  of 5 schedules.
     *
     * Generated from protobuf field <code>repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule schedules = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getSchedules()
    {
        return $this->schedules;
    }

    /**
     * The snapshot schedules contained in this policy. You can specify a maximum
     *  of 5 schedules.
     *
     * Generated from protobuf field <code>repeated .google.cloud.baremetalsolution.v2.SnapshotSchedulePolicy.Schedule schedules = 3;</code>
     * @param \Google\Cloud\BaremetalSolution\V2\SnapshotSchedulePolicy\Schedule[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setSchedules($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BaremetalSolution\V2\SnapshotSchedulePolicy\Schedule::class);
        $this->schedules = $arr;

        return $this;
    }

}

