<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/chat/v1/reaction.proto

namespace Google\Apps\Chat\V1;

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

/**
 * A request to create a custom emoji.
 *
 * Generated from protobuf message <code>google.chat.v1.CreateCustomEmojiRequest</code>
 */
class CreateCustomEmojiRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The custom emoji to create.
     *
     * Generated from protobuf field <code>.google.chat.v1.CustomEmoji custom_emoji = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $custom_emoji = null;

    /**
     * @param \Google\Apps\Chat\V1\CustomEmoji $customEmoji Required. The custom emoji to create.
     *
     * @return \Google\Apps\Chat\V1\CreateCustomEmojiRequest
     *
     * @experimental
     */
    public static function build(\Google\Apps\Chat\V1\CustomEmoji $customEmoji): self
    {
        return (new self())
            ->setCustomEmoji($customEmoji);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Apps\Chat\V1\CustomEmoji $custom_emoji
     *           Required. The custom emoji to create.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Chat\V1\Reaction::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The custom emoji to create.
     *
     * Generated from protobuf field <code>.google.chat.v1.CustomEmoji custom_emoji = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Apps\Chat\V1\CustomEmoji|null
     */
    public function getCustomEmoji()
    {
        return $this->custom_emoji;
    }

    public function hasCustomEmoji()
    {
        return isset($this->custom_emoji);
    }

    public function clearCustomEmoji()
    {
        unset($this->custom_emoji);
    }

    /**
     * Required. The custom emoji to create.
     *
     * Generated from protobuf field <code>.google.chat.v1.CustomEmoji custom_emoji = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Apps\Chat\V1\CustomEmoji $var
     * @return $this
     */
    public function setCustomEmoji($var)
    {
        GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\CustomEmoji::class);
        $this->custom_emoji = $var;

        return $this;
    }

}

