Skip to content

Update Swagger.json (16721213106) #488

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
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.dev700"
version = "5.1.0.dev704"
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 @@ -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.dev700"
__version__ = "5.1.0.dev704"
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@
from .models.gsa_append_point_values import GsaAppendPointValues
from .models.gsa_applicable_datum import GsaApplicableDatum
from .models.gsa_applications_info import GsaApplicationsInfo
from .models.gsa_apply_options import GsaApplyOptions
from .models.gsa_attribute import GsaAttribute
from .models.gsa_attribute_aggregation import GsaAttributeAggregation
from .models.gsa_attribute_aggregation_criterion import GsaAttributeAggregationCriterion
Expand Down Expand Up @@ -798,6 +799,7 @@
from .models.gsa_long_text_datum_exists_criterion import GsaLongTextDatumExistsCriterion
from .models.gsa_long_text_prefix_datum_criterion import GsaLongTextPrefixDatumCriterion
from .models.gsa_mapping_of_object_identifier import GsaMappingOfObjectIdentifier
from .models.gsa_match_mode import GsaMatchMode
from .models.gsa_maths_content import GsaMathsContent
from .models.gsa_maths_functional_attribute import GsaMathsFunctionalAttribute
from .models.gsa_maths_functional_attribute_error_detail import (
Expand Down Expand Up @@ -1057,6 +1059,7 @@
from .models.gsa_record_with_data import GsaRecordWithData
from .models.gsa_referenced_by_type import GsaReferencedByType
from .models.gsa_referential_integrity_model import GsaReferentialIntegrityModel
from .models.gsa_register_update_request import GsaRegisterUpdateRequest
from .models.gsa_release_record_version_control_exception import (
GsaReleaseRecordVersionControlException,
)
Expand Down Expand Up @@ -1322,6 +1325,7 @@
from .models.gsa_update_record_list_properties import GsaUpdateRecordListProperties
from .models.gsa_update_replacement_string import GsaUpdateReplacementString
from .models.gsa_update_root_folder_error_detail import GsaUpdateRootFolderErrorDetail
from .models.gsa_update_run_status import GsaUpdateRunStatus
from .models.gsa_update_short_text_attribute import GsaUpdateShortTextAttribute
from .models.gsa_update_smart_record_link_group import GsaUpdateSmartRecordLinkGroup
from .models.gsa_update_standard_name import GsaUpdateStandardName
Expand Down Expand Up @@ -1473,6 +1477,7 @@
"GsaAppendPointValues",
"GsaApplicableDatum",
"GsaApplicationsInfo",
"GsaApplyOptions",
"GsaAttribute",
"GsaAttributeAggregation",
"GsaAttributeAggregationCriterion",
Expand Down Expand Up @@ -1989,6 +1994,7 @@
"GsaLongTextDatumExistsCriterion",
"GsaLongTextPrefixDatumCriterion",
"GsaMappingOfObjectIdentifier",
"GsaMatchMode",
"GsaMathsContent",
"GsaMathsFunctionalAttribute",
"GsaMathsFunctionalAttributeErrorDetail",
Expand Down Expand Up @@ -2196,6 +2202,7 @@
"GsaRecordWithData",
"GsaReferencedByType",
"GsaReferentialIntegrityModel",
"GsaRegisterUpdateRequest",
"GsaReleaseRecordVersionControlException",
"GsaReleaseTableVersionControlException",
"GsaReleasedDateProperty",
Expand Down Expand Up @@ -2423,6 +2430,7 @@
"GsaUpdateRecordListProperties",
"GsaUpdateReplacementString",
"GsaUpdateRootFolderErrorDetail",
"GsaUpdateRunStatus",
"GsaUpdateShortTextAttribute",
"GsaUpdateSmartRecordLinkGroup",
"GsaUpdateStandardName",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,188 @@ class DataUpdaterApi(ApiBase):
Ref: https://github.com/swagger-api/swagger-codegen
"""

def apply_update(self, *, database_key: "str", update_token_guid: "str") -> "str":
"""Start an apply job for a given update

This method makes a synchronous HTTP request.

Parameters
----------
database_key: str
See [Schema - Databases/GetAllDatabases](#/Schema%20-%20Databases/GetAllDatabases)
update_token_guid: str

Returns
-------
str
"""
data = self._apply_update_with_http_info(
database_key, update_token_guid, _return_http_data_only=True
)
return data # type: ignore[no-any-return]

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

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 "update_token_guid" in params and update_token_guid is not None:
path_params["update-token-guid"] = params["update_token_guid"]

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(
["text/plain", "application/json", "text/json"]
)

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

return self.api_client.call_api(
"/v1alpha/dataupdater/updates/{database-key}/{update-token-guid}:apply",
"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 dry_run_update(self, *, database_key: "str", update_token_guid: "str") -> "str":
"""Start a dry run job for a given update

This method makes a synchronous HTTP request.

Parameters
----------
database_key: str
See [Schema - Databases/GetAllDatabases](#/Schema%20-%20Databases/GetAllDatabases)
update_token_guid: str

Returns
-------
str
"""
data = self._dry_run_update_with_http_info(
database_key, update_token_guid, _return_http_data_only=True
)
return data # type: ignore[no-any-return]

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

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 "update_token_guid" in params and update_token_guid is not None:
path_params["update-token-guid"] = params["update_token_guid"]

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(
["text/plain", "application/json", "text/json"]
)

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

return self.api_client.call_api(
"/v1alpha/dataupdater/updates/{database-key}/{update-token-guid}:dry-run",
"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 get_all_updates(self) -> "list[GsaDataUpdate]":
"""get_all_updates

Expand Down Expand Up @@ -277,3 +459,94 @@ def _get_updates_for_database_with_http_info(self, database_key: "str", **kwargs
collection_formats=collection_formats,
response_type_map=response_type_map,
)

def register_update(
self, *, database_key: "str", body: "Optional[GsaRegisterUpdateRequest]" = None
) -> "GsaDataUpdateToken":
"""Register an update

This method makes a synchronous HTTP request.

Parameters
----------
database_key: str
See [Schema - Databases/GetAllDatabases](#/Schema%20-%20Databases/GetAllDatabases)
body: GsaRegisterUpdateRequest

Returns
-------
GsaDataUpdateToken
"""
data = self._register_update_with_http_info(database_key, body, _return_http_data_only=True)
return data # type: ignore[no-any-return]

def _register_update_with_http_info(
self, database_key: "str", body: "Optional[GsaRegisterUpdateRequest]" = None, **kwargs: Any
) -> Any:
all_params = [
"database_key",
"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 register_update"
)
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 'register_update'"
)

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"]

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(
["text/plain", "application/json", "text/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]] = {
200: "GsaDataUpdateToken",
}

return self.api_client.call_api(
"/v1alpha/dataupdater/updates/{database-key}",
"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,
)
Loading