Skip to content

Commit

Permalink
Update Swagger.json (12150078605) (#270)
Browse files Browse the repository at this point in the history
Co-authored-by: pyansys-ci-bot <pyansys-ci-bot@users.noreply.github.com>
  • Loading branch information
pyansys-ci-bot and pyansys-ci-bot authored Dec 4, 2024
1 parent d4cd8f1 commit 56c603a
Show file tree
Hide file tree
Showing 8 changed files with 707 additions and 571 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.dev338"
version = "4.0.0.dev342"
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 @@ -405,7 +405,8 @@
from .models.gsa_discrete_type_usage import GsaDiscreteTypeUsage
from .models.gsa_discrete_types_info import GsaDiscreteTypesInfo
from .models.gsa_discrete_value import GsaDiscreteValue
from .models.gsa_discrete_value_deletion_exception import GsaDiscreteValueDeletionException
from .models.gsa_discrete_value_aggregate_error_reason import GsaDiscreteValueAggregateErrorReason
from .models.gsa_discrete_value_aggregate_exception import GsaDiscreteValueAggregateException
from .models.gsa_discrete_values_create_discrete_value import GsaDiscreteValuesCreateDiscreteValue
from .models.gsa_discrete_values_discrete_value import GsaDiscreteValuesDiscreteValue
from .models.gsa_discrete_values_discrete_values_info import GsaDiscreteValuesDiscreteValuesInfo
Expand Down Expand Up @@ -1353,7 +1354,8 @@
"GsaDiscreteTypeUsage",
"GsaDiscreteTypesInfo",
"GsaDiscreteValue",
"GsaDiscreteValueDeletionException",
"GsaDiscreteValueAggregateErrorReason",
"GsaDiscreteValueAggregateException",
"GsaDiscreteValuesCreateDiscreteValue",
"GsaDiscreteValuesDiscreteValue",
"GsaDiscreteValuesDiscreteValuesInfo",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def _create_discrete_value_with_http_info(

def delete_discrete_value(
self, *, database_key: "str", discrete_type_guid: "str", discrete_value_guid: "str"
) -> "Union[GsaDiscreteValueDeletionException, None]":
) -> "Union[GsaDiscreteValueAggregateException, None]":
"""Delete a single discrete value. It must not be used by any data, or the operation will fail.
This method makes a synchronous HTTP request.
Expand All @@ -173,7 +173,7 @@ def delete_discrete_value(
Returns
-------
Union[GsaDiscreteValueDeletionException, None]
Union[GsaDiscreteValueAggregateException, None]
"""
data = self._delete_discrete_value_with_http_info(
database_key, discrete_type_guid, discrete_value_guid, _return_http_data_only=True
Expand Down Expand Up @@ -242,7 +242,7 @@ def _delete_discrete_value_with_http_info(
header_params["Accept"] = self.api_client.select_header_accept(["application/json"])

response_type_map: dict[int, Optional[str]] = {
400: "GsaDiscreteValueDeletionException",
400: "GsaDiscreteValueAggregateException",
200: None,
403: None,
404: None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,8 @@
from .gsa_discrete_type_usage import GsaDiscreteTypeUsage
from .gsa_discrete_types_info import GsaDiscreteTypesInfo
from .gsa_discrete_value import GsaDiscreteValue
from .gsa_discrete_value_deletion_exception import GsaDiscreteValueDeletionException
from .gsa_discrete_value_aggregate_error_reason import GsaDiscreteValueAggregateErrorReason
from .gsa_discrete_value_aggregate_exception import GsaDiscreteValueAggregateException
from .gsa_discrete_values_create_discrete_value import GsaDiscreteValuesCreateDiscreteValue
from .gsa_discrete_values_discrete_value import GsaDiscreteValuesDiscreteValue
from .gsa_discrete_values_discrete_values_info import GsaDiscreteValuesDiscreteValuesInfo
Expand Down Expand Up @@ -1230,7 +1231,8 @@
"GsaDiscreteTypeUsage",
"GsaDiscreteTypesInfo",
"GsaDiscreteValue",
"GsaDiscreteValueDeletionException",
"GsaDiscreteValueAggregateErrorReason",
"GsaDiscreteValueAggregateException",
"GsaDiscreteValuesCreateDiscreteValue",
"GsaDiscreteValuesDiscreteValue",
"GsaDiscreteValuesDiscreteValuesInfo",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,24 +66,29 @@ class GsaDataUsageDataModificationErrorDetail(GsaUsageDataModificationErrorDetai
Name of the property used as discriminator for subtypes.
"""
swagger_types: dict[str, str] = {
"entity_in_use": "GsaSlimNamedEntity",
"message": "str",
"reason": "str",
"referenced_by_type": "GsaReferencedByType",
}

attribute_map: dict[str, str] = {
"entity_in_use": "entityInUse",
"message": "message",
"reason": "reason",
"referenced_by_type": "referencedByType",
}

subtype_mapping: dict[str, str] = {}
subtype_mapping: dict[str, str] = {
"entityInUse": "GsaSlimNamedEntity",
}

discriminator: Optional[str] = None

def __init__(
self,
*,
entity_in_use: "GsaSlimNamedEntity",
message: "str",
reason: "str" = "usage",
referenced_by_type: "GsaReferencedByType" = GsaReferencedByType.DATA,
Expand All @@ -92,11 +97,43 @@ def __init__(
Parameters
----------
entity_in_use: GsaSlimNamedEntity
message: str
reason: str
referenced_by_type: GsaReferencedByType
"""
super().__init__(message=message, reason=reason, referenced_by_type=referenced_by_type)
self._entity_in_use: GsaSlimNamedEntity

self.entity_in_use = entity_in_use

@property
def entity_in_use(self) -> "GsaSlimNamedEntity":
"""Gets the entity_in_use of this GsaDataUsageDataModificationErrorDetail.
Returns
-------
GsaSlimNamedEntity
The entity_in_use of this GsaDataUsageDataModificationErrorDetail.
"""
return self._entity_in_use

@entity_in_use.setter
def entity_in_use(self, entity_in_use: "GsaSlimNamedEntity") -> None:
"""Sets the entity_in_use of this GsaDataUsageDataModificationErrorDetail.
Parameters
----------
entity_in_use: GsaSlimNamedEntity
The entity_in_use of this GsaDataUsageDataModificationErrorDetail.
"""
# Field is not nullable
if entity_in_use is None:
raise ValueError("Invalid value for 'entity_in_use', must not be 'None'")
# Field is required
if entity_in_use is Unset: # type: ignore[comparison-overlap, unused-ignore]
raise ValueError("Invalid value for 'entity_in_use', must not be 'Unset'")
self._entity_in_use = entity_in_use

@classmethod
def get_real_child_model(cls, data: dict[str, str]) -> str:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

"""
MI Server API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

from enum import Enum


class GsaDiscreteValueAggregateErrorReason(Enum):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""

"""
Allowed Enum values
"""
DISCRETEVALUEADDITIONERRORS = "discreteValueAdditionErrors"
DISCRETEVALUEDELETIONERRORS = "discreteValueDeletionErrors"
DISCRETEVALUEUPDATEERRORS = "discreteValueUpdateErrors"
DISCRETEVALUEREPLACINGERRORS = "discreteValueReplacingErrors"
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
from . import *


class GsaDiscreteValueDeletionException(ModelBase):
class GsaDiscreteValueAggregateException(ModelBase):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
Expand All @@ -61,118 +61,151 @@ class GsaDiscreteValueDeletionException(ModelBase):
Name of the property used as discriminator for subtypes.
"""
swagger_types: dict[str, str] = {
"reason": "GsaDiscreteValueAggregateErrorReason",
"code": "SystemNetHttpStatusCode",
"errors": "list[GsaDataModificationErrorDetail]",
"errors": "list[GsaErrorDetail]",
"message": "str",
}

attribute_map: dict[str, str] = {
"reason": "reason",
"code": "code",
"errors": "errors",
"message": "message",
}

subtype_mapping: dict[str, str] = {
"reason": "GsaDiscreteValueAggregateErrorReason",
"code": "SystemNetHttpStatusCode",
"errors": "GsaDataModificationErrorDetail",
"errors": "GsaErrorDetail",
}

discriminator: Optional[str] = None

def __init__(
self,
*,
reason: "GsaDiscreteValueAggregateErrorReason",
code: "Union[SystemNetHttpStatusCode, Unset_Type]" = Unset,
errors: "Union[list[GsaDataModificationErrorDetail], None, Unset_Type]" = Unset,
errors: "Union[list[GsaErrorDetail], None, Unset_Type]" = Unset,
message: "Union[str, None, Unset_Type]" = Unset,
) -> None:
"""GsaDiscreteValueDeletionException - a model defined in Swagger
"""GsaDiscreteValueAggregateException - a model defined in Swagger
Parameters
----------
reason: GsaDiscreteValueAggregateErrorReason
code: SystemNetHttpStatusCode, optional
errors: list[GsaDataModificationErrorDetail], optional
errors: list[GsaErrorDetail], optional
message: str, optional
"""
self._message: Union[str, None, Unset_Type] = Unset
self._reason: GsaDiscreteValueAggregateErrorReason
self._code: Union[SystemNetHttpStatusCode, Unset_Type] = Unset
self._errors: Union[list[GsaDataModificationErrorDetail], None, Unset_Type] = Unset
self._errors: Union[list[GsaErrorDetail], None, Unset_Type] = Unset

if message is not Unset:
self.message = message
self.reason = reason
if code is not Unset:
self.code = code
if errors is not Unset:
self.errors = errors

@property
def message(self) -> "Union[str, None, Unset_Type]":
"""Gets the message of this GsaDiscreteValueDeletionException.
"""Gets the message of this GsaDiscreteValueAggregateException.
Returns
-------
Union[str, None, Unset_Type]
The message of this GsaDiscreteValueDeletionException.
The message of this GsaDiscreteValueAggregateException.
"""
return self._message

@message.setter
def message(self, message: "Union[str, None, Unset_Type]") -> None:
"""Sets the message of this GsaDiscreteValueDeletionException.
"""Sets the message of this GsaDiscreteValueAggregateException.
Parameters
----------
message: Union[str, None, Unset_Type]
The message of this GsaDiscreteValueDeletionException.
The message of this GsaDiscreteValueAggregateException.
"""
self._message = message

@property
def reason(self) -> "GsaDiscreteValueAggregateErrorReason":
"""Gets the reason of this GsaDiscreteValueAggregateException.
Returns
-------
GsaDiscreteValueAggregateErrorReason
The reason of this GsaDiscreteValueAggregateException.
"""
return self._reason

@reason.setter
def reason(self, reason: "GsaDiscreteValueAggregateErrorReason") -> None:
"""Sets the reason of this GsaDiscreteValueAggregateException.
Parameters
----------
reason: GsaDiscreteValueAggregateErrorReason
The reason of this GsaDiscreteValueAggregateException.
"""
# Field is not nullable
if reason is None:
raise ValueError("Invalid value for 'reason', must not be 'None'")
# Field is required
if reason is Unset: # type: ignore[comparison-overlap, unused-ignore]
raise ValueError("Invalid value for 'reason', must not be 'Unset'")
self._reason = reason

@property
def code(self) -> "Union[SystemNetHttpStatusCode, Unset_Type]":
"""Gets the code of this GsaDiscreteValueDeletionException.
"""Gets the code of this GsaDiscreteValueAggregateException.
Returns
-------
Union[SystemNetHttpStatusCode, Unset_Type]
The code of this GsaDiscreteValueDeletionException.
The code of this GsaDiscreteValueAggregateException.
"""
return self._code

@code.setter
def code(self, code: "Union[SystemNetHttpStatusCode, Unset_Type]") -> None:
"""Sets the code of this GsaDiscreteValueDeletionException.
"""Sets the code of this GsaDiscreteValueAggregateException.
Parameters
----------
code: Union[SystemNetHttpStatusCode, Unset_Type]
The code of this GsaDiscreteValueDeletionException.
The code of this GsaDiscreteValueAggregateException.
"""
# Field is not nullable
if code is None:
raise ValueError("Invalid value for 'code', must not be 'None'")
self._code = code

@property
def errors(self) -> "Union[list[GsaDataModificationErrorDetail], None, Unset_Type]":
"""Gets the errors of this GsaDiscreteValueDeletionException.
def errors(self) -> "Union[list[GsaErrorDetail], None, Unset_Type]":
"""Gets the errors of this GsaDiscreteValueAggregateException.
Returns
-------
Union[list[GsaDataModificationErrorDetail], None, Unset_Type]
The errors of this GsaDiscreteValueDeletionException.
Union[list[GsaErrorDetail], None, Unset_Type]
The errors of this GsaDiscreteValueAggregateException.
"""
return self._errors

@errors.setter
def errors(
self, errors: "Union[list[GsaDataModificationErrorDetail], None, Unset_Type]"
) -> None:
"""Sets the errors of this GsaDiscreteValueDeletionException.
def errors(self, errors: "Union[list[GsaErrorDetail], None, Unset_Type]") -> None:
"""Sets the errors of this GsaDiscreteValueAggregateException.
Parameters
----------
errors: Union[list[GsaDataModificationErrorDetail], None, Unset_Type]
The errors of this GsaDiscreteValueDeletionException.
errors: Union[list[GsaErrorDetail], None, Unset_Type]
The errors of this GsaDiscreteValueAggregateException.
"""
self._errors = errors

Expand All @@ -198,7 +231,7 @@ def __repr__(self) -> str:

def __eq__(self, other: Any) -> bool:
"""Returns true if both objects are equal"""
if not isinstance(other, GsaDiscreteValueDeletionException):
if not isinstance(other, GsaDiscreteValueAggregateException):
return False

return self.__dict__ == other.__dict__
Expand Down
Loading

0 comments on commit 56c603a

Please sign in to comment.