github.com/filecoin-project/bacalhau@v0.3.23-0.20230228154132-45c989550ace/clients/python/bacalhau_apiclient/models/metadata.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 Metadata(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      Attributes:
    30        swagger_types (dict): The key is attribute name
    31                              and the value is attribute type.
    32        attribute_map (dict): The key is attribute name
    33                              and the value is json key in definition.
    34      """
    35      swagger_types = {
    36          'client_id': 'str',
    37          'created_at': 'str',
    38          'id': 'str',
    39          'requester': 'JobRequester'
    40      }
    41  
    42      attribute_map = {
    43          'client_id': 'ClientID',
    44          'created_at': 'CreatedAt',
    45          'id': 'ID',
    46          'requester': 'Requester'
    47      }
    48  
    49      def __init__(self, client_id=None, created_at=None, id=None, requester=None, _configuration=None):  # noqa: E501
    50          """Metadata - a model defined in Swagger"""  # noqa: E501
    51          if _configuration is None:
    52              _configuration = Configuration()
    53          self._configuration = _configuration
    54  
    55          self._client_id = None
    56          self._created_at = None
    57          self._id = None
    58          self._requester = None
    59          self.discriminator = None
    60  
    61          if client_id is not None:
    62              self.client_id = client_id
    63          if created_at is not None:
    64              self.created_at = created_at
    65          if id is not None:
    66              self.id = id
    67          if requester is not None:
    68              self.requester = requester
    69  
    70      @property
    71      def client_id(self):
    72          """Gets the client_id of this Metadata.  # noqa: E501
    73  
    74          The ID of the client that created this job.  # noqa: E501
    75  
    76          :return: The client_id of this Metadata.  # noqa: E501
    77          :rtype: str
    78          """
    79          return self._client_id
    80  
    81      @client_id.setter
    82      def client_id(self, client_id):
    83          """Sets the client_id of this Metadata.
    84  
    85          The ID of the client that created this job.  # noqa: E501
    86  
    87          :param client_id: The client_id of this Metadata.  # noqa: E501
    88          :type: str
    89          """
    90  
    91          self._client_id = client_id
    92  
    93      @property
    94      def created_at(self):
    95          """Gets the created_at of this Metadata.  # noqa: E501
    96  
    97          Time the job was submitted to the bacalhau network.  # noqa: E501
    98  
    99          :return: The created_at of this Metadata.  # noqa: E501
   100          :rtype: str
   101          """
   102          return self._created_at
   103  
   104      @created_at.setter
   105      def created_at(self, created_at):
   106          """Sets the created_at of this Metadata.
   107  
   108          Time the job was submitted to the bacalhau network.  # noqa: E501
   109  
   110          :param created_at: The created_at of this Metadata.  # noqa: E501
   111          :type: str
   112          """
   113  
   114          self._created_at = created_at
   115  
   116      @property
   117      def id(self):
   118          """Gets the id of this Metadata.  # noqa: E501
   119  
   120          The unique global ID of this job in the bacalhau network.  # noqa: E501
   121  
   122          :return: The id of this Metadata.  # noqa: E501
   123          :rtype: str
   124          """
   125          return self._id
   126  
   127      @id.setter
   128      def id(self, id):
   129          """Sets the id of this Metadata.
   130  
   131          The unique global ID of this job in the bacalhau network.  # noqa: E501
   132  
   133          :param id: The id of this Metadata.  # noqa: E501
   134          :type: str
   135          """
   136  
   137          self._id = id
   138  
   139      @property
   140      def requester(self):
   141          """Gets the requester of this Metadata.  # noqa: E501
   142  
   143  
   144          :return: The requester of this Metadata.  # noqa: E501
   145          :rtype: JobRequester
   146          """
   147          return self._requester
   148  
   149      @requester.setter
   150      def requester(self, requester):
   151          """Sets the requester of this Metadata.
   152  
   153  
   154          :param requester: The requester of this Metadata.  # noqa: E501
   155          :type: JobRequester
   156          """
   157  
   158          self._requester = requester
   159  
   160      def to_dict(self):
   161          """Returns the model properties as a dict"""
   162          result = {}
   163  
   164          for attr, _ in six.iteritems(self.swagger_types):
   165              value = getattr(self, attr)
   166              if isinstance(value, list):
   167                  result[attr] = list(map(
   168                      lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
   169                      value
   170                  ))
   171              elif hasattr(value, "to_dict"):
   172                  result[attr] = value.to_dict()
   173              elif isinstance(value, dict):
   174                  result[attr] = dict(map(
   175                      lambda item: (item[0], item[1].to_dict())
   176                      if hasattr(item[1], "to_dict") else item,
   177                      value.items()
   178                  ))
   179              else:
   180                  result[attr] = value
   181          if issubclass(Metadata, dict):
   182              for key, value in self.items():
   183                  result[key] = value
   184  
   185          return result
   186  
   187      def to_str(self):
   188          """Returns the string representation of the model"""
   189          return pprint.pformat(self.to_dict())
   190  
   191      def __repr__(self):
   192          """For `print` and `pprint`"""
   193          return self.to_str()
   194  
   195      def __eq__(self, other):
   196          """Returns true if both objects are equal"""
   197          if not isinstance(other, Metadata):
   198              return False
   199  
   200          return self.to_dict() == other.to_dict()
   201  
   202      def __ne__(self, other):
   203          """Returns true if both objects are not equal"""
   204          if not isinstance(other, Metadata):
   205              return True
   206  
   207          return self.to_dict() != other.to_dict()