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

namespace Google\Cloud\Audit;

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

/**
 * Location information about a resource.
 *
 * Generated from protobuf message <code>google.cloud.audit.ResourceLocation</code>
 */
class ResourceLocation extends \Google\Protobuf\Internal\Message
{
    /**
     * The locations of a resource after the execution of the operation.
     * Requests to create or delete a location based resource must populate
     * the 'current_locations' field and not the 'original_locations' field.
     * For example:
     *     "europe-west1-a"
     *     "us-east1"
     *     "nam3"
     *
     * Generated from protobuf field <code>repeated string current_locations = 1;</code>
     */
    private $current_locations;
    /**
     * The locations of a resource prior to the execution of the operation.
     * Requests that mutate the resource's location must populate both the
     * 'original_locations' as well as the 'current_locations' fields.
     * For example:
     *     "europe-west1-a"
     *     "us-east1"
     *     "nam3"
     *
     * Generated from protobuf field <code>repeated string original_locations = 2;</code>
     */
    private $original_locations;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string[]|\Google\Protobuf\Internal\RepeatedField $current_locations
     *           The locations of a resource after the execution of the operation.
     *           Requests to create or delete a location based resource must populate
     *           the 'current_locations' field and not the 'original_locations' field.
     *           For example:
     *               "europe-west1-a"
     *               "us-east1"
     *               "nam3"
     *     @type string[]|\Google\Protobuf\Internal\RepeatedField $original_locations
     *           The locations of a resource prior to the execution of the operation.
     *           Requests that mutate the resource's location must populate both the
     *           'original_locations' as well as the 'current_locations' fields.
     *           For example:
     *               "europe-west1-a"
     *               "us-east1"
     *               "nam3"
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Audit\AuditLog::initOnce();
        parent::__construct($data);
    }

    /**
     * The locations of a resource after the execution of the operation.
     * Requests to create or delete a location based resource must populate
     * the 'current_locations' field and not the 'original_locations' field.
     * For example:
     *     "europe-west1-a"
     *     "us-east1"
     *     "nam3"
     *
     * Generated from protobuf field <code>repeated string current_locations = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getCurrentLocations()
    {
        return $this->current_locations;
    }

    /**
     * The locations of a resource after the execution of the operation.
     * Requests to create or delete a location based resource must populate
     * the 'current_locations' field and not the 'original_locations' field.
     * For example:
     *     "europe-west1-a"
     *     "us-east1"
     *     "nam3"
     *
     * Generated from protobuf field <code>repeated string current_locations = 1;</code>
     * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setCurrentLocations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->current_locations = $arr;

        return $this;
    }

    /**
     * The locations of a resource prior to the execution of the operation.
     * Requests that mutate the resource's location must populate both the
     * 'original_locations' as well as the 'current_locations' fields.
     * For example:
     *     "europe-west1-a"
     *     "us-east1"
     *     "nam3"
     *
     * Generated from protobuf field <code>repeated string original_locations = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getOriginalLocations()
    {
        return $this->original_locations;
    }

    /**
     * The locations of a resource prior to the execution of the operation.
     * Requests that mutate the resource's location must populate both the
     * 'original_locations' as well as the 'current_locations' fields.
     * For example:
     *     "europe-west1-a"
     *     "us-east1"
     *     "nam3"
     *
     * Generated from protobuf field <code>repeated string original_locations = 2;</code>
     * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setOriginalLocations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->original_locations = $arr;

        return $this;
    }

}

