<?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;

/**
 * Generated from protobuf message <code>temporal.api.workflowservice.v1.PatchScheduleRequest</code>
 */
class PatchScheduleRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * The namespace of the schedule to patch.
     *
     * Generated from protobuf field <code>string namespace = 1;</code>
     */
    protected $namespace = '';
    /**
     * The id of the schedule to patch.
     *
     * Generated from protobuf field <code>string schedule_id = 2;</code>
     */
    protected $schedule_id = '';
    /**
     * Generated from protobuf field <code>.temporal.api.schedule.v1.SchedulePatch patch = 3;</code>
     */
    protected $patch = null;
    /**
     * The identity of the client who initiated this request.
     *
     * Generated from protobuf field <code>string identity = 4;</code>
     */
    protected $identity = '';
    /**
     * A unique identifier for this update request for idempotence. Typically UUIDv4.
     *
     * Generated from protobuf field <code>string request_id = 5;</code>
     */
    protected $request_id = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $namespace
     *           The namespace of the schedule to patch.
     *     @type string $schedule_id
     *           The id of the schedule to patch.
     *     @type \Temporal\Api\Schedule\V1\SchedulePatch $patch
     *     @type string $identity
     *           The identity of the client who initiated this request.
     *     @type string $request_id
     *           A unique identifier for this update request for idempotence. Typically UUIDv4.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce();
        parent::__construct($data);
    }

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

    /**
     * The namespace of the schedule to patch.
     *
     * 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 schedule to patch.
     *
     * Generated from protobuf field <code>string schedule_id = 2;</code>
     * @return string
     */
    public function getScheduleId()
    {
        return $this->schedule_id;
    }

    /**
     * The id of the schedule to patch.
     *
     * 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;
    }

    /**
     * Generated from protobuf field <code>.temporal.api.schedule.v1.SchedulePatch patch = 3;</code>
     * @return \Temporal\Api\Schedule\V1\SchedulePatch|null
     */
    public function getPatch()
    {
        return $this->patch;
    }

    public function hasPatch()
    {
        return isset($this->patch);
    }

    public function clearPatch()
    {
        unset($this->patch);
    }

    /**
     * Generated from protobuf field <code>.temporal.api.schedule.v1.SchedulePatch patch = 3;</code>
     * @param \Temporal\Api\Schedule\V1\SchedulePatch $var
     * @return $this
     */
    public function setPatch($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Schedule\V1\SchedulePatch::class);
        $this->patch = $var;

        return $this;
    }

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

        return $this;
    }

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

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

        return $this;
    }

}

