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 @@ -8,7 +8,7 @@ module-name = "ansys.grantami.serverapi_openapi"
[project]
name = "ansys-grantami-serverapi-openapi"
description = "Autogenerated client library for the Granta MI Server API."
version = "6.0.0.dev1319"
version = "6.0.0.dev1323"
license = "MIT"
requires-python = ">=3.12"
authors = [
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__ = "6.0.0.dev1319"
__version__ = "6.0.0.dev1323"
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,9 @@
from .models.gsa_bulk_request_item import GsaBulkRequestItem
from .models.gsa_bulk_response_item import GsaBulkResponseItem
from .models.gsa_calendar_interval import GsaCalendarInterval
from .models.gsa_cannot_change_discrete_type_attribute_error_detail import (
GsaCannotChangeDiscreteTypeAttributeErrorDetail,
)
from .models.gsa_cannot_create_unavailable_tabular_column_attribute_error_detail import (
GsaCannotCreateUnavailableTabularColumnAttributeErrorDetail,
)
Expand Down Expand Up @@ -2248,6 +2251,7 @@
"GsaBulkRequestItem",
"GsaBulkResponseItem",
"GsaCalendarInterval",
"GsaCannotChangeDiscreteTypeAttributeErrorDetail",
"GsaCannotCreateUnavailableTabularColumnAttributeErrorDetail",
"GsaCannotDeleteTabularColumnAttributeErrorDetail",
"GsaCategoryReplacePermissionCategoryErrorDetail",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,9 @@
from .gsa_bulk_request_item import GsaBulkRequestItem
from .gsa_bulk_response_item import GsaBulkResponseItem
from .gsa_calendar_interval import GsaCalendarInterval
from .gsa_cannot_change_discrete_type_attribute_error_detail import (
GsaCannotChangeDiscreteTypeAttributeErrorDetail,
)
from .gsa_cannot_create_unavailable_tabular_column_attribute_error_detail import (
GsaCannotCreateUnavailableTabularColumnAttributeErrorDetail,
)
Expand Down Expand Up @@ -1996,6 +1999,7 @@
"GsaBulkRequestItem",
"GsaBulkResponseItem",
"GsaCalendarInterval",
"GsaCannotChangeDiscreteTypeAttributeErrorDetail",
"GsaCannotCreateUnavailableTabularColumnAttributeErrorDetail",
"GsaCannotDeleteTabularColumnAttributeErrorDetail",
"GsaCategoryReplacePermissionCategoryErrorDetail",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ class GsaAttributeErrorDetail(ModelBase):
"updateTabularColumnType".lower(): "#/components/schemas/GsaUpdateTabularColumnTypeAttributeErrorDetail",
"cannotDeleteTabularColumn".lower(): "#/components/schemas/GsaCannotDeleteTabularColumnAttributeErrorDetail",
"cannotCreateUnavailableTabularColumn".lower(): "#/components/schemas/GsaCannotCreateUnavailableTabularColumnAttributeErrorDetail",
"cannotChangeDiscreteType".lower(): "#/components/schemas/GsaCannotChangeDiscreteTypeAttributeErrorDetail",
}

discriminator: Optional[str] = "reason"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,4 @@ class GsaAttributeErrorReason(Enum):
UPDATETABULARCOLUMNTYPE = "updateTabularColumnType"
CANNOTDELETETABULARCOLUMN = "cannotDeleteTabularColumn"
CANNOTCREATEUNAVAILABLETABULARCOLUMN = "cannotCreateUnavailableTabularColumn"
CANNOTCHANGEDISCRETETYPE = "cannotChangeDiscreteType"
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
# Copyright (C) 2023 - 2026 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
"""

import re # noqa: F401
from typing import TYPE_CHECKING, Any, BinaryIO, Optional # noqa: F401

from ansys.grantami.serverapi_openapi.v2027r1.models.gsa_attribute_error_detail import ( # noqa: F401
GsaAttributeErrorDetail,
)
from ansys.grantami.serverapi_openapi.v2027r1.models.gsa_attribute_error_reason import (
GsaAttributeErrorReason,
)

from . import ModelBase, Unset, Unset_Type

if TYPE_CHECKING:
from datetime import datetime
import pathlib

from . import *


class GsaCannotChangeDiscreteTypeAttributeErrorDetail(GsaAttributeErrorDetail):
"""NOTE: This class is auto generated by the swagger code generator program.

Do not edit the class manually.
"""

"""
Attributes
----------
swagger_types: dict[str, str]
The key is attribute name and the value is attribute type.
attribute_map: dict[str, str]
The key is attribute name and the value is json key in definition.
subtype_mapping: dict[str, str]
The key is the unmangled property name and the value is the corresponding type.
discriminator: Optional[str]
Name of the property used as discriminator for subtypes.
"""
swagger_types: dict[str, str] = {
"message": "str",
"reason": "GsaAttributeErrorReason",
"column_guid": "str",
}

attribute_map: dict[str, str] = {
"message": "message",
"reason": "reason",
"column_guid": "columnGuid",
}

subtype_mapping: dict[str, str] = {}

discriminator: Optional[str] = None

def __init__(
self,
*,
message: "str",
reason: "GsaAttributeErrorReason" = GsaAttributeErrorReason.CANNOTCHANGEDISCRETETYPE,
column_guid: "str | Unset_Type" = Unset,
) -> None:
"""GsaCannotChangeDiscreteTypeAttributeErrorDetail - a model defined in Swagger

Parameters
----------
message: str
reason: GsaAttributeErrorReason
column_guid: str, optional
"""
super().__init__(message=message, reason=reason)
self._column_guid: str | Unset_Type = Unset

if column_guid is not Unset:
self.column_guid = column_guid

@property
def column_guid(self) -> "str | Unset_Type":
"""Gets the column_guid of this GsaCannotChangeDiscreteTypeAttributeErrorDetail.

Returns
-------
str | Unset_Type
The column_guid of this GsaCannotChangeDiscreteTypeAttributeErrorDetail.
"""
return self._column_guid

@column_guid.setter
def column_guid(self, column_guid: "str | Unset_Type") -> None:
"""Sets the column_guid of this GsaCannotChangeDiscreteTypeAttributeErrorDetail.

Parameters
----------
column_guid: str | Unset_Type
The column_guid of this GsaCannotChangeDiscreteTypeAttributeErrorDetail.
"""
# Field is not nullable
if column_guid is None:
raise ValueError("Invalid value for 'column_guid', must not be 'None'")
self._column_guid = column_guid

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

Parameters
----------
data: ModelBase
Object representing a subclass of this class

Raises
------
NotImplementedError
This class has no discriminator, and hence no subclasses
"""
raise NotImplementedError()

def __repr__(self) -> str:
"""For 'print' and 'pprint'"""
return self.to_str()

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

return self.__dict__ == other.__dict__

def __ne__(self, other: Any) -> bool:
"""Returns true if both objects are not equal"""
return not self == other
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,21 @@ class GsaNoSuchEntityTabularColumnErrorDetail(GsaAttributeErrorDetail):
swagger_types: dict[str, str] = {
"message": "str",
"reason": "GsaAttributeErrorReason",
"column_guid": "str",
"column_name": "str",
"database_key": "str",
"entity_type": "GsaTabularColumnNoSuchEntityType",
"guid": "str",
"tabular_column_name": "str",
}

attribute_map: dict[str, str] = {
"message": "message",
"reason": "reason",
"column_guid": "columnGuid",
"column_name": "columnName",
"database_key": "databaseKey",
"entity_type": "entityType",
"guid": "guid",
"tabular_column_name": "tabularColumnName",
}

subtype_mapping: dict[str, str] = {
Expand All @@ -96,30 +98,35 @@ def __init__(
*,
message: "str",
reason: "GsaAttributeErrorReason" = GsaAttributeErrorReason.TABULARCOLUMNNOSUCHENTITY,
column_guid: "str | None | Unset_Type" = Unset,
column_name: "str | None | Unset_Type" = Unset,
database_key: "str | None | Unset_Type" = Unset,
entity_type: "GsaTabularColumnNoSuchEntityType | Unset_Type" = Unset,
guid: "str | Unset_Type" = Unset,
tabular_column_name: "str | None | Unset_Type" = Unset,
) -> None:
"""GsaNoSuchEntityTabularColumnErrorDetail - a model defined in Swagger

Parameters
----------
message: str
reason: GsaAttributeErrorReason
column_guid: str | None, optional
column_name: str | None, optional
database_key: str | None, optional
entity_type: GsaTabularColumnNoSuchEntityType, optional
guid: str, optional
tabular_column_name: str | None, optional
"""
super().__init__(message=message, reason=reason)
self._tabular_column_name: str | None | Unset_Type = Unset
self._column_name: str | None | Unset_Type = Unset
self._column_guid: str | None | Unset_Type = Unset
self._guid: str | Unset_Type = Unset
self._database_key: str | None | Unset_Type = Unset
self._entity_type: GsaTabularColumnNoSuchEntityType | Unset_Type = Unset

if tabular_column_name is not Unset:
self.tabular_column_name = tabular_column_name
if column_name is not Unset:
self.column_name = column_name
if column_guid is not Unset:
self.column_guid = column_guid
if guid is not Unset:
self.guid = guid
if database_key is not Unset:
Expand All @@ -128,26 +135,52 @@ def __init__(
self.entity_type = entity_type

@property
def tabular_column_name(self) -> "str | None | Unset_Type":
"""Gets the tabular_column_name of this GsaNoSuchEntityTabularColumnErrorDetail.
def column_name(self) -> "str | None | Unset_Type":
"""Gets the column_name of this GsaNoSuchEntityTabularColumnErrorDetail.
May be null if no column name was provided in the request.

Returns
-------
str | None | Unset_Type
The tabular_column_name of this GsaNoSuchEntityTabularColumnErrorDetail.
The column_name of this GsaNoSuchEntityTabularColumnErrorDetail.
"""
return self._tabular_column_name
return self._column_name

@tabular_column_name.setter
def tabular_column_name(self, tabular_column_name: "str | None | Unset_Type") -> None:
"""Sets the tabular_column_name of this GsaNoSuchEntityTabularColumnErrorDetail.
@column_name.setter
def column_name(self, column_name: "str | None | Unset_Type") -> None:
"""Sets the column_name of this GsaNoSuchEntityTabularColumnErrorDetail.
May be null if no column name was provided in the request.

Parameters
----------
tabular_column_name: str | None | Unset_Type
The tabular_column_name of this GsaNoSuchEntityTabularColumnErrorDetail.
column_name: str | None | Unset_Type
The column_name of this GsaNoSuchEntityTabularColumnErrorDetail.
"""
self._tabular_column_name = tabular_column_name
self._column_name = column_name

@property
def column_guid(self) -> "str | None | Unset_Type":
"""Gets the column_guid of this GsaNoSuchEntityTabularColumnErrorDetail.
Only populated when updating an existing column.

Returns
-------
str | None | Unset_Type
The column_guid of this GsaNoSuchEntityTabularColumnErrorDetail.
"""
return self._column_guid

@column_guid.setter
def column_guid(self, column_guid: "str | None | Unset_Type") -> None:
"""Sets the column_guid of this GsaNoSuchEntityTabularColumnErrorDetail.
Only populated when updating an existing column.

Parameters
----------
column_guid: str | None | Unset_Type
The column_guid of this GsaNoSuchEntityTabularColumnErrorDetail.
"""
self._column_guid = column_guid

@property
def guid(self) -> "str | Unset_Type":
Expand Down
2 changes: 1 addition & 1 deletion ansys-grantami-serverapi-openapi/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading