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

namespace Google\Cloud\DatabaseCenter\V1beta;

use UnexpectedValueException;

/**
 * ProductType is used to identify a database service offering either in a cloud
 * provider or on-premise. This enum needs to be updated whenever we introduce
 * a new ProductType.
 *
 * Protobuf type <code>google.cloud.databasecenter.v1beta.ProductType</code>
 */
class ProductType
{
    /**
     * PRODUCT_TYPE_UNSPECIFIED means product type is not known or that the user
     * didn't provide this field in the request.
     *
     * Generated from protobuf enum <code>PRODUCT_TYPE_UNSPECIFIED = 0;</code>
     */
    const PRODUCT_TYPE_UNSPECIFIED = 0;
    /**
     * Cloud SQL product area in GCP
     *
     * Generated from protobuf enum <code>PRODUCT_TYPE_CLOUD_SQL = 1;</code>
     */
    const PRODUCT_TYPE_CLOUD_SQL = 1;
    /**
     * AlloyDB product area in GCP
     *
     * Generated from protobuf enum <code>PRODUCT_TYPE_ALLOYDB = 2;</code>
     */
    const PRODUCT_TYPE_ALLOYDB = 2;
    /**
     * Spanner product area in GCP
     *
     * Generated from protobuf enum <code>PRODUCT_TYPE_SPANNER = 3;</code>
     */
    const PRODUCT_TYPE_SPANNER = 3;
    /**
     * Bigtable product area in GCP
     *
     * Generated from protobuf enum <code>PRODUCT_TYPE_BIGTABLE = 6;</code>
     */
    const PRODUCT_TYPE_BIGTABLE = 6;
    /**
     * Memorystore product area in GCP
     *
     * Generated from protobuf enum <code>PRODUCT_TYPE_MEMORYSTORE = 7;</code>
     */
    const PRODUCT_TYPE_MEMORYSTORE = 7;
    /**
     * Firestore product area in GCP
     *
     * Generated from protobuf enum <code>PRODUCT_TYPE_FIRESTORE = 8;</code>
     */
    const PRODUCT_TYPE_FIRESTORE = 8;
    /**
     * Compute Engine self managed databases
     *
     * Generated from protobuf enum <code>PRODUCT_TYPE_COMPUTE_ENGINE = 9;</code>
     */
    const PRODUCT_TYPE_COMPUTE_ENGINE = 9;
    /**
     * Oracle product area in GCP
     *
     * Generated from protobuf enum <code>PRODUCT_TYPE_ORACLE_ON_GCP = 10;</code>
     */
    const PRODUCT_TYPE_ORACLE_ON_GCP = 10;
    /**
     * BigQuery product area in GCP
     *
     * Generated from protobuf enum <code>PRODUCT_TYPE_BIGQUERY = 11;</code>
     */
    const PRODUCT_TYPE_BIGQUERY = 11;
    /**
     * Other refers to rest of other product type. This is to be when product type
     * is known, but it is not present in this enum.
     *
     * Generated from protobuf enum <code>PRODUCT_TYPE_OTHER = 5;</code>
     */
    const PRODUCT_TYPE_OTHER = 5;

    private static $valueToName = [
        self::PRODUCT_TYPE_UNSPECIFIED => 'PRODUCT_TYPE_UNSPECIFIED',
        self::PRODUCT_TYPE_CLOUD_SQL => 'PRODUCT_TYPE_CLOUD_SQL',
        self::PRODUCT_TYPE_ALLOYDB => 'PRODUCT_TYPE_ALLOYDB',
        self::PRODUCT_TYPE_SPANNER => 'PRODUCT_TYPE_SPANNER',
        self::PRODUCT_TYPE_BIGTABLE => 'PRODUCT_TYPE_BIGTABLE',
        self::PRODUCT_TYPE_MEMORYSTORE => 'PRODUCT_TYPE_MEMORYSTORE',
        self::PRODUCT_TYPE_FIRESTORE => 'PRODUCT_TYPE_FIRESTORE',
        self::PRODUCT_TYPE_COMPUTE_ENGINE => 'PRODUCT_TYPE_COMPUTE_ENGINE',
        self::PRODUCT_TYPE_ORACLE_ON_GCP => 'PRODUCT_TYPE_ORACLE_ON_GCP',
        self::PRODUCT_TYPE_BIGQUERY => 'PRODUCT_TYPE_BIGQUERY',
        self::PRODUCT_TYPE_OTHER => 'PRODUCT_TYPE_OTHER',
    ];

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

