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