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

namespace Keyapis\Subscription\V1\Plan;

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

/**
 * Описание опции
 *
 * Generated from protobuf message <code>keyapis.subscription.v1.Plan.OptionDescription</code>
 */
class OptionDescription extends \Google\Protobuf\Internal\Message
{
    /**
     * Тип иконки
     *
     * Generated from protobuf field <code>.keyapis.subscription.v1.Plan.IconType icon_type = 1;</code>
     */
    protected $icon_type = 0;
    /**
     * Название
     *
     * Generated from protobuf field <code>string title = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $title = '';
    /**
     * Краткое описание
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue summary = 3;</code>
     */
    protected $summary = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $icon_type
     *           Тип иконки
     *     @type string $title
     *           Название
     *     @type \Google\Protobuf\StringValue $summary
     *           Краткое описание
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Subscription\V1\KeyapisSubscriptionPlanV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Тип иконки
     *
     * Generated from protobuf field <code>.keyapis.subscription.v1.Plan.IconType icon_type = 1;</code>
     * @return int
     */
    public function getIconType()
    {
        return $this->icon_type;
    }

    /**
     * Тип иконки
     *
     * Generated from protobuf field <code>.keyapis.subscription.v1.Plan.IconType icon_type = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setIconType($var)
    {
        GPBUtil::checkEnum($var, \Keyapis\Subscription\V1\Plan\IconType::class);
        $this->icon_type = $var;

        return $this;
    }

    /**
     * Название
     *
     * Generated from protobuf field <code>string title = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getTitle()
    {
        return $this->title;
    }

    /**
     * Название
     *
     * Generated from protobuf field <code>string title = 2 [(.google.api.field_behavior) = REQUIRED];</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 summary = 3;</code>
     * @return \Google\Protobuf\StringValue|null
     */
    public function getSummary()
    {
        return $this->summary;
    }

    public function hasSummary()
    {
        return isset($this->summary);
    }

    public function clearSummary()
    {
        unset($this->summary);
    }

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

     * Краткое описание
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue summary = 3;</code>
     * @return string|null
     */
    public function getSummaryUnwrapped()
    {
        return $this->readWrapperValue("summary");
    }

    /**
     * Краткое описание
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue summary = 3;</code>
     * @param \Google\Protobuf\StringValue $var
     * @return $this
     */
    public function setSummary($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class);
        $this->summary = $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 summary = 3;</code>
     * @param string|null $var
     * @return $this
     */
    public function setSummaryUnwrapped($var)
    {
        $this->writeWrapperValue("summary", $var);
        return $this;}

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(OptionDescription::class, \Keyapis\Subscription\V1\Plan_OptionDescription::class);

