<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: temporal/api/sdk/v1/user_metadata.proto

namespace Temporal\Api\Sdk\V1;

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

/**
 * Information a user can set, often for use by user interfaces.
 *
 * Generated from protobuf message <code>temporal.api.sdk.v1.UserMetadata</code>
 */
class UserMetadata extends \Google\Protobuf\Internal\Message
{
    /**
     * Short-form text that provides a summary. This payload should be a "json/plain"-encoded payload
     * that is a single JSON string for use in user interfaces. User interface formatting may not
     * apply to this text when used in "title" situations. The payload data section is limited to 400
     * bytes by default.
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.Payload summary = 1;</code>
     */
    protected $summary = null;
    /**
     * Long-form text that provides details. This payload should be a "json/plain"-encoded payload
     * that is a single JSON string for use in user interfaces. User interface formatting may apply to
     * this text in common use. The payload data section is limited to 20000 bytes by default.
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.Payload details = 2;</code>
     */
    protected $details = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Temporal\Api\Common\V1\Payload $summary
     *           Short-form text that provides a summary. This payload should be a "json/plain"-encoded payload
     *           that is a single JSON string for use in user interfaces. User interface formatting may not
     *           apply to this text when used in "title" situations. The payload data section is limited to 400
     *           bytes by default.
     *     @type \Temporal\Api\Common\V1\Payload $details
     *           Long-form text that provides details. This payload should be a "json/plain"-encoded payload
     *           that is a single JSON string for use in user interfaces. User interface formatting may apply to
     *           this text in common use. The payload data section is limited to 20000 bytes by default.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Sdk\V1\UserMetadata::initOnce();
        parent::__construct($data);
    }

    /**
     * Short-form text that provides a summary. This payload should be a "json/plain"-encoded payload
     * that is a single JSON string for use in user interfaces. User interface formatting may not
     * apply to this text when used in "title" situations. The payload data section is limited to 400
     * bytes by default.
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.Payload summary = 1;</code>
     * @return \Temporal\Api\Common\V1\Payload|null
     */
    public function getSummary()
    {
        return $this->summary;
    }

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

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

    /**
     * Short-form text that provides a summary. This payload should be a "json/plain"-encoded payload
     * that is a single JSON string for use in user interfaces. User interface formatting may not
     * apply to this text when used in "title" situations. The payload data section is limited to 400
     * bytes by default.
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.Payload summary = 1;</code>
     * @param \Temporal\Api\Common\V1\Payload $var
     * @return $this
     */
    public function setSummary($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payload::class);
        $this->summary = $var;

        return $this;
    }

    /**
     * Long-form text that provides details. This payload should be a "json/plain"-encoded payload
     * that is a single JSON string for use in user interfaces. User interface formatting may apply to
     * this text in common use. The payload data section is limited to 20000 bytes by default.
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.Payload details = 2;</code>
     * @return \Temporal\Api\Common\V1\Payload|null
     */
    public function getDetails()
    {
        return $this->details;
    }

    public function hasDetails()
    {
        return isset($this->details);
    }

    public function clearDetails()
    {
        unset($this->details);
    }

    /**
     * Long-form text that provides details. This payload should be a "json/plain"-encoded payload
     * that is a single JSON string for use in user interfaces. User interface formatting may apply to
     * this text in common use. The payload data section is limited to 20000 bytes by default.
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.Payload details = 2;</code>
     * @param \Temporal\Api\Common\V1\Payload $var
     * @return $this
     */
    public function setDetails($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payload::class);
        $this->details = $var;

        return $this;
    }

}

