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

namespace Google\Ads\GoogleAds\V23\Enums\LocalServicesInsuranceRejectionReasonEnum;

use UnexpectedValueException;

/**
 * Enums describing possible rejection reasons of a local services insurance
 * verification artifact.
 *
 * Protobuf type <code>google.ads.googleads.v23.enums.LocalServicesInsuranceRejectionReasonEnum.LocalServicesInsuranceRejectionReason</code>
 */
class LocalServicesInsuranceRejectionReason
{
    /**
     * 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;
    /**
     * Insurance amount doesn't meet requirement listed in the legal summaries
     * documentation for that geographic + category ID combination.
     *
     * Generated from protobuf enum <code>INSURANCE_AMOUNT_INSUFFICIENT = 3;</code>
     */
    const INSURANCE_AMOUNT_INSUFFICIENT = 3;
    /**
     * Insurance document is expired.
     *
     * Generated from protobuf enum <code>EXPIRED = 4;</code>
     */
    const EXPIRED = 4;
    /**
     * Insurance document is missing a signature.
     *
     * Generated from protobuf enum <code>NO_SIGNATURE = 5;</code>
     */
    const NO_SIGNATURE = 5;
    /**
     * Insurance document is missing a policy number.
     *
     * Generated from protobuf enum <code>NO_POLICY_NUMBER = 6;</code>
     */
    const NO_POLICY_NUMBER = 6;
    /**
     * Commercial General Liability(CGL) box is not marked in the insurance
     * document.
     *
     * Generated from protobuf enum <code>NO_COMMERCIAL_GENERAL_LIABILITY = 7;</code>
     */
    const NO_COMMERCIAL_GENERAL_LIABILITY = 7;
    /**
     * Insurance document is in an editable format.
     *
     * Generated from protobuf enum <code>EDITABLE_FORMAT = 8;</code>
     */
    const EDITABLE_FORMAT = 8;
    /**
     * Insurance document does not cover insurance for a particular category.
     *
     * Generated from protobuf enum <code>CATEGORY_MISMATCH = 9;</code>
     */
    const CATEGORY_MISMATCH = 9;
    /**
     * Insurance document is missing an expiration date.
     *
     * Generated from protobuf enum <code>MISSING_EXPIRATION_DATE = 10;</code>
     */
    const MISSING_EXPIRATION_DATE = 10;
    /**
     * Insurance document is poor quality - blurry images, illegible, etc...
     *
     * Generated from protobuf enum <code>POOR_QUALITY = 11;</code>
     */
    const POOR_QUALITY = 11;
    /**
     * Insurance document is suspected of being edited.
     *
     * Generated from protobuf enum <code>POTENTIALLY_EDITED = 12;</code>
     */
    const POTENTIALLY_EDITED = 12;
    /**
     * Insurance document not accepted. For example, documents of insurance
     * proposals, but missing coverages are not accepted.
     *
     * Generated from protobuf enum <code>WRONG_DOCUMENT_TYPE = 13;</code>
     */
    const WRONG_DOCUMENT_TYPE = 13;
    /**
     * Insurance document is not final.
     *
     * Generated from protobuf enum <code>NON_FINAL = 14;</code>
     */
    const NON_FINAL = 14;
    /**
     * Insurance document has another flaw not listed explicitly.
     *
     * Generated from protobuf enum <code>OTHER = 15;</code>
     */
    const OTHER = 15;

    private static $valueToName = [
        self::UNSPECIFIED => 'UNSPECIFIED',
        self::UNKNOWN => 'UNKNOWN',
        self::BUSINESS_NAME_MISMATCH => 'BUSINESS_NAME_MISMATCH',
        self::INSURANCE_AMOUNT_INSUFFICIENT => 'INSURANCE_AMOUNT_INSUFFICIENT',
        self::EXPIRED => 'EXPIRED',
        self::NO_SIGNATURE => 'NO_SIGNATURE',
        self::NO_POLICY_NUMBER => 'NO_POLICY_NUMBER',
        self::NO_COMMERCIAL_GENERAL_LIABILITY => 'NO_COMMERCIAL_GENERAL_LIABILITY',
        self::EDITABLE_FORMAT => 'EDITABLE_FORMAT',
        self::CATEGORY_MISMATCH => 'CATEGORY_MISMATCH',
        self::MISSING_EXPIRATION_DATE => 'MISSING_EXPIRATION_DATE',
        self::POOR_QUALITY => 'POOR_QUALITY',
        self::POTENTIALLY_EDITED => 'POTENTIALLY_EDITED',
        self::WRONG_DOCUMENT_TYPE => 'WRONG_DOCUMENT_TYPE',
        self::NON_FINAL => 'NON_FINAL',
        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);
    }
}

