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

namespace Temporal\Api\Sdk\V1;

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

/**
 * The name of the query to retrieve this information is `__temporal_workflow_metadata`.
 *
 * Generated from protobuf message <code>temporal.api.sdk.v1.WorkflowMetadata</code>
 */
class WorkflowMetadata extends \Google\Protobuf\Internal\Message
{
    /**
     * Metadata provided at declaration or creation time.
     *
     * Generated from protobuf field <code>.temporal.api.sdk.v1.WorkflowDefinition definition = 1;</code>
     */
    protected $definition = null;
    /**
     * Current long-form details of the workflow's state. This is used by user interfaces to show
     * long-form text. This text may be formatted by the user interface.
     *
     * Generated from protobuf field <code>string current_details = 2;</code>
     */
    protected $current_details = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Temporal\Api\Sdk\V1\WorkflowDefinition $definition
     *           Metadata provided at declaration or creation time.
     *     @type string $current_details
     *           Current long-form details of the workflow's state. This is used by user interfaces to show
     *           long-form text. This text may be formatted by the user interface.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Sdk\V1\WorkflowMetadata::initOnce();
        parent::__construct($data);
    }

    /**
     * Metadata provided at declaration or creation time.
     *
     * Generated from protobuf field <code>.temporal.api.sdk.v1.WorkflowDefinition definition = 1;</code>
     * @return \Temporal\Api\Sdk\V1\WorkflowDefinition|null
     */
    public function getDefinition()
    {
        return $this->definition;
    }

    public function hasDefinition()
    {
        return isset($this->definition);
    }

    public function clearDefinition()
    {
        unset($this->definition);
    }

    /**
     * Metadata provided at declaration or creation time.
     *
     * Generated from protobuf field <code>.temporal.api.sdk.v1.WorkflowDefinition definition = 1;</code>
     * @param \Temporal\Api\Sdk\V1\WorkflowDefinition $var
     * @return $this
     */
    public function setDefinition($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Sdk\V1\WorkflowDefinition::class);
        $this->definition = $var;

        return $this;
    }

    /**
     * Current long-form details of the workflow's state. This is used by user interfaces to show
     * long-form text. This text may be formatted by the user interface.
     *
     * Generated from protobuf field <code>string current_details = 2;</code>
     * @return string
     */
    public function getCurrentDetails()
    {
        return $this->current_details;
    }

    /**
     * Current long-form details of the workflow's state. This is used by user interfaces to show
     * long-form text. This text may be formatted by the user interface.
     *
     * Generated from protobuf field <code>string current_details = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setCurrentDetails($var)
    {
        GPBUtil::checkString($var, True);
        $this->current_details = $var;

        return $this;
    }

}

