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

namespace Google\Cloud\AIPlatform\V1\ModelDeploymentMonitoringJob;

use UnexpectedValueException;

/**
 * The state to Specify the monitoring pipeline.
 *
 * Protobuf type <code>google.cloud.aiplatform.v1.ModelDeploymentMonitoringJob.MonitoringScheduleState</code>
 */
class MonitoringScheduleState
{
    /**
     * Unspecified state.
     *
     * Generated from protobuf enum <code>MONITORING_SCHEDULE_STATE_UNSPECIFIED = 0;</code>
     */
    const MONITORING_SCHEDULE_STATE_UNSPECIFIED = 0;
    /**
     * The pipeline is picked up and wait to run.
     *
     * Generated from protobuf enum <code>PENDING = 1;</code>
     */
    const PENDING = 1;
    /**
     * The pipeline is offline and will be scheduled for next run.
     *
     * Generated from protobuf enum <code>OFFLINE = 2;</code>
     */
    const OFFLINE = 2;
    /**
     * The pipeline is running.
     *
     * Generated from protobuf enum <code>RUNNING = 3;</code>
     */
    const RUNNING = 3;

    private static $valueToName = [
        self::MONITORING_SCHEDULE_STATE_UNSPECIFIED => 'MONITORING_SCHEDULE_STATE_UNSPECIFIED',
        self::PENDING => 'PENDING',
        self::OFFLINE => 'OFFLINE',
        self::RUNNING => 'RUNNING',
    ];

    public static function name($value)
    {
        if (!isset(self::$valueToName[$value])) {
            throw new UnexpectedValueException(sprintf(
                    'Enum %s has no name defined for value %s', __CLASS__, $value));
        }
        return self::$valueToName[$value];
    }


    public static function value($name)
    {
        $const = __CLASS__ . '::' . strtoupper($name);
        if (!defined($const)) {
            throw new UnexpectedValueException(sprintf(
                    'Enum %s has no value defined for name %s', __CLASS__, $name));
        }
        return constant($const);
    }
}


