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

namespace Google\Cloud\AIPlatform\V1;

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

/**
 * Request message for
 * [ScheduleService.UpdateSchedule][google.cloud.aiplatform.v1.ScheduleService.UpdateSchedule].
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.UpdateScheduleRequest</code>
 */
class UpdateScheduleRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The Schedule which replaces the resource on the server.
     * The following restrictions will be applied:
     *   * The scheduled request type cannot be changed.
     *   * The non-empty fields cannot be unset.
     *   * The output_only fields will be ignored if specified.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.Schedule schedule = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $schedule = null;
    /**
     * Required. The update mask applies to the resource. See
     * [google.protobuf.FieldMask][google.protobuf.FieldMask].
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $update_mask = null;

    /**
     * @param \Google\Cloud\AIPlatform\V1\Schedule $schedule   Required. The Schedule which replaces the resource on the server.
     *                                                         The following restrictions will be applied:
     *
     *                                                         * The scheduled request type cannot be changed.
     *                                                         * The non-empty fields cannot be unset.
     *                                                         * The output_only fields will be ignored if specified.
     * @param \Google\Protobuf\FieldMask           $updateMask Required. The update mask applies to the resource. See
     *                                                         [google.protobuf.FieldMask][google.protobuf.FieldMask].
     *
     * @return \Google\Cloud\AIPlatform\V1\UpdateScheduleRequest
     *
     * @experimental
     */
    public static function build(\Google\Cloud\AIPlatform\V1\Schedule $schedule, \Google\Protobuf\FieldMask $updateMask): self
    {
        return (new self())
            ->setSchedule($schedule)
            ->setUpdateMask($updateMask);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\AIPlatform\V1\Schedule $schedule
     *           Required. The Schedule which replaces the resource on the server.
     *           The following restrictions will be applied:
     *             * The scheduled request type cannot be changed.
     *             * The non-empty fields cannot be unset.
     *             * The output_only fields will be ignored if specified.
     *     @type \Google\Protobuf\FieldMask $update_mask
     *           Required. The update mask applies to the resource. See
     *           [google.protobuf.FieldMask][google.protobuf.FieldMask].
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\ScheduleService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The Schedule which replaces the resource on the server.
     * The following restrictions will be applied:
     *   * The scheduled request type cannot be changed.
     *   * The non-empty fields cannot be unset.
     *   * The output_only fields will be ignored if specified.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.Schedule schedule = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\AIPlatform\V1\Schedule|null
     */
    public function getSchedule()
    {
        return $this->schedule;
    }

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

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

    /**
     * Required. The Schedule which replaces the resource on the server.
     * The following restrictions will be applied:
     *   * The scheduled request type cannot be changed.
     *   * The non-empty fields cannot be unset.
     *   * The output_only fields will be ignored if specified.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.Schedule schedule = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\AIPlatform\V1\Schedule $var
     * @return $this
     */
    public function setSchedule($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\Schedule::class);
        $this->schedule = $var;

        return $this;
    }

    /**
     * Required. The update mask applies to the resource. See
     * [google.protobuf.FieldMask][google.protobuf.FieldMask].
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\FieldMask|null
     */
    public function getUpdateMask()
    {
        return $this->update_mask;
    }

    public function hasUpdateMask()
    {
        return isset($this->update_mask);
    }

    public function clearUpdateMask()
    {
        unset($this->update_mask);
    }

    /**
     * Required. The update mask applies to the resource. See
     * [google.protobuf.FieldMask][google.protobuf.FieldMask].
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Protobuf\FieldMask $var
     * @return $this
     */
    public function setUpdateMask($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
        $this->update_mask = $var;

        return $this;
    }

}

