<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/googleads/v22/enums/local_services_license_rejection_reason.proto

namespace Google\Ads\GoogleAds\V22\Enums\LocalServicesLicenseRejectionReasonEnum;

use UnexpectedValueException;

/**
 * Enums describing possible rejection reasons of a local services license
 * verification artifact.
 *
 * Protobuf type <code>google.ads.googleads.v22.enums.LocalServicesLicenseRejectionReasonEnum.LocalServicesLicenseRejectionReason</code>
 */
class LocalServicesLicenseRejectionReason
{
    /**
     * Not specified.
     *
     * Generated from protobuf enum <code>UNSPECIFIED = 0;</code>
     */
    const UNSPECIFIED = 0;
    /**
     * Used for return value only. Represents value unknown in this version.
     *
     * Generated from protobuf enum <code>UNKNOWN = 1;</code>
     */
    const UNKNOWN = 1;
    /**
     * Business name doesn't match business name for the Local Services Ad.
     *
     * Generated from protobuf enum <code>BUSINESS_NAME_MISMATCH = 2;</code>
     */
    const BUSINESS_NAME_MISMATCH = 2;
    /**
     * License is unauthorized or been revoked.
     *
     * Generated from protobuf enum <code>UNAUTHORIZED = 3;</code>
     */
    const UNAUTHORIZED = 3;
    /**
     * License is expired.
     *
     * Generated from protobuf enum <code>EXPIRED = 4;</code>
     */
    const EXPIRED = 4;
    /**
     * License is poor quality - blurry images, illegible, etc...
     *
     * Generated from protobuf enum <code>POOR_QUALITY = 5;</code>
     */
    const POOR_QUALITY = 5;
    /**
     * License cannot be verified due to a not legitimate image.
     *
     * Generated from protobuf enum <code>UNVERIFIABLE = 6;</code>
     */
    const UNVERIFIABLE = 6;
    /**
     * License is not the requested document type or contains an invalid ID.
     *
     * Generated from protobuf enum <code>WRONG_DOCUMENT_OR_ID = 7;</code>
     */
    const WRONG_DOCUMENT_OR_ID = 7;
    /**
     * License has another flaw not listed explicitly.
     *
     * Generated from protobuf enum <code>OTHER = 8;</code>
     */
    const OTHER = 8;

    private static $valueToName = [
        self::UNSPECIFIED => 'UNSPECIFIED',
        self::UNKNOWN => 'UNKNOWN',
        self::BUSINESS_NAME_MISMATCH => 'BUSINESS_NAME_MISMATCH',
        self::UNAUTHORIZED => 'UNAUTHORIZED',
        self::EXPIRED => 'EXPIRED',
        self::POOR_QUALITY => 'POOR_QUALITY',
        self::UNVERIFIABLE => 'UNVERIFIABLE',
        self::WRONG_DOCUMENT_OR_ID => 'WRONG_DOCUMENT_OR_ID',
        self::OTHER => '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);
    }
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(LocalServicesLicenseRejectionReason::class, \Google\Ads\GoogleAds\V22\Enums\LocalServicesLicenseRejectionReasonEnum_LocalServicesLicenseRejectionReason::class);

