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

namespace Google\Cloud\Notebooks\V1;

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

/**
 * The definition of a schedule.
 *
 * Generated from protobuf message <code>google.cloud.notebooks.v1.Schedule</code>
 */
class Schedule extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The name of this schedule. Format:
     * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $name = '';
    /**
     * Output only. Display name used for UI purposes.
     * Name can only contain alphanumeric characters, hyphens `-`,
     * and underscores `_`.
     *
     * Generated from protobuf field <code>string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $display_name = '';
    /**
     * A brief description of this environment.
     *
     * Generated from protobuf field <code>string description = 3;</code>
     */
    private $description = '';
    /**
     * Generated from protobuf field <code>.google.cloud.notebooks.v1.Schedule.State state = 4;</code>
     */
    private $state = 0;
    /**
     * Cron-tab formatted schedule by which the job will execute.
     * Format: minute, hour, day of month, month, day of week,
     * e.g. `0 0 * * WED` = every Wednesday
     * More examples: https://crontab.guru/examples.html
     *
     * Generated from protobuf field <code>string cron_schedule = 5;</code>
     */
    private $cron_schedule = '';
    /**
     * Timezone on which the cron_schedule.
     * The value of this field must be a time zone name from the tz database.
     * TZ Database: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
     * Note that some time zones include a provision for daylight savings time.
     * The rules for daylight saving time are determined by the chosen tz.
     * For UTC use the string "utc". If a time zone is not specified,
     * the default will be in UTC (also known as GMT).
     *
     * Generated from protobuf field <code>string time_zone = 6;</code>
     */
    private $time_zone = '';
    /**
     * Output only. Time the schedule was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $create_time = null;
    /**
     * Output only. Time the schedule was last updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $update_time = null;
    /**
     * Notebook Execution Template corresponding to this schedule.
     *
     * Generated from protobuf field <code>.google.cloud.notebooks.v1.ExecutionTemplate execution_template = 9;</code>
     */
    private $execution_template = null;
    /**
     * Output only. The most recent execution names triggered from this schedule and their
     * corresponding states.
     *
     * Generated from protobuf field <code>repeated .google.cloud.notebooks.v1.Execution recent_executions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $recent_executions;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Output only. The name of this schedule. Format:
     *           `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
     *     @type string $display_name
     *           Output only. Display name used for UI purposes.
     *           Name can only contain alphanumeric characters, hyphens `-`,
     *           and underscores `_`.
     *     @type string $description
     *           A brief description of this environment.
     *     @type int $state
     *     @type string $cron_schedule
     *           Cron-tab formatted schedule by which the job will execute.
     *           Format: minute, hour, day of month, month, day of week,
     *           e.g. `0 0 * * WED` = every Wednesday
     *           More examples: https://crontab.guru/examples.html
     *     @type string $time_zone
     *           Timezone on which the cron_schedule.
     *           The value of this field must be a time zone name from the tz database.
     *           TZ Database: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
     *           Note that some time zones include a provision for daylight savings time.
     *           The rules for daylight saving time are determined by the chosen tz.
     *           For UTC use the string "utc". If a time zone is not specified,
     *           the default will be in UTC (also known as GMT).
     *     @type \Google\Protobuf\Timestamp $create_time
     *           Output only. Time the schedule was created.
     *     @type \Google\Protobuf\Timestamp $update_time
     *           Output only. Time the schedule was last updated.
     *     @type \Google\Cloud\Notebooks\V1\ExecutionTemplate $execution_template
     *           Notebook Execution Template corresponding to this schedule.
     *     @type array<\Google\Cloud\Notebooks\V1\Execution>|\Google\Protobuf\Internal\RepeatedField $recent_executions
     *           Output only. The most recent execution names triggered from this schedule and their
     *           corresponding states.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Notebooks\V1\Schedule::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The name of this schedule. Format:
     * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Output only. The name of this schedule. Format:
     * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Output only. Display name used for UI purposes.
     * Name can only contain alphanumeric characters, hyphens `-`,
     * and underscores `_`.
     *
     * Generated from protobuf field <code>string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getDisplayName()
    {
        return $this->display_name;
    }

    /**
     * Output only. Display name used for UI purposes.
     * Name can only contain alphanumeric characters, hyphens `-`,
     * and underscores `_`.
     *
     * Generated from protobuf field <code>string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->display_name = $var;

        return $this;
    }

    /**
     * A brief description of this environment.
     *
     * Generated from protobuf field <code>string description = 3;</code>
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * A brief description of this environment.
     *
     * Generated from protobuf field <code>string description = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.google.cloud.notebooks.v1.Schedule.State state = 4;</code>
     * @return int
     */
    public function getState()
    {
        return $this->state;
    }

    /**
     * Generated from protobuf field <code>.google.cloud.notebooks.v1.Schedule.State state = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setState($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\Schedule\State::class);
        $this->state = $var;

        return $this;
    }

    /**
     * Cron-tab formatted schedule by which the job will execute.
     * Format: minute, hour, day of month, month, day of week,
     * e.g. `0 0 * * WED` = every Wednesday
     * More examples: https://crontab.guru/examples.html
     *
     * Generated from protobuf field <code>string cron_schedule = 5;</code>
     * @return string
     */
    public function getCronSchedule()
    {
        return $this->cron_schedule;
    }

    /**
     * Cron-tab formatted schedule by which the job will execute.
     * Format: minute, hour, day of month, month, day of week,
     * e.g. `0 0 * * WED` = every Wednesday
     * More examples: https://crontab.guru/examples.html
     *
     * Generated from protobuf field <code>string cron_schedule = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setCronSchedule($var)
    {
        GPBUtil::checkString($var, True);
        $this->cron_schedule = $var;

        return $this;
    }

    /**
     * Timezone on which the cron_schedule.
     * The value of this field must be a time zone name from the tz database.
     * TZ Database: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
     * Note that some time zones include a provision for daylight savings time.
     * The rules for daylight saving time are determined by the chosen tz.
     * For UTC use the string "utc". If a time zone is not specified,
     * the default will be in UTC (also known as GMT).
     *
     * Generated from protobuf field <code>string time_zone = 6;</code>
     * @return string
     */
    public function getTimeZone()
    {
        return $this->time_zone;
    }

    /**
     * Timezone on which the cron_schedule.
     * The value of this field must be a time zone name from the tz database.
     * TZ Database: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
     * Note that some time zones include a provision for daylight savings time.
     * The rules for daylight saving time are determined by the chosen tz.
     * For UTC use the string "utc". If a time zone is not specified,
     * the default will be in UTC (also known as GMT).
     *
     * Generated from protobuf field <code>string time_zone = 6;</code>
     * @param string $var
     * @return $this
     */
    public function setTimeZone($var)
    {
        GPBUtil::checkString($var, True);
        $this->time_zone = $var;

        return $this;
    }

    /**
     * Output only. Time the schedule was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getCreateTime()
    {
        return $this->create_time;
    }

    public function hasCreateTime()
    {
        return isset($this->create_time);
    }

    public function clearCreateTime()
    {
        unset($this->create_time);
    }

    /**
     * Output only. Time the schedule was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setCreateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->create_time = $var;

        return $this;
    }

    /**
     * Output only. Time the schedule was last updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getUpdateTime()
    {
        return $this->update_time;
    }

    public function hasUpdateTime()
    {
        return isset($this->update_time);
    }

    public function clearUpdateTime()
    {
        unset($this->update_time);
    }

    /**
     * Output only. Time the schedule was last updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setUpdateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->update_time = $var;

        return $this;
    }

    /**
     * Notebook Execution Template corresponding to this schedule.
     *
     * Generated from protobuf field <code>.google.cloud.notebooks.v1.ExecutionTemplate execution_template = 9;</code>
     * @return \Google\Cloud\Notebooks\V1\ExecutionTemplate|null
     */
    public function getExecutionTemplate()
    {
        return $this->execution_template;
    }

    public function hasExecutionTemplate()
    {
        return isset($this->execution_template);
    }

    public function clearExecutionTemplate()
    {
        unset($this->execution_template);
    }

    /**
     * Notebook Execution Template corresponding to this schedule.
     *
     * Generated from protobuf field <code>.google.cloud.notebooks.v1.ExecutionTemplate execution_template = 9;</code>
     * @param \Google\Cloud\Notebooks\V1\ExecutionTemplate $var
     * @return $this
     */
    public function setExecutionTemplate($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\ExecutionTemplate::class);
        $this->execution_template = $var;

        return $this;
    }

    /**
     * Output only. The most recent execution names triggered from this schedule and their
     * corresponding states.
     *
     * Generated from protobuf field <code>repeated .google.cloud.notebooks.v1.Execution recent_executions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getRecentExecutions()
    {
        return $this->recent_executions;
    }

    /**
     * Output only. The most recent execution names triggered from this schedule and their
     * corresponding states.
     *
     * Generated from protobuf field <code>repeated .google.cloud.notebooks.v1.Execution recent_executions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param array<\Google\Cloud\Notebooks\V1\Execution>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setRecentExecutions($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V1\Execution::class);
        $this->recent_executions = $arr;

        return $this;
    }

}

