@@ -1085,6 +1085,271 @@ def _query_attributes_with_http_info(
1085
1085
response_type_map = response_type_map ,
1086
1086
)
1087
1087
1088
+ def query_meta_attributes (
1089
+ self ,
1090
+ * ,
1091
+ database_key : "str" ,
1092
+ table_guid : "str" ,
1093
+ body : "Optional[GsaQueryAttributesRequest]" = None ,
1094
+ x_ansys_vc_mode : "Optional[str]" = None ,
1095
+ mode : "Optional[str]" = None ,
1096
+ ) -> "Union[GsaQueryAttributesInfo, None]" :
1097
+ """Get meta-attributes in table, populate the requested properties. Optionally filter the returned meta-attributes.
1098
+
1099
+ This method makes a synchronous HTTP request.
1100
+
1101
+ Parameters
1102
+ ----------
1103
+ database_key: str
1104
+ table_guid: str
1105
+ body: GsaQueryAttributesRequest
1106
+ x_ansys_vc_mode: str
1107
+ The version control mode. If not provided, defaults to write mode if the user is allowed to see that. Can also be set in the query string.
1108
+ mode: str
1109
+ The version control mode. If not provided, defaults to write mode if the user is allowed to see that. Can also be set in the header.
1110
+
1111
+ Returns
1112
+ -------
1113
+ Union[GsaQueryAttributesInfo, None]
1114
+ """
1115
+ data = self ._query_meta_attributes_with_http_info (
1116
+ database_key , table_guid , body , x_ansys_vc_mode , mode , _return_http_data_only = True
1117
+ )
1118
+ return data # type: ignore[no-any-return]
1119
+
1120
+ def _query_meta_attributes_with_http_info (
1121
+ self ,
1122
+ database_key : "str" ,
1123
+ table_guid : "str" ,
1124
+ body : "Optional[GsaQueryAttributesRequest]" = None ,
1125
+ x_ansys_vc_mode : "Optional[str]" = None ,
1126
+ mode : "Optional[str]" = None ,
1127
+ ** kwargs : Any ,
1128
+ ) -> Any :
1129
+ all_params = [
1130
+ "database_key" ,
1131
+ "table_guid" ,
1132
+ "body" ,
1133
+ "x_ansys_vc_mode" ,
1134
+ "mode" ,
1135
+ "_return_http_data_only" ,
1136
+ "_preload_content" ,
1137
+ "_request_timeout" ,
1138
+ ]
1139
+
1140
+ params = locals ()
1141
+ for key , val in params ["kwargs" ].items ():
1142
+ if key not in all_params :
1143
+ raise TypeError (
1144
+ f"Got an unexpected keyword argument '{ key } ' to method query_meta_attributes"
1145
+ )
1146
+ params [key ] = val
1147
+ del params ["kwargs" ]
1148
+ # verify the required parameter "database_key" is set
1149
+ if "database_key" not in params or params ["database_key" ] is None :
1150
+ raise ValueError (
1151
+ "Missing the required parameter 'database_key' when calling 'query_meta_attributes'"
1152
+ )
1153
+ # verify the required parameter "table_guid" is set
1154
+ if "table_guid" not in params or params ["table_guid" ] is None :
1155
+ raise ValueError (
1156
+ "Missing the required parameter 'table_guid' when calling 'query_meta_attributes'"
1157
+ )
1158
+
1159
+ collection_formats : dict [str , Any ] = {}
1160
+
1161
+ path_params : dict [str , Any ] = {}
1162
+ if "database_key" in params and database_key is not None :
1163
+ path_params ["database-key" ] = params ["database_key" ]
1164
+ if "table_guid" in params and table_guid is not None :
1165
+ path_params ["table-guid" ] = params ["table_guid" ]
1166
+
1167
+ query_params : list [Any ] = []
1168
+ if "mode" in params and mode is not None :
1169
+ query_params .append (("mode" , params ["mode" ]))
1170
+
1171
+ header_params : dict [str , Any ] = {}
1172
+ if "x_ansys_vc_mode" in params and x_ansys_vc_mode is not None :
1173
+ header_params ["X-Ansys-VC-Mode" ] = params ["x_ansys_vc_mode" ]
1174
+
1175
+ form_params : list [Any ] = []
1176
+ local_var_files : dict [str , Any ] = {}
1177
+
1178
+ body_params = None
1179
+ if "body" in params and body is not None :
1180
+ body_params = params ["body" ]
1181
+ # HTTP header 'Accept'
1182
+ header_params ["Accept" ] = self .api_client .select_header_accept (["application/json" ])
1183
+
1184
+ # HTTP header 'Content-Type'
1185
+ header_params ["Content-Type" ] = self .api_client .select_header_content_type (
1186
+ ["application/json-patch+json" , "application/json" , "text/json" , "application/*+json" ]
1187
+ )
1188
+
1189
+ response_type_map : dict [int , Optional [str ]] = {
1190
+ 200 : "GsaQueryAttributesInfo" ,
1191
+ 400 : None ,
1192
+ 403 : None ,
1193
+ 404 : None ,
1194
+ }
1195
+
1196
+ return self .api_client .call_api (
1197
+ "/v1alpha/databases/{database-key}/tables/{table-guid}/meta-attributes:query" ,
1198
+ "POST" ,
1199
+ path_params ,
1200
+ query_params ,
1201
+ header_params ,
1202
+ body = body_params ,
1203
+ post_params = form_params ,
1204
+ files = local_var_files ,
1205
+ _return_http_data_only = params .get ("_return_http_data_only" ),
1206
+ _preload_content = params .get ("_preload_content" , True ),
1207
+ _request_timeout = params .get ("_request_timeout" ),
1208
+ collection_formats = collection_formats ,
1209
+ response_type_map = response_type_map ,
1210
+ )
1211
+
1212
+ def query_meta_attributes_for_attribute (
1213
+ self ,
1214
+ * ,
1215
+ database_key : "str" ,
1216
+ table_guid : "str" ,
1217
+ attribute_guid : "str" ,
1218
+ body : "Optional[GsaQueryAttributesRequest]" = None ,
1219
+ x_ansys_vc_mode : "Optional[str]" = None ,
1220
+ mode : "Optional[str]" = None ,
1221
+ ) -> "Union[GsaQueryAttributesInfo, None]" :
1222
+ """Get meta-attributes for attribute, populate the requested properties. Optionally filter the returned meta-attributes.
1223
+
1224
+ This method makes a synchronous HTTP request.
1225
+
1226
+ Parameters
1227
+ ----------
1228
+ database_key: str
1229
+ table_guid: str
1230
+ attribute_guid: str
1231
+ body: GsaQueryAttributesRequest
1232
+ x_ansys_vc_mode: str
1233
+ The version control mode. If not provided, defaults to write mode if the user is allowed to see that. Can also be set in the query string.
1234
+ mode: str
1235
+ The version control mode. If not provided, defaults to write mode if the user is allowed to see that. Can also be set in the header.
1236
+
1237
+ Returns
1238
+ -------
1239
+ Union[GsaQueryAttributesInfo, None]
1240
+ """
1241
+ data = self ._query_meta_attributes_for_attribute_with_http_info (
1242
+ database_key ,
1243
+ table_guid ,
1244
+ attribute_guid ,
1245
+ body ,
1246
+ x_ansys_vc_mode ,
1247
+ mode ,
1248
+ _return_http_data_only = True ,
1249
+ )
1250
+ return data # type: ignore[no-any-return]
1251
+
1252
+ def _query_meta_attributes_for_attribute_with_http_info (
1253
+ self ,
1254
+ database_key : "str" ,
1255
+ table_guid : "str" ,
1256
+ attribute_guid : "str" ,
1257
+ body : "Optional[GsaQueryAttributesRequest]" = None ,
1258
+ x_ansys_vc_mode : "Optional[str]" = None ,
1259
+ mode : "Optional[str]" = None ,
1260
+ ** kwargs : Any ,
1261
+ ) -> Any :
1262
+ all_params = [
1263
+ "database_key" ,
1264
+ "table_guid" ,
1265
+ "attribute_guid" ,
1266
+ "body" ,
1267
+ "x_ansys_vc_mode" ,
1268
+ "mode" ,
1269
+ "_return_http_data_only" ,
1270
+ "_preload_content" ,
1271
+ "_request_timeout" ,
1272
+ ]
1273
+
1274
+ params = locals ()
1275
+ for key , val in params ["kwargs" ].items ():
1276
+ if key not in all_params :
1277
+ raise TypeError (
1278
+ f"Got an unexpected keyword argument '{ key } ' to method query_meta_attributes_for_attribute"
1279
+ )
1280
+ params [key ] = val
1281
+ del params ["kwargs" ]
1282
+ # verify the required parameter "database_key" is set
1283
+ if "database_key" not in params or params ["database_key" ] is None :
1284
+ raise ValueError (
1285
+ "Missing the required parameter 'database_key' when calling 'query_meta_attributes_for_attribute'"
1286
+ )
1287
+ # verify the required parameter "table_guid" is set
1288
+ if "table_guid" not in params or params ["table_guid" ] is None :
1289
+ raise ValueError (
1290
+ "Missing the required parameter 'table_guid' when calling 'query_meta_attributes_for_attribute'"
1291
+ )
1292
+ # verify the required parameter "attribute_guid" is set
1293
+ if "attribute_guid" not in params or params ["attribute_guid" ] is None :
1294
+ raise ValueError (
1295
+ "Missing the required parameter 'attribute_guid' when calling 'query_meta_attributes_for_attribute'"
1296
+ )
1297
+
1298
+ collection_formats : dict [str , Any ] = {}
1299
+
1300
+ path_params : dict [str , Any ] = {}
1301
+ if "database_key" in params and database_key is not None :
1302
+ path_params ["database-key" ] = params ["database_key" ]
1303
+ if "table_guid" in params and table_guid is not None :
1304
+ path_params ["table-guid" ] = params ["table_guid" ]
1305
+ if "attribute_guid" in params and attribute_guid is not None :
1306
+ path_params ["attribute-guid" ] = params ["attribute_guid" ]
1307
+
1308
+ query_params : list [Any ] = []
1309
+ if "mode" in params and mode is not None :
1310
+ query_params .append (("mode" , params ["mode" ]))
1311
+
1312
+ header_params : dict [str , Any ] = {}
1313
+ if "x_ansys_vc_mode" in params and x_ansys_vc_mode is not None :
1314
+ header_params ["X-Ansys-VC-Mode" ] = params ["x_ansys_vc_mode" ]
1315
+
1316
+ form_params : list [Any ] = []
1317
+ local_var_files : dict [str , Any ] = {}
1318
+
1319
+ body_params = None
1320
+ if "body" in params and body is not None :
1321
+ body_params = params ["body" ]
1322
+ # HTTP header 'Accept'
1323
+ header_params ["Accept" ] = self .api_client .select_header_accept (["application/json" ])
1324
+
1325
+ # HTTP header 'Content-Type'
1326
+ header_params ["Content-Type" ] = self .api_client .select_header_content_type (
1327
+ ["application/json-patch+json" , "application/json" , "text/json" , "application/*+json" ]
1328
+ )
1329
+
1330
+ response_type_map : dict [int , Optional [str ]] = {
1331
+ 200 : "GsaQueryAttributesInfo" ,
1332
+ 400 : None ,
1333
+ 403 : None ,
1334
+ 404 : None ,
1335
+ }
1336
+
1337
+ return self .api_client .call_api (
1338
+ "/v1alpha/databases/{database-key}/tables/{table-guid}/attributes/{attribute-guid}/meta-attributes:query" ,
1339
+ "POST" ,
1340
+ path_params ,
1341
+ query_params ,
1342
+ header_params ,
1343
+ body = body_params ,
1344
+ post_params = form_params ,
1345
+ files = local_var_files ,
1346
+ _return_http_data_only = params .get ("_return_http_data_only" ),
1347
+ _preload_content = params .get ("_preload_content" , True ),
1348
+ _request_timeout = params .get ("_request_timeout" ),
1349
+ collection_formats = collection_formats ,
1350
+ response_type_map = response_type_map ,
1351
+ )
1352
+
1088
1353
def update_attribute (
1089
1354
self ,
1090
1355
* ,
0 commit comments