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

namespace Google\Cloud\Compute\V1;

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

/**
 * A snapshot schedule policy specifies when and how frequently snapshots are to be created for the target disk. Also specifies how many and how long these scheduled snapshots should be retained.
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy</code>
 */
class ResourcePolicySnapshotSchedulePolicy extends \Google\Protobuf\Internal\Message
{
    /**
     * Retention policy applied to snapshots created by this resource policy.
     *
     * Generated from protobuf field <code>optional .google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicyRetentionPolicy retention_policy = 68625779;</code>
     */
    protected $retention_policy = null;
    /**
     * A Vm Maintenance Policy specifies what kind of infrastructure maintenance we are allowed to perform on this VM and when. Schedule that is applied to disks covered by this policy.
     *
     * Generated from protobuf field <code>optional .google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicySchedule schedule = 375820951;</code>
     */
    protected $schedule = null;
    /**
     * Properties with which snapshots are created such as labels, encryption keys.
     *
     * Generated from protobuf field <code>optional .google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicySnapshotProperties snapshot_properties = 185371278;</code>
     */
    protected $snapshot_properties = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Compute\V1\ResourcePolicySnapshotSchedulePolicyRetentionPolicy $retention_policy
     *           Retention policy applied to snapshots created by this resource policy.
     *     @type \Google\Cloud\Compute\V1\ResourcePolicySnapshotSchedulePolicySchedule $schedule
     *           A Vm Maintenance Policy specifies what kind of infrastructure maintenance we are allowed to perform on this VM and when. Schedule that is applied to disks covered by this policy.
     *     @type \Google\Cloud\Compute\V1\ResourcePolicySnapshotSchedulePolicySnapshotProperties $snapshot_properties
     *           Properties with which snapshots are created such as labels, encryption keys.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * Retention policy applied to snapshots created by this resource policy.
     *
     * Generated from protobuf field <code>optional .google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicyRetentionPolicy retention_policy = 68625779;</code>
     * @return \Google\Cloud\Compute\V1\ResourcePolicySnapshotSchedulePolicyRetentionPolicy|null
     */
    public function getRetentionPolicy()
    {
        return $this->retention_policy;
    }

    public function hasRetentionPolicy()
    {
        return isset($this->retention_policy);
    }

    public function clearRetentionPolicy()
    {
        unset($this->retention_policy);
    }

    /**
     * Retention policy applied to snapshots created by this resource policy.
     *
     * Generated from protobuf field <code>optional .google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicyRetentionPolicy retention_policy = 68625779;</code>
     * @param \Google\Cloud\Compute\V1\ResourcePolicySnapshotSchedulePolicyRetentionPolicy $var
     * @return $this
     */
    public function setRetentionPolicy($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\ResourcePolicySnapshotSchedulePolicyRetentionPolicy::class);
        $this->retention_policy = $var;

        return $this;
    }

    /**
     * A Vm Maintenance Policy specifies what kind of infrastructure maintenance we are allowed to perform on this VM and when. Schedule that is applied to disks covered by this policy.
     *
     * Generated from protobuf field <code>optional .google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicySchedule schedule = 375820951;</code>
     * @return \Google\Cloud\Compute\V1\ResourcePolicySnapshotSchedulePolicySchedule|null
     */
    public function getSchedule()
    {
        return $this->schedule;
    }

    public function hasSchedule()
    {
        return isset($this->schedule);
    }

    public function clearSchedule()
    {
        unset($this->schedule);
    }

    /**
     * A Vm Maintenance Policy specifies what kind of infrastructure maintenance we are allowed to perform on this VM and when. Schedule that is applied to disks covered by this policy.
     *
     * Generated from protobuf field <code>optional .google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicySchedule schedule = 375820951;</code>
     * @param \Google\Cloud\Compute\V1\ResourcePolicySnapshotSchedulePolicySchedule $var
     * @return $this
     */
    public function setSchedule($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\ResourcePolicySnapshotSchedulePolicySchedule::class);
        $this->schedule = $var;

        return $this;
    }

    /**
     * Properties with which snapshots are created such as labels, encryption keys.
     *
     * Generated from protobuf field <code>optional .google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicySnapshotProperties snapshot_properties = 185371278;</code>
     * @return \Google\Cloud\Compute\V1\ResourcePolicySnapshotSchedulePolicySnapshotProperties|null
     */
    public function getSnapshotProperties()
    {
        return $this->snapshot_properties;
    }

    public function hasSnapshotProperties()
    {
        return isset($this->snapshot_properties);
    }

    public function clearSnapshotProperties()
    {
        unset($this->snapshot_properties);
    }

    /**
     * Properties with which snapshots are created such as labels, encryption keys.
     *
     * Generated from protobuf field <code>optional .google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicySnapshotProperties snapshot_properties = 185371278;</code>
     * @param \Google\Cloud\Compute\V1\ResourcePolicySnapshotSchedulePolicySnapshotProperties $var
     * @return $this
     */
    public function setSnapshotProperties($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\ResourcePolicySnapshotSchedulePolicySnapshotProperties::class);
        $this->snapshot_properties = $var;

        return $this;
    }

}

