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

namespace Google\Cloud\BackupDR\V1;

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

/**
 * BackupConfigDetails has information about how the resource is configured
 * for backups and about the most recent backup taken for this configuration.
 *
 * Generated from protobuf message <code>google.cloud.backupdr.v1.BackupConfigDetails</code>
 */
class BackupConfigDetails extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The full resource name of the backup config source resource.
     * For example,
     * "//backupdr.googleapis.com/v1/projects/{project}/locations/{region}/backupPlans/{backupplanId}"
     * or
     * "//compute.googleapis.com/projects/{project}/locations/{region}/resourcePolicies/{resourcePolicyId}".
     *
     * Generated from protobuf field <code>string backup_config_source = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $backup_config_source = '';
    /**
     * Output only. The display name of the backup config source resource.
     *
     * Generated from protobuf field <code>string backup_config_source_display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $backup_config_source_display_name = '';
    /**
     * Output only. The type of the backup config resource.
     *
     * Generated from protobuf field <code>.google.cloud.backupdr.v1.BackupConfigDetails.Type type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $type = 0;
    /**
     * Output only. The state of the backup config resource.
     *
     * Generated from protobuf field <code>.google.cloud.backupdr.v1.BackupConfigDetails.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $state = 0;
    /**
     * Output only. Point in time recovery settings of the backup configuration
     * resource.
     *
     * Generated from protobuf field <code>.google.cloud.backupdr.v1.PitrSettings pitr_settings = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $pitr_settings = null;
    /**
     * Output only. Timestamp of the latest successful backup created via this
     * backup configuration.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp latest_successful_backup_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $latest_successful_backup_time = null;
    /**
     * Output only. The [full resource
     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
     * of the resource that is applicable for the backup configuration. Example:
     * "//compute.googleapis.com/projects/{project}/zones/{zone}/instances/{instance}"
     *
     * Generated from protobuf field <code>string applicable_resource = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $applicable_resource = '';
    /**
     * Output only. The [full resource
     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
     * of the backup vault that will store the backups generated through this
     * backup configuration. Example:
     * "//backupdr.googleapis.com/v1/projects/{project}/locations/{region}/backupVaults/{backupvaultId}"
     *
     * Generated from protobuf field <code>string backup_vault = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $backup_vault = '';
    /**
     * The locations where the backups are to be stored.
     *
     * Generated from protobuf field <code>repeated .google.cloud.backupdr.v1.BackupLocation backup_locations = 12;</code>
     */
    private $backup_locations;
    protected $plan_specific_config;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $backup_config_source
     *           Output only. The full resource name of the backup config source resource.
     *           For example,
     *           "//backupdr.googleapis.com/v1/projects/{project}/locations/{region}/backupPlans/{backupplanId}"
     *           or
     *           "//compute.googleapis.com/projects/{project}/locations/{region}/resourcePolicies/{resourcePolicyId}".
     *     @type string $backup_config_source_display_name
     *           Output only. The display name of the backup config source resource.
     *     @type int $type
     *           Output only. The type of the backup config resource.
     *     @type int $state
     *           Output only. The state of the backup config resource.
     *     @type \Google\Cloud\BackupDR\V1\PitrSettings $pitr_settings
     *           Output only. Point in time recovery settings of the backup configuration
     *           resource.
     *     @type \Google\Protobuf\Timestamp $latest_successful_backup_time
     *           Output only. Timestamp of the latest successful backup created via this
     *           backup configuration.
     *     @type string $applicable_resource
     *           Output only. The [full resource
     *           name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
     *           of the resource that is applicable for the backup configuration. Example:
     *           "//compute.googleapis.com/projects/{project}/zones/{zone}/instances/{instance}"
     *     @type string $backup_vault
     *           Output only. The [full resource
     *           name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
     *           of the backup vault that will store the backups generated through this
     *           backup configuration. Example:
     *           "//backupdr.googleapis.com/v1/projects/{project}/locations/{region}/backupVaults/{backupvaultId}"
     *     @type array<\Google\Cloud\BackupDR\V1\BackupLocation>|\Google\Protobuf\Internal\RepeatedField $backup_locations
     *           The locations where the backups are to be stored.
     *     @type \Google\Cloud\BackupDR\V1\BackupDrPlanConfig $backup_dr_plan_config
     *           Google Cloud Backup and DR's Backup Plan specific data.
     *     @type \Google\Cloud\BackupDR\V1\BackupDrTemplateConfig $backup_dr_template_config
     *           Google Cloud Backup and DR's Template specific data.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Backupdr\V1\ProtectionSummary::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The full resource name of the backup config source resource.
     * For example,
     * "//backupdr.googleapis.com/v1/projects/{project}/locations/{region}/backupPlans/{backupplanId}"
     * or
     * "//compute.googleapis.com/projects/{project}/locations/{region}/resourcePolicies/{resourcePolicyId}".
     *
     * Generated from protobuf field <code>string backup_config_source = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getBackupConfigSource()
    {
        return $this->backup_config_source;
    }

    /**
     * Output only. The full resource name of the backup config source resource.
     * For example,
     * "//backupdr.googleapis.com/v1/projects/{project}/locations/{region}/backupPlans/{backupplanId}"
     * or
     * "//compute.googleapis.com/projects/{project}/locations/{region}/resourcePolicies/{resourcePolicyId}".
     *
     * Generated from protobuf field <code>string backup_config_source = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setBackupConfigSource($var)
    {
        GPBUtil::checkString($var, True);
        $this->backup_config_source = $var;

        return $this;
    }

    /**
     * Output only. The display name of the backup config source resource.
     *
     * Generated from protobuf field <code>string backup_config_source_display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getBackupConfigSourceDisplayName()
    {
        return $this->backup_config_source_display_name;
    }

    /**
     * Output only. The display name of the backup config source resource.
     *
     * Generated from protobuf field <code>string backup_config_source_display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setBackupConfigSourceDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->backup_config_source_display_name = $var;

        return $this;
    }

    /**
     * Output only. The type of the backup config resource.
     *
     * Generated from protobuf field <code>.google.cloud.backupdr.v1.BackupConfigDetails.Type type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Output only. The type of the backup config resource.
     *
     * Generated from protobuf field <code>.google.cloud.backupdr.v1.BackupConfigDetails.Type type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\BackupConfigDetails\Type::class);
        $this->type = $var;

        return $this;
    }

    /**
     * Output only. The state of the backup config resource.
     *
     * Generated from protobuf field <code>.google.cloud.backupdr.v1.BackupConfigDetails.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getState()
    {
        return $this->state;
    }

    /**
     * Output only. The state of the backup config resource.
     *
     * Generated from protobuf field <code>.google.cloud.backupdr.v1.BackupConfigDetails.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setState($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\BackupDR\V1\BackupConfigDetails\State::class);
        $this->state = $var;

        return $this;
    }

    /**
     * Output only. Point in time recovery settings of the backup configuration
     * resource.
     *
     * Generated from protobuf field <code>.google.cloud.backupdr.v1.PitrSettings pitr_settings = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Cloud\BackupDR\V1\PitrSettings|null
     */
    public function getPitrSettings()
    {
        return $this->pitr_settings;
    }

    public function hasPitrSettings()
    {
        return isset($this->pitr_settings);
    }

    public function clearPitrSettings()
    {
        unset($this->pitr_settings);
    }

    /**
     * Output only. Point in time recovery settings of the backup configuration
     * resource.
     *
     * Generated from protobuf field <code>.google.cloud.backupdr.v1.PitrSettings pitr_settings = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Cloud\BackupDR\V1\PitrSettings $var
     * @return $this
     */
    public function setPitrSettings($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\PitrSettings::class);
        $this->pitr_settings = $var;

        return $this;
    }

    /**
     * Output only. Timestamp of the latest successful backup created via this
     * backup configuration.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp latest_successful_backup_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getLatestSuccessfulBackupTime()
    {
        return $this->latest_successful_backup_time;
    }

    public function hasLatestSuccessfulBackupTime()
    {
        return isset($this->latest_successful_backup_time);
    }

    public function clearLatestSuccessfulBackupTime()
    {
        unset($this->latest_successful_backup_time);
    }

    /**
     * Output only. Timestamp of the latest successful backup created via this
     * backup configuration.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp latest_successful_backup_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setLatestSuccessfulBackupTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->latest_successful_backup_time = $var;

        return $this;
    }

    /**
     * Output only. The [full resource
     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
     * of the resource that is applicable for the backup configuration. Example:
     * "//compute.googleapis.com/projects/{project}/zones/{zone}/instances/{instance}"
     *
     * Generated from protobuf field <code>string applicable_resource = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getApplicableResource()
    {
        return $this->applicable_resource;
    }

    /**
     * Output only. The [full resource
     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
     * of the resource that is applicable for the backup configuration. Example:
     * "//compute.googleapis.com/projects/{project}/zones/{zone}/instances/{instance}"
     *
     * Generated from protobuf field <code>string applicable_resource = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setApplicableResource($var)
    {
        GPBUtil::checkString($var, True);
        $this->applicable_resource = $var;

        return $this;
    }

    /**
     * Output only. The [full resource
     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
     * of the backup vault that will store the backups generated through this
     * backup configuration. Example:
     * "//backupdr.googleapis.com/v1/projects/{project}/locations/{region}/backupVaults/{backupvaultId}"
     *
     * Generated from protobuf field <code>string backup_vault = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getBackupVault()
    {
        return $this->backup_vault;
    }

    /**
     * Output only. The [full resource
     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
     * of the backup vault that will store the backups generated through this
     * backup configuration. Example:
     * "//backupdr.googleapis.com/v1/projects/{project}/locations/{region}/backupVaults/{backupvaultId}"
     *
     * Generated from protobuf field <code>string backup_vault = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setBackupVault($var)
    {
        GPBUtil::checkString($var, True);
        $this->backup_vault = $var;

        return $this;
    }

    /**
     * The locations where the backups are to be stored.
     *
     * Generated from protobuf field <code>repeated .google.cloud.backupdr.v1.BackupLocation backup_locations = 12;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getBackupLocations()
    {
        return $this->backup_locations;
    }

    /**
     * The locations where the backups are to be stored.
     *
     * Generated from protobuf field <code>repeated .google.cloud.backupdr.v1.BackupLocation backup_locations = 12;</code>
     * @param array<\Google\Cloud\BackupDR\V1\BackupLocation>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setBackupLocations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BackupDR\V1\BackupLocation::class);
        $this->backup_locations = $arr;

        return $this;
    }

    /**
     * Google Cloud Backup and DR's Backup Plan specific data.
     *
     * Generated from protobuf field <code>.google.cloud.backupdr.v1.BackupDrPlanConfig backup_dr_plan_config = 10;</code>
     * @return \Google\Cloud\BackupDR\V1\BackupDrPlanConfig|null
     */
    public function getBackupDrPlanConfig()
    {
        return $this->readOneof(10);
    }

    public function hasBackupDrPlanConfig()
    {
        return $this->hasOneof(10);
    }

    /**
     * Google Cloud Backup and DR's Backup Plan specific data.
     *
     * Generated from protobuf field <code>.google.cloud.backupdr.v1.BackupDrPlanConfig backup_dr_plan_config = 10;</code>
     * @param \Google\Cloud\BackupDR\V1\BackupDrPlanConfig $var
     * @return $this
     */
    public function setBackupDrPlanConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\BackupDrPlanConfig::class);
        $this->writeOneof(10, $var);

        return $this;
    }

    /**
     * Google Cloud Backup and DR's Template specific data.
     *
     * Generated from protobuf field <code>.google.cloud.backupdr.v1.BackupDrTemplateConfig backup_dr_template_config = 11;</code>
     * @return \Google\Cloud\BackupDR\V1\BackupDrTemplateConfig|null
     */
    public function getBackupDrTemplateConfig()
    {
        return $this->readOneof(11);
    }

    public function hasBackupDrTemplateConfig()
    {
        return $this->hasOneof(11);
    }

    /**
     * Google Cloud Backup and DR's Template specific data.
     *
     * Generated from protobuf field <code>.google.cloud.backupdr.v1.BackupDrTemplateConfig backup_dr_template_config = 11;</code>
     * @param \Google\Cloud\BackupDR\V1\BackupDrTemplateConfig $var
     * @return $this
     */
    public function setBackupDrTemplateConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\BackupDR\V1\BackupDrTemplateConfig::class);
        $this->writeOneof(11, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getPlanSpecificConfig()
    {
        return $this->whichOneof("plan_specific_config");
    }

}

