<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/googleads/v20/resources/mobile_app_category_constant.proto

namespace Google\Ads\GoogleAds\V20\Resources;

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

/**
 * A mobile application category constant.
 *
 * Generated from protobuf message <code>google.ads.googleads.v20.resources.MobileAppCategoryConstant</code>
 */
class MobileAppCategoryConstant extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The resource name of the mobile app category constant.
     * Mobile app category constant resource names have the form:
     * `mobileAppCategoryConstants/{mobile_app_category_id}`
     *
     * Generated from protobuf field <code>string resource_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     */
    protected $resource_name = '';
    /**
     * Output only. The ID of the mobile app category constant.
     *
     * Generated from protobuf field <code>optional int32 id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $id = null;
    /**
     * Output only. Mobile app category name.
     *
     * Generated from protobuf field <code>optional string name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $name = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $resource_name
     *           Output only. The resource name of the mobile app category constant.
     *           Mobile app category constant resource names have the form:
     *           `mobileAppCategoryConstants/{mobile_app_category_id}`
     *     @type int $id
     *           Output only. The ID of the mobile app category constant.
     *     @type string $name
     *           Output only. Mobile app category name.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V20\Resources\MobileAppCategoryConstant::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The resource name of the mobile app category constant.
     * Mobile app category constant resource names have the form:
     * `mobileAppCategoryConstants/{mobile_app_category_id}`
     *
     * Generated from protobuf field <code>string resource_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getResourceName()
    {
        return $this->resource_name;
    }

    /**
     * Output only. The resource name of the mobile app category constant.
     * Mobile app category constant resource names have the form:
     * `mobileAppCategoryConstants/{mobile_app_category_id}`
     *
     * Generated from protobuf field <code>string resource_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setResourceName($var)
    {
        GPBUtil::checkString($var, True);
        $this->resource_name = $var;

        return $this;
    }

    /**
     * Output only. The ID of the mobile app category constant.
     *
     * Generated from protobuf field <code>optional int32 id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getId()
    {
        return isset($this->id) ? $this->id : 0;
    }

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

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

    /**
     * Output only. The ID of the mobile app category constant.
     *
     * Generated from protobuf field <code>optional int32 id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkInt32($var);
        $this->id = $var;

        return $this;
    }

    /**
     * Output only. Mobile app category name.
     *
     * Generated from protobuf field <code>optional string name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</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);
    }

    /**
     * Output only. Mobile app category name.
     *
     * Generated from protobuf field <code>optional string name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

}

