|
| 1 | +<?php |
| 2 | +/* |
| 3 | + * -------------------------------------------------------------------------------- |
| 4 | + * <copyright company="Aspose" file="Azw3SaveOptionsData.php"> |
| 5 | + * Copyright (c) 2024 Aspose.Words for Cloud |
| 6 | + * </copyright> |
| 7 | + * <summary> |
| 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 | + * |
| 15 | + * The above copyright notice and this permission notice shall be included in all |
| 16 | + * copies or substantial portions of the Software. |
| 17 | + * |
| 18 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 19 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 20 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 21 | + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 22 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 23 | + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 24 | + * SOFTWARE. |
| 25 | + * </summary> |
| 26 | + * -------------------------------------------------------------------------------- |
| 27 | + */ |
| 28 | + |
| 29 | +namespace Aspose\Words\Model; |
| 30 | +use \Aspose\Words\ObjectSerializer; |
| 31 | + |
| 32 | +/* |
| 33 | + * Azw3SaveOptionsData |
| 34 | + * |
| 35 | + * @description Container class for azw3 save options. |
| 36 | + */ |
| 37 | +class Azw3SaveOptionsData extends HtmlSaveOptionsData |
| 38 | +{ |
| 39 | + const DISCRIMINATOR = null; |
| 40 | + |
| 41 | + /* |
| 42 | + * The original name of the model. |
| 43 | + * |
| 44 | + * @var string |
| 45 | + */ |
| 46 | + protected static $swaggerModelName = "Azw3SaveOptionsData"; |
| 47 | + |
| 48 | + /* |
| 49 | + * Array of property to type mappings. Used for (de)serialization |
| 50 | + * |
| 51 | + * @var string[] |
| 52 | + */ |
| 53 | + protected static $swaggerTypes = [ |
| 54 | + 'navigation_map_level' => 'int' |
| 55 | + ]; |
| 56 | + |
| 57 | + /* |
| 58 | + * Array of property to format mappings. Used for (de)serialization |
| 59 | + * |
| 60 | + * @var string[] |
| 61 | + */ |
| 62 | + protected static $swaggerFormats = [ |
| 63 | + 'navigation_map_level' => 'null' |
| 64 | + ]; |
| 65 | + |
| 66 | + /* |
| 67 | + * Array of property to type mappings. Used for (de)serialization |
| 68 | + * |
| 69 | + * @return array |
| 70 | + */ |
| 71 | + public static function swaggerTypes() |
| 72 | + { |
| 73 | + return self::$swaggerTypes + parent::swaggerTypes(); |
| 74 | + } |
| 75 | + |
| 76 | + /* |
| 77 | + * Array of property to format mappings. Used for (de)serialization |
| 78 | + * |
| 79 | + * @return array |
| 80 | + */ |
| 81 | + public static function swaggerFormats() |
| 82 | + { |
| 83 | + return self::$swaggerFormats + parent::swaggerFormats(); |
| 84 | + } |
| 85 | + |
| 86 | + /* |
| 87 | + * Array of attributes where the key is the local name, |
| 88 | + * and the value is the original name |
| 89 | + * |
| 90 | + * @var string[] |
| 91 | + */ |
| 92 | + protected static $attributeMap = [ |
| 93 | + 'navigation_map_level' => 'NavigationMapLevel' |
| 94 | + ]; |
| 95 | + |
| 96 | + /* |
| 97 | + * Array of attributes to setter functions (for deserialization of responses) |
| 98 | + * |
| 99 | + * @var string[] |
| 100 | + */ |
| 101 | + protected static $setters = [ |
| 102 | + 'navigation_map_level' => 'setNavigationMapLevel' |
| 103 | + ]; |
| 104 | + |
| 105 | + /* |
| 106 | + * Array of attributes to getter functions (for serialization of requests) |
| 107 | + * |
| 108 | + * @var string[] |
| 109 | + */ |
| 110 | + protected static $getters = [ |
| 111 | + 'navigation_map_level' => 'getNavigationMapLevel' |
| 112 | + ]; |
| 113 | + |
| 114 | + /* |
| 115 | + * Array of attributes where the key is the local name, |
| 116 | + * and the value is the original name |
| 117 | + * |
| 118 | + * @return array |
| 119 | + */ |
| 120 | + public static function attributeMap() |
| 121 | + { |
| 122 | + return parent::attributeMap() + self::$attributeMap; |
| 123 | + } |
| 124 | + |
| 125 | + /* |
| 126 | + * Array of attributes to setter functions (for deserialization of responses) |
| 127 | + * |
| 128 | + * @return array |
| 129 | + */ |
| 130 | + public static function setters() |
| 131 | + { |
| 132 | + return parent::setters() + self::$setters; |
| 133 | + } |
| 134 | + |
| 135 | + /* |
| 136 | + * Array of attributes to getter functions (for serialization of requests) |
| 137 | + * |
| 138 | + * @return array |
| 139 | + */ |
| 140 | + public static function getters() |
| 141 | + { |
| 142 | + return parent::getters() + self::$getters; |
| 143 | + } |
| 144 | + |
| 145 | + /* |
| 146 | + * The original name of the model. |
| 147 | + * |
| 148 | + * @return string |
| 149 | + */ |
| 150 | + public function getModelName() |
| 151 | + { |
| 152 | + return self::$swaggerModelName; |
| 153 | + } |
| 154 | + |
| 155 | + |
| 156 | + |
| 157 | + /* |
| 158 | + * Constructor |
| 159 | + * |
| 160 | + * @param mixed[] $data Associated array of property values |
| 161 | + * initializing the model |
| 162 | + */ |
| 163 | + public function __construct(array $data = null) |
| 164 | + { |
| 165 | + parent::__construct($data); |
| 166 | + $this->container['navigation_map_level'] = isset($data['navigation_map_level']) ? $data['navigation_map_level'] : null; |
| 167 | + $this->container['save_format'] = "azw3"; |
| 168 | + } |
| 169 | + |
| 170 | + /* |
| 171 | + * Validate all the properties in the model |
| 172 | + */ |
| 173 | + public function validate() |
| 174 | + { |
| 175 | + parent::validate(); |
| 176 | + |
| 177 | + } |
| 178 | + |
| 179 | + /* |
| 180 | + * Gets navigation_map_level |
| 181 | + * |
| 182 | + * @return int |
| 183 | + */ |
| 184 | + public function getNavigationMapLevel() |
| 185 | + { |
| 186 | + return $this->container['navigation_map_level']; |
| 187 | + } |
| 188 | + |
| 189 | + /* |
| 190 | + * Sets navigation_map_level |
| 191 | + * |
| 192 | + * @param int $navigation_map_level Gets or sets the maximum level of headings populated to the navigation map when exporting. |
| 193 | + * |
| 194 | + * @return $this |
| 195 | + */ |
| 196 | + public function setNavigationMapLevel($navigation_map_level) |
| 197 | + { |
| 198 | + $this->container['navigation_map_level'] = $navigation_map_level; |
| 199 | + return $this; |
| 200 | + } |
| 201 | + |
| 202 | + |
| 203 | + /* |
| 204 | + * Returns true if offset exists. False otherwise. |
| 205 | + * |
| 206 | + * @param integer $offset Offset |
| 207 | + * |
| 208 | + * @return boolean |
| 209 | + */ |
| 210 | + #[\ReturnTypeWillChange] |
| 211 | + public function offsetExists($offset) |
| 212 | + { |
| 213 | + return isset($this->container[$offset]); |
| 214 | + } |
| 215 | + |
| 216 | + /* |
| 217 | + * Gets offset. |
| 218 | + * |
| 219 | + * @param integer $offset Offset |
| 220 | + * |
| 221 | + * @return mixed |
| 222 | + */ |
| 223 | + #[\ReturnTypeWillChange] |
| 224 | + public function offsetGet($offset) |
| 225 | + { |
| 226 | + return isset($this->container[$offset]) ? $this->container[$offset] : null; |
| 227 | + } |
| 228 | + |
| 229 | + /* |
| 230 | + * Sets value based on offset. |
| 231 | + * |
| 232 | + * @param integer $offset Offset |
| 233 | + * @param mixed $value Value to be set |
| 234 | + * |
| 235 | + * @return void |
| 236 | + */ |
| 237 | + #[\ReturnTypeWillChange] |
| 238 | + public function offsetSet($offset, $value) |
| 239 | + { |
| 240 | + if (is_null($offset)) { |
| 241 | + $this->container[] = $value; |
| 242 | + } else { |
| 243 | + $this->container[$offset] = $value; |
| 244 | + } |
| 245 | + } |
| 246 | + |
| 247 | + /* |
| 248 | + * Unsets offset. |
| 249 | + * |
| 250 | + * @param integer $offset Offset |
| 251 | + * |
| 252 | + * @return void |
| 253 | + */ |
| 254 | + #[\ReturnTypeWillChange] |
| 255 | + public function offsetUnset($offset) |
| 256 | + { |
| 257 | + unset($this->container[$offset]); |
| 258 | + } |
| 259 | + |
| 260 | + /* |
| 261 | + * Collect all FileReference variables to list |
| 262 | + */ |
| 263 | + public function collectFilesContent($resultFilesContent) |
| 264 | + { |
| 265 | + return $resultFilesContent; |
| 266 | + } |
| 267 | + |
| 268 | + /* |
| 269 | + * Gets the string presentation of the object |
| 270 | + * |
| 271 | + * @return string |
| 272 | + */ |
| 273 | + public function __toString() |
| 274 | + { |
| 275 | + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print |
| 276 | + return json_encode( |
| 277 | + ObjectSerializer::sanitizeForSerialization($this), |
| 278 | + JSON_PRETTY_PRINT |
| 279 | + ); |
| 280 | + } |
| 281 | + |
| 282 | + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); |
| 283 | + } |
| 284 | +} |
| 285 | + |
0 commit comments