diff options
author | Andrew Dolgov <[email protected]> | 2023-10-20 17:12:29 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2023-10-20 21:13:39 +0300 |
commit | cdd7ad020e165fe680703b6d3319b908b682fb7a (patch) | |
tree | b51eb09b7b4587e8fbc5624ac8d88d28cfcd0b04 /vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/LogRecordFlags.php | |
parent | 45a9ff0c88cbd33892ff16ab837e9059937d656e (diff) |
jaeger-client -> opentelemetry
Diffstat (limited to 'vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/LogRecordFlags.php')
-rw-r--r-- | vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/LogRecordFlags.php | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/LogRecordFlags.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/LogRecordFlags.php new file mode 100644 index 000000000..de6f38899 --- /dev/null +++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/LogRecordFlags.php @@ -0,0 +1,58 @@ +<?php +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: opentelemetry/proto/logs/v1/logs.proto + +namespace Opentelemetry\Proto\Logs\V1; + +use UnexpectedValueException; + +/** + * LogRecordFlags is defined as a protobuf 'uint32' type and is to be used as + * bit-fields. Each non-zero value defined in this enum is a bit-mask. + * To extract the bit-field, for example, use an expression like: + * (logRecord.flags & LOG_RECORD_FLAGS_TRACE_FLAGS_MASK) + * + * Protobuf type <code>opentelemetry.proto.logs.v1.LogRecordFlags</code> + */ +class LogRecordFlags +{ + /** + * The zero value for the enum. Should not be used for comparisons. + * Instead use bitwise "and" with the appropriate mask as shown above. + * + * Generated from protobuf enum <code>LOG_RECORD_FLAGS_DO_NOT_USE = 0;</code> + */ + const LOG_RECORD_FLAGS_DO_NOT_USE = 0; + /** + * Bits 0-7 are used for trace flags. + * + * Generated from protobuf enum <code>LOG_RECORD_FLAGS_TRACE_FLAGS_MASK = 255;</code> + */ + const LOG_RECORD_FLAGS_TRACE_FLAGS_MASK = 255; + + private static $valueToName = [ + self::LOG_RECORD_FLAGS_DO_NOT_USE => 'LOG_RECORD_FLAGS_DO_NOT_USE', + self::LOG_RECORD_FLAGS_TRACE_FLAGS_MASK => 'LOG_RECORD_FLAGS_TRACE_FLAGS_MASK', + ]; + + 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); + } +} + |