Added create container grpc method

Signed-off-by: Ilyas Niyazov <i.niyazov@yadro.com>
This commit is contained in:
Ilyas Niyazov 2025-03-10 13:46:17 +03:00
parent 9a1b5d778b
commit f8465e5b99
34 changed files with 532 additions and 53 deletions

View file

@ -0,0 +1,26 @@
class SelectorClause:
"""
Enum for selector clauses with integer value mapping
"""
CLAUSE_UNSPECIFIED = 0
SAME = 1
DISTINCT = 2
_value_map = {
0: CLAUSE_UNSPECIFIED,
1: SAME,
2: DISTINCT
}
@classmethod
def get(cls, value: int) -> 'SelectorClause':
"""
Get enum instance by integer value
Args:
value: Integer value of the clause
Returns:
Corresponding SelectorClause instance
"""
return cls._value_map.get(value)