@@ -13,6 +13,11 @@ def __init__(self, name, allowed_uses, total_uses, gross_uses):
1313 self .total_uses = total_uses
1414 self .gross_uses = gross_uses
1515
16+ class ProductVersionFeatureFlag (object ):
17+ def __init__ (self , name , enabled , data ):
18+ self .name = name
19+ self .enabled = enabled
20+ self .data = data
1621
1722class LexFloatClient :
1823 @staticmethod
@@ -96,6 +101,66 @@ def SetFloatingClientMetadata(key, value):
96101 if LexFloatStatusCodes .LF_OK != status :
97102 raise LexFloatClientException (status )
98103
104+ @staticmethod
105+ def GetProductVersionName ():
106+ """Gets the product version name.
107+
108+ Raises:
109+ LexFloatClientException
110+
111+ Returns:
112+ str: name of the product version.
113+ """
114+
115+ buffer_size = 256
116+ buffer = LexFloatClientNative .get_ctype_string_buffer (buffer_size )
117+ status = LexFloatClientNative .GetProductVersionName (buffer ,buffer_size )
118+ if status != LexFloatStatusCodes .LF_OK :
119+ raise LexFloatClientException (status )
120+ return LexFloatClientNative .byte_to_string (buffer .value )
121+
122+ @staticmethod
123+ def GetProductVersionDisplayName ():
124+ """Gets the product version display name.
125+
126+ Raises:
127+ LexFloatClientException
128+
129+ Returns:
130+ str: display name of the product version.
131+ """
132+
133+ buffer_size = 256
134+ buffer = LexFloatClientNative .get_ctype_string_buffer (buffer_size )
135+ status = LexFloatClientNative .GetProductVersionDisplayName (buffer ,buffer_size )
136+ if status != LexFloatStatusCodes .LF_OK :
137+ raise LexFloatClientException (status )
138+ return LexFloatClientNative .byte_to_string (buffer .value )
139+
140+ @staticmethod
141+ def GetProductVersionFeatureFlag (name ):
142+ """Gets the product version feature flag.
143+
144+ Args:
145+ name (str): name of the feature flag
146+
147+ Raises:
148+ LexFloatClientException
149+
150+ Returns:
151+ ProductVersionFeatureFlag: product version feature flag
152+ """
153+ cstring_name = LexFloatClientNative .get_ctype_string (name )
154+ enabled = ctypes .c_uint ()
155+ buffer_size = 256
156+ buffer = LexFloatClientNative .get_ctype_string_buffer (buffer_size )
157+ status = LexFloatClientNative .GetProductVersionFeatureFlag (cstring_name , ctypes .byref (enabled ), buffer , buffer_size )
158+ if status == LexFloatStatusCodes .LF_OK :
159+ isEnabled = enabled .value > 0
160+ return ProductVersionFeatureFlag (name , isEnabled , LexFloatClientNative .byte_to_string (buffer .value ))
161+ else :
162+ raise LexFloatClientException (status )
163+
99164 @staticmethod
100165 def GetHostLicenseMetadata (key ):
101166 """Get the value of the license metadata field associated with the
0 commit comments