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

namespace Google\Cloud\BinaryAuthorization\V1beta1\ContinuousValidationEvent\ContinuousValidationPodEvent\ImageDetails;

use UnexpectedValueException;

/**
 * The container type.
 *
 * Protobuf type <code>google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.ContainerType</code>
 */
class ContainerType
{
    /**
     * The container type should always be specified. This is an error.
     *
     * Generated from protobuf enum <code>CONTAINER_TYPE_UNSPECIFIED = 0;</code>
     */
    const CONTAINER_TYPE_UNSPECIFIED = 0;
    /**
     * A regular deployment.
     *
     * Generated from protobuf enum <code>CONTAINER = 1;</code>
     */
    const CONTAINER = 1;
    /**
     * Init container defined as specified at
     * https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
     *
     * Generated from protobuf enum <code>INIT_CONTAINER = 2;</code>
     */
    const INIT_CONTAINER = 2;
    /**
     * Ephemeral container defined as specified at
     * https://kubernetes.io/docs/concepts/workloads/pods/ephemeral-containers/
     *
     * Generated from protobuf enum <code>EPHEMERAL_CONTAINER = 3;</code>
     */
    const EPHEMERAL_CONTAINER = 3;

    private static $valueToName = [
        self::CONTAINER_TYPE_UNSPECIFIED => 'CONTAINER_TYPE_UNSPECIFIED',
        self::CONTAINER => 'CONTAINER',
        self::INIT_CONTAINER => 'INIT_CONTAINER',
        self::EPHEMERAL_CONTAINER => 'EPHEMERAL_CONTAINER',
    ];

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

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ContainerType::class, \Google\Cloud\BinaryAuthorization\V1beta1\ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_ContainerType::class);

