|
| 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 XmpMetadataProperty(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 | + 'key': 'str', |
| 52 | + 'value': 'str', |
| 53 | + 'namespace_uri': 'str' |
| 54 | + } |
| 55 | + |
| 56 | + attribute_map = { |
| 57 | + 'key': 'Key', |
| 58 | + 'value': 'Value', |
| 59 | + 'namespace_uri': 'NamespaceUri' |
| 60 | + } |
| 61 | + |
| 62 | + def __init__(self, key=None, value=None, namespace_uri=None): |
| 63 | + """ |
| 64 | + XmpMetadataProperty - a model defined in Swagger |
| 65 | + """ |
| 66 | + |
| 67 | + self._key = None |
| 68 | + self._value = None |
| 69 | + self._namespace_uri = None |
| 70 | + |
| 71 | + self.key = key |
| 72 | + if value is not None: |
| 73 | + self.value = value |
| 74 | + if namespace_uri is not None: |
| 75 | + self.namespace_uri = namespace_uri |
| 76 | + |
| 77 | + @property |
| 78 | + def key(self): |
| 79 | + """ |
| 80 | + Gets the key of this XmpMetadataProperty. |
| 81 | + Xmp Metadata Property Key. Can take the form for default keys: xmp:DefaultKeyName or DefaultKeyName. Form for user defined properties: customNamespace:UserPropertyName. |
| 82 | +
|
| 83 | + :return: The key of this XmpMetadataProperty. |
| 84 | + :rtype: str |
| 85 | + """ |
| 86 | + return self._key |
| 87 | + |
| 88 | + @key.setter |
| 89 | + def key(self, key): |
| 90 | + """ |
| 91 | + Sets the key of this XmpMetadataProperty. |
| 92 | + Xmp Metadata Property Key. Can take the form for default keys: xmp:DefaultKeyName or DefaultKeyName. Form for user defined properties: customNamespace:UserPropertyName. |
| 93 | +
|
| 94 | + :param key: The key of this XmpMetadataProperty. |
| 95 | + :type: str |
| 96 | + """ |
| 97 | + if key is None: |
| 98 | + raise ValueError("Invalid value for `key`, must not be `None`") |
| 99 | + if key is not None and len(key) < 1: |
| 100 | + raise ValueError("Invalid value for `key`, length must be greater than or equal to `1`") |
| 101 | + |
| 102 | + self._key = key |
| 103 | + |
| 104 | + @property |
| 105 | + def value(self): |
| 106 | + """ |
| 107 | + Gets the value of this XmpMetadataProperty. |
| 108 | + Xmp Metadata Property Value. Null for delete property. |
| 109 | +
|
| 110 | + :return: The value of this XmpMetadataProperty. |
| 111 | + :rtype: str |
| 112 | + """ |
| 113 | + return self._value |
| 114 | + |
| 115 | + @value.setter |
| 116 | + def value(self, value): |
| 117 | + """ |
| 118 | + Sets the value of this XmpMetadataProperty. |
| 119 | + Xmp Metadata Property Value. Null for delete property. |
| 120 | +
|
| 121 | + :param value: The value of this XmpMetadataProperty. |
| 122 | + :type: str |
| 123 | + """ |
| 124 | + |
| 125 | + self._value = value |
| 126 | + |
| 127 | + @property |
| 128 | + def namespace_uri(self): |
| 129 | + """ |
| 130 | + Gets the namespace_uri of this XmpMetadataProperty. |
| 131 | + Namespace Uri. For user defined properties only. |
| 132 | +
|
| 133 | + :return: The namespace_uri of this XmpMetadataProperty. |
| 134 | + :rtype: str |
| 135 | + """ |
| 136 | + return self._namespace_uri |
| 137 | + |
| 138 | + @namespace_uri.setter |
| 139 | + def namespace_uri(self, namespace_uri): |
| 140 | + """ |
| 141 | + Sets the namespace_uri of this XmpMetadataProperty. |
| 142 | + Namespace Uri. For user defined properties only. |
| 143 | +
|
| 144 | + :param namespace_uri: The namespace_uri of this XmpMetadataProperty. |
| 145 | + :type: str |
| 146 | + """ |
| 147 | + |
| 148 | + self._namespace_uri = namespace_uri |
| 149 | + |
| 150 | + def to_dict(self): |
| 151 | + """ |
| 152 | + Returns the model properties as a dict |
| 153 | + """ |
| 154 | + result = {} |
| 155 | + |
| 156 | + for attr, _ in iteritems(self.swagger_types): |
| 157 | + value = getattr(self, attr) |
| 158 | + if isinstance(value, list): |
| 159 | + result[attr] = list(map( |
| 160 | + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, |
| 161 | + value |
| 162 | + )) |
| 163 | + elif hasattr(value, "to_dict"): |
| 164 | + result[attr] = value.to_dict() |
| 165 | + elif isinstance(value, dict): |
| 166 | + result[attr] = dict(map( |
| 167 | + lambda item: (item[0], item[1].to_dict()) |
| 168 | + if hasattr(item[1], "to_dict") else item, |
| 169 | + value.items() |
| 170 | + )) |
| 171 | + else: |
| 172 | + result[attr] = value |
| 173 | + |
| 174 | + return result |
| 175 | + |
| 176 | + def to_str(self): |
| 177 | + """ |
| 178 | + Returns the string representation of the model |
| 179 | + """ |
| 180 | + return pformat(self.to_dict()) |
| 181 | + |
| 182 | + def __repr__(self): |
| 183 | + """ |
| 184 | + For `print` and `pprint` |
| 185 | + """ |
| 186 | + return self.to_str() |
| 187 | + |
| 188 | + def __eq__(self, other): |
| 189 | + """ |
| 190 | + Returns true if both objects are equal |
| 191 | + """ |
| 192 | + if not isinstance(other, XmpMetadataProperty): |
| 193 | + return False |
| 194 | + |
| 195 | + return self.__dict__ == other.__dict__ |
| 196 | + |
| 197 | + def __ne__(self, other): |
| 198 | + """ |
| 199 | + Returns true if both objects are not equal |
| 200 | + """ |
| 201 | + return not self == other |
0 commit comments