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