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

namespace Google\Cloud\LocationFinder\V1\CloudLocation;

use UnexpectedValueException;

/**
 * The type of the cloud provider. This enum lists all possible providers of
 * cloud locations.
 *
 * Protobuf type <code>google.cloud.locationfinder.v1.CloudLocation.CloudProvider</code>
 */
class CloudProvider
{
    /**
     * Unspecified type.
     *
     * Generated from protobuf enum <code>CLOUD_PROVIDER_UNSPECIFIED = 0;</code>
     */
    const CLOUD_PROVIDER_UNSPECIFIED = 0;
    /**
     * Cloud provider type for Google Cloud.
     *
     * Generated from protobuf enum <code>CLOUD_PROVIDER_GCP = 1;</code>
     */
    const CLOUD_PROVIDER_GCP = 1;
    /**
     * Cloud provider type for AWS.
     *
     * Generated from protobuf enum <code>CLOUD_PROVIDER_AWS = 2;</code>
     */
    const CLOUD_PROVIDER_AWS = 2;
    /**
     * Cloud provider type for Azure.
     *
     * Generated from protobuf enum <code>CLOUD_PROVIDER_AZURE = 3;</code>
     */
    const CLOUD_PROVIDER_AZURE = 3;
    /**
     * Cloud provider type for OCI.
     *
     * Generated from protobuf enum <code>CLOUD_PROVIDER_OCI = 4;</code>
     */
    const CLOUD_PROVIDER_OCI = 4;

    private static $valueToName = [
        self::CLOUD_PROVIDER_UNSPECIFIED => 'CLOUD_PROVIDER_UNSPECIFIED',
        self::CLOUD_PROVIDER_GCP => 'CLOUD_PROVIDER_GCP',
        self::CLOUD_PROVIDER_AWS => 'CLOUD_PROVIDER_AWS',
        self::CLOUD_PROVIDER_AZURE => 'CLOUD_PROVIDER_AZURE',
        self::CLOUD_PROVIDER_OCI => 'CLOUD_PROVIDER_OCI',
    ];

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


