Source code for gemmapy.sdk.models.gene_value_object

# coding: utf-8

"""
    Gemma RESTful API

    This website documents the usage of the [Gemma RESTful API](https://gemma.msl.ubc.ca/rest/v2/). Here you can find example script usage of the API, as well as graphical interface for each endpoint, with description of its parameters and the endpoint URL.  Use of this webpage and the Gemma Web services, including the REST API, is subject to [these terms and conditions](https://pavlidislab.github.io/Gemma/terms.html). Please read these in full before continuing to use this webpage or any other part of the Gemma system.  You can [consult the CHANGELOG.md file](https://gemma.msl.ubc.ca/resources/restapidocs/CHANGELOG.md) to view  release notes and recent changes to the Gemma RESTful API.   # noqa: E501

    OpenAPI spec version: 2.7.4
    Contact: pavlab-support@msl.ubc.ca
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

[docs] class GeneValueObject(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 = { 'id': 'int', 'aliases': 'list[str]', 'multifunctionality_rank': 'float', 'ncbi_id': 'int', 'ensembl_id': 'str', 'accessions': 'list[DatabaseEntryValueObject]', 'official_name': 'str', 'official_symbol': 'str', 'taxon': 'TaxonValueObject' } attribute_map = { 'id': 'id', 'aliases': 'aliases', 'multifunctionality_rank': 'multifunctionalityRank', 'ncbi_id': 'ncbiId', 'ensembl_id': 'ensemblId', 'accessions': 'accessions', 'official_name': 'officialName', 'official_symbol': 'officialSymbol', 'taxon': 'taxon' } def __init__(self, id=None, aliases=None, multifunctionality_rank=None, ncbi_id=None, ensembl_id=None, accessions=None, official_name=None, official_symbol=None, taxon=None): # noqa: E501 """GeneValueObject - a model defined in Swagger""" # noqa: E501 self._id = None self._aliases = None self._multifunctionality_rank = None self._ncbi_id = None self._ensembl_id = None self._accessions = None self._official_name = None self._official_symbol = None self._taxon = None self.discriminator = None if id is not None: self.id = id if aliases is not None: self.aliases = aliases if multifunctionality_rank is not None: self.multifunctionality_rank = multifunctionality_rank if ncbi_id is not None: self.ncbi_id = ncbi_id if ensembl_id is not None: self.ensembl_id = ensembl_id if accessions is not None: self.accessions = accessions if official_name is not None: self.official_name = official_name if official_symbol is not None: self.official_symbol = official_symbol if taxon is not None: self.taxon = taxon @property def id(self): """Gets the id of this GeneValueObject. # noqa: E501 :return: The id of this GeneValueObject. # noqa: E501 :rtype: int """ return self._id @id.setter def id(self, id): """Sets the id of this GeneValueObject. :param id: The id of this GeneValueObject. # noqa: E501 :type: int """ self._id = id @property def aliases(self): """Gets the aliases of this GeneValueObject. # noqa: E501 :return: The aliases of this GeneValueObject. # noqa: E501 :rtype: list[str] """ return self._aliases @aliases.setter def aliases(self, aliases): """Sets the aliases of this GeneValueObject. :param aliases: The aliases of this GeneValueObject. # noqa: E501 :type: list[str] """ self._aliases = aliases @property def multifunctionality_rank(self): """Gets the multifunctionality_rank of this GeneValueObject. # noqa: E501 :return: The multifunctionality_rank of this GeneValueObject. # noqa: E501 :rtype: float """ return self._multifunctionality_rank @multifunctionality_rank.setter def multifunctionality_rank(self, multifunctionality_rank): """Sets the multifunctionality_rank of this GeneValueObject. :param multifunctionality_rank: The multifunctionality_rank of this GeneValueObject. # noqa: E501 :type: float """ self._multifunctionality_rank = multifunctionality_rank @property def ncbi_id(self): """Gets the ncbi_id of this GeneValueObject. # noqa: E501 :return: The ncbi_id of this GeneValueObject. # noqa: E501 :rtype: int """ return self._ncbi_id @ncbi_id.setter def ncbi_id(self, ncbi_id): """Sets the ncbi_id of this GeneValueObject. :param ncbi_id: The ncbi_id of this GeneValueObject. # noqa: E501 :type: int """ self._ncbi_id = ncbi_id @property def ensembl_id(self): """Gets the ensembl_id of this GeneValueObject. # noqa: E501 :return: The ensembl_id of this GeneValueObject. # noqa: E501 :rtype: str """ return self._ensembl_id @ensembl_id.setter def ensembl_id(self, ensembl_id): """Sets the ensembl_id of this GeneValueObject. :param ensembl_id: The ensembl_id of this GeneValueObject. # noqa: E501 :type: str """ self._ensembl_id = ensembl_id @property def accessions(self): """Gets the accessions of this GeneValueObject. # noqa: E501 :return: The accessions of this GeneValueObject. # noqa: E501 :rtype: list[DatabaseEntryValueObject] """ return self._accessions @accessions.setter def accessions(self, accessions): """Sets the accessions of this GeneValueObject. :param accessions: The accessions of this GeneValueObject. # noqa: E501 :type: list[DatabaseEntryValueObject] """ self._accessions = accessions @property def official_name(self): """Gets the official_name of this GeneValueObject. # noqa: E501 :return: The official_name of this GeneValueObject. # noqa: E501 :rtype: str """ return self._official_name @official_name.setter def official_name(self, official_name): """Sets the official_name of this GeneValueObject. :param official_name: The official_name of this GeneValueObject. # noqa: E501 :type: str """ self._official_name = official_name @property def official_symbol(self): """Gets the official_symbol of this GeneValueObject. # noqa: E501 :return: The official_symbol of this GeneValueObject. # noqa: E501 :rtype: str """ return self._official_symbol @official_symbol.setter def official_symbol(self, official_symbol): """Sets the official_symbol of this GeneValueObject. :param official_symbol: The official_symbol of this GeneValueObject. # noqa: E501 :type: str """ self._official_symbol = official_symbol @property def taxon(self): """Gets the taxon of this GeneValueObject. # noqa: E501 :return: The taxon of this GeneValueObject. # noqa: E501 :rtype: TaxonValueObject """ return self._taxon @taxon.setter def taxon(self, taxon): """Sets the taxon of this GeneValueObject. :param taxon: The taxon of this GeneValueObject. # noqa: E501 :type: TaxonValueObject """ self._taxon = taxon
[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(GeneValueObject, 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, GeneValueObject): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other