github.com/filecoin-project/bacalhau@v0.3.23-0.20230228154132-45c989550ace/clients/python/bacalhau_apiclient/models/verifier.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 Verifier(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      _0 = "0"
    32      _1 = "1"
    33      _2 = "2"
    34      _3 = "3"
    35  
    36      """
    37      Attributes:
    38        swagger_types (dict): The key is attribute name
    39                              and the value is attribute type.
    40        attribute_map (dict): The key is attribute name
    41                              and the value is json key in definition.
    42      """
    43      swagger_types = {
    44      }
    45  
    46      attribute_map = {
    47      }
    48  
    49      def __init__(self, _configuration=None):  # noqa: E501
    50          """Verifier - a model defined in Swagger"""  # noqa: E501
    51          if _configuration is None:
    52              _configuration = Configuration()
    53          self._configuration = _configuration
    54          self.discriminator = None
    55  
    56      def to_dict(self):
    57          """Returns the model properties as a dict"""
    58          result = {}
    59  
    60          for attr, _ in six.iteritems(self.swagger_types):
    61              value = getattr(self, attr)
    62              if isinstance(value, list):
    63                  result[attr] = list(map(
    64                      lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
    65                      value
    66                  ))
    67              elif hasattr(value, "to_dict"):
    68                  result[attr] = value.to_dict()
    69              elif isinstance(value, dict):
    70                  result[attr] = dict(map(
    71                      lambda item: (item[0], item[1].to_dict())
    72                      if hasattr(item[1], "to_dict") else item,
    73                      value.items()
    74                  ))
    75              else:
    76                  result[attr] = value
    77          if issubclass(Verifier, dict):
    78              for key, value in self.items():
    79                  result[key] = value
    80  
    81          return result
    82  
    83      def to_str(self):
    84          """Returns the string representation of the model"""
    85          return pprint.pformat(self.to_dict())
    86  
    87      def __repr__(self):
    88          """For `print` and `pprint`"""
    89          return self.to_str()
    90  
    91      def __eq__(self, other):
    92          """Returns true if both objects are equal"""
    93          if not isinstance(other, Verifier):
    94              return False
    95  
    96          return self.to_dict() == other.to_dict()
    97  
    98      def __ne__(self, other):
    99          """Returns true if both objects are not equal"""
   100          if not isinstance(other, Verifier):
   101              return True
   102  
   103          return self.to_dict() != other.to_dict()