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

namespace Google\Cloud\BackupDR\V1;

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

/**
 * Information of backup configuration on the DataSource.
 *
 * Generated from protobuf message <code>google.cloud.backupdr.v1.DataSourceBackupConfigInfo</code>
 */
class DataSourceBackupConfigInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The status of the last backup in this DataSource
     *
     * Generated from protobuf field <code>.google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState last_backup_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $last_backup_state = 0;
    /**
     * Output only. Timestamp of the last successful backup to this DataSource.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_successful_backup_consistency_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $last_successful_backup_consistency_time = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $last_backup_state
     *           Output only. The status of the last backup in this DataSource
     *     @type \Google\Protobuf\Timestamp $last_successful_backup_consistency_time
     *           Output only. Timestamp of the last successful backup to this DataSource.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Backupdr\V1\Datasourcereference::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The status of the last backup in this DataSource
     *
     * Generated from protobuf field <code>.google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState last_backup_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getLastBackupState()
    {
        return $this->last_backup_state;
    }

    /**
     * Output only. The status of the last backup in this DataSource
     *
     * Generated from protobuf field <code>.google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState last_backup_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setLastBackupState($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\BackupConfigInfo\LastBackupState::class);
        $this->last_backup_state = $var;

        return $this;
    }

    /**
     * Output only. Timestamp of the last successful backup to this DataSource.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_successful_backup_consistency_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getLastSuccessfulBackupConsistencyTime()
    {
        return $this->last_successful_backup_consistency_time;
    }

    public function hasLastSuccessfulBackupConsistencyTime()
    {
        return isset($this->last_successful_backup_consistency_time);
    }

    public function clearLastSuccessfulBackupConsistencyTime()
    {
        unset($this->last_successful_backup_consistency_time);
    }

    /**
     * Output only. Timestamp of the last successful backup to this DataSource.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_successful_backup_consistency_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setLastSuccessfulBackupConsistencyTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->last_successful_backup_consistency_time = $var;

        return $this;
    }

}

