Skip to content

Commit

Permalink
Bump template to 3.0.4 (#230)
Browse files Browse the repository at this point in the history
Co-authored-by: ludovicsteinbach <[email protected]>
  • Loading branch information
ludovicsteinbach and ludovicsteinbach authored Sep 2, 2024
1 parent da1cc50 commit 2f4ca60
Show file tree
Hide file tree
Showing 417 changed files with 1,529 additions and 497 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.dev284"
version = "4.0.0.dev285"
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 @@ -133,11 +133,18 @@ def get_real_child_model(cls, data: Dict[str, str]) -> str:
data: ModelBase
Object representing a subclass of this class
"""
discriminator_value = str(data[cls.discriminator]).lower() # type: ignore[index]
discriminator_value = str(data[cls._get_discriminator_field_name()]).lower()
# The actual class name is not available in swagger-codegen,
# so we have to extract it from the JSON reference
return cls.discriminator_value_class_map[discriminator_value].rsplit("/", 1)[-1]

@classmethod
def _get_discriminator_field_name(cls) -> str:
assert cls.discriminator
name_tokens = cls.discriminator.split("_")
later_tokens = [element.capitalize() for element in name_tokens[1:]]
return "".join([name_tokens[0], *later_tokens])

def __repr__(self) -> str:
"""For 'print' and 'pprint'"""
return self.to_str()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,18 @@ def get_real_child_model(cls, data: Dict[str, str]) -> str:
data: ModelBase
Object representing a subclass of this class
"""
discriminator_value = str(data[cls.discriminator]).lower() # type: ignore[index]
discriminator_value = str(data[cls._get_discriminator_field_name()]).lower()
# The actual class name is not available in swagger-codegen,
# so we have to extract it from the JSON reference
return cls.discriminator_value_class_map[discriminator_value].rsplit("/", 1)[-1]

@classmethod
def _get_discriminator_field_name(cls) -> str:
assert cls.discriminator
name_tokens = cls.discriminator.split("_")
later_tokens = [element.capitalize() for element in name_tokens[1:]]
return "".join([name_tokens[0], *later_tokens])

def __repr__(self) -> str:
"""For 'print' and 'pprint'"""
return self.to_str()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,18 @@ def get_real_child_model(cls, data: Dict[str, str]) -> str:
data: ModelBase
Object representing a subclass of this class
"""
discriminator_value = str(data[cls.discriminator]).lower() # type: ignore[index]
discriminator_value = str(data[cls._get_discriminator_field_name()]).lower()
# The actual class name is not available in swagger-codegen,
# so we have to extract it from the JSON reference
return cls.discriminator_value_class_map[discriminator_value].rsplit("/", 1)[-1]

@classmethod
def _get_discriminator_field_name(cls) -> str:
assert cls.discriminator
name_tokens = cls.discriminator.split("_")
later_tokens = [element.capitalize() for element in name_tokens[1:]]
return "".join([name_tokens[0], *later_tokens])

def __repr__(self) -> str:
"""For 'print' and 'pprint'"""
return self.to_str()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,18 @@ def get_real_child_model(cls, data: Dict[str, str]) -> str:
data: ModelBase
Object representing a subclass of this class
"""
discriminator_value = str(data[cls.discriminator]).lower() # type: ignore[index]
discriminator_value = str(data[cls._get_discriminator_field_name()]).lower()
# The actual class name is not available in swagger-codegen,
# so we have to extract it from the JSON reference
return cls.discriminator_value_class_map[discriminator_value].rsplit("/", 1)[-1]

@classmethod
def _get_discriminator_field_name(cls) -> str:
assert cls.discriminator
name_tokens = cls.discriminator.split("_")
later_tokens = [element.capitalize() for element in name_tokens[1:]]
return "".join([name_tokens[0], *later_tokens])

def __repr__(self) -> str:
"""For 'print' and 'pprint'"""
return self.to_str()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
from ansys.grantami.serverapi_openapi.models.gsa_value_specifier import ( # noqa: F401
GsaValueSpecifier,
)
from ansys.grantami.serverapi_openapi.models.gsa_value_specifier_type import GsaValueSpecifierType

from . import ModelBase, Unset, Unset_Type

Expand Down Expand Up @@ -79,7 +80,7 @@ class GsaAllValuesSpecifier(GsaValueSpecifier):
def __init__(
self,
*,
filter_on: "GsaValueSpecifierType",
filter_on: "GsaValueSpecifierType" = GsaValueSpecifierType.ALL,
) -> None:
"""GsaAllValuesSpecifier - a model defined in Swagger
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def __init__(
self,
*,
datum_type: "GsaDatumType",
not_applicable: "str",
not_applicable: "str" = "applicable",
) -> None:
"""GsaApplicableDatum - a model defined in Swagger
Expand Down Expand Up @@ -151,11 +151,18 @@ def get_real_child_model(cls, data: Dict[str, str]) -> str:
data: ModelBase
Object representing a subclass of this class
"""
discriminator_value = str(data[cls.discriminator]).lower() # type: ignore[index]
discriminator_value = str(data[cls._get_discriminator_field_name()]).lower()
# The actual class name is not available in swagger-codegen,
# so we have to extract it from the JSON reference
return cls.discriminator_value_class_map[discriminator_value].rsplit("/", 1)[-1]

@classmethod
def _get_discriminator_field_name(cls) -> str:
assert cls.discriminator
name_tokens = cls.discriminator.split("_")
later_tokens = [element.capitalize() for element in name_tokens[1:]]
return "".join([name_tokens[0], *later_tokens])

def __repr__(self) -> str:
"""For 'print' and 'pprint'"""
return self.to_str()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -484,11 +484,18 @@ def get_real_child_model(cls, data: Dict[str, str]) -> str:
data: ModelBase
Object representing a subclass of this class
"""
discriminator_value = str(data[cls.discriminator]).lower() # type: ignore[index]
discriminator_value = str(data[cls._get_discriminator_field_name()]).lower()
# The actual class name is not available in swagger-codegen,
# so we have to extract it from the JSON reference
return cls.discriminator_value_class_map[discriminator_value].rsplit("/", 1)[-1]

@classmethod
def _get_discriminator_field_name(cls) -> str:
assert cls.discriminator
name_tokens = cls.discriminator.split("_")
later_tokens = [element.capitalize() for element in name_tokens[1:]]
return "".join([name_tokens[0], *later_tokens])

def __repr__(self) -> str:
"""For 'print' and 'pprint'"""
return self.to_str()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, Union # noqa: F401

from ansys.grantami.serverapi_openapi.models.gsa_aggregation import GsaAggregation # noqa: F401
from ansys.grantami.serverapi_openapi.models.gsa_aggregation_type import GsaAggregationType

from . import ModelBase, Unset, Unset_Type

Expand Down Expand Up @@ -95,7 +96,7 @@ def __init__(
self,
*,
attribute_aggregation_type: "GsaAttributeAggregationType",
type: "GsaAggregationType",
type: "GsaAggregationType" = GsaAggregationType.ATTRIBUTE,
attribute_guid: "Union[str, None, Unset_Type]" = Unset,
attribute_identity: "Union[int, None, Unset_Type]" = Unset,
count: "Union[int, Unset_Type]" = Unset,
Expand Down Expand Up @@ -238,11 +239,18 @@ def get_real_child_model(cls, data: Dict[str, str]) -> str:
data: ModelBase
Object representing a subclass of this class
"""
discriminator_value = str(data[cls.discriminator]).lower() # type: ignore[index]
discriminator_value = str(data[cls._get_discriminator_field_name()]).lower()
# The actual class name is not available in swagger-codegen,
# so we have to extract it from the JSON reference
return cls.discriminator_value_class_map[discriminator_value].rsplit("/", 1)[-1]

@classmethod
def _get_discriminator_field_name(cls) -> str:
assert cls.discriminator
name_tokens = cls.discriminator.split("_")
later_tokens = [element.capitalize() for element in name_tokens[1:]]
return "".join([name_tokens[0], *later_tokens])

def __repr__(self) -> str:
"""For 'print' and 'pprint'"""
return self.to_str()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
from ansys.grantami.serverapi_openapi.models.gsa_aggregation_criterion import ( # noqa: F401
GsaAggregationCriterion,
)
from ansys.grantami.serverapi_openapi.models.gsa_aggregation_type import GsaAggregationType

from . import ModelBase, Unset, Unset_Type

Expand Down Expand Up @@ -97,7 +98,7 @@ def __init__(
self,
*,
attribute_aggregation_criterion_type: "GsaAttributeAggregationType",
type: "GsaAggregationType",
type: "GsaAggregationType" = GsaAggregationType.ATTRIBUTE,
guid: "Union[str, None, Unset_Type]" = Unset,
identity: "Union[int, None, Unset_Type]" = Unset,
is_meta_attribute: "Union[bool, Unset_Type]" = Unset,
Expand Down Expand Up @@ -238,11 +239,18 @@ def get_real_child_model(cls, data: Dict[str, str]) -> str:
data: ModelBase
Object representing a subclass of this class
"""
discriminator_value = str(data[cls.discriminator]).lower() # type: ignore[index]
discriminator_value = str(data[cls._get_discriminator_field_name()]).lower()
# The actual class name is not available in swagger-codegen,
# so we have to extract it from the JSON reference
return cls.discriminator_value_class_map[discriminator_value].rsplit("/", 1)[-1]

@classmethod
def _get_discriminator_field_name(cls) -> str:
assert cls.discriminator
name_tokens = cls.discriminator.split("_")
later_tokens = [element.capitalize() for element in name_tokens[1:]]
return "".join([name_tokens[0], *later_tokens])

def __repr__(self) -> str:
"""For 'print' and 'pprint'"""
return self.to_str()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@
import re # noqa: F401
from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, Union # noqa: F401

from ansys.grantami.serverapi_openapi.models.gsa_aggregation_type import GsaAggregationType
from ansys.grantami.serverapi_openapi.models.gsa_attribute_aggregation_criterion import ( # noqa: F401
GsaAttributeAggregationCriterion,
)
from ansys.grantami.serverapi_openapi.models.gsa_attribute_aggregation_type import (
GsaAttributeAggregationType,
)

from . import ModelBase, Unset, Unset_Type

Expand Down Expand Up @@ -91,8 +95,8 @@ class GsaAttributeAggregationExistsCriterion(GsaAttributeAggregationCriterion):
def __init__(
self,
*,
attribute_aggregation_criterion_type: "GsaAttributeAggregationType",
type: "GsaAggregationType",
attribute_aggregation_criterion_type: "GsaAttributeAggregationType" = GsaAttributeAggregationType.EXISTS,
type: "GsaAggregationType" = GsaAggregationType.ATTRIBUTE,
guid: "Union[str, None, Unset_Type]" = Unset,
identity: "Union[int, None, Unset_Type]" = Unset,
inner_criterion: "Union[GsaAggregationDatumExistsCriterion, Unset_Type]" = Unset,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@
import re # noqa: F401
from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, Union # noqa: F401

from ansys.grantami.serverapi_openapi.models.gsa_aggregation_type import GsaAggregationType
from ansys.grantami.serverapi_openapi.models.gsa_attribute_aggregation_criterion import ( # noqa: F401
GsaAttributeAggregationCriterion,
)
from ansys.grantami.serverapi_openapi.models.gsa_attribute_aggregation_type import (
GsaAttributeAggregationType,
)

from . import ModelBase, Unset, Unset_Type

Expand Down Expand Up @@ -91,8 +95,8 @@ class GsaAttributeAggregationValueCriterion(GsaAttributeAggregationCriterion):
def __init__(
self,
*,
attribute_aggregation_criterion_type: "GsaAttributeAggregationType",
type: "GsaAggregationType",
attribute_aggregation_criterion_type: "GsaAttributeAggregationType" = GsaAttributeAggregationType.VALUE,
type: "GsaAggregationType" = GsaAggregationType.ATTRIBUTE,
guid: "Union[str, None, Unset_Type]" = Unset,
identity: "Union[int, None, Unset_Type]" = Unset,
inner_criterion: "Union[GsaAggregationDatumCriterion, Unset_Type]" = Unset,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, Union # noqa: F401

from ansys.grantami.serverapi_openapi.models.gsa_criterion import GsaCriterion # noqa: F401
from ansys.grantami.serverapi_openapi.models.gsa_criterion_type import GsaCriterionType

from . import ModelBase, Unset, Unset_Type

Expand Down Expand Up @@ -96,7 +97,7 @@ def __init__(
self,
*,
attribute_criterion_type: "GsaAttributeCriterionType",
type: "GsaCriterionType",
type: "GsaCriterionType" = GsaCriterionType.ATTRIBUTE,
guid: "Union[str, None, Unset_Type]" = Unset,
identity: "Union[int, None, Unset_Type]" = Unset,
is_meta_attribute: "Union[bool, Unset_Type]" = Unset,
Expand Down Expand Up @@ -233,11 +234,18 @@ def get_real_child_model(cls, data: Dict[str, str]) -> str:
data: ModelBase
Object representing a subclass of this class
"""
discriminator_value = str(data[cls.discriminator]).lower() # type: ignore[index]
discriminator_value = str(data[cls._get_discriminator_field_name()]).lower()
# The actual class name is not available in swagger-codegen,
# so we have to extract it from the JSON reference
return cls.discriminator_value_class_map[discriminator_value].rsplit("/", 1)[-1]

@classmethod
def _get_discriminator_field_name(cls) -> str:
assert cls.discriminator
name_tokens = cls.discriminator.split("_")
later_tokens = [element.capitalize() for element in name_tokens[1:]]
return "".join([name_tokens[0], *later_tokens])

def __repr__(self) -> str:
"""For 'print' and 'pprint'"""
return self.to_str()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@
import re # noqa: F401
from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, Union # noqa: F401

from ansys.grantami.serverapi_openapi.models.gsa_aggregation_type import GsaAggregationType
from ansys.grantami.serverapi_openapi.models.gsa_attribute_aggregation import ( # noqa: F401
GsaAttributeAggregation,
)
from ansys.grantami.serverapi_openapi.models.gsa_attribute_aggregation_type import (
GsaAttributeAggregationType,
)

from . import ModelBase, Unset, Unset_Type

Expand Down Expand Up @@ -87,8 +91,8 @@ class GsaAttributeExistsAggregation(GsaAttributeAggregation):
def __init__(
self,
*,
attribute_aggregation_type: "GsaAttributeAggregationType",
type: "GsaAggregationType",
attribute_aggregation_type: "GsaAttributeAggregationType" = GsaAttributeAggregationType.EXISTS,
type: "GsaAggregationType" = GsaAggregationType.ATTRIBUTE,
attribute_guid: "Union[str, None, Unset_Type]" = Unset,
attribute_identity: "Union[int, None, Unset_Type]" = Unset,
count: "Union[int, Unset_Type]" = Unset,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
from ansys.grantami.serverapi_openapi.models.gsa_attribute_criterion import ( # noqa: F401
GsaAttributeCriterion,
)
from ansys.grantami.serverapi_openapi.models.gsa_attribute_criterion_type import (
GsaAttributeCriterionType,
)
from ansys.grantami.serverapi_openapi.models.gsa_criterion_type import GsaCriterionType

from . import ModelBase, Unset, Unset_Type

Expand Down Expand Up @@ -91,8 +95,8 @@ class GsaAttributeExistsCriterion(GsaAttributeCriterion):
def __init__(
self,
*,
attribute_criterion_type: "GsaAttributeCriterionType",
type: "GsaCriterionType",
attribute_criterion_type: "GsaAttributeCriterionType" = GsaAttributeCriterionType.EXISTS,
type: "GsaCriterionType" = GsaCriterionType.ATTRIBUTE,
guid: "Union[str, None, Unset_Type]" = Unset,
identity: "Union[int, None, Unset_Type]" = Unset,
inner_criterion: "Union[GsaDatumExistsCriterion, Unset_Type]" = Unset,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
from ansys.grantami.serverapi_openapi.models.gsa_export_failure import ( # noqa: F401
GsaExportFailure,
)
from ansys.grantami.serverapi_openapi.models.gsa_export_failure_type import GsaExportFailureType

from . import ModelBase, Unset, Unset_Type

Expand Down Expand Up @@ -90,7 +91,7 @@ def __init__(
failed_attributes: "List[GsaAttributeReference]",
failure_details: "str",
failure_reason: "str",
type: "GsaExportFailureType",
type: "GsaExportFailureType" = GsaExportFailureType.ATTRIBUTE,
) -> None:
"""GsaAttributeExportFailure - a model defined in Swagger
Expand Down
Loading

0 comments on commit 2f4ca60

Please sign in to comment.