|
| 1 | +# coding: utf-8 |
| 2 | + |
| 3 | +""" |
| 4 | +
|
| 5 | + Copyright (c) 2023 Aspose.BarCode for Cloud |
| 6 | +
|
| 7 | + Permission is hereby granted, free of charge, to any person obtaining a copy |
| 8 | + of this software and associated documentation files (the "Software"), to deal |
| 9 | + in the Software without restriction, including without limitation the rights |
| 10 | + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 11 | + copies of the Software, and to permit persons to whom the Software is |
| 12 | + furnished to do so, subject to the following conditions: |
| 13 | +
|
| 14 | + The above copyright notice and this permission notice shall be included in all |
| 15 | + copies or substantial portions of the Software. |
| 16 | +
|
| 17 | + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 18 | + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 19 | + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 20 | + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 21 | + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 22 | + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 23 | + SOFTWARE. |
| 24 | +
|
| 25 | +""" |
| 26 | + |
| 27 | + |
| 28 | +import pprint |
| 29 | +import re # noqa: F401 |
| 30 | + |
| 31 | +import six |
| 32 | + |
| 33 | + |
| 34 | +class Code128Params(object): |
| 35 | + """NOTE: This class is auto generated by the swagger code generator program. |
| 36 | +
|
| 37 | + Do not edit the class manually. |
| 38 | + """ |
| 39 | + |
| 40 | + """ |
| 41 | + Attributes: |
| 42 | + swagger_types (dict): The key is attribute name |
| 43 | + and the value is attribute type. |
| 44 | + attribute_map (dict): The key is attribute name |
| 45 | + and the value is json key in definition. |
| 46 | + """ |
| 47 | + swagger_types = {"encode_mode": "Code128EncodeMode"} |
| 48 | + |
| 49 | + attribute_map = {"encode_mode": "EncodeMode"} |
| 50 | + |
| 51 | + def __init__(self, encode_mode=None): # noqa: E501 |
| 52 | + """Code128Params - a model defined in Swagger""" # noqa: E501 |
| 53 | + |
| 54 | + self._encode_mode = None |
| 55 | + self.discriminator = None |
| 56 | + |
| 57 | + if encode_mode is not None: |
| 58 | + self.encode_mode = encode_mode |
| 59 | + |
| 60 | + @property |
| 61 | + def encode_mode(self): |
| 62 | + """Gets the encode_mode of this Code128Params. # noqa: E501 |
| 63 | +
|
| 64 | + Encoding mode for Code128 barcodes. Code 128 specification Default value: Code128EncodeMode.Auto. # noqa: E501 |
| 65 | +
|
| 66 | + :return: The encode_mode of this Code128Params. # noqa: E501 |
| 67 | + :rtype: Code128EncodeMode |
| 68 | + """ |
| 69 | + return self._encode_mode |
| 70 | + |
| 71 | + @encode_mode.setter |
| 72 | + def encode_mode(self, encode_mode): |
| 73 | + """Sets the encode_mode of this Code128Params. |
| 74 | +
|
| 75 | + Encoding mode for Code128 barcodes. Code 128 specification Default value: Code128EncodeMode.Auto. # noqa: E501 |
| 76 | +
|
| 77 | + :param encode_mode: The encode_mode of this Code128Params. # noqa: E501 |
| 78 | + :type: Code128EncodeMode |
| 79 | + """ |
| 80 | + |
| 81 | + self._encode_mode = encode_mode |
| 82 | + |
| 83 | + def to_dict(self): |
| 84 | + """Returns the model properties as a dict""" |
| 85 | + result = {} |
| 86 | + |
| 87 | + for attr, _ in six.iteritems(self.swagger_types): |
| 88 | + value = getattr(self, attr) |
| 89 | + if isinstance(value, list): |
| 90 | + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) |
| 91 | + elif hasattr(value, "to_dict"): |
| 92 | + result[attr] = value.to_dict() |
| 93 | + elif isinstance(value, dict): |
| 94 | + result[attr] = dict( |
| 95 | + map( |
| 96 | + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, |
| 97 | + value.items(), |
| 98 | + ) |
| 99 | + ) |
| 100 | + else: |
| 101 | + result[attr] = value |
| 102 | + if issubclass(Code128Params, dict): |
| 103 | + for key, value in self.items(): |
| 104 | + result[key] = value |
| 105 | + |
| 106 | + return result |
| 107 | + |
| 108 | + def to_str(self): |
| 109 | + """Returns the string representation of the model""" |
| 110 | + return pprint.pformat(self.to_dict()) |
| 111 | + |
| 112 | + def __repr__(self): |
| 113 | + """For `print` and `pprint`""" |
| 114 | + return self.to_str() |
| 115 | + |
| 116 | + def __eq__(self, other): |
| 117 | + """Returns true if both objects are equal""" |
| 118 | + if not isinstance(other, Code128Params): |
| 119 | + return False |
| 120 | + |
| 121 | + return self.__dict__ == other.__dict__ |
| 122 | + |
| 123 | + def __ne__(self, other): |
| 124 | + """Returns true if both objects are not equal""" |
| 125 | + return not self == other |
0 commit comments