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

namespace Keyapis\Ad\V1;

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

/**
 * Точка продаж
 *
 * Generated from protobuf message <code>keyapis.ad.v1.Salepoint</code>
 */
class Salepoint extends \Google\Protobuf\Internal\Message
{
    /**
     * Идентификатор
     *
     * Generated from protobuf field <code>int32 id = 1;</code>
     */
    protected $id = 0;
    /**
     * Название
     *
     * Generated from protobuf field <code>string title = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $title = '';
    /**
     * Тип точки продаж
     *
     * Generated from protobuf field <code>.keyapis.ad.v1.Salepoint.Type type = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $type = 0;
    /**
     * Описание
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue description = 4;</code>
     */
    protected $description = null;
    /**
     * Адрес
     *
     * Generated from protobuf field <code>string address = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $address = '';
    /**
     * Местонахождение
     *
     * Generated from protobuf field <code>.keyapis.ad.v1.Salepoint.Location location = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $location = null;
    /**
     * Рабочее время
     *
     * Generated from protobuf field <code>repeated .keyapis.ad.v1.Salepoint.Worktime worktimes = 7 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $worktimes;
    /**
     * Номер телефона
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue phone_number = 8;</code>
     */
    protected $phone_number = null;
    /**
     * Ссылка на сайт
     *
     * Generated from protobuf field <code>string site_url = 9 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $site_url = '';
    /**
     * Дата создания
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp created_at = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $created_at = null;
    /**
     * Дата последнего изменения.
     * Заполняется и обновляется сервером.
     * Заполняется при создании и изменении.
     * Является версией объекта
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp changed_at = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $changed_at = null;
    /**
     * Дата архивации
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp archieved_at = 12;</code>
     */
    protected $archieved_at = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $id
     *           Идентификатор
     *     @type string $title
     *           Название
     *     @type int $type
     *           Тип точки продаж
     *     @type \Google\Protobuf\StringValue $description
     *           Описание
     *     @type string $address
     *           Адрес
     *     @type \Keyapis\Ad\V1\Salepoint\Location $location
     *           Местонахождение
     *     @type array<\Keyapis\Ad\V1\Salepoint\Worktime>|\Google\Protobuf\Internal\RepeatedField $worktimes
     *           Рабочее время
     *     @type \Google\Protobuf\StringValue $phone_number
     *           Номер телефона
     *     @type string $site_url
     *           Ссылка на сайт
     *     @type \Google\Protobuf\Timestamp $created_at
     *           Дата создания
     *     @type \Google\Protobuf\Timestamp $changed_at
     *           Дата последнего изменения.
     *           Заполняется и обновляется сервером.
     *           Заполняется при создании и изменении.
     *           Является версией объекта
     *     @type \Google\Protobuf\Timestamp $archieved_at
     *           Дата архивации
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Ad\V1\KeyapisAdSalepointV1::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;
    }

    /**
     * Название
     *
     * 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>.keyapis.ad.v1.Salepoint.Type type = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Тип точки продаж
     *
     * Generated from protobuf field <code>.keyapis.ad.v1.Salepoint.Type type = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Keyapis\Ad\V1\Salepoint\Type::class);
        $this->type = $var;

        return $this;
    }

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

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

    /**
     * Адрес
     *
     * Generated from protobuf field <code>string address = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getAddress()
    {
        return $this->address;
    }

    /**
     * Адрес
     *
     * Generated from protobuf field <code>string address = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setAddress($var)
    {
        GPBUtil::checkString($var, True);
        $this->address = $var;

        return $this;
    }

    /**
     * Местонахождение
     *
     * Generated from protobuf field <code>.keyapis.ad.v1.Salepoint.Location location = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Keyapis\Ad\V1\Salepoint\Location|null
     */
    public function getLocation()
    {
        return $this->location;
    }

    public function hasLocation()
    {
        return isset($this->location);
    }

    public function clearLocation()
    {
        unset($this->location);
    }

    /**
     * Местонахождение
     *
     * Generated from protobuf field <code>.keyapis.ad.v1.Salepoint.Location location = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Keyapis\Ad\V1\Salepoint\Location $var
     * @return $this
     */
    public function setLocation($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\Ad\V1\Salepoint\Location::class);
        $this->location = $var;

        return $this;
    }

    /**
     * Рабочее время
     *
     * Generated from protobuf field <code>repeated .keyapis.ad.v1.Salepoint.Worktime worktimes = 7 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getWorktimes()
    {
        return $this->worktimes;
    }

    /**
     * Рабочее время
     *
     * Generated from protobuf field <code>repeated .keyapis.ad.v1.Salepoint.Worktime worktimes = 7 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param array<\Keyapis\Ad\V1\Salepoint\Worktime>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setWorktimes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Keyapis\Ad\V1\Salepoint\Worktime::class);
        $this->worktimes = $arr;

        return $this;
    }

    /**
     * Номер телефона
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue phone_number = 8;</code>
     * @return \Google\Protobuf\StringValue|null
     */
    public function getPhoneNumber()
    {
        return $this->phone_number;
    }

    public function hasPhoneNumber()
    {
        return isset($this->phone_number);
    }

    public function clearPhoneNumber()
    {
        unset($this->phone_number);
    }

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

     * Номер телефона
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue phone_number = 8;</code>
     * @return string|null
     */
    public function getPhoneNumberUnwrapped()
    {
        return $this->readWrapperValue("phone_number");
    }

    /**
     * Номер телефона
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue phone_number = 8;</code>
     * @param \Google\Protobuf\StringValue $var
     * @return $this
     */
    public function setPhoneNumber($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class);
        $this->phone_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 phone_number = 8;</code>
     * @param string|null $var
     * @return $this
     */
    public function setPhoneNumberUnwrapped($var)
    {
        $this->writeWrapperValue("phone_number", $var);
        return $this;}

    /**
     * Ссылка на сайт
     *
     * Generated from protobuf field <code>string site_url = 9 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getSiteUrl()
    {
        return $this->site_url;
    }

    /**
     * Ссылка на сайт
     *
     * Generated from protobuf field <code>string site_url = 9 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setSiteUrl($var)
    {
        GPBUtil::checkString($var, True);
        $this->site_url = $var;

        return $this;
    }

    /**
     * Дата создания
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp created_at = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getCreatedAt()
    {
        return $this->created_at;
    }

    public function hasCreatedAt()
    {
        return isset($this->created_at);
    }

    public function clearCreatedAt()
    {
        unset($this->created_at);
    }

    /**
     * Дата создания
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp created_at = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setCreatedAt($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->created_at = $var;

        return $this;
    }

    /**
     * Дата последнего изменения.
     * Заполняется и обновляется сервером.
     * Заполняется при создании и изменении.
     * Является версией объекта
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp changed_at = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getChangedAt()
    {
        return $this->changed_at;
    }

    public function hasChangedAt()
    {
        return isset($this->changed_at);
    }

    public function clearChangedAt()
    {
        unset($this->changed_at);
    }

    /**
     * Дата последнего изменения.
     * Заполняется и обновляется сервером.
     * Заполняется при создании и изменении.
     * Является версией объекта
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp changed_at = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setChangedAt($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->changed_at = $var;

        return $this;
    }

    /**
     * Дата архивации
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp archieved_at = 12;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getArchievedAt()
    {
        return $this->archieved_at;
    }

    public function hasArchievedAt()
    {
        return isset($this->archieved_at);
    }

    public function clearArchievedAt()
    {
        unset($this->archieved_at);
    }

    /**
     * Дата архивации
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp archieved_at = 12;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setArchievedAt($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->archieved_at = $var;

        return $this;
    }

}

