Skip to content

Commit 2f4ca60

Browse files
Bump template to 3.0.4 (#230)
Co-authored-by: ludovicsteinbach <ludovicsteinbach@users.noreply.github.com>
1 parent da1cc50 commit 2f4ca60

File tree

417 files changed

+1529
-497
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

417 files changed

+1529
-497
lines changed

ansys-grantami-serverapi-openapi/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"
55
[tool.poetry]
66
name = "ansys-grantami-serverapi-openapi"
77
description = "Autogenerated client library for the Granta MI Server API."
8-
version = "4.0.0.dev284"
8+
version = "4.0.0.dev285"
99
license = "MIT"
1010
authors = ["ANSYS, Inc. <pyansys.core@ansys.com>"]
1111
maintainers = ["ANSYS, Inc. <pyansys.core@ansys.com>"]

ansys-grantami-serverapi-openapi/src/ansys/grantami/serverapi_openapi/models/gsa_aggregation.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,18 @@ def get_real_child_model(cls, data: Dict[str, str]) -> str:
133133
data: ModelBase
134134
Object representing a subclass of this class
135135
"""
136-
discriminator_value = str(data[cls.discriminator]).lower() # type: ignore[index]
136+
discriminator_value = str(data[cls._get_discriminator_field_name()]).lower()
137137
# The actual class name is not available in swagger-codegen,
138138
# so we have to extract it from the JSON reference
139139
return cls.discriminator_value_class_map[discriminator_value].rsplit("/", 1)[-1]
140140

141+
@classmethod
142+
def _get_discriminator_field_name(cls) -> str:
143+
assert cls.discriminator
144+
name_tokens = cls.discriminator.split("_")
145+
later_tokens = [element.capitalize() for element in name_tokens[1:]]
146+
return "".join([name_tokens[0], *later_tokens])
147+
141148
def __repr__(self) -> str:
142149
"""For 'print' and 'pprint'"""
143150
return self.to_str()

ansys-grantami-serverapi-openapi/src/ansys/grantami/serverapi_openapi/models/gsa_aggregation_criterion.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,18 @@ def get_real_child_model(cls, data: Dict[str, str]) -> str:
133133
data: ModelBase
134134
Object representing a subclass of this class
135135
"""
136-
discriminator_value = str(data[cls.discriminator]).lower() # type: ignore[index]
136+
discriminator_value = str(data[cls._get_discriminator_field_name()]).lower()
137137
# The actual class name is not available in swagger-codegen,
138138
# so we have to extract it from the JSON reference
139139
return cls.discriminator_value_class_map[discriminator_value].rsplit("/", 1)[-1]
140140

141+
@classmethod
142+
def _get_discriminator_field_name(cls) -> str:
143+
assert cls.discriminator
144+
name_tokens = cls.discriminator.split("_")
145+
later_tokens = [element.capitalize() for element in name_tokens[1:]]
146+
return "".join([name_tokens[0], *later_tokens])
147+
141148
def __repr__(self) -> str:
142149
"""For 'print' and 'pprint'"""
143150
return self.to_str()

ansys-grantami-serverapi-openapi/src/ansys/grantami/serverapi_openapi/models/gsa_aggregation_datum.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,18 @@ def get_real_child_model(cls, data: Dict[str, str]) -> str:
144144
data: ModelBase
145145
Object representing a subclass of this class
146146
"""
147-
discriminator_value = str(data[cls.discriminator]).lower() # type: ignore[index]
147+
discriminator_value = str(data[cls._get_discriminator_field_name()]).lower()
148148
# The actual class name is not available in swagger-codegen,
149149
# so we have to extract it from the JSON reference
150150
return cls.discriminator_value_class_map[discriminator_value].rsplit("/", 1)[-1]
151151

152+
@classmethod
153+
def _get_discriminator_field_name(cls) -> str:
154+
assert cls.discriminator
155+
name_tokens = cls.discriminator.split("_")
156+
later_tokens = [element.capitalize() for element in name_tokens[1:]]
157+
return "".join([name_tokens[0], *later_tokens])
158+
152159
def __repr__(self) -> str:
153160
"""For 'print' and 'pprint'"""
154161
return self.to_str()

ansys-grantami-serverapi-openapi/src/ansys/grantami/serverapi_openapi/models/gsa_aggregation_datum_criterion.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,18 @@ def get_real_child_model(cls, data: Dict[str, str]) -> str:
149149
data: ModelBase
150150
Object representing a subclass of this class
151151
"""
152-
discriminator_value = str(data[cls.discriminator]).lower() # type: ignore[index]
152+
discriminator_value = str(data[cls._get_discriminator_field_name()]).lower()
153153
# The actual class name is not available in swagger-codegen,
154154
# so we have to extract it from the JSON reference
155155
return cls.discriminator_value_class_map[discriminator_value].rsplit("/", 1)[-1]
156156

157+
@classmethod
158+
def _get_discriminator_field_name(cls) -> str:
159+
assert cls.discriminator
160+
name_tokens = cls.discriminator.split("_")
161+
later_tokens = [element.capitalize() for element in name_tokens[1:]]
162+
return "".join([name_tokens[0], *later_tokens])
163+
157164
def __repr__(self) -> str:
158165
"""For 'print' and 'pprint'"""
159166
return self.to_str()

ansys-grantami-serverapi-openapi/src/ansys/grantami/serverapi_openapi/models/gsa_all_values_specifier.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
from ansys.grantami.serverapi_openapi.models.gsa_value_specifier import ( # noqa: F401
3737
GsaValueSpecifier,
3838
)
39+
from ansys.grantami.serverapi_openapi.models.gsa_value_specifier_type import GsaValueSpecifierType
3940

4041
from . import ModelBase, Unset, Unset_Type
4142

@@ -79,7 +80,7 @@ class GsaAllValuesSpecifier(GsaValueSpecifier):
7980
def __init__(
8081
self,
8182
*,
82-
filter_on: "GsaValueSpecifierType",
83+
filter_on: "GsaValueSpecifierType" = GsaValueSpecifierType.ALL,
8384
) -> None:
8485
"""GsaAllValuesSpecifier - a model defined in Swagger
8586

ansys-grantami-serverapi-openapi/src/ansys/grantami/serverapi_openapi/models/gsa_applicable_datum.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def __init__(
100100
self,
101101
*,
102102
datum_type: "GsaDatumType",
103-
not_applicable: "str",
103+
not_applicable: "str" = "applicable",
104104
) -> None:
105105
"""GsaApplicableDatum - a model defined in Swagger
106106
@@ -151,11 +151,18 @@ def get_real_child_model(cls, data: Dict[str, str]) -> str:
151151
data: ModelBase
152152
Object representing a subclass of this class
153153
"""
154-
discriminator_value = str(data[cls.discriminator]).lower() # type: ignore[index]
154+
discriminator_value = str(data[cls._get_discriminator_field_name()]).lower()
155155
# The actual class name is not available in swagger-codegen,
156156
# so we have to extract it from the JSON reference
157157
return cls.discriminator_value_class_map[discriminator_value].rsplit("/", 1)[-1]
158158

159+
@classmethod
160+
def _get_discriminator_field_name(cls) -> str:
161+
assert cls.discriminator
162+
name_tokens = cls.discriminator.split("_")
163+
later_tokens = [element.capitalize() for element in name_tokens[1:]]
164+
return "".join([name_tokens[0], *later_tokens])
165+
159166
def __repr__(self) -> str:
160167
"""For 'print' and 'pprint'"""
161168
return self.to_str()

ansys-grantami-serverapi-openapi/src/ansys/grantami/serverapi_openapi/models/gsa_attribute.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -484,11 +484,18 @@ def get_real_child_model(cls, data: Dict[str, str]) -> str:
484484
data: ModelBase
485485
Object representing a subclass of this class
486486
"""
487-
discriminator_value = str(data[cls.discriminator]).lower() # type: ignore[index]
487+
discriminator_value = str(data[cls._get_discriminator_field_name()]).lower()
488488
# The actual class name is not available in swagger-codegen,
489489
# so we have to extract it from the JSON reference
490490
return cls.discriminator_value_class_map[discriminator_value].rsplit("/", 1)[-1]
491491

492+
@classmethod
493+
def _get_discriminator_field_name(cls) -> str:
494+
assert cls.discriminator
495+
name_tokens = cls.discriminator.split("_")
496+
later_tokens = [element.capitalize() for element in name_tokens[1:]]
497+
return "".join([name_tokens[0], *later_tokens])
498+
492499
def __repr__(self) -> str:
493500
"""For 'print' and 'pprint'"""
494501
return self.to_str()

ansys-grantami-serverapi-openapi/src/ansys/grantami/serverapi_openapi/models/gsa_attribute_aggregation.py

+10-2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, Union # noqa: F401
3535

3636
from ansys.grantami.serverapi_openapi.models.gsa_aggregation import GsaAggregation # noqa: F401
37+
from ansys.grantami.serverapi_openapi.models.gsa_aggregation_type import GsaAggregationType
3738

3839
from . import ModelBase, Unset, Unset_Type
3940

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

247+
@classmethod
248+
def _get_discriminator_field_name(cls) -> str:
249+
assert cls.discriminator
250+
name_tokens = cls.discriminator.split("_")
251+
later_tokens = [element.capitalize() for element in name_tokens[1:]]
252+
return "".join([name_tokens[0], *later_tokens])
253+
246254
def __repr__(self) -> str:
247255
"""For 'print' and 'pprint'"""
248256
return self.to_str()

ansys-grantami-serverapi-openapi/src/ansys/grantami/serverapi_openapi/models/gsa_attribute_aggregation_criterion.py

+10-2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
from ansys.grantami.serverapi_openapi.models.gsa_aggregation_criterion import ( # noqa: F401
3737
GsaAggregationCriterion,
3838
)
39+
from ansys.grantami.serverapi_openapi.models.gsa_aggregation_type import GsaAggregationType
3940

4041
from . import ModelBase, Unset, Unset_Type
4142

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

247+
@classmethod
248+
def _get_discriminator_field_name(cls) -> str:
249+
assert cls.discriminator
250+
name_tokens = cls.discriminator.split("_")
251+
later_tokens = [element.capitalize() for element in name_tokens[1:]]
252+
return "".join([name_tokens[0], *later_tokens])
253+
246254
def __repr__(self) -> str:
247255
"""For 'print' and 'pprint'"""
248256
return self.to_str()

ansys-grantami-serverapi-openapi/src/ansys/grantami/serverapi_openapi/models/gsa_attribute_aggregation_exists_criterion.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,13 @@
3333
import re # noqa: F401
3434
from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, Union # noqa: F401
3535

36+
from ansys.grantami.serverapi_openapi.models.gsa_aggregation_type import GsaAggregationType
3637
from ansys.grantami.serverapi_openapi.models.gsa_attribute_aggregation_criterion import ( # noqa: F401
3738
GsaAttributeAggregationCriterion,
3839
)
40+
from ansys.grantami.serverapi_openapi.models.gsa_attribute_aggregation_type import (
41+
GsaAttributeAggregationType,
42+
)
3943

4044
from . import ModelBase, Unset, Unset_Type
4145

@@ -91,8 +95,8 @@ class GsaAttributeAggregationExistsCriterion(GsaAttributeAggregationCriterion):
9195
def __init__(
9296
self,
9397
*,
94-
attribute_aggregation_criterion_type: "GsaAttributeAggregationType",
95-
type: "GsaAggregationType",
98+
attribute_aggregation_criterion_type: "GsaAttributeAggregationType" = GsaAttributeAggregationType.EXISTS,
99+
type: "GsaAggregationType" = GsaAggregationType.ATTRIBUTE,
96100
guid: "Union[str, None, Unset_Type]" = Unset,
97101
identity: "Union[int, None, Unset_Type]" = Unset,
98102
inner_criterion: "Union[GsaAggregationDatumExistsCriterion, Unset_Type]" = Unset,

ansys-grantami-serverapi-openapi/src/ansys/grantami/serverapi_openapi/models/gsa_attribute_aggregation_value_criterion.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,13 @@
3333
import re # noqa: F401
3434
from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, Union # noqa: F401
3535

36+
from ansys.grantami.serverapi_openapi.models.gsa_aggregation_type import GsaAggregationType
3637
from ansys.grantami.serverapi_openapi.models.gsa_attribute_aggregation_criterion import ( # noqa: F401
3738
GsaAttributeAggregationCriterion,
3839
)
40+
from ansys.grantami.serverapi_openapi.models.gsa_attribute_aggregation_type import (
41+
GsaAttributeAggregationType,
42+
)
3943

4044
from . import ModelBase, Unset, Unset_Type
4145

@@ -91,8 +95,8 @@ class GsaAttributeAggregationValueCriterion(GsaAttributeAggregationCriterion):
9195
def __init__(
9296
self,
9397
*,
94-
attribute_aggregation_criterion_type: "GsaAttributeAggregationType",
95-
type: "GsaAggregationType",
98+
attribute_aggregation_criterion_type: "GsaAttributeAggregationType" = GsaAttributeAggregationType.VALUE,
99+
type: "GsaAggregationType" = GsaAggregationType.ATTRIBUTE,
96100
guid: "Union[str, None, Unset_Type]" = Unset,
97101
identity: "Union[int, None, Unset_Type]" = Unset,
98102
inner_criterion: "Union[GsaAggregationDatumCriterion, Unset_Type]" = Unset,

ansys-grantami-serverapi-openapi/src/ansys/grantami/serverapi_openapi/models/gsa_attribute_criterion.py

+10-2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, Union # noqa: F401
3535

3636
from ansys.grantami.serverapi_openapi.models.gsa_criterion import GsaCriterion # noqa: F401
37+
from ansys.grantami.serverapi_openapi.models.gsa_criterion_type import GsaCriterionType
3738

3839
from . import ModelBase, Unset, Unset_Type
3940

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

242+
@classmethod
243+
def _get_discriminator_field_name(cls) -> str:
244+
assert cls.discriminator
245+
name_tokens = cls.discriminator.split("_")
246+
later_tokens = [element.capitalize() for element in name_tokens[1:]]
247+
return "".join([name_tokens[0], *later_tokens])
248+
241249
def __repr__(self) -> str:
242250
"""For 'print' and 'pprint'"""
243251
return self.to_str()

ansys-grantami-serverapi-openapi/src/ansys/grantami/serverapi_openapi/models/gsa_attribute_exists_aggregation.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,13 @@
3333
import re # noqa: F401
3434
from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, Union # noqa: F401
3535

36+
from ansys.grantami.serverapi_openapi.models.gsa_aggregation_type import GsaAggregationType
3637
from ansys.grantami.serverapi_openapi.models.gsa_attribute_aggregation import ( # noqa: F401
3738
GsaAttributeAggregation,
3839
)
40+
from ansys.grantami.serverapi_openapi.models.gsa_attribute_aggregation_type import (
41+
GsaAttributeAggregationType,
42+
)
3943

4044
from . import ModelBase, Unset, Unset_Type
4145

@@ -87,8 +91,8 @@ class GsaAttributeExistsAggregation(GsaAttributeAggregation):
8791
def __init__(
8892
self,
8993
*,
90-
attribute_aggregation_type: "GsaAttributeAggregationType",
91-
type: "GsaAggregationType",
94+
attribute_aggregation_type: "GsaAttributeAggregationType" = GsaAttributeAggregationType.EXISTS,
95+
type: "GsaAggregationType" = GsaAggregationType.ATTRIBUTE,
9296
attribute_guid: "Union[str, None, Unset_Type]" = Unset,
9397
attribute_identity: "Union[int, None, Unset_Type]" = Unset,
9498
count: "Union[int, Unset_Type]" = Unset,

ansys-grantami-serverapi-openapi/src/ansys/grantami/serverapi_openapi/models/gsa_attribute_exists_criterion.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@
3636
from ansys.grantami.serverapi_openapi.models.gsa_attribute_criterion import ( # noqa: F401
3737
GsaAttributeCriterion,
3838
)
39+
from ansys.grantami.serverapi_openapi.models.gsa_attribute_criterion_type import (
40+
GsaAttributeCriterionType,
41+
)
42+
from ansys.grantami.serverapi_openapi.models.gsa_criterion_type import GsaCriterionType
3943

4044
from . import ModelBase, Unset, Unset_Type
4145

@@ -91,8 +95,8 @@ class GsaAttributeExistsCriterion(GsaAttributeCriterion):
9195
def __init__(
9296
self,
9397
*,
94-
attribute_criterion_type: "GsaAttributeCriterionType",
95-
type: "GsaCriterionType",
98+
attribute_criterion_type: "GsaAttributeCriterionType" = GsaAttributeCriterionType.EXISTS,
99+
type: "GsaCriterionType" = GsaCriterionType.ATTRIBUTE,
96100
guid: "Union[str, None, Unset_Type]" = Unset,
97101
identity: "Union[int, None, Unset_Type]" = Unset,
98102
inner_criterion: "Union[GsaDatumExistsCriterion, Unset_Type]" = Unset,

ansys-grantami-serverapi-openapi/src/ansys/grantami/serverapi_openapi/models/gsa_attribute_export_failure.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
from ansys.grantami.serverapi_openapi.models.gsa_export_failure import ( # noqa: F401
3737
GsaExportFailure,
3838
)
39+
from ansys.grantami.serverapi_openapi.models.gsa_export_failure_type import GsaExportFailureType
3940

4041
from . import ModelBase, Unset, Unset_Type
4142

@@ -90,7 +91,7 @@ def __init__(
9091
failed_attributes: "List[GsaAttributeReference]",
9192
failure_details: "str",
9293
failure_reason: "str",
93-
type: "GsaExportFailureType",
94+
type: "GsaExportFailureType" = GsaExportFailureType.ATTRIBUTE,
9495
) -> None:
9596
"""GsaAttributeExportFailure - a model defined in Swagger
9697

0 commit comments

Comments
 (0)