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

namespace Google\Cloud\AIPlatform\V1;

use UnexpectedValueException;

/**
 * The state of the PSC service automation.
 *
 * Protobuf type <code>google.cloud.aiplatform.v1.PSCAutomationState</code>
 */
class PSCAutomationState
{
    /**
     * Should not be used.
     *
     * Generated from protobuf enum <code>PSC_AUTOMATION_STATE_UNSPECIFIED = 0;</code>
     */
    const PSC_AUTOMATION_STATE_UNSPECIFIED = 0;
    /**
     * The PSC service automation is successful.
     *
     * Generated from protobuf enum <code>PSC_AUTOMATION_STATE_SUCCESSFUL = 1;</code>
     */
    const PSC_AUTOMATION_STATE_SUCCESSFUL = 1;
    /**
     * The PSC service automation has failed.
     *
     * Generated from protobuf enum <code>PSC_AUTOMATION_STATE_FAILED = 2;</code>
     */
    const PSC_AUTOMATION_STATE_FAILED = 2;

    private static $valueToName = [
        self::PSC_AUTOMATION_STATE_UNSPECIFIED => 'PSC_AUTOMATION_STATE_UNSPECIFIED',
        self::PSC_AUTOMATION_STATE_SUCCESSFUL => 'PSC_AUTOMATION_STATE_SUCCESSFUL',
        self::PSC_AUTOMATION_STATE_FAILED => 'PSC_AUTOMATION_STATE_FAILED',
    ];

    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);
    }
}

