Skip to content

Commit 2f39c1d

Browse files
pyansys-ci-botactions-user
authored andcommitted
Generate Client Library code - Automated
1 parent f729f5f commit 2f39c1d

File tree

10 files changed

+979
-1
lines changed

10 files changed

+979
-1
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 = "5.0.0.dev421"
8+
version = "5.0.0.dev423"
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/__init__.py

+12
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434

3535
# import apis into sdk package
3636
from .api.aggregation_api import AggregationApi
37+
from .api.bulk_api import BulkApi
3738
from .api.data_api import DataApi
3839
from .api.data_export_api import DataExportApi
3940
from .api.database_api import DatabaseApi
@@ -152,6 +153,11 @@
152153
from .models.gsa_boolean_criterion import GsaBooleanCriterion
153154
from .models.gsa_boost_by_guid import GsaBoostByGuid
154155
from .models.gsa_boost_by_identity import GsaBoostByIdentity
156+
from .models.gsa_bulk_info import GsaBulkInfo
157+
from .models.gsa_bulk_request import GsaBulkRequest
158+
from .models.gsa_bulk_request_http_method import GsaBulkRequestHttpMethod
159+
from .models.gsa_bulk_request_item import GsaBulkRequestItem
160+
from .models.gsa_bulk_response_item import GsaBulkResponseItem
155161
from .models.gsa_calendar_interval import GsaCalendarInterval
156162
from .models.gsa_configuration import GsaConfiguration
157163
from .models.gsa_configurations_info import GsaConfigurationsInfo
@@ -1057,6 +1063,7 @@
10571063

10581064
__all__ = [
10591065
"AggregationApi",
1066+
"BulkApi",
10601067
"DataApi",
10611068
"DataExportApi",
10621069
"DatabaseApi",
@@ -1163,6 +1170,11 @@
11631170
"GsaBooleanCriterion",
11641171
"GsaBoostByGuid",
11651172
"GsaBoostByIdentity",
1173+
"GsaBulkInfo",
1174+
"GsaBulkRequest",
1175+
"GsaBulkRequestHttpMethod",
1176+
"GsaBulkRequestItem",
1177+
"GsaBulkResponseItem",
11661178
"GsaCalendarInterval",
11671179
"GsaConfiguration",
11681180
"GsaConfigurationsInfo",

ansys-grantami-serverapi-openapi/src/ansys/grantami/serverapi_openapi/api/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
# import apis into api package
2929
from .aggregation_api import AggregationApi
30+
from .bulk_api import BulkApi
3031
from .data_api import DataApi
3132
from .data_export_api import DataExportApi
3233
from .database_api import DatabaseApi
@@ -73,6 +74,7 @@
7374
__all__ = [
7475
"ApiBase",
7576
"AggregationApi",
77+
"BulkApi",
7678
"DataApi",
7779
"DataExportApi",
7880
"DatabaseApi",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
2+
# SPDX-License-Identifier: MIT
3+
#
4+
#
5+
# Permission is hereby granted, free of charge, to any person obtaining a copy
6+
# of this software and associated documentation files (the "Software"), to deal
7+
# in the Software without restriction, including without limitation the rights
8+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
# copies of the Software, and to permit persons to whom the Software is
10+
# furnished to do so, subject to the following conditions:
11+
#
12+
# The above copyright notice and this permission notice shall be included in all
13+
# copies or substantial portions of the Software.
14+
#
15+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
# SOFTWARE.
22+
23+
"""
24+
MI Server API
25+
26+
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
27+
28+
OpenAPI spec version: v1
29+
30+
Generated by: https://github.com/swagger-api/swagger-codegen.git
31+
"""
32+
33+
import re # noqa: F401
34+
from typing import TYPE_CHECKING, Any, BinaryIO, Optional, Union # noqa: F401
35+
36+
from . import ApiBase
37+
38+
if TYPE_CHECKING:
39+
import pathlib
40+
41+
from ..models import *
42+
43+
44+
class BulkApi(ApiBase):
45+
"""NOTE: This class is auto generated by the swagger code generator program.
46+
47+
Do not edit the class manually.
48+
Ref: https://github.com/swagger-api/swagger-codegen
49+
"""
50+
51+
def bulk(self, *, body: "Optional[GsaBulkRequest]" = None) -> "Union[GsaBulkInfo, None]":
52+
"""Handles multiple requests. The requests should be independent - they could be executed in any order. The response will contain a response item for each request item, in the same order as the request items. Requests that return file or image responses cannot be sent via the bulk endpoint.
53+
54+
This method makes a synchronous HTTP request.
55+
56+
Parameters
57+
----------
58+
body: GsaBulkRequest
59+
60+
Returns
61+
-------
62+
Union[GsaBulkInfo, None]
63+
"""
64+
data = self._bulk_with_http_info(body, _return_http_data_only=True)
65+
return data # type: ignore[no-any-return]
66+
67+
def _bulk_with_http_info(self, body: "Optional[GsaBulkRequest]" = None, **kwargs: Any) -> Any:
68+
all_params = ["body", "_return_http_data_only", "_preload_content", "_request_timeout"]
69+
70+
params = locals()
71+
for key, val in params["kwargs"].items():
72+
if key not in all_params:
73+
raise TypeError(f"Got an unexpected keyword argument '{key}' to method bulk")
74+
params[key] = val
75+
del params["kwargs"]
76+
77+
collection_formats: dict[str, Any] = {}
78+
79+
path_params: dict[str, Any] = {}
80+
81+
query_params: list[Any] = []
82+
83+
header_params: dict[str, Any] = {}
84+
85+
form_params: list[Any] = []
86+
local_var_files: dict[str, Any] = {}
87+
88+
body_params = None
89+
if "body" in params and body is not None:
90+
body_params = params["body"]
91+
# HTTP header 'Accept'
92+
header_params["Accept"] = self.api_client.select_header_accept(
93+
["text/plain", "application/json", "text/json"]
94+
)
95+
96+
# HTTP header 'Content-Type'
97+
header_params["Content-Type"] = self.api_client.select_header_content_type(
98+
["application/json-patch+json", "application/json", "text/json", "application/*+json"]
99+
)
100+
101+
response_type_map: dict[int, Optional[str]] = {
102+
200: "GsaBulkInfo",
103+
400: None,
104+
}
105+
106+
return self.api_client.call_api(
107+
"/v1alpha/bulk",
108+
"POST",
109+
path_params,
110+
query_params,
111+
header_params,
112+
body=body_params,
113+
post_params=form_params,
114+
files=local_var_files,
115+
_return_http_data_only=params.get("_return_http_data_only"),
116+
_preload_content=params.get("_preload_content", True),
117+
_request_timeout=params.get("_request_timeout"),
118+
collection_formats=collection_formats,
119+
response_type_map=response_type_map,
120+
)

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

+10
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,11 @@
105105
from .gsa_boolean_criterion import GsaBooleanCriterion
106106
from .gsa_boost_by_guid import GsaBoostByGuid
107107
from .gsa_boost_by_identity import GsaBoostByIdentity
108+
from .gsa_bulk_info import GsaBulkInfo
109+
from .gsa_bulk_request import GsaBulkRequest
110+
from .gsa_bulk_request_http_method import GsaBulkRequestHttpMethod
111+
from .gsa_bulk_request_item import GsaBulkRequestItem
112+
from .gsa_bulk_response_item import GsaBulkResponseItem
108113
from .gsa_calendar_interval import GsaCalendarInterval
109114
from .gsa_configuration import GsaConfiguration
110115
from .gsa_configurations_info import GsaConfigurationsInfo
@@ -1038,6 +1043,11 @@
10381043
"GsaBooleanCriterion",
10391044
"GsaBoostByGuid",
10401045
"GsaBoostByIdentity",
1046+
"GsaBulkInfo",
1047+
"GsaBulkRequest",
1048+
"GsaBulkRequestHttpMethod",
1049+
"GsaBulkRequestItem",
1050+
"GsaBulkResponseItem",
10411051
"GsaCalendarInterval",
10421052
"GsaConfiguration",
10431053
"GsaConfigurationsInfo",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
2+
# SPDX-License-Identifier: MIT
3+
#
4+
#
5+
# Permission is hereby granted, free of charge, to any person obtaining a copy
6+
# of this software and associated documentation files (the "Software"), to deal
7+
# in the Software without restriction, including without limitation the rights
8+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
# copies of the Software, and to permit persons to whom the Software is
10+
# furnished to do so, subject to the following conditions:
11+
#
12+
# The above copyright notice and this permission notice shall be included in all
13+
# copies or substantial portions of the Software.
14+
#
15+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
# SOFTWARE.
22+
23+
"""
24+
MI Server API
25+
26+
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
27+
28+
OpenAPI spec version: v1
29+
30+
Generated by: https://github.com/swagger-api/swagger-codegen.git
31+
"""
32+
33+
import re # noqa: F401
34+
from typing import TYPE_CHECKING, Any, BinaryIO, Optional, Union # noqa: F401
35+
36+
from . import ModelBase, Unset, Unset_Type
37+
38+
if TYPE_CHECKING:
39+
from datetime import datetime
40+
import pathlib
41+
42+
from . import *
43+
44+
45+
class GsaBulkInfo(ModelBase):
46+
"""NOTE: This class is auto generated by the swagger code generator program.
47+
48+
Do not edit the class manually.
49+
"""
50+
51+
"""
52+
Attributes
53+
----------
54+
swagger_types: dict[str, str]
55+
The key is attribute name and the value is attribute type.
56+
attribute_map: dict[str, str]
57+
The key is attribute name and the value is json key in definition.
58+
subtype_mapping: dict[str, str]
59+
The key is the unmangled property name and the value is the corresponding type.
60+
discriminator: Optional[str]
61+
Name of the property used as discriminator for subtypes.
62+
"""
63+
swagger_types: dict[str, str] = {
64+
"data": "list[GsaBulkResponseItem]",
65+
}
66+
67+
attribute_map: dict[str, str] = {
68+
"data": "data",
69+
}
70+
71+
subtype_mapping: dict[str, str] = {
72+
"data": "GsaBulkResponseItem",
73+
}
74+
75+
discriminator: Optional[str] = None
76+
77+
def __init__(
78+
self,
79+
*,
80+
data: "list[GsaBulkResponseItem]",
81+
) -> None:
82+
"""GsaBulkInfo - a model defined in Swagger
83+
84+
Parameters
85+
----------
86+
data: list[GsaBulkResponseItem]
87+
"""
88+
self._data: list[GsaBulkResponseItem]
89+
90+
self.data = data
91+
92+
@property
93+
def data(self) -> "list[GsaBulkResponseItem]":
94+
"""Gets the data of this GsaBulkInfo.
95+
96+
Returns
97+
-------
98+
list[GsaBulkResponseItem]
99+
The data of this GsaBulkInfo.
100+
"""
101+
return self._data
102+
103+
@data.setter
104+
def data(self, data: "list[GsaBulkResponseItem]") -> None:
105+
"""Sets the data of this GsaBulkInfo.
106+
107+
Parameters
108+
----------
109+
data: list[GsaBulkResponseItem]
110+
The data of this GsaBulkInfo.
111+
"""
112+
# Field is not nullable
113+
if data is None:
114+
raise ValueError("Invalid value for 'data', must not be 'None'")
115+
# Field is required
116+
if data is Unset: # type: ignore[comparison-overlap, unused-ignore]
117+
raise ValueError("Invalid value for 'data', must not be 'Unset'")
118+
self._data = data
119+
120+
@classmethod
121+
def get_real_child_model(cls, data: dict[str, str]) -> str:
122+
"""Raises a NotImplementedError for a type without a discriminator defined.
123+
124+
Parameters
125+
----------
126+
data: ModelBase
127+
Object representing a subclass of this class
128+
129+
Raises
130+
------
131+
NotImplementedError
132+
This class has no discriminator, and hence no subclasses
133+
"""
134+
raise NotImplementedError()
135+
136+
def __repr__(self) -> str:
137+
"""For 'print' and 'pprint'"""
138+
return self.to_str()
139+
140+
def __eq__(self, other: Any) -> bool:
141+
"""Returns true if both objects are equal"""
142+
if not isinstance(other, GsaBulkInfo):
143+
return False
144+
145+
return self.__dict__ == other.__dict__
146+
147+
def __ne__(self, other: Any) -> bool:
148+
"""Returns true if both objects are not equal"""
149+
return not self == other

0 commit comments

Comments
 (0)