# coding: utf-8 """ eLabFTW REST API v2 Documentation This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501 OpenAPI spec version: 2.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class CompoundDuplicateRequest(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 = { 'action': 'str', 'cid': 'int', 'cas': 'str' } attribute_map = { 'action': 'action', 'cid': 'cid', 'cas': 'cas' } def __init__(self, action=None, cid=None, cas=None): # noqa: E501 """CompoundDuplicateRequest - a model defined in Swagger""" # noqa: E501 self._action = None self._cid = None self._cas = None self.discriminator = None self.action = action if cid is not None: self.cid = cid if cas is not None: self.cas = cas @property def action(self): """Gets the action of this CompoundDuplicateRequest. # noqa: E501 :return: The action of this CompoundDuplicateRequest. # noqa: E501 :rtype: str """ return self._action @action.setter def action(self, action): """Sets the action of this CompoundDuplicateRequest. :param action: The action of this CompoundDuplicateRequest. # noqa: E501 :type: str """ if action is None: raise ValueError("Invalid value for `action`, must not be `None`") # noqa: E501 allowed_values = ["duplicate"] # noqa: E501 if action not in allowed_values: raise ValueError( "Invalid value for `action` ({0}), must be one of {1}" # noqa: E501 .format(action, allowed_values) ) self._action = action @property def cid(self): """Gets the cid of this CompoundDuplicateRequest. # noqa: E501 PubChem Compound ID (CID). Use it to find a compound via this unique identifier. Not compatible with `cas` parameter. # noqa: E501 :return: The cid of this CompoundDuplicateRequest. # noqa: E501 :rtype: int """ return self._cid @cid.setter def cid(self, cid): """Sets the cid of this CompoundDuplicateRequest. PubChem Compound ID (CID). Use it to find a compound via this unique identifier. Not compatible with `cas` parameter. # noqa: E501 :param cid: The cid of this CompoundDuplicateRequest. # noqa: E501 :type: int """ self._cid = cid @property def cas(self): """Gets the cas of this CompoundDuplicateRequest. # noqa: E501 CAS number. Use it to find a compound via this unique identifier. Not compatible with `cid` parameter. # noqa: E501 :return: The cas of this CompoundDuplicateRequest. # noqa: E501 :rtype: str """ return self._cas @cas.setter def cas(self, cas): """Sets the cas of this CompoundDuplicateRequest. CAS number. Use it to find a compound via this unique identifier. Not compatible with `cid` parameter. # noqa: E501 :param cas: The cas of this CompoundDuplicateRequest. # noqa: E501 :type: str """ self._cas = cas 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(CompoundDuplicateRequest, 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, CompoundDuplicateRequest): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other