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

namespace Google\Cloud\Billing\V1;

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

/**
 * Encapsulates the geographic taxonomy data for a sku.
 *
 * Generated from protobuf message <code>google.cloud.billing.v1.GeoTaxonomy</code>
 */
class GeoTaxonomy extends \Google\Protobuf\Internal\Message
{
    /**
     * The type of Geo Taxonomy: GLOBAL, REGIONAL, or MULTI_REGIONAL.
     *
     * Generated from protobuf field <code>.google.cloud.billing.v1.GeoTaxonomy.Type type = 1;</code>
     */
    private $type = 0;
    /**
     * The list of regions associated with a sku. Empty for Global skus, which are
     * associated with all Google Cloud regions.
     *
     * Generated from protobuf field <code>repeated string regions = 2;</code>
     */
    private $regions;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $type
     *           The type of Geo Taxonomy: GLOBAL, REGIONAL, or MULTI_REGIONAL.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $regions
     *           The list of regions associated with a sku. Empty for Global skus, which are
     *           associated with all Google Cloud regions.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Billing\V1\CloudCatalog::initOnce();
        parent::__construct($data);
    }

    /**
     * The type of Geo Taxonomy: GLOBAL, REGIONAL, or MULTI_REGIONAL.
     *
     * Generated from protobuf field <code>.google.cloud.billing.v1.GeoTaxonomy.Type type = 1;</code>
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * The type of Geo Taxonomy: GLOBAL, REGIONAL, or MULTI_REGIONAL.
     *
     * Generated from protobuf field <code>.google.cloud.billing.v1.GeoTaxonomy.Type type = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Billing\V1\GeoTaxonomy\Type::class);
        $this->type = $var;

        return $this;
    }

    /**
     * The list of regions associated with a sku. Empty for Global skus, which are
     * associated with all Google Cloud regions.
     *
     * Generated from protobuf field <code>repeated string regions = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getRegions()
    {
        return $this->regions;
    }

    /**
     * The list of regions associated with a sku. Empty for Global skus, which are
     * associated with all Google Cloud regions.
     *
     * Generated from protobuf field <code>repeated string regions = 2;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setRegions($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->regions = $arr;

        return $this;
    }

}

