<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: core/Tron.proto

namespace Protocol\Transaction\Contract;

use UnexpectedValueException;

/**
 * Protobuf type <code>protocol.Transaction.Contract.ContractType</code>
 */
class ContractType
{
    /**
     * Generated from protobuf enum <code>AccountCreateContract = 0;</code>
     */
    const AccountCreateContract = 0;
    /**
     * Generated from protobuf enum <code>TransferContract = 1;</code>
     */
    const TransferContract = 1;
    /**
     * Generated from protobuf enum <code>TransferAssetContract = 2;</code>
     */
    const TransferAssetContract = 2;
    /**
     * Generated from protobuf enum <code>VoteAssetContract = 3;</code>
     */
    const VoteAssetContract = 3;
    /**
     * Generated from protobuf enum <code>VoteWitnessContract = 4;</code>
     */
    const VoteWitnessContract = 4;
    /**
     * Generated from protobuf enum <code>WitnessCreateContract = 5;</code>
     */
    const WitnessCreateContract = 5;
    /**
     * Generated from protobuf enum <code>AssetIssueContract = 6;</code>
     */
    const AssetIssueContract = 6;
    /**
     * Generated from protobuf enum <code>WitnessUpdateContract = 8;</code>
     */
    const WitnessUpdateContract = 8;
    /**
     * Generated from protobuf enum <code>ParticipateAssetIssueContract = 9;</code>
     */
    const ParticipateAssetIssueContract = 9;
    /**
     * Generated from protobuf enum <code>AccountUpdateContract = 10;</code>
     */
    const AccountUpdateContract = 10;
    /**
     * Generated from protobuf enum <code>FreezeBalanceContract = 11;</code>
     */
    const FreezeBalanceContract = 11;
    /**
     * Generated from protobuf enum <code>UnfreezeBalanceContract = 12;</code>
     */
    const UnfreezeBalanceContract = 12;
    /**
     * Generated from protobuf enum <code>WithdrawBalanceContract = 13;</code>
     */
    const WithdrawBalanceContract = 13;
    /**
     * Generated from protobuf enum <code>UnfreezeAssetContract = 14;</code>
     */
    const UnfreezeAssetContract = 14;
    /**
     * Generated from protobuf enum <code>UpdateAssetContract = 15;</code>
     */
    const UpdateAssetContract = 15;
    /**
     * Generated from protobuf enum <code>ProposalCreateContract = 16;</code>
     */
    const ProposalCreateContract = 16;
    /**
     * Generated from protobuf enum <code>ProposalApproveContract = 17;</code>
     */
    const ProposalApproveContract = 17;
    /**
     * Generated from protobuf enum <code>ProposalDeleteContract = 18;</code>
     */
    const ProposalDeleteContract = 18;
    /**
     * Generated from protobuf enum <code>SetAccountIdContract = 19;</code>
     */
    const SetAccountIdContract = 19;
    /**
     * Generated from protobuf enum <code>CustomContract = 20;</code>
     */
    const CustomContract = 20;
    /**
     * Generated from protobuf enum <code>CreateSmartContract = 30;</code>
     */
    const CreateSmartContract = 30;
    /**
     * Generated from protobuf enum <code>TriggerSmartContract = 31;</code>
     */
    const TriggerSmartContract = 31;
    /**
     * Generated from protobuf enum <code>GetContract = 32;</code>
     */
    const GetContract = 32;
    /**
     * Generated from protobuf enum <code>UpdateSettingContract = 33;</code>
     */
    const UpdateSettingContract = 33;
    /**
     * Generated from protobuf enum <code>ExchangeCreateContract = 41;</code>
     */
    const ExchangeCreateContract = 41;
    /**
     * Generated from protobuf enum <code>ExchangeInjectContract = 42;</code>
     */
    const ExchangeInjectContract = 42;
    /**
     * Generated from protobuf enum <code>ExchangeWithdrawContract = 43;</code>
     */
    const ExchangeWithdrawContract = 43;
    /**
     * Generated from protobuf enum <code>ExchangeTransactionContract = 44;</code>
     */
    const ExchangeTransactionContract = 44;
    /**
     * Generated from protobuf enum <code>UpdateEnergyLimitContract = 45;</code>
     */
    const UpdateEnergyLimitContract = 45;
    /**
     * Generated from protobuf enum <code>AccountPermissionUpdateContract = 46;</code>
     */
    const AccountPermissionUpdateContract = 46;
    /**
     * Generated from protobuf enum <code>ClearABIContract = 48;</code>
     */
    const ClearABIContract = 48;
    /**
     * Generated from protobuf enum <code>UpdateBrokerageContract = 49;</code>
     */
    const UpdateBrokerageContract = 49;
    /**
     * Generated from protobuf enum <code>ShieldedTransferContract = 51;</code>
     */
    const ShieldedTransferContract = 51;
    /**
     * Generated from protobuf enum <code>MarketSellAssetContract = 52;</code>
     */
    const MarketSellAssetContract = 52;
    /**
     * Generated from protobuf enum <code>MarketCancelOrderContract = 53;</code>
     */
    const MarketCancelOrderContract = 53;

    private static $valueToName = [
        self::AccountCreateContract => 'AccountCreateContract',
        self::TransferContract => 'TransferContract',
        self::TransferAssetContract => 'TransferAssetContract',
        self::VoteAssetContract => 'VoteAssetContract',
        self::VoteWitnessContract => 'VoteWitnessContract',
        self::WitnessCreateContract => 'WitnessCreateContract',
        self::AssetIssueContract => 'AssetIssueContract',
        self::WitnessUpdateContract => 'WitnessUpdateContract',
        self::ParticipateAssetIssueContract => 'ParticipateAssetIssueContract',
        self::AccountUpdateContract => 'AccountUpdateContract',
        self::FreezeBalanceContract => 'FreezeBalanceContract',
        self::UnfreezeBalanceContract => 'UnfreezeBalanceContract',
        self::WithdrawBalanceContract => 'WithdrawBalanceContract',
        self::UnfreezeAssetContract => 'UnfreezeAssetContract',
        self::UpdateAssetContract => 'UpdateAssetContract',
        self::ProposalCreateContract => 'ProposalCreateContract',
        self::ProposalApproveContract => 'ProposalApproveContract',
        self::ProposalDeleteContract => 'ProposalDeleteContract',
        self::SetAccountIdContract => 'SetAccountIdContract',
        self::CustomContract => 'CustomContract',
        self::CreateSmartContract => 'CreateSmartContract',
        self::TriggerSmartContract => 'TriggerSmartContract',
        self::GetContract => 'GetContract',
        self::UpdateSettingContract => 'UpdateSettingContract',
        self::ExchangeCreateContract => 'ExchangeCreateContract',
        self::ExchangeInjectContract => 'ExchangeInjectContract',
        self::ExchangeWithdrawContract => 'ExchangeWithdrawContract',
        self::ExchangeTransactionContract => 'ExchangeTransactionContract',
        self::UpdateEnergyLimitContract => 'UpdateEnergyLimitContract',
        self::AccountPermissionUpdateContract => 'AccountPermissionUpdateContract',
        self::ClearABIContract => 'ClearABIContract',
        self::UpdateBrokerageContract => 'UpdateBrokerageContract',
        self::ShieldedTransferContract => 'ShieldedTransferContract',
        self::MarketSellAssetContract => 'MarketSellAssetContract',
        self::MarketCancelOrderContract => 'MarketCancelOrderContract',
    ];

    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(ContractType::class, \Protocol\Transaction_Contract_ContractType::class);

