Skip to content

Commit

Permalink
Update Swagger.json (12175824353) (#271)
Browse files Browse the repository at this point in the history
Co-authored-by: pyansys-ci-bot <[email protected]>
  • Loading branch information
pyansys-ci-bot and pyansys-ci-bot authored Dec 5, 2024
1 parent e63d5f8 commit a56f236
Show file tree
Hide file tree
Showing 9 changed files with 2,715 additions and 508 deletions.
2 changes: 1 addition & 1 deletion ansys-grantami-serverapi-openapi/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "ansys-grantami-serverapi-openapi"
description = "Autogenerated client library for the Granta MI Server API."
version = "4.0.0.dev342"
version = "4.0.0.dev344"
license = "MIT"
authors = ["ANSYS, Inc. <[email protected]>"]
maintainers = ["ANSYS, Inc. <[email protected]>"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,8 @@
from .models.gsa_query_slim_discrete_type_properties import GsaQuerySlimDiscreteTypeProperties
from .models.gsa_query_slim_named_entity import GsaQuerySlimNamedEntity
from .models.gsa_query_slim_named_entity_properties import GsaQuerySlimNamedEntityProperties
from .models.gsa_query_slim_typed_attribute import GsaQuerySlimTypedAttribute
from .models.gsa_query_slim_typed_attribute_properties import GsaQuerySlimTypedAttributeProperties
from .models.gsa_query_tabular_attribute_target import GsaQueryTabularAttributeTarget
from .models.gsa_query_tabular_attribute_target_properties import (
GsaQueryTabularAttributeTargetProperties,
Expand Down Expand Up @@ -1621,6 +1623,8 @@
"GsaQuerySlimDiscreteTypeProperties",
"GsaQuerySlimNamedEntity",
"GsaQuerySlimNamedEntityProperties",
"GsaQuerySlimTypedAttribute",
"GsaQuerySlimTypedAttributeProperties",
"GsaQueryTabularAttributeTarget",
"GsaQueryTabularAttributeTargetProperties",
"GsaQueryUnit",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1085,6 +1085,271 @@ def _query_attributes_with_http_info(
response_type_map=response_type_map,
)

def query_meta_attributes(
self,
*,
database_key: "str",
table_guid: "str",
body: "Optional[GsaQueryAttributesRequest]" = None,
x_ansys_vc_mode: "Optional[str]" = None,
mode: "Optional[str]" = None,
) -> "Union[GsaQueryAttributesInfo, None]":
"""Get meta-attributes in table, populate the requested properties. Optionally filter the returned meta-attributes.
This method makes a synchronous HTTP request.
Parameters
----------
database_key: str
table_guid: str
body: GsaQueryAttributesRequest
x_ansys_vc_mode: str
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.
mode: str
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.
Returns
-------
Union[GsaQueryAttributesInfo, None]
"""
data = self._query_meta_attributes_with_http_info(
database_key, table_guid, body, x_ansys_vc_mode, mode, _return_http_data_only=True
)
return data # type: ignore[no-any-return]

def _query_meta_attributes_with_http_info(
self,
database_key: "str",
table_guid: "str",
body: "Optional[GsaQueryAttributesRequest]" = None,
x_ansys_vc_mode: "Optional[str]" = None,
mode: "Optional[str]" = None,
**kwargs: Any,
) -> Any:
all_params = [
"database_key",
"table_guid",
"body",
"x_ansys_vc_mode",
"mode",
"_return_http_data_only",
"_preload_content",
"_request_timeout",
]

params = locals()
for key, val in params["kwargs"].items():
if key not in all_params:
raise TypeError(
f"Got an unexpected keyword argument '{key}' to method query_meta_attributes"
)
params[key] = val
del params["kwargs"]
# verify the required parameter "database_key" is set
if "database_key" not in params or params["database_key"] is None:
raise ValueError(
"Missing the required parameter 'database_key' when calling 'query_meta_attributes'"
)
# verify the required parameter "table_guid" is set
if "table_guid" not in params or params["table_guid"] is None:
raise ValueError(
"Missing the required parameter 'table_guid' when calling 'query_meta_attributes'"
)

collection_formats: dict[str, Any] = {}

path_params: dict[str, Any] = {}
if "database_key" in params and database_key is not None:
path_params["database-key"] = params["database_key"]
if "table_guid" in params and table_guid is not None:
path_params["table-guid"] = params["table_guid"]

query_params: list[Any] = []
if "mode" in params and mode is not None:
query_params.append(("mode", params["mode"]))

header_params: dict[str, Any] = {}
if "x_ansys_vc_mode" in params and x_ansys_vc_mode is not None:
header_params["X-Ansys-VC-Mode"] = params["x_ansys_vc_mode"]

form_params: list[Any] = []
local_var_files: dict[str, Any] = {}

body_params = None
if "body" in params and body is not None:
body_params = params["body"]
# HTTP header 'Accept'
header_params["Accept"] = self.api_client.select_header_accept(["application/json"])

# HTTP header 'Content-Type'
header_params["Content-Type"] = self.api_client.select_header_content_type(
["application/json-patch+json", "application/json", "text/json", "application/*+json"]
)

response_type_map: dict[int, Optional[str]] = {
200: "GsaQueryAttributesInfo",
400: None,
403: None,
404: None,
}

return self.api_client.call_api(
"/v1alpha/databases/{database-key}/tables/{table-guid}/meta-attributes:query",
"POST",
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
_return_http_data_only=params.get("_return_http_data_only"),
_preload_content=params.get("_preload_content", True),
_request_timeout=params.get("_request_timeout"),
collection_formats=collection_formats,
response_type_map=response_type_map,
)

def query_meta_attributes_for_attribute(
self,
*,
database_key: "str",
table_guid: "str",
attribute_guid: "str",
body: "Optional[GsaQueryAttributesRequest]" = None,
x_ansys_vc_mode: "Optional[str]" = None,
mode: "Optional[str]" = None,
) -> "Union[GsaQueryAttributesInfo, None]":
"""Get meta-attributes for attribute, populate the requested properties. Optionally filter the returned meta-attributes.
This method makes a synchronous HTTP request.
Parameters
----------
database_key: str
table_guid: str
attribute_guid: str
body: GsaQueryAttributesRequest
x_ansys_vc_mode: str
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.
mode: str
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.
Returns
-------
Union[GsaQueryAttributesInfo, None]
"""
data = self._query_meta_attributes_for_attribute_with_http_info(
database_key,
table_guid,
attribute_guid,
body,
x_ansys_vc_mode,
mode,
_return_http_data_only=True,
)
return data # type: ignore[no-any-return]

def _query_meta_attributes_for_attribute_with_http_info(
self,
database_key: "str",
table_guid: "str",
attribute_guid: "str",
body: "Optional[GsaQueryAttributesRequest]" = None,
x_ansys_vc_mode: "Optional[str]" = None,
mode: "Optional[str]" = None,
**kwargs: Any,
) -> Any:
all_params = [
"database_key",
"table_guid",
"attribute_guid",
"body",
"x_ansys_vc_mode",
"mode",
"_return_http_data_only",
"_preload_content",
"_request_timeout",
]

params = locals()
for key, val in params["kwargs"].items():
if key not in all_params:
raise TypeError(
f"Got an unexpected keyword argument '{key}' to method query_meta_attributes_for_attribute"
)
params[key] = val
del params["kwargs"]
# verify the required parameter "database_key" is set
if "database_key" not in params or params["database_key"] is None:
raise ValueError(
"Missing the required parameter 'database_key' when calling 'query_meta_attributes_for_attribute'"
)
# verify the required parameter "table_guid" is set
if "table_guid" not in params or params["table_guid"] is None:
raise ValueError(
"Missing the required parameter 'table_guid' when calling 'query_meta_attributes_for_attribute'"
)
# verify the required parameter "attribute_guid" is set
if "attribute_guid" not in params or params["attribute_guid"] is None:
raise ValueError(
"Missing the required parameter 'attribute_guid' when calling 'query_meta_attributes_for_attribute'"
)

collection_formats: dict[str, Any] = {}

path_params: dict[str, Any] = {}
if "database_key" in params and database_key is not None:
path_params["database-key"] = params["database_key"]
if "table_guid" in params and table_guid is not None:
path_params["table-guid"] = params["table_guid"]
if "attribute_guid" in params and attribute_guid is not None:
path_params["attribute-guid"] = params["attribute_guid"]

query_params: list[Any] = []
if "mode" in params and mode is not None:
query_params.append(("mode", params["mode"]))

header_params: dict[str, Any] = {}
if "x_ansys_vc_mode" in params and x_ansys_vc_mode is not None:
header_params["X-Ansys-VC-Mode"] = params["x_ansys_vc_mode"]

form_params: list[Any] = []
local_var_files: dict[str, Any] = {}

body_params = None
if "body" in params and body is not None:
body_params = params["body"]
# HTTP header 'Accept'
header_params["Accept"] = self.api_client.select_header_accept(["application/json"])

# HTTP header 'Content-Type'
header_params["Content-Type"] = self.api_client.select_header_content_type(
["application/json-patch+json", "application/json", "text/json", "application/*+json"]
)

response_type_map: dict[int, Optional[str]] = {
200: "GsaQueryAttributesInfo",
400: None,
403: None,
404: None,
}

return self.api_client.call_api(
"/v1alpha/databases/{database-key}/tables/{table-guid}/attributes/{attribute-guid}/meta-attributes:query",
"POST",
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
_return_http_data_only=params.get("_return_http_data_only"),
_preload_content=params.get("_preload_content", True),
_request_timeout=params.get("_request_timeout"),
collection_formats=collection_formats,
response_type_map=response_type_map,
)

def update_attribute(
self,
*,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,8 @@
from .gsa_query_slim_discrete_type_properties import GsaQuerySlimDiscreteTypeProperties
from .gsa_query_slim_named_entity import GsaQuerySlimNamedEntity
from .gsa_query_slim_named_entity_properties import GsaQuerySlimNamedEntityProperties
from .gsa_query_slim_typed_attribute import GsaQuerySlimTypedAttribute
from .gsa_query_slim_typed_attribute_properties import GsaQuerySlimTypedAttributeProperties
from .gsa_query_tabular_attribute_target import GsaQueryTabularAttributeTarget
from .gsa_query_tabular_attribute_target_properties import GsaQueryTabularAttributeTargetProperties
from .gsa_query_unit import GsaQueryUnit
Expand Down Expand Up @@ -1498,6 +1500,8 @@
"GsaQuerySlimDiscreteTypeProperties",
"GsaQuerySlimNamedEntity",
"GsaQuerySlimNamedEntityProperties",
"GsaQuerySlimTypedAttribute",
"GsaQuerySlimTypedAttributeProperties",
"GsaQueryTabularAttributeTarget",
"GsaQueryTabularAttributeTargetProperties",
"GsaQueryUnit",
Expand Down
Loading

0 comments on commit a56f236

Please sign in to comment.