Source code for thamos.swagger_client.models.provenance_result_response_result_parameters
# coding: utf-8
"""
Thoth User API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: 0.7.0-dev
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
[docs]class ProvenanceResultResponseResultParameters(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'project': 'ProjectDef',
'whitelisted_sources': 'list[str]'
}
attribute_map = {
'project': 'project',
'whitelisted_sources': 'whitelisted_sources'
}
def __init__(self, project=None, whitelisted_sources=None): # noqa: E501
"""ProvenanceResultResponseResultParameters - a model defined in Swagger""" # noqa: E501
self._project = None
self._whitelisted_sources = None
self.discriminator = None
self.project = project
if whitelisted_sources is not None:
self.whitelisted_sources = whitelisted_sources
@property
def project(self):
"""Gets the project of this ProvenanceResultResponseResultParameters. # noqa: E501
:return: The project of this ProvenanceResultResponseResultParameters. # noqa: E501
:rtype: ProjectDef
"""
return self._project
@project.setter
def project(self, project):
"""Sets the project of this ProvenanceResultResponseResultParameters.
:param project: The project of this ProvenanceResultResponseResultParameters. # noqa: E501
:type: ProjectDef
"""
if project is None:
raise ValueError("Invalid value for `project`, must not be `None`") # noqa: E501
self._project = project
@property
def whitelisted_sources(self):
"""Gets the whitelisted_sources of this ProvenanceResultResponseResultParameters. # noqa: E501
Python package indexes whitelisted # noqa: E501
:return: The whitelisted_sources of this ProvenanceResultResponseResultParameters. # noqa: E501
:rtype: list[str]
"""
return self._whitelisted_sources
@whitelisted_sources.setter
def whitelisted_sources(self, whitelisted_sources):
"""Sets the whitelisted_sources of this ProvenanceResultResponseResultParameters.
Python package indexes whitelisted # noqa: E501
:param whitelisted_sources: The whitelisted_sources of this ProvenanceResultResponseResultParameters. # noqa: E501
:type: list[str]
"""
self._whitelisted_sources = whitelisted_sources
[docs] def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
result[attr] = value
if issubclass(ProvenanceResultResponseResultParameters, dict):
for key, value in self.items():
result[key] = value
return result
[docs] def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, ProvenanceResultResponseResultParameters):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other