text: # 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 OneOfDynamicAnalysisBoundaryConditions(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',
          'rotation_origin': 'DimensionalVectorFunctionLength',
          'rotation_axis': 'DimensionalVectorFunctionLength',
          'omega': 'DimensionalFunctionAngle',
          'pressure': 'DimensionalFunctionPressure',
          'force': 'DimensionalVectorFunctionForce',
          'scaling': 'DimensionalFunctionDimensionless',
          'phase_angle': 'DimensionalAngle',
          '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',
          'rotation_origin': 'rotationOrigin',
          'rotation_axis': 'rotationAxis',
          'omega': 'omega',
          'pressure': 'pressure',
          'force': 'force',
          'scaling': 'scaling',
          'phase_angle': 'phaseAngle',
          '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',
          'ROTATING_MOTION': 'RotatingMotionBC',
          'SYMMETRY_PLANE': 'SymmetryPlaneBC',
          'CENTRIFUGAL_FORCE': 'CentrifugalForceBC',
          'FOLLOWER_PRESSURE': 'FollowerPressureBC',
          '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, rotation_origin=None, rotation_axis=None, omega=None, pressure=None, force=None, scaling=None, phase_angle=None, moment=None, remote_point=None, load=None, local_vars_configuration=None):  # noqa: E501
          """OneOfDynamicAnalysisBoundaryConditions - 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._rotation_origin = None
          self._rotation_axis = None
          self._omega = None
          self._pressure = None
          self._force = None
          self._scaling = None
          self._phase_angle = 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 rotation_origin is not None:
              self.rotation_origin = rotation_origin
          if rotation_axis is not None:
              self.rotation_axis = rotation_axis
          if omega is not None:
              self.omega = omega
          if pressure is not None:
              self.pressure = pressure
          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 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 OneOfDynamicAnalysisBoundaryConditions.  # 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 OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
          :rtype: str
          """
          return self._type
  
      @type.setter
      def type(self, type):
          """Sets the type of this OneOfDynamicAnalysisBoundaryConditions.
  
          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 OneOfDynamicAnalysisBoundaryConditions.  # 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 OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
  
  
          :return: The name of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
          :rtype: str
          """
          return self._name
  
      @name.setter
      def name(self, name):
          """Sets the name of this OneOfDynamicAnalysisBoundaryConditions.
  
  
          :param name: The name of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
          :type: str
          """
  
          self._name = name
  
      @property
      def preload(self):
          """Gets the preload of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
  
  
          :return: The preload of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
          :rtype: ForcePreload
          """
          return self._preload
  
      @preload.setter
      def preload(self, preload):
          """Sets the preload of this OneOfDynamicAnalysisBoundaryConditions.
  
  
          :param preload: The preload of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
          :type: ForcePreload
          """
  
          self._preload = preload
  
      @property
      def topological_reference(self):
          """Gets the topological_reference of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
  
  
          :return: The topological_reference of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
          :rtype: TopologicalReference
          """
          return self._topological_reference
  
      @topological_reference.setter
      def topological_reference(self, topological_reference):
          """Sets the topological_reference of this OneOfDynamicAnalysisBoundaryConditions.
  
  
          :param topological_reference: The topological_reference of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
          :type: TopologicalReference
          """
  
          self._topological_reference = topological_reference
  
      @property
      def spring_stiffness(self):
          """Gets the spring_stiffness of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
  
  
          :return: The spring_stiffness of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
          :rtype: OneOfElasticSupportBCSpringStiffness
          """
          return self._spring_stiffness
  
      @spring_stiffness.setter
      def spring_stiffness(self, spring_stiffness):
          """Sets the spring_stiffness of this OneOfDynamicAnalysisBoundaryConditions.
  
  
          :param spring_stiffness: The spring_stiffness of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
          :type: OneOfElasticSupportBCSpringStiffness
          """
  
          self._spring_stiffness = spring_stiffness
  
      @property
      def displacement(self):
          """Gets the displacement of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
  
  
          :return: The displacement of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
          :rtype: DimensionalPartialVectorFunctionLength
          """
          return self._displacement
  
      @displacement.setter
      def displacement(self, displacement):
          """Sets the displacement of this OneOfDynamicAnalysisBoundaryConditions.
  
  
          :param displacement: The displacement of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
          :type: DimensionalPartialVectorFunctionLength
          """
  
          self._displacement = displacement
  
      @property
      def rotation(self):
          """Gets the rotation of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
  
  
          :return: The rotation of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
          :rtype: AngularRotation
          """
          return self._rotation
  
      @rotation.setter
      def rotation(self, rotation):
          """Sets the rotation of this OneOfDynamicAnalysisBoundaryConditions.
  
  
          :param rotation: The rotation of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
          :type: AngularRotation
          """
  
          self._rotation = rotation
  
      @property
      def external_point(self):
          """Gets the external_point of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
  
  
          :return: The external_point of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
          :rtype: DimensionalVectorLength
          """
          return self._external_point
  
      @external_point.setter
      def external_point(self, external_point):
          """Sets the external_point of this OneOfDynamicAnalysisBoundaryConditions.
  
  
          :param external_point: The external_point of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
          :type: DimensionalVectorLength
          """
  
          self._external_point = external_point
  
      @property
      def deformation_behavior(self):
          """Gets the deformation_behavior of this OneOfDynamicAnalysisBoundaryConditions.  # 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 OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
          :rtype: str
          """
          return self._deformation_behavior
  
      @deformation_behavior.setter
      def deformation_behavior(self, deformation_behavior):
          """Sets the deformation_behavior of this OneOfDynamicAnalysisBoundaryConditions.
  
          <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 OneOfDynamicAnalysisBoundaryConditions.  # 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 rotation_origin(self):
          """Gets the rotation_origin of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
  
  
          :return: The rotation_origin of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
          :rtype: DimensionalVectorFunctionLength
          """
          return self._rotation_origin
  
      @rotation_origin.setter
      def rotation_origin(self, rotation_origin):
          """Sets the rotation_origin of this OneOfDynamicAnalysisBoundaryConditions.
  
  
          :param rotation_origin: The rotation_origin of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
          :type: DimensionalVectorFunctionLength
          """
  
          self._rotation_origin = rotation_origin
  
      @property
      def rotation_axis(self):
          """Gets the rotation_axis of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
  
  
          :return: The rotation_axis of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
          :rtype: DimensionalVectorFunctionLength
          """
          return self._rotation_axis
  
      @rotation_axis.setter
      def rotation_axis(self, rotation_axis):
          """Sets the rotation_axis of this OneOfDynamicAnalysisBoundaryConditions.
  
  
          :param rotation_axis: The rotation_axis of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
          :type: DimensionalVectorFunctionLength
          """
  
          self._rotation_axis = rotation_axis
  
      @property
      def omega(self):
          """Gets the omega of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
  
  
          :return: The omega of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
          :rtype: DimensionalFunctionAngle
          """
          return self._omega
  
      @omega.setter
      def omega(self, omega):
          """Sets the omega of this OneOfDynamicAnalysisBoundaryConditions.
  
  
          :param omega: The omega of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
          :type: DimensionalFunctionAngle
          """
  
          self._omega = omega
  
      @property
      def pressure(self):
          """Gets the pressure of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
  
  
          :return: The pressure of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
          :rtype: DimensionalFunctionPressure
          """
          return self._pressure
  
      @pressure.setter
      def pressure(self, pressure):
          """Sets the pressure of this OneOfDynamicAnalysisBoundaryConditions.
  
  
          :param pressure: The pressure of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
          :type: DimensionalFunctionPressure
          """
  
          self._pressure = pressure
  
      @property
      def force(self):
          """Gets the force of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
  
  
          :return: The force of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
          :rtype: DimensionalVectorFunctionForce
          """
          return self._force
  
      @force.setter
      def force(self, force):
          """Sets the force of this OneOfDynamicAnalysisBoundaryConditions.
  
  
          :param force: The force of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
          :type: DimensionalVectorFunctionForce
          """
  
          self._force = force
  
      @property
      def scaling(self):
          """Gets the scaling of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
  
  
          :return: The scaling of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
          :rtype: DimensionalFunctionDimensionless
          """
          return self._scaling
  
      @scaling.setter
      def scaling(self, scaling):
          """Sets the scaling of this OneOfDynamicAnalysisBoundaryConditions.
  
  
          :param scaling: The scaling of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
          :type: DimensionalFunctionDimensionless
          """
  
          self._scaling = scaling
  
      @property
      def phase_angle(self):
          """Gets the phase_angle of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
  
  
          :return: The phase_angle of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
          :rtype: DimensionalAngle
          """
          return self._phase_angle
  
      @phase_angle.setter
      def phase_angle(self, phase_angle):
          """Sets the phase_angle of this OneOfDynamicAnalysisBoundaryConditions.
  
  
          :param phase_angle: The phase_angle of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
          :type: DimensionalAngle
          """
  
          self._phase_angle = phase_angle
  
      @property
      def moment(self):
          """Gets the moment of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
  
  
          :return: The moment of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
          :rtype: DimensionalVectorFunctionTorque
          """
          return self._moment
  
      @moment.setter
      def moment(self, moment):
          """Sets the moment of this OneOfDynamicAnalysisBoundaryConditions.
  
  
          :param moment: The moment of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
          :type: DimensionalVectorFunctionTorque
          """
  
          self._moment = moment
  
      @property
      def remote_point(self):
          """Gets the remote_point of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
  
  
          :return: The remote_point of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
          :rtype: DimensionalVectorLength
          """
          return self._remote_point
  
      @remote_point.setter
      def remote_point(self, remote_point):
          """Sets the remote_point of this OneOfDynamicAnalysisBoundaryConditions.
  
  
          :param remote_point: The remote_point of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
          :type: DimensionalVectorLength
          """
  
          self._remote_point = remote_point
  
      @property
      def load(self):
          """Gets the load of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
  
  
          :return: The load of this OneOfDynamicAnalysisBoundaryConditions.  # noqa: E501
          :rtype: DimensionalVectorFunctionVolumeForce
          """
          return self._load
  
      @load.setter
      def load(self, load):
          """Sets the load of this OneOfDynamicAnalysisBoundaryConditions.
  
  
          :param load: The load of this OneOfDynamicAnalysisBoundaryConditions.  # 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, OneOfDynamicAnalysisBoundaryConditions):
              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, OneOfDynamicAnalysisBoundaryConditions):
              return True
  
          return self.to_dict() != other.to_dict()
  