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