<?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.Service</code>
 */
class Service extends \Google\Protobuf\Internal\Message
{
    /**
     * Название услуги на английском
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    protected $name = '';
    /**
     * Доступна ли услуга на квартире.
     * Вернётся true если статусы привилегии:
     * - PROMO;
     * - PAID;
     * - TURNS_OFF.
     * Вернётся false если статусы привилегии:
     * - NOT_PAID;
     * - CAN_BE_PAID;
     * - STATE_TYPE_UNKNOWN;
     * - Не найден (нет на кваритре, но есть в справочнике привилегий)
     *
     * Generated from protobuf field <code>bool is_active = 2;</code>
     */
    protected $is_active = false;
    /**
     * ОРПОН дома
     *
     * Generated from protobuf field <code>.google.protobuf.Int64Value orpon = 3;</code>
     */
    protected $orpon = null;
    /**
     * Номер квартиры
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue flat_number = 4;</code>
     */
    protected $flat_number = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Название услуги на английском
     *     @type bool $is_active
     *           Доступна ли услуга на квартире.
     *           Вернётся true если статусы привилегии:
     *           - PROMO;
     *           - PAID;
     *           - TURNS_OFF.
     *           Вернётся false если статусы привилегии:
     *           - NOT_PAID;
     *           - CAN_BE_PAID;
     *           - STATE_TYPE_UNKNOWN;
     *           - Не найден (нет на кваритре, но есть в справочнике привилегий)
     *     @type \Google\Protobuf\Int64Value $orpon
     *           ОРПОН дома
     *     @type \Google\Protobuf\StringValue $flat_number
     *           Номер квартиры
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Subscription\V1\KeyapisSubscriptionServiceV1::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

    /**
     * Доступна ли услуга на квартире.
     * Вернётся true если статусы привилегии:
     * - PROMO;
     * - PAID;
     * - TURNS_OFF.
     * Вернётся false если статусы привилегии:
     * - NOT_PAID;
     * - CAN_BE_PAID;
     * - STATE_TYPE_UNKNOWN;
     * - Не найден (нет на кваритре, но есть в справочнике привилегий)
     *
     * Generated from protobuf field <code>bool is_active = 2;</code>
     * @return bool
     */
    public function getIsActive()
    {
        return $this->is_active;
    }

    /**
     * Доступна ли услуга на квартире.
     * Вернётся true если статусы привилегии:
     * - PROMO;
     * - PAID;
     * - TURNS_OFF.
     * Вернётся false если статусы привилегии:
     * - NOT_PAID;
     * - CAN_BE_PAID;
     * - STATE_TYPE_UNKNOWN;
     * - Не найден (нет на кваритре, но есть в справочнике привилегий)
     *
     * Generated from protobuf field <code>bool is_active = 2;</code>
     * @param bool $var
     * @return $this
     */
    public function setIsActive($var)
    {
        GPBUtil::checkBool($var);
        $this->is_active = $var;

        return $this;
    }

    /**
     * ОРПОН дома
     *
     * Generated from protobuf field <code>.google.protobuf.Int64Value orpon = 3;</code>
     * @return \Google\Protobuf\Int64Value|null
     */
    public function getOrpon()
    {
        return $this->orpon;
    }

    public function hasOrpon()
    {
        return isset($this->orpon);
    }

    public function clearOrpon()
    {
        unset($this->orpon);
    }

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

     * ОРПОН дома
     *
     * Generated from protobuf field <code>.google.protobuf.Int64Value orpon = 3;</code>
     * @return int|string|null
     */
    public function getOrponUnwrapped()
    {
        return $this->readWrapperValue("orpon");
    }

    /**
     * ОРПОН дома
     *
     * Generated from protobuf field <code>.google.protobuf.Int64Value orpon = 3;</code>
     * @param \Google\Protobuf\Int64Value $var
     * @return $this
     */
    public function setOrpon($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class);
        $this->orpon = $var;

        return $this;
    }

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

     * ОРПОН дома
     *
     * Generated from protobuf field <code>.google.protobuf.Int64Value orpon = 3;</code>
     * @param int|string|null $var
     * @return $this
     */
    public function setOrponUnwrapped($var)
    {
        $this->writeWrapperValue("orpon", $var);
        return $this;}

    /**
     * Номер квартиры
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue flat_number = 4;</code>
     * @return \Google\Protobuf\StringValue|null
     */
    public function getFlatNumber()
    {
        return $this->flat_number;
    }

    public function hasFlatNumber()
    {
        return isset($this->flat_number);
    }

    public function clearFlatNumber()
    {
        unset($this->flat_number);
    }

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

     * Номер квартиры
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue flat_number = 4;</code>
     * @return string|null
     */
    public function getFlatNumberUnwrapped()
    {
        return $this->readWrapperValue("flat_number");
    }

    /**
     * Номер квартиры
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue flat_number = 4;</code>
     * @param \Google\Protobuf\StringValue $var
     * @return $this
     */
    public function setFlatNumber($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class);
        $this->flat_number = $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 flat_number = 4;</code>
     * @param string|null $var
     * @return $this
     */
    public function setFlatNumberUnwrapped($var)
    {
        $this->writeWrapperValue("flat_number", $var);
        return $this;}

}

