Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 = "5.1.0.dev821"
version = "5.1.0.dev824"
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 @@ -20,4 +20,4 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

__version__ = "5.1.0.dev821"
__version__ = "5.1.0.dev824"
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,101 @@ def _export_configuration_with_http_info(
response_type_map=response_type_map,
)

def export_configurations(
self, *, database_key: "str", configuration_type: "str"
) -> "None | str":
"""Get configurations as a zip file

This method makes a synchronous HTTP request.

Parameters
----------
database_key: str
See [Schema - Databases/GetAllDatabases](#/Schema%20-%20Databases/GetAllDatabases)
configuration_type: str
The configuration type as entered.

Returns
-------
None | str
"""
data = self._export_configurations_with_http_info(
database_key, configuration_type, _return_http_data_only=True
)
return data # type: ignore[no-any-return]

def _export_configurations_with_http_info(
self, database_key: "str", configuration_type: "str", **kwargs: Any
) -> Any:
all_params = [
"database_key",
"configuration_type",
"_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 export_configurations"
)
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 'export_configurations'"
)
# verify the required parameter "configuration_type" is set
if "configuration_type" not in params or params["configuration_type"] is None:
raise ValueError(
"Missing the required parameter 'configuration_type' when calling 'export_configurations'"
)

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 "configuration_type" in params and configuration_type is not None:
path_params["configuration-type"] = params["configuration_type"]

query_params: list[Any] = []

header_params: dict[str, Any] = {}

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

body_params = None
# HTTP header 'Accept'
header_params["Accept"] = self.api_client.select_header_accept(
["application/zip", "application/json"]
)

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

return self.api_client.call_api(
"/v1alpha/databases/{database-key}/configurations/{configuration-type}:export",
"GET",
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 get_configuration(
self, *, database_key: "str", configuration_type: "str", configuration_guid: "str"
) -> "GsaConfiguration | None":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class GsaServerConnectionDetails(ModelBase):
Name of the property used as discriminator for subtypes.
"""
swagger_types: dict[str, str] = {
"additional_sql_parameters": "str",
"data_source": "str",
"existing_database_key": "str",
"sql_password": "str",
Expand All @@ -70,6 +71,7 @@ class GsaServerConnectionDetails(ModelBase):
}

attribute_map: dict[str, str] = {
"additional_sql_parameters": "additionalSqlParameters",
"data_source": "dataSource",
"existing_database_key": "existingDatabaseKey",
"sql_password": "sqlPassword",
Expand All @@ -85,6 +87,7 @@ class GsaServerConnectionDetails(ModelBase):
def __init__(
self,
*,
additional_sql_parameters: "str | None | Unset_Type" = Unset,
data_source: "str | None | Unset_Type" = Unset,
existing_database_key: "str | None | Unset_Type" = Unset,
sql_password: "str | None | Unset_Type" = Unset,
Expand All @@ -96,6 +99,7 @@ def __init__(

Parameters
----------
additional_sql_parameters: str | None, optional
data_source: str | None, optional
existing_database_key: str | None, optional
sql_password: str | None, optional
Expand All @@ -109,6 +113,7 @@ def __init__(
self._sql_username: str | None | Unset_Type = Unset
self._sql_password: str | None | Unset_Type = Unset
self._existing_database_key: str | None | Unset_Type = Unset
self._additional_sql_parameters: str | None | Unset_Type = Unset

if data_source is not Unset:
self.data_source = data_source
Expand All @@ -122,6 +127,8 @@ def __init__(
self.sql_password = sql_password
if existing_database_key is not Unset:
self.existing_database_key = existing_database_key
if additional_sql_parameters is not Unset:
self.additional_sql_parameters = additional_sql_parameters

@property
def data_source(self) -> "str | None | Unset_Type":
Expand Down Expand Up @@ -277,6 +284,32 @@ def existing_database_key(self, existing_database_key: "str | None | Unset_Type"
"""
self._existing_database_key = existing_database_key

@property
def additional_sql_parameters(self) -> "str | None | Unset_Type":
"""Gets the additional_sql_parameters of this GsaServerConnectionDetails.
(Optional) Any additional parameters added to the SQL Server connection string.

Returns
-------
str | None | Unset_Type
The additional_sql_parameters of this GsaServerConnectionDetails.
"""
return self._additional_sql_parameters

@additional_sql_parameters.setter
def additional_sql_parameters(
self, additional_sql_parameters: "str | None | Unset_Type"
) -> None:
"""Sets the additional_sql_parameters of this GsaServerConnectionDetails.
(Optional) Any additional parameters added to the SQL Server connection string.

Parameters
----------
additional_sql_parameters: str | None | Unset_Type
The additional_sql_parameters of this GsaServerConnectionDetails.
"""
self._additional_sql_parameters = additional_sql_parameters

@classmethod
def get_real_child_model(cls, data: dict[str, str]) -> str:
"""Raises a NotImplementedError for a type without a discriminator defined.
Expand Down
Loading