<?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;

/**
 * BackupLocation represents a cloud location where a backup can be stored.
 *
 * Generated from protobuf message <code>google.cloud.backupdr.v1.BackupLocation</code>
 */
class BackupLocation extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The type of the location.
     *
     * Generated from protobuf field <code>.google.cloud.backupdr.v1.BackupLocation.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $type = 0;
    /**
     * Output only. The id of the cloud location. Example: "us-central1"
     *
     * Generated from protobuf field <code>string location_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $location_id = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $type
     *           Output only. The type of the location.
     *     @type string $location_id
     *           Output only. The id of the cloud location. Example: "us-central1"
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Backupdr\V1\ProtectionSummary::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

    /**
     * Output only. The id of the cloud location. Example: "us-central1"
     *
     * Generated from protobuf field <code>string location_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getLocationId()
    {
        return $this->location_id;
    }

    /**
     * Output only. The id of the cloud location. Example: "us-central1"
     *
     * Generated from protobuf field <code>string location_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setLocationId($var)
    {
        GPBUtil::checkString($var, True);
        $this->location_id = $var;

        return $this;
    }

}

