github.com/filecoin-project/bacalhau@v0.3.23-0.20230228154132-45c989550ace/clients/python/bacalhau_apiclient/models/job_requester.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 JobRequester(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 'requester_node_id': 'str', 37 'requester_public_key': 'list[int]' 38 } 39 40 attribute_map = { 41 'requester_node_id': 'RequesterNodeID', 42 'requester_public_key': 'RequesterPublicKey' 43 } 44 45 def __init__(self, requester_node_id=None, requester_public_key=None, _configuration=None): # noqa: E501 46 """JobRequester - a model defined in Swagger""" # noqa: E501 47 if _configuration is None: 48 _configuration = Configuration() 49 self._configuration = _configuration 50 51 self._requester_node_id = None 52 self._requester_public_key = None 53 self.discriminator = None 54 55 if requester_node_id is not None: 56 self.requester_node_id = requester_node_id 57 if requester_public_key is not None: 58 self.requester_public_key = requester_public_key 59 60 @property 61 def requester_node_id(self): 62 """Gets the requester_node_id of this JobRequester. # noqa: E501 63 64 The ID of the requester node that owns this job. # noqa: E501 65 66 :return: The requester_node_id of this JobRequester. # noqa: E501 67 :rtype: str 68 """ 69 return self._requester_node_id 70 71 @requester_node_id.setter 72 def requester_node_id(self, requester_node_id): 73 """Sets the requester_node_id of this JobRequester. 74 75 The ID of the requester node that owns this job. # noqa: E501 76 77 :param requester_node_id: The requester_node_id of this JobRequester. # noqa: E501 78 :type: str 79 """ 80 81 self._requester_node_id = requester_node_id 82 83 @property 84 def requester_public_key(self): 85 """Gets the requester_public_key of this JobRequester. # noqa: E501 86 87 The public key of the Requester node that created this job This can be used to encrypt messages back to the creator # noqa: E501 88 89 :return: The requester_public_key of this JobRequester. # noqa: E501 90 :rtype: list[int] 91 """ 92 return self._requester_public_key 93 94 @requester_public_key.setter 95 def requester_public_key(self, requester_public_key): 96 """Sets the requester_public_key of this JobRequester. 97 98 The public key of the Requester node that created this job This can be used to encrypt messages back to the creator # noqa: E501 99 100 :param requester_public_key: The requester_public_key of this JobRequester. # noqa: E501 101 :type: list[int] 102 """ 103 104 self._requester_public_key = requester_public_key 105 106 def to_dict(self): 107 """Returns the model properties as a dict""" 108 result = {} 109 110 for attr, _ in six.iteritems(self.swagger_types): 111 value = getattr(self, attr) 112 if isinstance(value, list): 113 result[attr] = list(map( 114 lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 115 value 116 )) 117 elif hasattr(value, "to_dict"): 118 result[attr] = value.to_dict() 119 elif isinstance(value, dict): 120 result[attr] = dict(map( 121 lambda item: (item[0], item[1].to_dict()) 122 if hasattr(item[1], "to_dict") else item, 123 value.items() 124 )) 125 else: 126 result[attr] = value 127 if issubclass(JobRequester, dict): 128 for key, value in self.items(): 129 result[key] = value 130 131 return result 132 133 def to_str(self): 134 """Returns the string representation of the model""" 135 return pprint.pformat(self.to_dict()) 136 137 def __repr__(self): 138 """For `print` and `pprint`""" 139 return self.to_str() 140 141 def __eq__(self, other): 142 """Returns true if both objects are equal""" 143 if not isinstance(other, JobRequester): 144 return False 145 146 return self.to_dict() == other.to_dict() 147 148 def __ne__(self, other): 149 """Returns true if both objects are not equal""" 150 if not isinstance(other, JobRequester): 151 return True 152 153 return self.to_dict() != other.to_dict()