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

namespace Temporal\Api\Workflowservice\V1;

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

/**
 * (-- api-linter: core::0203::optional=disabled
 *     aip.dev/not-precedent: field_behavior annotation not available in our gogo fork --)
 *
 * Generated from protobuf message <code>temporal.api.workflowservice.v1.CreateScheduleRequest</code>
 */
class CreateScheduleRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * The namespace the schedule should be created in.
     *
     * Generated from protobuf field <code>string namespace = 1;</code>
     */
    protected $namespace = '';
    /**
     * The id of the new schedule.
     *
     * Generated from protobuf field <code>string schedule_id = 2;</code>
     */
    protected $schedule_id = '';
    /**
     * The schedule spec, policies, action, and initial state.
     *
     * Generated from protobuf field <code>.temporal.api.schedule.v1.Schedule schedule = 3;</code>
     */
    protected $schedule = null;
    /**
     * Optional initial patch (e.g. to run the action once immediately).
     *
     * Generated from protobuf field <code>.temporal.api.schedule.v1.SchedulePatch initial_patch = 4;</code>
     */
    protected $initial_patch = null;
    /**
     * The identity of the client who initiated this request.
     *
     * Generated from protobuf field <code>string identity = 5;</code>
     */
    protected $identity = '';
    /**
     * A unique identifier for this create request for idempotence. Typically UUIDv4.
     *
     * Generated from protobuf field <code>string request_id = 6;</code>
     */
    protected $request_id = '';
    /**
     * Memo and search attributes to attach to the schedule itself.
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.Memo memo = 7;</code>
     */
    protected $memo = null;
    /**
     * Generated from protobuf field <code>.temporal.api.common.v1.SearchAttributes search_attributes = 8;</code>
     */
    protected $search_attributes = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $namespace
     *           The namespace the schedule should be created in.
     *     @type string $schedule_id
     *           The id of the new schedule.
     *     @type \Temporal\Api\Schedule\V1\Schedule $schedule
     *           The schedule spec, policies, action, and initial state.
     *     @type \Temporal\Api\Schedule\V1\SchedulePatch $initial_patch
     *           Optional initial patch (e.g. to run the action once immediately).
     *     @type string $identity
     *           The identity of the client who initiated this request.
     *     @type string $request_id
     *           A unique identifier for this create request for idempotence. Typically UUIDv4.
     *     @type \Temporal\Api\Common\V1\Memo $memo
     *           Memo and search attributes to attach to the schedule itself.
     *     @type \Temporal\Api\Common\V1\SearchAttributes $search_attributes
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce();
        parent::__construct($data);
    }

    /**
     * The namespace the schedule should be created in.
     *
     * Generated from protobuf field <code>string namespace = 1;</code>
     * @return string
     */
    public function getNamespace()
    {
        return $this->namespace;
    }

    /**
     * The namespace the schedule should be created in.
     *
     * Generated from protobuf field <code>string namespace = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setNamespace($var)
    {
        GPBUtil::checkString($var, True);
        $this->namespace = $var;

        return $this;
    }

    /**
     * The id of the new schedule.
     *
     * Generated from protobuf field <code>string schedule_id = 2;</code>
     * @return string
     */
    public function getScheduleId()
    {
        return $this->schedule_id;
    }

    /**
     * The id of the new schedule.
     *
     * Generated from protobuf field <code>string schedule_id = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setScheduleId($var)
    {
        GPBUtil::checkString($var, True);
        $this->schedule_id = $var;

        return $this;
    }

    /**
     * The schedule spec, policies, action, and initial state.
     *
     * Generated from protobuf field <code>.temporal.api.schedule.v1.Schedule schedule = 3;</code>
     * @return \Temporal\Api\Schedule\V1\Schedule|null
     */
    public function getSchedule()
    {
        return $this->schedule;
    }

    public function hasSchedule()
    {
        return isset($this->schedule);
    }

    public function clearSchedule()
    {
        unset($this->schedule);
    }

    /**
     * The schedule spec, policies, action, and initial state.
     *
     * Generated from protobuf field <code>.temporal.api.schedule.v1.Schedule schedule = 3;</code>
     * @param \Temporal\Api\Schedule\V1\Schedule $var
     * @return $this
     */
    public function setSchedule($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Schedule\V1\Schedule::class);
        $this->schedule = $var;

        return $this;
    }

    /**
     * Optional initial patch (e.g. to run the action once immediately).
     *
     * Generated from protobuf field <code>.temporal.api.schedule.v1.SchedulePatch initial_patch = 4;</code>
     * @return \Temporal\Api\Schedule\V1\SchedulePatch|null
     */
    public function getInitialPatch()
    {
        return $this->initial_patch;
    }

    public function hasInitialPatch()
    {
        return isset($this->initial_patch);
    }

    public function clearInitialPatch()
    {
        unset($this->initial_patch);
    }

    /**
     * Optional initial patch (e.g. to run the action once immediately).
     *
     * Generated from protobuf field <code>.temporal.api.schedule.v1.SchedulePatch initial_patch = 4;</code>
     * @param \Temporal\Api\Schedule\V1\SchedulePatch $var
     * @return $this
     */
    public function setInitialPatch($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Schedule\V1\SchedulePatch::class);
        $this->initial_patch = $var;

        return $this;
    }

    /**
     * The identity of the client who initiated this request.
     *
     * Generated from protobuf field <code>string identity = 5;</code>
     * @return string
     */
    public function getIdentity()
    {
        return $this->identity;
    }

    /**
     * The identity of the client who initiated this request.
     *
     * Generated from protobuf field <code>string identity = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setIdentity($var)
    {
        GPBUtil::checkString($var, True);
        $this->identity = $var;

        return $this;
    }

    /**
     * A unique identifier for this create request for idempotence. Typically UUIDv4.
     *
     * Generated from protobuf field <code>string request_id = 6;</code>
     * @return string
     */
    public function getRequestId()
    {
        return $this->request_id;
    }

    /**
     * A unique identifier for this create request for idempotence. Typically UUIDv4.
     *
     * Generated from protobuf field <code>string request_id = 6;</code>
     * @param string $var
     * @return $this
     */
    public function setRequestId($var)
    {
        GPBUtil::checkString($var, True);
        $this->request_id = $var;

        return $this;
    }

    /**
     * Memo and search attributes to attach to the schedule itself.
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.Memo memo = 7;</code>
     * @return \Temporal\Api\Common\V1\Memo|null
     */
    public function getMemo()
    {
        return $this->memo;
    }

    public function hasMemo()
    {
        return isset($this->memo);
    }

    public function clearMemo()
    {
        unset($this->memo);
    }

    /**
     * Memo and search attributes to attach to the schedule itself.
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.Memo memo = 7;</code>
     * @param \Temporal\Api\Common\V1\Memo $var
     * @return $this
     */
    public function setMemo($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Memo::class);
        $this->memo = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.temporal.api.common.v1.SearchAttributes search_attributes = 8;</code>
     * @return \Temporal\Api\Common\V1\SearchAttributes|null
     */
    public function getSearchAttributes()
    {
        return $this->search_attributes;
    }

    public function hasSearchAttributes()
    {
        return isset($this->search_attributes);
    }

    public function clearSearchAttributes()
    {
        unset($this->search_attributes);
    }

    /**
     * Generated from protobuf field <code>.temporal.api.common.v1.SearchAttributes search_attributes = 8;</code>
     * @param \Temporal\Api\Common\V1\SearchAttributes $var
     * @return $this
     */
    public function setSearchAttributes($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\SearchAttributes::class);
        $this->search_attributes = $var;

        return $this;
    }

}

