<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/shopping/merchant/products/v1/products_common.proto

namespace Google\Shopping\Merchant\Products\V1\ProductAttributes;

use UnexpectedValueException;

/**
 * The specialty housing type for the property.
 *
 * Protobuf type <code>google.shopping.merchant.products.v1.ProductAttributes.SpecialtyHousingType</code>
 */
class SpecialtyHousingType
{
    /**
     * Unspecified specialty housing type.
     *
     * Generated from protobuf enum <code>SPECIALTY_HOUSING_TYPE_UNSPECIFIED = 0;</code>
     */
    const SPECIALTY_HOUSING_TYPE_UNSPECIFIED = 0;
    /**
     * Corporate housing.
     *
     * Generated from protobuf enum <code>CORPORATE = 1;</code>
     */
    const CORPORATE = 1;
    /**
     * Low income housing.
     *
     * Generated from protobuf enum <code>LOW_INCOME = 2;</code>
     */
    const LOW_INCOME = 2;
    /**
     * Military housing.
     *
     * Generated from protobuf enum <code>MILITARY = 3;</code>
     */
    const MILITARY = 3;
    /**
     * Senior housing.
     *
     * Generated from protobuf enum <code>SENIOR = 4;</code>
     */
    const SENIOR = 4;
    /**
     * Short term housing.
     *
     * Generated from protobuf enum <code>SHORT_TERM = 5;</code>
     */
    const SHORT_TERM = 5;
    /**
     * Student housing.
     *
     * Generated from protobuf enum <code>STUDENT = 6;</code>
     */
    const STUDENT = 6;

    private static $valueToName = [
        self::SPECIALTY_HOUSING_TYPE_UNSPECIFIED => 'SPECIALTY_HOUSING_TYPE_UNSPECIFIED',
        self::CORPORATE => 'CORPORATE',
        self::LOW_INCOME => 'LOW_INCOME',
        self::MILITARY => 'MILITARY',
        self::SENIOR => 'SENIOR',
        self::SHORT_TERM => 'SHORT_TERM',
        self::STUDENT => 'STUDENT',
    ];

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

