123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- <?php
- # Generated by the protocol buffer compiler. DO NOT EDIT!
- # source: protos/ydb_table.proto
- namespace Ydb\Table\ChangefeedMode;
- use UnexpectedValueException;
- /**
- * Protobuf type <code>Ydb.Table.ChangefeedMode.Mode</code>
- */
- class Mode
- {
- /**
- * Generated from protobuf enum <code>MODE_UNSPECIFIED = 0;</code>
- */
- const MODE_UNSPECIFIED = 0;
- /**
- * Only the key component of the modified row
- *
- * Generated from protobuf enum <code>MODE_KEYS_ONLY = 1;</code>
- */
- const MODE_KEYS_ONLY = 1;
- /**
- * Updated columns
- *
- * Generated from protobuf enum <code>MODE_UPDATES = 2;</code>
- */
- const MODE_UPDATES = 2;
- /**
- * The entire row, as it appears after it was modified
- *
- * Generated from protobuf enum <code>MODE_NEW_IMAGE = 3;</code>
- */
- const MODE_NEW_IMAGE = 3;
- /**
- * The entire row, as it appeared before it was modified
- *
- * Generated from protobuf enum <code>MODE_OLD_IMAGE = 4;</code>
- */
- const MODE_OLD_IMAGE = 4;
- /**
- * Both new and old images of the row
- *
- * Generated from protobuf enum <code>MODE_NEW_AND_OLD_IMAGES = 5;</code>
- */
- const MODE_NEW_AND_OLD_IMAGES = 5;
- private static $valueToName = [
- self::MODE_UNSPECIFIED => 'MODE_UNSPECIFIED',
- self::MODE_KEYS_ONLY => 'MODE_KEYS_ONLY',
- self::MODE_UPDATES => 'MODE_UPDATES',
- self::MODE_NEW_IMAGE => 'MODE_NEW_IMAGE',
- self::MODE_OLD_IMAGE => 'MODE_OLD_IMAGE',
- self::MODE_NEW_AND_OLD_IMAGES => 'MODE_NEW_AND_OLD_IMAGES',
- ];
- 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(Mode::class, \Ydb\Table\ChangefeedMode_Mode::class);
|