lentiq.models.project module
# coding: utf-8 ####alex test """ """ import pprint import re # noqa: F401 import six from lentiq.models.job_identifier import JobIdentifier # noqa: F401,E501 from lentiq.models.project_current_operation_status import ProjectCurrentOperationStatus # noqa: F401,E501 from lentiq.models.project_quota import ProjectQuota # noqa: F401,E501 from lentiq.models.whitelisted_ip import WhitelistedIP # noqa: F401,E501 class Project(object): """ """ """ 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 = { 'contains_internal_services': 'bool', 'created_timestamp_seconds': 'int', 'datapool_name': 'str', 'generation': 'int', 'name': 'str', 'ongoing_job': 'JobIdentifier', 'project_current_operation_status': 'ProjectCurrentOperationStatus', 'project_quota': 'ProjectQuota', 'status': 'str', 'updated_timestamp_seconds': 'int', 'whitelisted_i_ps': 'list[WhitelistedIP]' } attribute_map = { 'contains_internal_services': 'containsInternalServices', 'created_timestamp_seconds': 'createdTimestampSeconds', 'datapool_name': 'datapoolName', 'generation': 'generation', 'name': 'name', 'ongoing_job': 'ongoingJob', 'project_current_operation_status': 'projectCurrentOperationStatus', 'project_quota': 'projectQuota', 'status': 'status', 'updated_timestamp_seconds': 'updatedTimestampSeconds', 'whitelisted_i_ps': 'whitelistedIPs' } discriminator = None def __init__(self, contains_internal_services=None, created_timestamp_seconds=None, datapool_name=None, generation=None, name=None, ongoing_job=None, project_current_operation_status=None, project_quota=None, status=None, updated_timestamp_seconds=None, whitelisted_i_ps=None): # noqa: E501 """Project - a model defined in Swagger""" # noqa: E501 self._contains_internal_services = None self._created_timestamp_seconds = None self._datapool_name = None self._generation = None self._name = None self._ongoing_job = None self._project_current_operation_status = None self._project_quota = None self._status = None self._updated_timestamp_seconds = None self._whitelisted_i_ps = None if contains_internal_services is not None: self.contains_internal_services = contains_internal_services if created_timestamp_seconds is not None: self.created_timestamp_seconds = created_timestamp_seconds if datapool_name is not None: self.datapool_name = datapool_name if generation is not None: self.generation = generation if name is not None: self.name = name if ongoing_job is not None: self.ongoing_job = ongoing_job if project_current_operation_status is not None: self.project_current_operation_status = project_current_operation_status if project_quota is not None: self.project_quota = project_quota if status is not None: self.status = status if updated_timestamp_seconds is not None: self.updated_timestamp_seconds = updated_timestamp_seconds if whitelisted_i_ps is not None: self.whitelisted_i_ps = whitelisted_i_ps @property def contains_internal_services(self): """Gets the contains_internal_services of this Project. # noqa: E501 Set automatically to true on projects that are used internally by the system to host mandatory applications. Otherwise false. # noqa: E501 :return: The contains_internal_services of this Project. # noqa: E501 :rtype: bool """ return self._contains_internal_services @contains_internal_services.setter def contains_internal_services(self, contains_internal_services): """Sets the contains_internal_services of this Project. Set automatically to true on projects that are used internally by the system to host mandatory applications. Otherwise false. # noqa: E501 :param contains_internal_services: The contains_internal_services of this Project. # noqa: E501 :type: bool """ self._contains_internal_services = contains_internal_services @property def created_timestamp_seconds(self): """Gets the created_timestamp_seconds of this Project. # noqa: E501 :return: The created_timestamp_seconds of this Project. # noqa: E501 :rtype: int """ return self._created_timestamp_seconds @created_timestamp_seconds.setter def created_timestamp_seconds(self, created_timestamp_seconds): """Sets the created_timestamp_seconds of this Project. :param created_timestamp_seconds: The created_timestamp_seconds of this Project. # noqa: E501 :type: int """ self._created_timestamp_seconds = created_timestamp_seconds @property def datapool_name(self): """Gets the datapool_name of this Project. # noqa: E501 The name of the datapool that will conume resources for this project. # noqa: E501 :return: The datapool_name of this Project. # noqa: E501 :rtype: str """ return self._datapool_name @datapool_name.setter def datapool_name(self, datapool_name): """Sets the datapool_name of this Project. The name of the datapool that will conume resources for this project. # noqa: E501 :param datapool_name: The datapool_name of this Project. # noqa: E501 :type: str """ self._datapool_name = datapool_name @property def generation(self): """Gets the generation of this Project. # noqa: E501 A sequence number representing a specific generation of the project state. Read-only value set by the system. # noqa: E501 :return: The generation of this Project. # noqa: E501 :rtype: int """ return self._generation @generation.setter def generation(self, generation): """Sets the generation of this Project. A sequence number representing a specific generation of the project state. Read-only value set by the system. # noqa: E501 :param generation: The generation of this Project. # noqa: E501 :type: int """ self._generation = generation @property def name(self): """Gets the name of this Project. # noqa: E501 Unique name to identify the project amongst other projects belonging to the datapool. # noqa: E501 :return: The name of this Project. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this Project. Unique name to identify the project amongst other projects belonging to the datapool. # noqa: E501 :param name: The name of this Project. # noqa: E501 :type: str """ self._name = name @property def ongoing_job(self): """Gets the ongoing_job of this Project. # noqa: E501 :return: The ongoing_job of this Project. # noqa: E501 :rtype: JobIdentifier """ return self._ongoing_job @ongoing_job.setter def ongoing_job(self, ongoing_job): """Sets the ongoing_job of this Project. :param ongoing_job: The ongoing_job of this Project. # noqa: E501 :type: JobIdentifier """ self._ongoing_job = ongoing_job @property def project_current_operation_status(self): """Gets the project_current_operation_status of this Project. # noqa: E501 :return: The project_current_operation_status of this Project. # noqa: E501 :rtype: ProjectCurrentOperationStatus """ return self._project_current_operation_status @project_current_operation_status.setter def project_current_operation_status(self, project_current_operation_status): """Sets the project_current_operation_status of this Project. :param project_current_operation_status: The project_current_operation_status of this Project. # noqa: E501 :type: ProjectCurrentOperationStatus """ self._project_current_operation_status = project_current_operation_status @property def project_quota(self): """Gets the project_quota of this Project. # noqa: E501 :return: The project_quota of this Project. # noqa: E501 :rtype: ProjectQuota """ return self._project_quota @project_quota.setter def project_quota(self, project_quota): """Sets the project_quota of this Project. :param project_quota: The project_quota of this Project. # noqa: E501 :type: ProjectQuota """ self._project_quota = project_quota @property def status(self): """Gets the status of this Project. # noqa: E501 The current status of the project. # noqa: E501 :return: The status of this Project. # noqa: E501 :rtype: str """ return self._status @status.setter def status(self, status): """Sets the status of this Project. The current status of the project. # noqa: E501 :param status: The status of this Project. # noqa: E501 :type: str """ allowed_values = ["running", "creating", "deleting", "ongoing_change"] # noqa: E501 if status not in allowed_values: raise ValueError( "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 .format(status, allowed_values) ) self._status = status @property def updated_timestamp_seconds(self): """Gets the updated_timestamp_seconds of this Project. # noqa: E501 :return: The updated_timestamp_seconds of this Project. # noqa: E501 :rtype: int """ return self._updated_timestamp_seconds @updated_timestamp_seconds.setter def updated_timestamp_seconds(self, updated_timestamp_seconds): """Sets the updated_timestamp_seconds of this Project. :param updated_timestamp_seconds: The updated_timestamp_seconds of this Project. # noqa: E501 :type: int """ self._updated_timestamp_seconds = updated_timestamp_seconds @property def whitelisted_i_ps(self): """Gets the whitelisted_i_ps of this Project. # noqa: E501 :return: The whitelisted_i_ps of this Project. # noqa: E501 :rtype: list[WhitelistedIP] """ return self._whitelisted_i_ps @whitelisted_i_ps.setter def whitelisted_i_ps(self, whitelisted_i_ps): """Sets the whitelisted_i_ps of this Project. :param whitelisted_i_ps: The whitelisted_i_ps of this Project. # noqa: E501 :type: list[WhitelistedIP] """ self._whitelisted_i_ps = whitelisted_i_ps 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(Project, dict): for key, value in self.items(): result[key] = value return result 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, Project): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
Classes
class Project
class Project(object): """ """ """ 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 = { 'contains_internal_services': 'bool', 'created_timestamp_seconds': 'int', 'datapool_name': 'str', 'generation': 'int', 'name': 'str', 'ongoing_job': 'JobIdentifier', 'project_current_operation_status': 'ProjectCurrentOperationStatus', 'project_quota': 'ProjectQuota', 'status': 'str', 'updated_timestamp_seconds': 'int', 'whitelisted_i_ps': 'list[WhitelistedIP]' } attribute_map = { 'contains_internal_services': 'containsInternalServices', 'created_timestamp_seconds': 'createdTimestampSeconds', 'datapool_name': 'datapoolName', 'generation': 'generation', 'name': 'name', 'ongoing_job': 'ongoingJob', 'project_current_operation_status': 'projectCurrentOperationStatus', 'project_quota': 'projectQuota', 'status': 'status', 'updated_timestamp_seconds': 'updatedTimestampSeconds', 'whitelisted_i_ps': 'whitelistedIPs' } discriminator = None def __init__(self, contains_internal_services=None, created_timestamp_seconds=None, datapool_name=None, generation=None, name=None, ongoing_job=None, project_current_operation_status=None, project_quota=None, status=None, updated_timestamp_seconds=None, whitelisted_i_ps=None): # noqa: E501 """Project - a model defined in Swagger""" # noqa: E501 self._contains_internal_services = None self._created_timestamp_seconds = None self._datapool_name = None self._generation = None self._name = None self._ongoing_job = None self._project_current_operation_status = None self._project_quota = None self._status = None self._updated_timestamp_seconds = None self._whitelisted_i_ps = None if contains_internal_services is not None: self.contains_internal_services = contains_internal_services if created_timestamp_seconds is not None: self.created_timestamp_seconds = created_timestamp_seconds if datapool_name is not None: self.datapool_name = datapool_name if generation is not None: self.generation = generation if name is not None: self.name = name if ongoing_job is not None: self.ongoing_job = ongoing_job if project_current_operation_status is not None: self.project_current_operation_status = project_current_operation_status if project_quota is not None: self.project_quota = project_quota if status is not None: self.status = status if updated_timestamp_seconds is not None: self.updated_timestamp_seconds = updated_timestamp_seconds if whitelisted_i_ps is not None: self.whitelisted_i_ps = whitelisted_i_ps @property def contains_internal_services(self): """Gets the contains_internal_services of this Project. # noqa: E501 Set automatically to true on projects that are used internally by the system to host mandatory applications. Otherwise false. # noqa: E501 :return: The contains_internal_services of this Project. # noqa: E501 :rtype: bool """ return self._contains_internal_services @contains_internal_services.setter def contains_internal_services(self, contains_internal_services): """Sets the contains_internal_services of this Project. Set automatically to true on projects that are used internally by the system to host mandatory applications. Otherwise false. # noqa: E501 :param contains_internal_services: The contains_internal_services of this Project. # noqa: E501 :type: bool """ self._contains_internal_services = contains_internal_services @property def created_timestamp_seconds(self): """Gets the created_timestamp_seconds of this Project. # noqa: E501 :return: The created_timestamp_seconds of this Project. # noqa: E501 :rtype: int """ return self._created_timestamp_seconds @created_timestamp_seconds.setter def created_timestamp_seconds(self, created_timestamp_seconds): """Sets the created_timestamp_seconds of this Project. :param created_timestamp_seconds: The created_timestamp_seconds of this Project. # noqa: E501 :type: int """ self._created_timestamp_seconds = created_timestamp_seconds @property def datapool_name(self): """Gets the datapool_name of this Project. # noqa: E501 The name of the datapool that will conume resources for this project. # noqa: E501 :return: The datapool_name of this Project. # noqa: E501 :rtype: str """ return self._datapool_name @datapool_name.setter def datapool_name(self, datapool_name): """Sets the datapool_name of this Project. The name of the datapool that will conume resources for this project. # noqa: E501 :param datapool_name: The datapool_name of this Project. # noqa: E501 :type: str """ self._datapool_name = datapool_name @property def generation(self): """Gets the generation of this Project. # noqa: E501 A sequence number representing a specific generation of the project state. Read-only value set by the system. # noqa: E501 :return: The generation of this Project. # noqa: E501 :rtype: int """ return self._generation @generation.setter def generation(self, generation): """Sets the generation of this Project. A sequence number representing a specific generation of the project state. Read-only value set by the system. # noqa: E501 :param generation: The generation of this Project. # noqa: E501 :type: int """ self._generation = generation @property def name(self): """Gets the name of this Project. # noqa: E501 Unique name to identify the project amongst other projects belonging to the datapool. # noqa: E501 :return: The name of this Project. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this Project. Unique name to identify the project amongst other projects belonging to the datapool. # noqa: E501 :param name: The name of this Project. # noqa: E501 :type: str """ self._name = name @property def ongoing_job(self): """Gets the ongoing_job of this Project. # noqa: E501 :return: The ongoing_job of this Project. # noqa: E501 :rtype: JobIdentifier """ return self._ongoing_job @ongoing_job.setter def ongoing_job(self, ongoing_job): """Sets the ongoing_job of this Project. :param ongoing_job: The ongoing_job of this Project. # noqa: E501 :type: JobIdentifier """ self._ongoing_job = ongoing_job @property def project_current_operation_status(self): """Gets the project_current_operation_status of this Project. # noqa: E501 :return: The project_current_operation_status of this Project. # noqa: E501 :rtype: ProjectCurrentOperationStatus """ return self._project_current_operation_status @project_current_operation_status.setter def project_current_operation_status(self, project_current_operation_status): """Sets the project_current_operation_status of this Project. :param project_current_operation_status: The project_current_operation_status of this Project. # noqa: E501 :type: ProjectCurrentOperationStatus """ self._project_current_operation_status = project_current_operation_status @property def project_quota(self): """Gets the project_quota of this Project. # noqa: E501 :return: The project_quota of this Project. # noqa: E501 :rtype: ProjectQuota """ return self._project_quota @project_quota.setter def project_quota(self, project_quota): """Sets the project_quota of this Project. :param project_quota: The project_quota of this Project. # noqa: E501 :type: ProjectQuota """ self._project_quota = project_quota @property def status(self): """Gets the status of this Project. # noqa: E501 The current status of the project. # noqa: E501 :return: The status of this Project. # noqa: E501 :rtype: str """ return self._status @status.setter def status(self, status): """Sets the status of this Project. The current status of the project. # noqa: E501 :param status: The status of this Project. # noqa: E501 :type: str """ allowed_values = ["running", "creating", "deleting", "ongoing_change"] # noqa: E501 if status not in allowed_values: raise ValueError( "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 .format(status, allowed_values) ) self._status = status @property def updated_timestamp_seconds(self): """Gets the updated_timestamp_seconds of this Project. # noqa: E501 :return: The updated_timestamp_seconds of this Project. # noqa: E501 :rtype: int """ return self._updated_timestamp_seconds @updated_timestamp_seconds.setter def updated_timestamp_seconds(self, updated_timestamp_seconds): """Sets the updated_timestamp_seconds of this Project. :param updated_timestamp_seconds: The updated_timestamp_seconds of this Project. # noqa: E501 :type: int """ self._updated_timestamp_seconds = updated_timestamp_seconds @property def whitelisted_i_ps(self): """Gets the whitelisted_i_ps of this Project. # noqa: E501 :return: The whitelisted_i_ps of this Project. # noqa: E501 :rtype: list[WhitelistedIP] """ return self._whitelisted_i_ps @whitelisted_i_ps.setter def whitelisted_i_ps(self, whitelisted_i_ps): """Sets the whitelisted_i_ps of this Project. :param whitelisted_i_ps: The whitelisted_i_ps of this Project. # noqa: E501 :type: list[WhitelistedIP] """ self._whitelisted_i_ps = whitelisted_i_ps 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(Project, dict): for key, value in self.items(): result[key] = value return result 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, Project): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
Ancestors (in MRO)
- Project
- builtins.object
Class variables
var attribute_map
var discriminator
var swagger_types
Static methods
def __init__(
self, contains_internal_services=None, created_timestamp_seconds=None, datapool_name=None, generation=None, name=None, ongoing_job=None, project_current_operation_status=None, project_quota=None, status=None, updated_timestamp_seconds=None, whitelisted_i_ps=None)
Project - a model defined in Swagger
def __init__(self, contains_internal_services=None, created_timestamp_seconds=None, datapool_name=None, generation=None, name=None, ongoing_job=None, project_current_operation_status=None, project_quota=None, status=None, updated_timestamp_seconds=None, whitelisted_i_ps=None): # noqa: E501 """Project - a model defined in Swagger""" # noqa: E501 self._contains_internal_services = None self._created_timestamp_seconds = None self._datapool_name = None self._generation = None self._name = None self._ongoing_job = None self._project_current_operation_status = None self._project_quota = None self._status = None self._updated_timestamp_seconds = None self._whitelisted_i_ps = None if contains_internal_services is not None: self.contains_internal_services = contains_internal_services if created_timestamp_seconds is not None: self.created_timestamp_seconds = created_timestamp_seconds if datapool_name is not None: self.datapool_name = datapool_name if generation is not None: self.generation = generation if name is not None: self.name = name if ongoing_job is not None: self.ongoing_job = ongoing_job if project_current_operation_status is not None: self.project_current_operation_status = project_current_operation_status if project_quota is not None: self.project_quota = project_quota if status is not None: self.status = status if updated_timestamp_seconds is not None: self.updated_timestamp_seconds = updated_timestamp_seconds if whitelisted_i_ps is not None: self.whitelisted_i_ps = whitelisted_i_ps
def to_dict(
self)
Returns the model properties as a dict
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(Project, dict): for key, value in self.items(): result[key] = value return result
def to_str(
self)
Returns the string representation of the model
def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict())
Instance variables
var contains_internal_services
Gets the contains_internal_services of this Project. # noqa: E501
Set automatically to true on projects that are used internally by the system to host mandatory applications. Otherwise false. # noqa: E501
:return: The contains_internal_services of this Project. # noqa: E501 :rtype: bool
var created_timestamp_seconds
Gets the created_timestamp_seconds of this Project. # noqa: E501
:return: The created_timestamp_seconds of this Project. # noqa: E501 :rtype: int
var datapool_name
Gets the datapool_name of this Project. # noqa: E501
The name of the datapool that will conume resources for this project. # noqa: E501
:return: The datapool_name of this Project. # noqa: E501 :rtype: str
var generation
Gets the generation of this Project. # noqa: E501
A sequence number representing a specific generation of the project state. Read-only value set by the system. # noqa: E501
:return: The generation of this Project. # noqa: E501 :rtype: int
var name
Gets the name of this Project. # noqa: E501
Unique name to identify the project amongst other projects belonging to the datapool. # noqa: E501
:return: The name of this Project. # noqa: E501 :rtype: str
var ongoing_job
Gets the ongoing_job of this Project. # noqa: E501
:return: The ongoing_job of this Project. # noqa: E501 :rtype: JobIdentifier
var project_current_operation_status
Gets the project_current_operation_status of this Project. # noqa: E501
:return: The project_current_operation_status of this Project. # noqa: E501 :rtype: ProjectCurrentOperationStatus
var project_quota
Gets the project_quota of this Project. # noqa: E501
:return: The project_quota of this Project. # noqa: E501 :rtype: ProjectQuota
var status
Gets the status of this Project. # noqa: E501
The current status of the project. # noqa: E501
:return: The status of this Project. # noqa: E501 :rtype: str
var updated_timestamp_seconds
Gets the updated_timestamp_seconds of this Project. # noqa: E501
:return: The updated_timestamp_seconds of this Project. # noqa: E501 :rtype: int
var whitelisted_i_ps
Gets the whitelisted_i_ps of this Project. # noqa: E501
:return: The whitelisted_i_ps of this Project. # noqa: E501 :rtype: list[WhitelistedIP]