<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/googleads/v25/common/local_services.proto

namespace Google\Ads\GoogleAds\V25\Common;

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

/**
 * Phone number associated with the provider.
 *
 * Generated from protobuf message <code>google.ads.googleads.v25.common.LocalServicesPhoneNumber</code>
 */
class LocalServicesPhoneNumber extends \Google\Protobuf\Internal\Message
{
    /**
     * The phone number.
     *
     * Generated from protobuf field <code>optional string phone_number = 1;</code>
     */
    protected $phone_number = null;
    /**
     * Upper-case, two-letter codes as defined by ISO-3166.
     *
     * Generated from protobuf field <code>optional string country_code = 2;</code>
     */
    protected $country_code = null;
    /**
     * The type of the phone number.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v25.enums.GlsPhoneNumberTypeEnum.GlsPhoneNumberType phone_number_type = 3;</code>
     */
    protected $phone_number_type = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $phone_number
     *           The phone number.
     *     @type string $country_code
     *           Upper-case, two-letter codes as defined by ISO-3166.
     *     @type int $phone_number_type
     *           The type of the phone number.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V25\Common\LocalServices::initOnce();
        parent::__construct($data);
    }

    /**
     * The phone number.
     *
     * Generated from protobuf field <code>optional string phone_number = 1;</code>
     * @return string
     */
    public function getPhoneNumber()
    {
        return isset($this->phone_number) ? $this->phone_number : '';
    }

    public function hasPhoneNumber()
    {
        return isset($this->phone_number);
    }

    public function clearPhoneNumber()
    {
        unset($this->phone_number);
    }

    /**
     * The phone number.
     *
     * Generated from protobuf field <code>optional string phone_number = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setPhoneNumber($var)
    {
        GPBUtil::checkString($var, True);
        $this->phone_number = $var;

        return $this;
    }

    /**
     * Upper-case, two-letter codes as defined by ISO-3166.
     *
     * Generated from protobuf field <code>optional string country_code = 2;</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);
    }

    /**
     * Upper-case, two-letter codes as defined by ISO-3166.
     *
     * Generated from protobuf field <code>optional string country_code = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setCountryCode($var)
    {
        GPBUtil::checkString($var, True);
        $this->country_code = $var;

        return $this;
    }

    /**
     * The type of the phone number.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v25.enums.GlsPhoneNumberTypeEnum.GlsPhoneNumberType phone_number_type = 3;</code>
     * @return int
     */
    public function getPhoneNumberType()
    {
        return isset($this->phone_number_type) ? $this->phone_number_type : 0;
    }

    public function hasPhoneNumberType()
    {
        return isset($this->phone_number_type);
    }

    public function clearPhoneNumberType()
    {
        unset($this->phone_number_type);
    }

    /**
     * The type of the phone number.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v25.enums.GlsPhoneNumberTypeEnum.GlsPhoneNumberType phone_number_type = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setPhoneNumberType($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V25\Enums\GlsPhoneNumberTypeEnum\GlsPhoneNumberType::class);
        $this->phone_number_type = $var;

        return $this;
    }

}

