Skip to content

Commit

Permalink
Update Swagger.json (12324701776) (#280)
Browse files Browse the repository at this point in the history
Co-authored-by: pyansys-ci-bot <pyansys-ci-bot@users.noreply.github.com>
  • Loading branch information
pyansys-ci-bot and pyansys-ci-bot authored Dec 15, 2024
1 parent 6c04fbf commit 5b6695b
Show file tree
Hide file tree
Showing 19 changed files with 989 additions and 683 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.dev358"
version = "4.0.0.dev362"
license = "MIT"
authors = ["ANSYS, Inc. <pyansys.core@ansys.com>"]
maintainers = ["ANSYS, Inc. <pyansys.core@ansys.com>"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,127 @@ def _create_attribute_with_http_info(
response_type_map=response_type_map,
)

def create_meta_attribute(
self,
*,
database_key: "str",
table_guid: "str",
attribute_guid: "str",
body: "Optional[GsaCreateAttribute]" = None,
) -> "Union[GsaAttribute, None]":
"""Create a new meta-attribute for attribute.
This method makes a synchronous HTTP request.
Parameters
----------
database_key: str
table_guid: str
attribute_guid: str
body: GsaCreateAttribute
Returns
-------
Union[GsaAttribute, None]
"""
data = self._create_meta_attribute_with_http_info(
database_key, table_guid, attribute_guid, body, _return_http_data_only=True
)
return data # type: ignore[no-any-return]

def _create_meta_attribute_with_http_info(
self,
database_key: "str",
table_guid: "str",
attribute_guid: "str",
body: "Optional[GsaCreateAttribute]" = None,
**kwargs: Any,
) -> Any:
all_params = [
"database_key",
"table_guid",
"attribute_guid",
"body",
"_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 create_meta_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 'create_meta_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 'create_meta_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 'create_meta_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] = []

header_params: dict[str, Any] = {}

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]] = {
201: "GsaAttribute",
400: None,
403: None,
404: None,
}

return self.api_client.call_api(
"/v1alpha/databases/{database-key}/tables/{table-guid}/attributes/{attribute-guid}/meta-attributes",
"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 delete_attribute(
self, *, database_key: "str", table_guid: "str", attribute_guid: "str"
) -> "Union[GsaAttributeDeletionException, None]":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ class GsaCreateAttribute(ModelBase):
swagger_types: dict[str, str] = {
"name": "str",
"type": "GsaAttributeType",
"about_attribute": "GsaSlimEntity",
"default_threshold_type": "GsaAttributeThresholdType",
"guid": "str",
"help_path": "str",
Expand All @@ -75,7 +74,6 @@ class GsaCreateAttribute(ModelBase):
attribute_map: dict[str, str] = {
"name": "name",
"type": "type",
"about_attribute": "aboutAttribute",
"default_threshold_type": "defaultThresholdType",
"guid": "guid",
"help_path": "helpPath",
Expand All @@ -85,7 +83,6 @@ class GsaCreateAttribute(ModelBase):
subtype_mapping: dict[str, str] = {
"type": "GsaAttributeType",
"defaultThresholdType": "GsaAttributeThresholdType",
"aboutAttribute": "GsaSlimEntity",
}

discriminator_value_class_map = {
Expand Down Expand Up @@ -113,7 +110,6 @@ def __init__(
*,
name: "str",
type: "GsaAttributeType",
about_attribute: "Union[GsaSlimEntity, Unset_Type]" = Unset,
default_threshold_type: "Union[GsaAttributeThresholdType, Unset_Type]" = Unset,
guid: "Union[str, Unset_Type]" = Unset,
help_path: "Union[str, None, Unset_Type]" = Unset,
Expand All @@ -125,7 +121,6 @@ def __init__(
----------
name: str
type: GsaAttributeType
about_attribute: GsaSlimEntity, optional
default_threshold_type: GsaAttributeThresholdType, optional
guid: str, optional
help_path: str, optional
Expand All @@ -134,7 +129,6 @@ def __init__(
self._type: GsaAttributeType
self._default_threshold_type: Union[GsaAttributeThresholdType, Unset_Type] = Unset
self._help_path: Union[str, None, Unset_Type] = Unset
self._about_attribute: Union[GsaSlimEntity, Unset_Type] = Unset
self._is_hidden_from_search_criteria: Union[bool, None, Unset_Type] = Unset
self._name: str
self._guid: Union[str, Unset_Type] = Unset
Expand All @@ -144,8 +138,6 @@ def __init__(
self.default_threshold_type = default_threshold_type
if help_path is not Unset:
self.help_path = help_path
if about_attribute is not Unset:
self.about_attribute = about_attribute
if is_hidden_from_search_criteria is not Unset:
self.is_hidden_from_search_criteria = is_hidden_from_search_criteria
self.name = name
Expand Down Expand Up @@ -229,31 +221,6 @@ def help_path(self, help_path: "Union[str, None, Unset_Type]") -> None:
"""
self._help_path = help_path

@property
def about_attribute(self) -> "Union[GsaSlimEntity, Unset_Type]":
"""Gets the about_attribute of this GsaCreateAttribute.
Returns
-------
Union[GsaSlimEntity, Unset_Type]
The about_attribute of this GsaCreateAttribute.
"""
return self._about_attribute

@about_attribute.setter
def about_attribute(self, about_attribute: "Union[GsaSlimEntity, Unset_Type]") -> None:
"""Sets the about_attribute of this GsaCreateAttribute.
Parameters
----------
about_attribute: Union[GsaSlimEntity, Unset_Type]
The about_attribute of this GsaCreateAttribute.
"""
# Field is not nullable
if about_attribute is None:
raise ValueError("Invalid value for 'about_attribute', must not be 'None'")
self._about_attribute = about_attribute

@property
def is_hidden_from_search_criteria(self) -> "Union[bool, None, Unset_Type]":
"""Gets the is_hidden_from_search_criteria of this GsaCreateAttribute.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ class GsaCreateDateTimeAttribute(GsaCreateAttribute):
swagger_types: dict[str, str] = {
"name": "str",
"type": "GsaAttributeType",
"about_attribute": "GsaSlimEntity",
"default_threshold_type": "GsaAttributeThresholdType",
"guid": "str",
"help_path": "str",
Expand All @@ -78,7 +77,6 @@ class GsaCreateDateTimeAttribute(GsaCreateAttribute):
attribute_map: dict[str, str] = {
"name": "name",
"type": "type",
"about_attribute": "aboutAttribute",
"default_threshold_type": "defaultThresholdType",
"guid": "guid",
"help_path": "helpPath",
Expand All @@ -94,7 +92,6 @@ def __init__(
*,
name: "str",
type: "GsaAttributeType" = GsaAttributeType.DATETIME,
about_attribute: "Union[GsaSlimEntity, Unset_Type]" = Unset,
default_threshold_type: "Union[GsaAttributeThresholdType, Unset_Type]" = Unset,
guid: "Union[str, Unset_Type]" = Unset,
help_path: "Union[str, None, Unset_Type]" = Unset,
Expand All @@ -106,7 +103,6 @@ def __init__(
----------
name: str
type: GsaAttributeType
about_attribute: GsaSlimEntity, optional
default_threshold_type: GsaAttributeThresholdType, optional
guid: str, optional
help_path: str, optional
Expand All @@ -115,7 +111,6 @@ def __init__(
super().__init__(
name=name,
type=type,
about_attribute=about_attribute,
default_threshold_type=default_threshold_type,
guid=guid,
help_path=help_path,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ class GsaCreateDiscreteAttribute(GsaCreateAttribute):
"discrete_type": "GsaSlimEntity",
"name": "str",
"type": "GsaAttributeType",
"about_attribute": "GsaSlimEntity",
"default_threshold_type": "GsaAttributeThresholdType",
"guid": "str",
"help_path": "str",
Expand All @@ -81,7 +80,6 @@ class GsaCreateDiscreteAttribute(GsaCreateAttribute):
"discrete_type": "discreteType",
"name": "name",
"type": "type",
"about_attribute": "aboutAttribute",
"default_threshold_type": "defaultThresholdType",
"guid": "guid",
"help_path": "helpPath",
Expand All @@ -101,7 +99,6 @@ def __init__(
discrete_type: "GsaSlimEntity",
name: "str",
type: "GsaAttributeType" = GsaAttributeType.DISCRETE,
about_attribute: "Union[GsaSlimEntity, Unset_Type]" = Unset,
default_threshold_type: "Union[GsaAttributeThresholdType, Unset_Type]" = Unset,
guid: "Union[str, Unset_Type]" = Unset,
help_path: "Union[str, None, Unset_Type]" = Unset,
Expand All @@ -115,7 +112,6 @@ def __init__(
discrete_type: GsaSlimEntity
name: str
type: GsaAttributeType
about_attribute: GsaSlimEntity, optional
default_threshold_type: GsaAttributeThresholdType, optional
guid: str, optional
help_path: str, optional
Expand All @@ -125,7 +121,6 @@ def __init__(
super().__init__(
name=name,
type=type,
about_attribute=about_attribute,
default_threshold_type=default_threshold_type,
guid=guid,
help_path=help_path,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ class GsaCreateDiscreteFunctionalAttribute(GsaCreateAttribute):
"discrete_type": "GsaSlimEntity",
"name": "str",
"type": "GsaAttributeType",
"about_attribute": "GsaSlimEntity",
"default_threshold_type": "GsaAttributeThresholdType",
"guid": "str",
"help_path": "str",
Expand All @@ -82,7 +81,6 @@ class GsaCreateDiscreteFunctionalAttribute(GsaCreateAttribute):
"discrete_type": "discreteType",
"name": "name",
"type": "type",
"about_attribute": "aboutAttribute",
"default_threshold_type": "defaultThresholdType",
"guid": "guid",
"help_path": "helpPath",
Expand All @@ -103,7 +101,6 @@ def __init__(
discrete_type: "GsaSlimEntity",
name: "str",
type: "GsaAttributeType" = GsaAttributeType.DISCRETEFUNCTIONAL,
about_attribute: "Union[GsaSlimEntity, Unset_Type]" = Unset,
default_threshold_type: "Union[GsaAttributeThresholdType, Unset_Type]" = Unset,
guid: "Union[str, Unset_Type]" = Unset,
help_path: "Union[str, None, Unset_Type]" = Unset,
Expand All @@ -117,7 +114,6 @@ def __init__(
discrete_type: GsaSlimEntity
name: str
type: GsaAttributeType
about_attribute: GsaSlimEntity, optional
default_threshold_type: GsaAttributeThresholdType, optional
guid: str, optional
help_path: str, optional
Expand All @@ -126,7 +122,6 @@ def __init__(
super().__init__(
name=name,
type=type,
about_attribute=about_attribute,
default_threshold_type=default_threshold_type,
guid=guid,
help_path=help_path,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ class GsaCreateFileAttribute(GsaCreateAttribute):
swagger_types: dict[str, str] = {
"name": "str",
"type": "GsaAttributeType",
"about_attribute": "GsaSlimEntity",
"default_threshold_type": "GsaAttributeThresholdType",
"guid": "str",
"help_path": "str",
Expand All @@ -78,7 +77,6 @@ class GsaCreateFileAttribute(GsaCreateAttribute):
attribute_map: dict[str, str] = {
"name": "name",
"type": "type",
"about_attribute": "aboutAttribute",
"default_threshold_type": "defaultThresholdType",
"guid": "guid",
"help_path": "helpPath",
Expand All @@ -94,7 +92,6 @@ def __init__(
*,
name: "str",
type: "GsaAttributeType" = GsaAttributeType.FILE,
about_attribute: "Union[GsaSlimEntity, Unset_Type]" = Unset,
default_threshold_type: "Union[GsaAttributeThresholdType, Unset_Type]" = Unset,
guid: "Union[str, Unset_Type]" = Unset,
help_path: "Union[str, None, Unset_Type]" = Unset,
Expand All @@ -106,7 +103,6 @@ def __init__(
----------
name: str
type: GsaAttributeType
about_attribute: GsaSlimEntity, optional
default_threshold_type: GsaAttributeThresholdType, optional
guid: str, optional
help_path: str, optional
Expand All @@ -115,7 +111,6 @@ def __init__(
super().__init__(
name=name,
type=type,
about_attribute=about_attribute,
default_threshold_type=default_threshold_type,
guid=guid,
help_path=help_path,
Expand Down
Loading

0 comments on commit 5b6695b

Please sign in to comment.