Skip to content
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

Update Swagger.json (12271961203) #278

Merged
merged 2 commits into from
Dec 11, 2024
Merged
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 = "4.0.0.dev356"
version = "4.0.0.dev358"
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 @@ -736,9 +736,11 @@
GsaRangeHistogramAggregationDatumCriterion,
)
from .models.gsa_record_ancestor_criterion import GsaRecordAncestorCriterion
from .models.gsa_record_ancestor_history_criterion import GsaRecordAncestorHistoryCriterion
from .models.gsa_record_ancestor_history_identity_criterion import (
GsaRecordAncestorHistoryIdentityCriterion,
)
from .models.gsa_record_ancestor_identity_criterion import GsaRecordAncestorIdentityCriterion
from .models.gsa_record_capabilities import GsaRecordCapabilities
from .models.gsa_record_color import GsaRecordColor
from .models.gsa_record_color_property import GsaRecordColorProperty
Expand Down Expand Up @@ -1640,7 +1642,9 @@
"GsaRangeHistogramAggregation",
"GsaRangeHistogramAggregationDatumCriterion",
"GsaRecordAncestorCriterion",
"GsaRecordAncestorHistoryCriterion",
"GsaRecordAncestorHistoryIdentityCriterion",
"GsaRecordAncestorIdentityCriterion",
"GsaRecordCapabilities",
"GsaRecordColor",
"GsaRecordColorProperty",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -660,9 +660,11 @@
GsaRangeHistogramAggregationDatumCriterion,
)
from .gsa_record_ancestor_criterion import GsaRecordAncestorCriterion
from .gsa_record_ancestor_history_criterion import GsaRecordAncestorHistoryCriterion
from .gsa_record_ancestor_history_identity_criterion import (
GsaRecordAncestorHistoryIdentityCriterion,
)
from .gsa_record_ancestor_identity_criterion import GsaRecordAncestorIdentityCriterion
from .gsa_record_capabilities import GsaRecordCapabilities
from .gsa_record_color import GsaRecordColor
from .gsa_record_color_property import GsaRecordColorProperty
Expand Down Expand Up @@ -1517,7 +1519,9 @@
"GsaRangeHistogramAggregation",
"GsaRangeHistogramAggregationDatumCriterion",
"GsaRecordAncestorCriterion",
"GsaRecordAncestorHistoryCriterion",
"GsaRecordAncestorHistoryIdentityCriterion",
"GsaRecordAncestorIdentityCriterion",
"GsaRecordCapabilities",
"GsaRecordColor",
"GsaRecordColorProperty",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,10 @@ class GsaCriterion(ModelBase):
"recordListMember".lower(): "#/components/schemas/GsaRecordListMemberCriterion",
"recordProperty".lower(): "#/components/schemas/GsaRecordPropertyCriterion",
"reference".lower(): "#/components/schemas/GsaRecordReferenceCriterion",
"recordAncestorIdentity".lower(): "#/components/schemas/GsaRecordAncestorIdentityCriterion",
"recordAncestor".lower(): "#/components/schemas/GsaRecordAncestorCriterion",
"recordAncestorHistoryIdentity".lower(): "#/components/schemas/GsaRecordAncestorHistoryIdentityCriterion",
"recordAncestorHistory".lower(): "#/components/schemas/GsaRecordAncestorHistoryCriterion",
"subset".lower(): "#/components/schemas/GsaRecordSubsetCriterion",
"tabularLinkingValue".lower(): "#/components/schemas/GsaTabularLinkingValueCriterion",
"attribute".lower(): "#/components/schemas/GsaAttributeCriterion",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ class GsaCriterionType(Enum):
RECORDLISTMEMBER = "recordListMember"
RECORDPROPERTY = "recordProperty"
REFERENCE = "reference"
RECORDANCESTORIDENTITY = "recordAncestorIdentity"
RECORDANCESTOR = "recordAncestor"
RECORDANCESTORHISTORYIDENTITY = "recordAncestorHistoryIdentity"
RECORDANCESTORHISTORY = "recordAncestorHistory"
SUBSET = "subset"
TABULARLINKINGVALUE = "tabularLinkingValue"
ATTRIBUTE = "attribute"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ class GsaRecordAncestorCriterion(GsaCriterion):
swagger_types: dict[str, str] = {
"direct_parent_only": "bool",
"type": "GsaCriterionType",
"ancestor_identity": "int",
"ancestor_guid": "str",
}

attribute_map: dict[str, str] = {
"direct_parent_only": "directParentOnly",
"type": "type",
"ancestor_identity": "ancestorIdentity",
"ancestor_guid": "ancestorGuid",
}

subtype_mapping: dict[str, str] = {}
Expand All @@ -84,45 +84,45 @@ def __init__(
*,
direct_parent_only: "bool",
type: "GsaCriterionType" = GsaCriterionType.RECORDANCESTOR,
ancestor_identity: "Union[int, None, Unset_Type]" = Unset,
ancestor_guid: "Union[str, None, Unset_Type]" = Unset,
) -> None:
"""GsaRecordAncestorCriterion - a model defined in Swagger

Parameters
----------
direct_parent_only: bool
type: GsaCriterionType
ancestor_identity: int, optional
ancestor_guid: str, optional
"""
super().__init__(type=type)
self._ancestor_identity: Union[int, None, Unset_Type] = Unset
self._ancestor_guid: Union[str, None, Unset_Type] = Unset
self._direct_parent_only: bool

if ancestor_identity is not Unset:
self.ancestor_identity = ancestor_identity
if ancestor_guid is not Unset:
self.ancestor_guid = ancestor_guid
self.direct_parent_only = direct_parent_only

@property
def ancestor_identity(self) -> "Union[int, None, Unset_Type]":
"""Gets the ancestor_identity of this GsaRecordAncestorCriterion.
def ancestor_guid(self) -> "Union[str, None, Unset_Type]":
"""Gets the ancestor_guid of this GsaRecordAncestorCriterion.

Returns
-------
Union[int, None, Unset_Type]
The ancestor_identity of this GsaRecordAncestorCriterion.
Union[str, None, Unset_Type]
The ancestor_guid of this GsaRecordAncestorCriterion.
"""
return self._ancestor_identity
return self._ancestor_guid

@ancestor_identity.setter
def ancestor_identity(self, ancestor_identity: "Union[int, None, Unset_Type]") -> None:
"""Sets the ancestor_identity of this GsaRecordAncestorCriterion.
@ancestor_guid.setter
def ancestor_guid(self, ancestor_guid: "Union[str, None, Unset_Type]") -> None:
"""Sets the ancestor_guid of this GsaRecordAncestorCriterion.

Parameters
----------
ancestor_identity: Union[int, None, Unset_Type]
The ancestor_identity of this GsaRecordAncestorCriterion.
ancestor_guid: Union[str, None, Unset_Type]
The ancestor_guid of this GsaRecordAncestorCriterion.
"""
self._ancestor_identity = ancestor_identity
self._ancestor_guid = ancestor_guid

@property
def direct_parent_only(self) -> "bool":
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
# 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
"""

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

from ansys.grantami.serverapi_openapi.models.gsa_criterion import GsaCriterion # noqa: F401
from ansys.grantami.serverapi_openapi.models.gsa_criterion_type import GsaCriterionType

from . import ModelBase, Unset, Unset_Type

if TYPE_CHECKING:
from datetime import datetime
import pathlib

from . import *


class GsaRecordAncestorHistoryCriterion(GsaCriterion):
"""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] = {
"direct_parent_only": "bool",
"type": "GsaCriterionType",
"ancestor_history_guid": "str",
}

attribute_map: dict[str, str] = {
"direct_parent_only": "directParentOnly",
"type": "type",
"ancestor_history_guid": "ancestorHistoryGuid",
}

subtype_mapping: dict[str, str] = {}

discriminator: Optional[str] = None

def __init__(
self,
*,
direct_parent_only: "bool",
type: "GsaCriterionType" = GsaCriterionType.RECORDANCESTORHISTORY,
ancestor_history_guid: "Union[str, None, Unset_Type]" = Unset,
) -> None:
"""GsaRecordAncestorHistoryCriterion - a model defined in Swagger

Parameters
----------
direct_parent_only: bool
type: GsaCriterionType
ancestor_history_guid: str, optional
"""
super().__init__(type=type)
self._ancestor_history_guid: Union[str, None, Unset_Type] = Unset
self._direct_parent_only: bool

if ancestor_history_guid is not Unset:
self.ancestor_history_guid = ancestor_history_guid
self.direct_parent_only = direct_parent_only

@property
def ancestor_history_guid(self) -> "Union[str, None, Unset_Type]":
"""Gets the ancestor_history_guid of this GsaRecordAncestorHistoryCriterion.

Returns
-------
Union[str, None, Unset_Type]
The ancestor_history_guid of this GsaRecordAncestorHistoryCriterion.
"""
return self._ancestor_history_guid

@ancestor_history_guid.setter
def ancestor_history_guid(self, ancestor_history_guid: "Union[str, None, Unset_Type]") -> None:
"""Sets the ancestor_history_guid of this GsaRecordAncestorHistoryCriterion.

Parameters
----------
ancestor_history_guid: Union[str, None, Unset_Type]
The ancestor_history_guid of this GsaRecordAncestorHistoryCriterion.
"""
self._ancestor_history_guid = ancestor_history_guid

@property
def direct_parent_only(self) -> "bool":
"""Gets the direct_parent_only of this GsaRecordAncestorHistoryCriterion.

Returns
-------
bool
The direct_parent_only of this GsaRecordAncestorHistoryCriterion.
"""
return self._direct_parent_only

@direct_parent_only.setter
def direct_parent_only(self, direct_parent_only: "bool") -> None:
"""Sets the direct_parent_only of this GsaRecordAncestorHistoryCriterion.

Parameters
----------
direct_parent_only: bool
The direct_parent_only of this GsaRecordAncestorHistoryCriterion.
"""
# Field is not nullable
if direct_parent_only is None:
raise ValueError("Invalid value for 'direct_parent_only', must not be 'None'")
# Field is required
if direct_parent_only is Unset: # type: ignore[comparison-overlap, unused-ignore]
raise ValueError("Invalid value for 'direct_parent_only', must not be 'Unset'")
self._direct_parent_only = direct_parent_only

@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, GsaRecordAncestorHistoryCriterion):
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
Loading
Loading