<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/googleads/v11/services/reach_plan_service.proto

namespace Google\Ads\GoogleAds\V11\Services;

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

/**
 * A plannable location: country, metro region, province, etc.
 *
 * Generated from protobuf message <code>google.ads.googleads.v11.services.PlannableLocation</code>
 */
class PlannableLocation extends \Google\Protobuf\Internal\Message
{
    /**
     * The location identifier.
     *
     * Generated from protobuf field <code>optional string id = 4;</code>
     */
    protected $id = null;
    /**
     * The unique location name in English.
     *
     * Generated from protobuf field <code>optional string name = 5;</code>
     */
    protected $name = null;
    /**
     * The parent country (not present if location is a country).
     * If present, will always be a GeoTargetConstant ID. Additional information
     * such as country name is provided by
     * [ReachPlanService.ListPlannableLocations][google.ads.googleads.v11.services.ReachPlanService.ListPlannableLocations] or
     * [GoogleAdsService.Search/SearchStream][].
     *
     * Generated from protobuf field <code>optional int64 parent_country_id = 6;</code>
     */
    protected $parent_country_id = null;
    /**
     * The ISO-3166-1 alpha-2 country code that is associated with the location.
     *
     * Generated from protobuf field <code>optional string country_code = 7;</code>
     */
    protected $country_code = null;
    /**
     * The location's type. Location types correspond to target_type returned by
     * searching location type in [GoogleAdsService.Search/SearchStream][].
     *
     * Generated from protobuf field <code>optional string location_type = 8;</code>
     */
    protected $location_type = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $id
     *           The location identifier.
     *     @type string $name
     *           The unique location name in English.
     *     @type int|string $parent_country_id
     *           The parent country (not present if location is a country).
     *           If present, will always be a GeoTargetConstant ID. Additional information
     *           such as country name is provided by
     *           [ReachPlanService.ListPlannableLocations][google.ads.googleads.v11.services.ReachPlanService.ListPlannableLocations] or
     *           [GoogleAdsService.Search/SearchStream][].
     *     @type string $country_code
     *           The ISO-3166-1 alpha-2 country code that is associated with the location.
     *     @type string $location_type
     *           The location's type. Location types correspond to target_type returned by
     *           searching location type in [GoogleAdsService.Search/SearchStream][].
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V11\Services\ReachPlanService::initOnce();
        parent::__construct($data);
    }

    /**
     * The location identifier.
     *
     * Generated from protobuf field <code>optional string id = 4;</code>
     * @return string
     */
    public function getId()
    {
        return isset($this->id) ? $this->id : '';
    }

    public function hasId()
    {
        return isset($this->id);
    }

    public function clearId()
    {
        unset($this->id);
    }

    /**
     * The location identifier.
     *
     * Generated from protobuf field <code>optional string id = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkString($var, True);
        $this->id = $var;

        return $this;
    }

    /**
     * The unique location name in English.
     *
     * Generated from protobuf field <code>optional string name = 5;</code>
     * @return string
     */
    public function getName()
    {
        return isset($this->name) ? $this->name : '';
    }

    public function hasName()
    {
        return isset($this->name);
    }

    public function clearName()
    {
        unset($this->name);
    }

    /**
     * The unique location name in English.
     *
     * Generated from protobuf field <code>optional string name = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * The parent country (not present if location is a country).
     * If present, will always be a GeoTargetConstant ID. Additional information
     * such as country name is provided by
     * [ReachPlanService.ListPlannableLocations][google.ads.googleads.v11.services.ReachPlanService.ListPlannableLocations] or
     * [GoogleAdsService.Search/SearchStream][].
     *
     * Generated from protobuf field <code>optional int64 parent_country_id = 6;</code>
     * @return int|string
     */
    public function getParentCountryId()
    {
        return isset($this->parent_country_id) ? $this->parent_country_id : 0;
    }

    public function hasParentCountryId()
    {
        return isset($this->parent_country_id);
    }

    public function clearParentCountryId()
    {
        unset($this->parent_country_id);
    }

    /**
     * The parent country (not present if location is a country).
     * If present, will always be a GeoTargetConstant ID. Additional information
     * such as country name is provided by
     * [ReachPlanService.ListPlannableLocations][google.ads.googleads.v11.services.ReachPlanService.ListPlannableLocations] or
     * [GoogleAdsService.Search/SearchStream][].
     *
     * Generated from protobuf field <code>optional int64 parent_country_id = 6;</code>
     * @param int|string $var
     * @return $this
     */
    public function setParentCountryId($var)
    {
        GPBUtil::checkInt64($var);
        $this->parent_country_id = $var;

        return $this;
    }

    /**
     * The ISO-3166-1 alpha-2 country code that is associated with the location.
     *
     * Generated from protobuf field <code>optional string country_code = 7;</code>
     * @return string
     */
    public function getCountryCode()
    {
        return isset($this->country_code) ? $this->country_code : '';
    }

    public function hasCountryCode()
    {
        return isset($this->country_code);
    }

    public function clearCountryCode()
    {
        unset($this->country_code);
    }

    /**
     * The ISO-3166-1 alpha-2 country code that is associated with the location.
     *
     * Generated from protobuf field <code>optional string country_code = 7;</code>
     * @param string $var
     * @return $this
     */
    public function setCountryCode($var)
    {
        GPBUtil::checkString($var, True);
        $this->country_code = $var;

        return $this;
    }

    /**
     * The location's type. Location types correspond to target_type returned by
     * searching location type in [GoogleAdsService.Search/SearchStream][].
     *
     * Generated from protobuf field <code>optional string location_type = 8;</code>
     * @return string
     */
    public function getLocationType()
    {
        return isset($this->location_type) ? $this->location_type : '';
    }

    public function hasLocationType()
    {
        return isset($this->location_type);
    }

    public function clearLocationType()
    {
        unset($this->location_type);
    }

    /**
     * The location's type. Location types correspond to target_type returned by
     * searching location type in [GoogleAdsService.Search/SearchStream][].
     *
     * Generated from protobuf field <code>optional string location_type = 8;</code>
     * @param string $var
     * @return $this
     */
    public function setLocationType($var)
    {
        GPBUtil::checkString($var, True);
        $this->location_type = $var;

        return $this;
    }

}

