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

namespace Google\Cloud\Functions\V2;

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

/**
 * Extra GCF specific location information.
 *
 * Generated from protobuf message <code>google.cloud.functions.v2.LocationMetadata</code>
 */
class LocationMetadata extends \Google\Protobuf\Internal\Message
{
    /**
     * The Cloud Function environments this location supports.
     *
     * Generated from protobuf field <code>repeated .google.cloud.functions.v2.Environment environments = 1;</code>
     */
    private $environments;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<int>|\Google\Protobuf\Internal\RepeatedField $environments
     *           The Cloud Function environments this location supports.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce();
        parent::__construct($data);
    }

    /**
     * The Cloud Function environments this location supports.
     *
     * Generated from protobuf field <code>repeated .google.cloud.functions.v2.Environment environments = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getEnvironments()
    {
        return $this->environments;
    }

    /**
     * The Cloud Function environments this location supports.
     *
     * Generated from protobuf field <code>repeated .google.cloud.functions.v2.Environment environments = 1;</code>
     * @param array<int>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setEnvironments($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Functions\V2\Environment::class);
        $this->environments = $arr;

        return $this;
    }

}

