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

namespace Google\Cloud\Orchestration\Airflow\Service\V1\CheckUpgradeResponse;

use UnexpectedValueException;

/**
 * Whether there were python modules conflict during image build.
 *
 * Protobuf type <code>google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult</code>
 */
class ConflictResult
{
    /**
     * It is unknown whether build had conflicts or not.
     *
     * Generated from protobuf enum <code>CONFLICT_RESULT_UNSPECIFIED = 0;</code>
     */
    const CONFLICT_RESULT_UNSPECIFIED = 0;
    /**
     * There were python packages conflicts.
     *
     * Generated from protobuf enum <code>CONFLICT = 1;</code>
     */
    const CONFLICT = 1;
    /**
     * There were no python packages conflicts.
     *
     * Generated from protobuf enum <code>NO_CONFLICT = 2;</code>
     */
    const NO_CONFLICT = 2;

    private static $valueToName = [
        self::CONFLICT_RESULT_UNSPECIFIED => 'CONFLICT_RESULT_UNSPECIFIED',
        self::CONFLICT => 'CONFLICT',
        self::NO_CONFLICT => 'NO_CONFLICT',
    ];

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


