# coding: utf-8

"""
    SimScale API

    The version of the OpenAPI document: 0.0.0
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from simscale_sdk.configuration import Configuration


class OneOfHarmonicAnalysisBoundaryConditions(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    openapi_types = {
        'type': 'str',
        'name': 'str',
        'preload': 'ForcePreload',
        'topological_reference': 'TopologicalReference',
        'spring_stiffness': 'OneOfElasticSupportBCSpringStiffness',
        'displacement': 'DimensionalPartialVectorFunctionLength',
        'rotation': 'AngularRotation',
        'external_point': 'DimensionalVectorLength',
        'deformation_behavior': 'str',
        'force': 'DimensionalVectorFunctionForce',
        'scaling': 'DimensionalFunctionDimensionless',
        'phase_angle': 'DimensionalAngle',
        'pressure': 'DimensionalFunctionPressure',
        'moment': 'DimensionalVectorFunctionTorque',
        'remote_point': 'DimensionalVectorLength',
        'load': 'DimensionalVectorFunctionVolumeForce'
    }

    attribute_map = {
        'type': 'type',
        'name': 'name',
        'preload': 'preload',
        'topological_reference': 'topologicalReference',
        'spring_stiffness': 'springStiffness',
        'displacement': 'displacement',
        'rotation': 'rotation',
        'external_point': 'externalPoint',
        'deformation_behavior': 'deformationBehavior',
        'force': 'force',
        'scaling': 'scaling',
        'phase_angle': 'phaseAngle',
        'pressure': 'pressure',
        'moment': 'moment',
        'remote_point': 'remotePoint',
        'load': 'load'
    }

    discriminator_value_class_map = {
        'BOLT_PRELOAD': 'BoltPreloadBC',
        'ELASTIC_SUPPORT': 'ElasticSupportBC',
        'FIXED_SUPPORT': 'FixedSupportBC',
        'FIXED_VALUE': 'FixedValueBC',
        'REMOTE_DISPLACEMENT_LOAD': 'RemoteDisplacementLoadBC',
        'SYMMETRY_PLANE': 'SymmetryPlaneBC',
        'CENTRIFUGAL_FORCE': 'CentrifugalForceBC',
        'FORCE_LOAD': 'ForceLoadBC',
        'NODAL_LOAD': 'NodalLoadBC',
        'PRESSURE': 'PressureBC',
        'REMOTE_FORCE_LOAD': 'RemoteForceLoadBC',
        'SURFACE_LOAD': 'SurfaceLoadBC',
        'VOLUME_LOAD': 'VolumeLoadBC'
    }

    def __init__(self, type='VOLUME_LOAD', name=None, preload=None, topological_reference=None, spring_stiffness=None, displacement=None, rotation=None, external_point=None, deformation_behavior=None, force=None, scaling=None, phase_angle=None, pressure=None, moment=None, remote_point=None, load=None, local_vars_configuration=None):  # noqa: E501
        """OneOfHarmonicAnalysisBoundaryConditions - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._type = None
        self._name = None
        self._preload = None
        self._topological_reference = None
        self._spring_stiffness = None
        self._displacement = None
        self._rotation = None
        self._external_point = None
        self._deformation_behavior = None
        self._force = None
        self._scaling = None
        self._phase_angle = None
        self._pressure = None
        self._moment = None
        self._remote_point = None
        self._load = None
        self.discriminator = 'type'

        self.type = type
        if name is not None:
            self.name = name
        if preload is not None:
            self.preload = preload
        if topological_reference is not None:
            self.topological_reference = topological_reference
        if spring_stiffness is not None:
            self.spring_stiffness = spring_stiffness
        if displacement is not None:
            self.displacement = displacement
        if rotation is not None:
            self.rotation = rotation
        if external_point is not None:
            self.external_point = external_point
        if deformation_behavior is not None:
            self.deformation_behavior = deformation_behavior
        if force is not None:
            self.force = force
        if scaling is not None:
            self.scaling = scaling
        if phase_angle is not None:
            self.phase_angle = phase_angle
        if pressure is not None:
            self.pressure = pressure
        if moment is not None:
            self.moment = moment
        if remote_point is not None:
            self.remote_point = remote_point
        if load is not None:
            self.load = load

    @property
    def type(self):
        """Gets the type of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501

        This is a <b>volume load</b> boundary condition representing a distributed load on the selected volumes applied in the global coordinate system and each element of the assignment is loaded with a volume force depending on the volume of the element.<br /><br />Important remarks: <br /><ul><li>The applied total force depends on the volume of the selection.</li></ul><a href= https://www.simscale.com/docs/simulation-setup/boundary-conditions/volume-load/' target='_blank'>Learn more</a>.  Schema name: VolumeLoadBC  # noqa: E501

        :return: The type of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this OneOfHarmonicAnalysisBoundaryConditions.

        This is a <b>volume load</b> boundary condition representing a distributed load on the selected volumes applied in the global coordinate system and each element of the assignment is loaded with a volume force depending on the volume of the element.<br /><br />Important remarks: <br /><ul><li>The applied total force depends on the volume of the selection.</li></ul><a href= https://www.simscale.com/docs/simulation-setup/boundary-conditions/volume-load/' target='_blank'>Learn more</a>.  Schema name: VolumeLoadBC  # noqa: E501

        :param type: The type of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and type is None:  # noqa: E501
            raise ValueError("Invalid value for `type`, must not be `None`")  # noqa: E501

        self._type = type

    @property
    def name(self):
        """Gets the name of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501


        :return: The name of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this OneOfHarmonicAnalysisBoundaryConditions.


        :param name: The name of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501
        :type: str
        """

        self._name = name

    @property
    def preload(self):
        """Gets the preload of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501


        :return: The preload of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501
        :rtype: ForcePreload
        """
        return self._preload

    @preload.setter
    def preload(self, preload):
        """Sets the preload of this OneOfHarmonicAnalysisBoundaryConditions.


        :param preload: The preload of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501
        :type: ForcePreload
        """

        self._preload = preload

    @property
    def topological_reference(self):
        """Gets the topological_reference of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501


        :return: The topological_reference of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501
        :rtype: TopologicalReference
        """
        return self._topological_reference

    @topological_reference.setter
    def topological_reference(self, topological_reference):
        """Sets the topological_reference of this OneOfHarmonicAnalysisBoundaryConditions.


        :param topological_reference: The topological_reference of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501
        :type: TopologicalReference
        """

        self._topological_reference = topological_reference

    @property
    def spring_stiffness(self):
        """Gets the spring_stiffness of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501


        :return: The spring_stiffness of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501
        :rtype: OneOfElasticSupportBCSpringStiffness
        """
        return self._spring_stiffness

    @spring_stiffness.setter
    def spring_stiffness(self, spring_stiffness):
        """Sets the spring_stiffness of this OneOfHarmonicAnalysisBoundaryConditions.


        :param spring_stiffness: The spring_stiffness of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501
        :type: OneOfElasticSupportBCSpringStiffness
        """

        self._spring_stiffness = spring_stiffness

    @property
    def displacement(self):
        """Gets the displacement of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501


        :return: The displacement of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501
        :rtype: DimensionalPartialVectorFunctionLength
        """
        return self._displacement

    @displacement.setter
    def displacement(self, displacement):
        """Sets the displacement of this OneOfHarmonicAnalysisBoundaryConditions.


        :param displacement: The displacement of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501
        :type: DimensionalPartialVectorFunctionLength
        """

        self._displacement = displacement

    @property
    def rotation(self):
        """Gets the rotation of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501


        :return: The rotation of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501
        :rtype: AngularRotation
        """
        return self._rotation

    @rotation.setter
    def rotation(self, rotation):
        """Sets the rotation of this OneOfHarmonicAnalysisBoundaryConditions.


        :param rotation: The rotation of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501
        :type: AngularRotation
        """

        self._rotation = rotation

    @property
    def external_point(self):
        """Gets the external_point of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501


        :return: The external_point of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501
        :rtype: DimensionalVectorLength
        """
        return self._external_point

    @external_point.setter
    def external_point(self, external_point):
        """Sets the external_point of this OneOfHarmonicAnalysisBoundaryConditions.


        :param external_point: The external_point of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501
        :type: DimensionalVectorLength
        """

        self._external_point = external_point

    @property
    def deformation_behavior(self):
        """Gets the deformation_behavior of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501

        <p>Choose the deformation behavior of the assigned entity. If <b>deformable</b> is selected, the entitiy is allowed to deform without applying additional stiffness, selecting <b>undeformable</b> leads to a rigid entity.</p>  # noqa: E501

        :return: The deformation_behavior of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501
        :rtype: str
        """
        return self._deformation_behavior

    @deformation_behavior.setter
    def deformation_behavior(self, deformation_behavior):
        """Sets the deformation_behavior of this OneOfHarmonicAnalysisBoundaryConditions.

        <p>Choose the deformation behavior of the assigned entity. If <b>deformable</b> is selected, the entitiy is allowed to deform without applying additional stiffness, selecting <b>undeformable</b> leads to a rigid entity.</p>  # noqa: E501

        :param deformation_behavior: The deformation_behavior of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501
        :type: str
        """
        allowed_values = ["DEFORMABLE", "UNDEFORMABLE"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and deformation_behavior not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `deformation_behavior` ({0}), must be one of {1}"  # noqa: E501
                .format(deformation_behavior, allowed_values)
            )

        self._deformation_behavior = deformation_behavior

    @property
    def force(self):
        """Gets the force of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501


        :return: The force of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501
        :rtype: DimensionalVectorFunctionForce
        """
        return self._force

    @force.setter
    def force(self, force):
        """Sets the force of this OneOfHarmonicAnalysisBoundaryConditions.


        :param force: The force of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501
        :type: DimensionalVectorFunctionForce
        """

        self._force = force

    @property
    def scaling(self):
        """Gets the scaling of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501


        :return: The scaling of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501
        :rtype: DimensionalFunctionDimensionless
        """
        return self._scaling

    @scaling.setter
    def scaling(self, scaling):
        """Sets the scaling of this OneOfHarmonicAnalysisBoundaryConditions.


        :param scaling: The scaling of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501
        :type: DimensionalFunctionDimensionless
        """

        self._scaling = scaling

    @property
    def phase_angle(self):
        """Gets the phase_angle of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501


        :return: The phase_angle of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501
        :rtype: DimensionalAngle
        """
        return self._phase_angle

    @phase_angle.setter
    def phase_angle(self, phase_angle):
        """Sets the phase_angle of this OneOfHarmonicAnalysisBoundaryConditions.


        :param phase_angle: The phase_angle of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501
        :type: DimensionalAngle
        """

        self._phase_angle = phase_angle

    @property
    def pressure(self):
        """Gets the pressure of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501


        :return: The pressure of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501
        :rtype: DimensionalFunctionPressure
        """
        return self._pressure

    @pressure.setter
    def pressure(self, pressure):
        """Sets the pressure of this OneOfHarmonicAnalysisBoundaryConditions.


        :param pressure: The pressure of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501
        :type: DimensionalFunctionPressure
        """

        self._pressure = pressure

    @property
    def moment(self):
        """Gets the moment of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501


        :return: The moment of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501
        :rtype: DimensionalVectorFunctionTorque
        """
        return self._moment

    @moment.setter
    def moment(self, moment):
        """Sets the moment of this OneOfHarmonicAnalysisBoundaryConditions.


        :param moment: The moment of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501
        :type: DimensionalVectorFunctionTorque
        """

        self._moment = moment

    @property
    def remote_point(self):
        """Gets the remote_point of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501


        :return: The remote_point of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501
        :rtype: DimensionalVectorLength
        """
        return self._remote_point

    @remote_point.setter
    def remote_point(self, remote_point):
        """Sets the remote_point of this OneOfHarmonicAnalysisBoundaryConditions.


        :param remote_point: The remote_point of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501
        :type: DimensionalVectorLength
        """

        self._remote_point = remote_point

    @property
    def load(self):
        """Gets the load of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501


        :return: The load of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501
        :rtype: DimensionalVectorFunctionVolumeForce
        """
        return self._load

    @load.setter
    def load(self, load):
        """Sets the load of this OneOfHarmonicAnalysisBoundaryConditions.


        :param load: The load of this OneOfHarmonicAnalysisBoundaryConditions.  # noqa: E501
        :type: DimensionalVectorFunctionVolumeForce
        """

        self._load = load

    def get_real_child_model(self, data):
        """Returns the real base class specified by the discriminator"""
        discriminator_key = self.attribute_map[self.discriminator]
        discriminator_value = data[discriminator_key]
        return self.discriminator_value_class_map.get(discriminator_value)

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, OneOfHarmonicAnalysisBoundaryConditions):
            return False

        return self.to_dict() == other.to_dict()

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        if not isinstance(other, OneOfHarmonicAnalysisBoundaryConditions):
            return True

        return self.to_dict() != other.to_dict()
