<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: keyapis/subscription/v1/keyapis_subscription_service_v1.proto

namespace Keyapis\Subscription\V1;

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

/**
 * Элемент справочника видов услуг
 *
 * Generated from protobuf message <code>keyapis.subscription.v1.ServiceKind</code>
 */
class ServiceKind extends \Google\Protobuf\Internal\Message
{
    /**
     * Идентификатор услуги
     *
     * Generated from protobuf field <code>int32 id = 1;</code>
     */
    protected $id = 0;
    /**
     * Категория услуги.
     * Аналогично V1ServiceDto.type
     *
     * Generated from protobuf field <code>string category = 2;</code>
     */
    protected $category = '';
    /**
     * Название услуги на английском
     *
     * Generated from protobuf field <code>string name = 3;</code>
     */
    protected $name = '';
    /**
     * Название услуги 
     *
     * Generated from protobuf field <code>string title = 4;</code>
     */
    protected $title = '';
    /**
     * Описание услуги
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue description = 5;</code>
     */
    protected $description = null;
    /**
     * Идентификатор родительской услуги
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value parent_id = 6;</code>
     */
    protected $parent_id = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $id
     *           Идентификатор услуги
     *     @type string $category
     *           Категория услуги.
     *           Аналогично V1ServiceDto.type
     *     @type string $name
     *           Название услуги на английском
     *     @type string $title
     *           Название услуги 
     *     @type \Google\Protobuf\StringValue $description
     *           Описание услуги
     *     @type \Google\Protobuf\Int32Value $parent_id
     *           Идентификатор родительской услуги
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Subscription\V1\KeyapisSubscriptionServiceV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Идентификатор услуги
     *
     * Generated from protobuf field <code>int32 id = 1;</code>
     * @return int
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Идентификатор услуги
     *
     * Generated from protobuf field <code>int32 id = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkInt32($var);
        $this->id = $var;

        return $this;
    }

    /**
     * Категория услуги.
     * Аналогично V1ServiceDto.type
     *
     * Generated from protobuf field <code>string category = 2;</code>
     * @return string
     */
    public function getCategory()
    {
        return $this->category;
    }

    /**
     * Категория услуги.
     * Аналогично V1ServiceDto.type
     *
     * Generated from protobuf field <code>string category = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setCategory($var)
    {
        GPBUtil::checkString($var, True);
        $this->category = $var;

        return $this;
    }

    /**
     * Название услуги на английском
     *
     * Generated from protobuf field <code>string name = 3;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Название услуги на английском
     *
     * Generated from protobuf field <code>string name = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Название услуги 
     *
     * Generated from protobuf field <code>string title = 4;</code>
     * @return string
     */
    public function getTitle()
    {
        return $this->title;
    }

    /**
     * Название услуги 
     *
     * Generated from protobuf field <code>string title = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setTitle($var)
    {
        GPBUtil::checkString($var, True);
        $this->title = $var;

        return $this;
    }

    /**
     * Описание услуги
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue description = 5;</code>
     * @return \Google\Protobuf\StringValue|null
     */
    public function getDescription()
    {
        return $this->description;
    }

    public function hasDescription()
    {
        return isset($this->description);
    }

    public function clearDescription()
    {
        unset($this->description);
    }

    /**
     * Returns the unboxed value from <code>getDescription()</code>

     * Описание услуги
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue description = 5;</code>
     * @return string|null
     */
    public function getDescriptionUnwrapped()
    {
        return $this->readWrapperValue("description");
    }

    /**
     * Описание услуги
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue description = 5;</code>
     * @param \Google\Protobuf\StringValue $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class);
        $this->description = $var;

        return $this;
    }

    /**
     * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object.

     * Описание услуги
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue description = 5;</code>
     * @param string|null $var
     * @return $this
     */
    public function setDescriptionUnwrapped($var)
    {
        $this->writeWrapperValue("description", $var);
        return $this;}

    /**
     * Идентификатор родительской услуги
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value parent_id = 6;</code>
     * @return \Google\Protobuf\Int32Value|null
     */
    public function getParentId()
    {
        return $this->parent_id;
    }

    public function hasParentId()
    {
        return isset($this->parent_id);
    }

    public function clearParentId()
    {
        unset($this->parent_id);
    }

    /**
     * Returns the unboxed value from <code>getParentId()</code>

     * Идентификатор родительской услуги
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value parent_id = 6;</code>
     * @return int|null
     */
    public function getParentIdUnwrapped()
    {
        return $this->readWrapperValue("parent_id");
    }

    /**
     * Идентификатор родительской услуги
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value parent_id = 6;</code>
     * @param \Google\Protobuf\Int32Value $var
     * @return $this
     */
    public function setParentId($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class);
        $this->parent_id = $var;

        return $this;
    }

    /**
     * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object.

     * Идентификатор родительской услуги
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value parent_id = 6;</code>
     * @param int|null $var
     * @return $this
     */
    public function setParentIdUnwrapped($var)
    {
        $this->writeWrapperValue("parent_id", $var);
        return $this;}

}

