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

namespace Keyapis\Preset\V1;

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

/**
 * Задача на установку пресета.
 * Очередь key.preset.install
 *
 * Generated from protobuf message <code>keyapis.preset.v1.PresetInstallTask</code>
 */
class PresetInstallTask extends \Google\Protobuf\Internal\Message
{
    /**
     * Идентификатор запроса
     *
     * Generated from protobuf field <code>string request_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $request_id = '';
    /**
     * Пресет
     *
     * Generated from protobuf field <code>.keyapis.preset.v1.Preset preset = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $preset = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $request_id
     *           Идентификатор запроса
     *     @type \Keyapis\Preset\V1\Preset $preset
     *           Пресет
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Preset\V1\KeyapisPresetEventsV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Идентификатор запроса
     *
     * Generated from protobuf field <code>string request_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getRequestId()
    {
        return $this->request_id;
    }

    /**
     * Идентификатор запроса
     *
     * Generated from protobuf field <code>string request_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setRequestId($var)
    {
        GPBUtil::checkString($var, True);
        $this->request_id = $var;

        return $this;
    }

    /**
     * Пресет
     *
     * Generated from protobuf field <code>.keyapis.preset.v1.Preset preset = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Keyapis\Preset\V1\Preset|null
     */
    public function getPreset()
    {
        return $this->preset;
    }

    public function hasPreset()
    {
        return isset($this->preset);
    }

    public function clearPreset()
    {
        unset($this->preset);
    }

    /**
     * Пресет
     *
     * Generated from protobuf field <code>.keyapis.preset.v1.Preset preset = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Keyapis\Preset\V1\Preset $var
     * @return $this
     */
    public function setPreset($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\Preset\V1\Preset::class);
        $this->preset = $var;

        return $this;
    }

}

