|
| 1 | +# coding: utf-8 |
| 2 | + |
| 3 | +""" |
| 4 | + Patch API V1 |
| 5 | +
|
| 6 | + The core API used to integrate with Patch's service # noqa: E501 |
| 7 | +
|
| 8 | + The version of the OpenAPI document: v1 |
| 9 | + Contact: developers@usepatch.com |
| 10 | + Generated by: https://openapi-generator.tech |
| 11 | +""" |
| 12 | + |
| 13 | + |
| 14 | +import pprint |
| 15 | +import re # noqa: F401 |
| 16 | + |
| 17 | +import six |
| 18 | + |
| 19 | +from patch_api.configuration import Configuration |
| 20 | + |
| 21 | + |
| 22 | +class ParentTechnologyType(object): |
| 23 | + """NOTE: This class is auto generated by OpenAPI Generator. |
| 24 | + Ref: https://openapi-generator.tech |
| 25 | +
|
| 26 | + Do not edit the class manually. |
| 27 | + """ |
| 28 | + |
| 29 | + """ |
| 30 | + Attributes: |
| 31 | + openapi_types (dict): The key is attribute name |
| 32 | + and the value is attribute type. |
| 33 | + attribute_map (dict): The key is attribute name |
| 34 | + and the value is json key in definition. |
| 35 | + """ |
| 36 | + openapi_types = {"slug": "str", "name": "str"} |
| 37 | + |
| 38 | + attribute_map = {"slug": "slug", "name": "name"} |
| 39 | + |
| 40 | + def __init__( |
| 41 | + self, slug=None, name=None, local_vars_configuration=None |
| 42 | + ): # noqa: E501 |
| 43 | + """ParentTechnologyType - a model defined in OpenAPI""" # noqa: E501 |
| 44 | + if local_vars_configuration is None: |
| 45 | + local_vars_configuration = Configuration() |
| 46 | + self.local_vars_configuration = local_vars_configuration |
| 47 | + |
| 48 | + self._slug = None |
| 49 | + self._name = None |
| 50 | + self.discriminator = None |
| 51 | + |
| 52 | + if slug is not None: |
| 53 | + self.slug = slug |
| 54 | + if name is not None: |
| 55 | + self.name = name |
| 56 | + |
| 57 | + @property |
| 58 | + def slug(self): |
| 59 | + """Gets the slug of this ParentTechnologyType. # noqa: E501 |
| 60 | +
|
| 61 | + Unique identifier for this type of technology. # noqa: E501 |
| 62 | +
|
| 63 | + :return: The slug of this ParentTechnologyType. # noqa: E501 |
| 64 | + :rtype: str |
| 65 | + """ |
| 66 | + return self._slug |
| 67 | + |
| 68 | + @slug.setter |
| 69 | + def slug(self, slug): |
| 70 | + """Sets the slug of this ParentTechnologyType. |
| 71 | +
|
| 72 | + Unique identifier for this type of technology. # noqa: E501 |
| 73 | +
|
| 74 | + :param slug: The slug of this ParentTechnologyType. # noqa: E501 |
| 75 | + :type: str |
| 76 | + """ |
| 77 | + |
| 78 | + self._slug = slug |
| 79 | + |
| 80 | + @property |
| 81 | + def name(self): |
| 82 | + """Gets the name of this ParentTechnologyType. # noqa: E501 |
| 83 | +
|
| 84 | + Name of this technology type. # noqa: E501 |
| 85 | +
|
| 86 | + :return: The name of this ParentTechnologyType. # noqa: E501 |
| 87 | + :rtype: str |
| 88 | + """ |
| 89 | + return self._name |
| 90 | + |
| 91 | + @name.setter |
| 92 | + def name(self, name): |
| 93 | + """Sets the name of this ParentTechnologyType. |
| 94 | +
|
| 95 | + Name of this technology type. # noqa: E501 |
| 96 | +
|
| 97 | + :param name: The name of this ParentTechnologyType. # noqa: E501 |
| 98 | + :type: str |
| 99 | + """ |
| 100 | + |
| 101 | + self._name = name |
| 102 | + |
| 103 | + def to_dict(self): |
| 104 | + """Returns the model properties as a dict""" |
| 105 | + result = {} |
| 106 | + |
| 107 | + for attr, _ in six.iteritems(self.openapi_types): |
| 108 | + value = getattr(self, attr) |
| 109 | + if isinstance(value, list): |
| 110 | + result[attr] = list( |
| 111 | + map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) |
| 112 | + ) |
| 113 | + elif hasattr(value, "to_dict"): |
| 114 | + result[attr] = value.to_dict() |
| 115 | + elif isinstance(value, dict): |
| 116 | + result[attr] = dict( |
| 117 | + map( |
| 118 | + lambda item: (item[0], item[1].to_dict()) |
| 119 | + if hasattr(item[1], "to_dict") |
| 120 | + else item, |
| 121 | + value.items(), |
| 122 | + ) |
| 123 | + ) |
| 124 | + else: |
| 125 | + result[attr] = value |
| 126 | + |
| 127 | + return result |
| 128 | + |
| 129 | + def to_str(self): |
| 130 | + """Returns the string representation of the model""" |
| 131 | + return pprint.pformat(self.to_dict()) |
| 132 | + |
| 133 | + def __repr__(self): |
| 134 | + """For `print` and `pprint`""" |
| 135 | + return self.to_str() |
| 136 | + |
| 137 | + def __eq__(self, other): |
| 138 | + """Returns true if both objects are equal""" |
| 139 | + if not isinstance(other, ParentTechnologyType): |
| 140 | + return False |
| 141 | + |
| 142 | + return self.to_dict() == other.to_dict() |
| 143 | + |
| 144 | + def __ne__(self, other): |
| 145 | + """Returns true if both objects are not equal""" |
| 146 | + if not isinstance(other, ParentTechnologyType): |
| 147 | + return True |
| 148 | + |
| 149 | + return self.to_dict() != other.to_dict() |
0 commit comments