opentelemetry.proto.trace.v1.Status.StatusCode */ class StatusCode { /** * The default status. * * Generated from protobuf enum STATUS_CODE_UNSET = 0; */ const STATUS_CODE_UNSET = 0; /** * The Span has been validated by an Application developer or Operator to * have completed successfully. * * Generated from protobuf enum STATUS_CODE_OK = 1; */ const STATUS_CODE_OK = 1; /** * The Span contains an error. * * Generated from protobuf enum STATUS_CODE_ERROR = 2; */ const STATUS_CODE_ERROR = 2; private static $valueToName = [ self::STATUS_CODE_UNSET => 'STATUS_CODE_UNSET', self::STATUS_CODE_OK => 'STATUS_CODE_OK', self::STATUS_CODE_ERROR => 'STATUS_CODE_ERROR', ]; 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(StatusCode::class, \Opentelemetry\Proto\Trace\V1\Status_StatusCode::class);