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

namespace Keyapis\Banner\V1\BannerLite;

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

/**
 * Упрощённый объект картинки
 *
 * Generated from protobuf message <code>keyapis.banner.v1.BannerLite.ImageLite</code>
 */
class ImageLite extends \Google\Protobuf\Internal\Message
{
    /**
     * Тип картинки.
     * Обязательное
     *
     * Generated from protobuf field <code>.keyapis.banner.v1.Banner.Image.Type type = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $type = 0;
    /**
     * Значение ссылки на картинку.
     * Обязательное
     *
     * Generated from protobuf field <code>string url = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $url = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $type
     *           Тип картинки.
     *           Обязательное
     *     @type string $url
     *           Значение ссылки на картинку.
     *           Обязательное
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Banner\V1\KeyapisBannerBannerV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Тип картинки.
     * Обязательное
     *
     * Generated from protobuf field <code>.keyapis.banner.v1.Banner.Image.Type type = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Тип картинки.
     * Обязательное
     *
     * Generated from protobuf field <code>.keyapis.banner.v1.Banner.Image.Type type = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Keyapis\Banner\V1\Banner\Image\Type::class);
        $this->type = $var;

        return $this;
    }

    /**
     * Значение ссылки на картинку.
     * Обязательное
     *
     * Generated from protobuf field <code>string url = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getUrl()
    {
        return $this->url;
    }

    /**
     * Значение ссылки на картинку.
     * Обязательное
     *
     * Generated from protobuf field <code>string url = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setUrl($var)
    {
        GPBUtil::checkString($var, True);
        $this->url = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ImageLite::class, \Keyapis\Banner\V1\BannerLite_ImageLite::class);

