github.com/filecoin-project/bacalhau@v0.3.23-0.20230228154132-45c989550ace/clients/python/bacalhau_apiclient/models/selection_operator.py (about)

     1  # coding: utf-8
     2  
     3  """
     4      Bacalhau API
     5  
     6      This page is the reference of the Bacalhau REST API. Project docs are available at https://docs.bacalhau.org/. Find more information about Bacalhau at https://github.com/filecoin-project/bacalhau.  # noqa: E501
     7  
     8      OpenAPI spec version: 0.3.22.post4
     9      Contact: team@bacalhau.org
    10      Generated by: https://github.com/swagger-api/swagger-codegen.git
    11  """
    12  
    13  
    14  import pprint
    15  import re  # noqa: F401
    16  
    17  import six
    18  
    19  from bacalhau_apiclient.configuration import Configuration
    20  
    21  
    22  class SelectionOperator(object):
    23      """NOTE: This class is auto generated by the swagger code generator program.
    24  
    25      Do not edit the class manually.
    26      """
    27  
    28      """
    29      allowed enum values
    30      """
    31      _ = "!"
    32      __2 = "="
    33      __3 = "=="
    34      IN = "in"
    35      __4 = "!="
    36      NOTIN = "notin"
    37      EXISTS = "exists"
    38      GT = "gt"
    39      LT = "lt"
    40  
    41      """
    42      Attributes:
    43        swagger_types (dict): The key is attribute name
    44                              and the value is attribute type.
    45        attribute_map (dict): The key is attribute name
    46                              and the value is json key in definition.
    47      """
    48      swagger_types = {
    49      }
    50  
    51      attribute_map = {
    52      }
    53  
    54      def __init__(self, _configuration=None):  # noqa: E501
    55          """SelectionOperator - a model defined in Swagger"""  # noqa: E501
    56          if _configuration is None:
    57              _configuration = Configuration()
    58          self._configuration = _configuration
    59          self.discriminator = None
    60  
    61      def to_dict(self):
    62          """Returns the model properties as a dict"""
    63          result = {}
    64  
    65          for attr, _ in six.iteritems(self.swagger_types):
    66              value = getattr(self, attr)
    67              if isinstance(value, list):
    68                  result[attr] = list(map(
    69                      lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
    70                      value
    71                  ))
    72              elif hasattr(value, "to_dict"):
    73                  result[attr] = value.to_dict()
    74              elif isinstance(value, dict):
    75                  result[attr] = dict(map(
    76                      lambda item: (item[0], item[1].to_dict())
    77                      if hasattr(item[1], "to_dict") else item,
    78                      value.items()
    79                  ))
    80              else:
    81                  result[attr] = value
    82          if issubclass(SelectionOperator, dict):
    83              for key, value in self.items():
    84                  result[key] = value
    85  
    86          return result
    87  
    88      def to_str(self):
    89          """Returns the string representation of the model"""
    90          return pprint.pformat(self.to_dict())
    91  
    92      def __repr__(self):
    93          """For `print` and `pprint`"""
    94          return self.to_str()
    95  
    96      def __eq__(self, other):
    97          """Returns true if both objects are equal"""
    98          if not isinstance(other, SelectionOperator):
    99              return False
   100  
   101          return self.to_dict() == other.to_dict()
   102  
   103      def __ne__(self, other):
   104          """Returns true if both objects are not equal"""
   105          if not isinstance(other, SelectionOperator):
   106              return True
   107  
   108          return self.to_dict() != other.to_dict()