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

namespace Google\Cloud\MigrationCenter\V1\GuestConfigDetails;

use UnexpectedValueException;

/**
 * Security-Enhanced Linux (SELinux) mode.
 *
 * Protobuf type <code>google.cloud.migrationcenter.v1.GuestConfigDetails.SeLinuxMode</code>
 */
class SeLinuxMode
{
    /**
     * SELinux mode unknown or unspecified.
     *
     * Generated from protobuf enum <code>SE_LINUX_MODE_UNSPECIFIED = 0;</code>
     */
    const SE_LINUX_MODE_UNSPECIFIED = 0;
    /**
     * SELinux is disabled.
     *
     * Generated from protobuf enum <code>SE_LINUX_MODE_DISABLED = 1;</code>
     */
    const SE_LINUX_MODE_DISABLED = 1;
    /**
     * SELinux permissive mode.
     *
     * Generated from protobuf enum <code>SE_LINUX_MODE_PERMISSIVE = 2;</code>
     */
    const SE_LINUX_MODE_PERMISSIVE = 2;
    /**
     * SELinux enforcing mode.
     *
     * Generated from protobuf enum <code>SE_LINUX_MODE_ENFORCING = 3;</code>
     */
    const SE_LINUX_MODE_ENFORCING = 3;

    private static $valueToName = [
        self::SE_LINUX_MODE_UNSPECIFIED => 'SE_LINUX_MODE_UNSPECIFIED',
        self::SE_LINUX_MODE_DISABLED => 'SE_LINUX_MODE_DISABLED',
        self::SE_LINUX_MODE_PERMISSIVE => 'SE_LINUX_MODE_PERMISSIVE',
        self::SE_LINUX_MODE_ENFORCING => 'SE_LINUX_MODE_ENFORCING',
    ];

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


