From 282ffd16a9c77a079d8f0faa38fdeb22585b563d Mon Sep 17 00:00:00 2001 From: roy wang Date: Tue, 26 Jul 2022 02:59:40 -0500 Subject: [PATCH] 20220726 update : add 4 kinds of save option and update apis. --- README.md | 12 +- composer.lock | 14 +- lib/Api/LightCellsApi.php | 6 +- lib/Model/DocxSaveOptions.php | 286 +++++++++++++ lib/Model/JsonSaveOptions.php | 401 ++++++++++++++++++ lib/Model/PptxSaveOptions.php | 286 +++++++++++++ lib/Model/SqlScriptSaveOptions.php | 641 +++++++++++++++++++++++++++++ 7 files changed, 1628 insertions(+), 18 deletions(-) create mode 100644 lib/Model/DocxSaveOptions.php create mode 100644 lib/Model/JsonSaveOptions.php create mode 100644 lib/Model/PptxSaveOptions.php create mode 100644 lib/Model/SqlScriptSaveOptions.php diff --git a/README.md b/README.md index 94ee9e1..df0bddc 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![](https://img.shields.io/badge/REST%20API-v3.0-lightgrey) ![Packagist Version](https://img.shields.io/packagist/v/aspose/cells-sdk-php) ![Packagist PHP Version Support](https://img.shields.io/packagist/php-v/aspose/cells-sdk-php) ![Packagist Downloads](https://img.shields.io/packagist/dt/aspose/cells-sdk-php) [![GitHub license](https://img.shields.io/github/license/aspose-cells-cloud/aspose-cells-cloud-java)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-php/blob/master/LICENSE) ![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/aspose-cells-cloud/aspose-cells-cloud-php/22.6.1) +![](https://img.shields.io/badge/REST%20API-v3.0-lightgrey) ![Packagist Version](https://img.shields.io/packagist/v/aspose/cells-sdk-php) ![Packagist PHP Version Support](https://img.shields.io/packagist/php-v/aspose/cells-sdk-php) ![Packagist Downloads](https://img.shields.io/packagist/dt/aspose/cells-sdk-php) [![GitHub license](https://img.shields.io/github/license/aspose-cells-cloud/aspose-cells-cloud-java)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-php/blob/master/LICENSE) ![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/aspose-cells-cloud/aspose-cells-cloud-php/22.7) # PHP SDK for Spreadsheet Processing in Cloud @@ -24,15 +24,11 @@ This Cloud SDK enhances your PHP-based Cloud apps to [process & manipulate Micro - Fetch the required shape from worksheet. - Leverage the power of [Pivot Tables](https://docs.aspose.cloud/cells/working-with-pivot-tables/) & Ranges. -## Feature & Enhancements in Version 22.6 +## Feature & Enhancements in Version 22.7 -- Improve save as api. -- Improve clear objects api. -- upgrade guzzlehttp/guzzle to 7.4.0. +- Add 4 kinds of Save Option. +- Add the checkExcelRestriction parameter for multiple APIs. -## Feature & Enhancements in Version 22.6.1 - -- fix bugs about upgrading guzzlehttp/guzzle to 7.4.0. ## Read Other Formats diff --git a/composer.lock b/composer.lock index d93e01c..890796d 100644 --- a/composer.lock +++ b/composer.lock @@ -510,25 +510,25 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.2", + "version": "v3.1.1", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" + "reference": "07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918", + "reference": "07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.1-dev" }, "thanks": { "name": "symfony/contracts", @@ -570,7 +570,7 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2022-02-25T11:15:52+00:00" } ], "packages-dev": [ diff --git a/lib/Api/LightCellsApi.php b/lib/Api/LightCellsApi.php index 8be2423..7127b8d 100644 --- a/lib/Api/LightCellsApi.php +++ b/lib/Api/LightCellsApi.php @@ -119,10 +119,10 @@ public function getConfig() * @throws \InvalidArgumentException * @return \Aspose\Cells\Cloud\Model\FilesResult */ - public function deleteMetadata($file, $type = 'all' ,$c) + public function deleteMetadata($file, $type = 'all' ,$check_excel_restriction = 'true') { $this->checkAccessToken(); - list($response) = $this->deleteMetadataWithHttpInfo($file, $type); + list($response) = $this->deleteMetadataWithHttpInfo($file, $type,$check_excel_restriction ); return $response; } @@ -2235,7 +2235,7 @@ protected function postImportRequest($file,$importoption) public function postMetadata($file, $document_properties, $check_excel_restriction = 'true') { $this->checkAccessToken(); - list($response) = $this->postMetadataWithHttpInfo($file, $document_propertie, $check_excel_restriction ); + list($response) = $this->postMetadataWithHttpInfo($file, $document_properties, $check_excel_restriction ); return $response; } diff --git a/lib/Model/DocxSaveOptions.php b/lib/Model/DocxSaveOptions.php new file mode 100644 index 0000000..37ccf6d --- /dev/null +++ b/lib/Model/DocxSaveOptions.php @@ -0,0 +1,286 @@ + + * Copyright (c) 2022 Aspose.Cells Cloud + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ + +/** + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen + * Do not edit the class manually. + */ + +namespace Aspose\Cells\Cloud\Model; +use \Aspose\Cells\Cloud\ObjectSerializer; + +/** + * DocxSaveOptions Class Doc Comment + * + * @category Class + * @package Aspose\Cells\Cloud + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen + */ +class DocxSaveOptions extends SaveOptions +{ + const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $swaggerModelName = 'DocxSaveOptions'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerTypes = [ + + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats + parent::swaggerFormats(); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return parent::attributeMap() + self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return parent::setters() + self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return parent::getters() + self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + parent::__construct($data); + + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = parent::listInvalidProperties(); + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + if (!parent::valid()) { + return false; + } + + return true; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/JsonSaveOptions.php b/lib/Model/JsonSaveOptions.php new file mode 100644 index 0000000..11d0d71 --- /dev/null +++ b/lib/Model/JsonSaveOptions.php @@ -0,0 +1,401 @@ + + * Copyright (c) 2022 Aspose.Cells Cloud + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ + +/** + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen + * Do not edit the class manually. + */ + +namespace Aspose\Cells\Cloud\Model; +use \Aspose\Cells\Cloud\ObjectSerializer; + +/** + * JsonSaveOptions Class Doc Comment + * + * @category Class + * @package Aspose\Cells\Cloud + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen + */ +class JsonSaveOptions extends SaveOptions +{ + const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $swaggerModelName = 'JsonSaveOptions'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerTypes = [ + 'export_area' => '\Aspose\Cells\Cloud\Model\CellArea', + 'has_header_row' => 'bool', + 'export_as_string' => 'bool', + 'indent' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'export_area' => null, + 'has_header_row' => null, + 'export_as_string' => null, + 'indent' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats + parent::swaggerFormats(); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'export_area' => 'ExportArea', + 'has_header_row' => 'HasHeaderRow', + 'export_as_string' => 'ExportAsString', + 'indent' => 'Indent' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'export_area' => 'setExportArea', + 'has_header_row' => 'setHasHeaderRow', + 'export_as_string' => 'setExportAsString', + 'indent' => 'setIndent' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'export_area' => 'getExportArea', + 'has_header_row' => 'getHasHeaderRow', + 'export_as_string' => 'getExportAsString', + 'indent' => 'getIndent' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return parent::attributeMap() + self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return parent::setters() + self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return parent::getters() + self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + parent::__construct($data); + + $this->container['export_area'] = isset($data['export_area']) ? $data['export_area'] : null; + $this->container['has_header_row'] = isset($data['has_header_row']) ? $data['has_header_row'] : null; + $this->container['export_as_string'] = isset($data['export_as_string']) ? $data['export_as_string'] : null; + $this->container['indent'] = isset($data['indent']) ? $data['indent'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = parent::listInvalidProperties(); + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + if (!parent::valid()) { + return false; + } + + return true; + } + + + /** + * Gets export_area + * + * @return \Aspose\Cells\Cloud\Model\CellArea + */ + public function getExportArea() + { + return $this->container['export_area']; + } + + /** + * Sets export_area + * + * @param \Aspose\Cells\Cloud\Model\CellArea $export_area export_area + * + * @return $this + */ + public function setExportArea($export_area) + { + $this->container['export_area'] = $export_area; + + return $this; + } + + /** + * Gets has_header_row + * + * @return bool + */ + public function getHasHeaderRow() + { + return $this->container['has_header_row']; + } + + /** + * Sets has_header_row + * + * @param bool $has_header_row has_header_row + * + * @return $this + */ + public function setHasHeaderRow($has_header_row) + { + $this->container['has_header_row'] = $has_header_row; + + return $this; + } + + /** + * Gets export_as_string + * + * @return bool + */ + public function getExportAsString() + { + return $this->container['export_as_string']; + } + + /** + * Sets export_as_string + * + * @param bool $export_as_string export_as_string + * + * @return $this + */ + public function setExportAsString($export_as_string) + { + $this->container['export_as_string'] = $export_as_string; + + return $this; + } + + /** + * Gets indent + * + * @return string + */ + public function getIndent() + { + return $this->container['indent']; + } + + /** + * Sets indent + * + * @param string $indent indent + * + * @return $this + */ + public function setIndent($indent) + { + $this->container['indent'] = $indent; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/PptxSaveOptions.php b/lib/Model/PptxSaveOptions.php new file mode 100644 index 0000000..f3e7ac9 --- /dev/null +++ b/lib/Model/PptxSaveOptions.php @@ -0,0 +1,286 @@ + + * Copyright (c) 2022 Aspose.Cells Cloud + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ + +/** + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen + * Do not edit the class manually. + */ + +namespace Aspose\Cells\Cloud\Model; +use \Aspose\Cells\Cloud\ObjectSerializer; + +/** + * PptxSaveOptions Class Doc Comment + * + * @category Class + * @package Aspose\Cells\Cloud + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen + */ +class PptxSaveOptions extends SaveOptions +{ + const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $swaggerModelName = 'PptxSaveOptions'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerTypes = [ + + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats + parent::swaggerFormats(); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return parent::attributeMap() + self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return parent::setters() + self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return parent::getters() + self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + parent::__construct($data); + + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = parent::listInvalidProperties(); + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + if (!parent::valid()) { + return false; + } + + return true; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/SqlScriptSaveOptions.php b/lib/Model/SqlScriptSaveOptions.php new file mode 100644 index 0000000..fd25d53 --- /dev/null +++ b/lib/Model/SqlScriptSaveOptions.php @@ -0,0 +1,641 @@ + + * Copyright (c) 2022 Aspose.Cells Cloud + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ + +/** + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen + * Do not edit the class manually. + */ + +namespace Aspose\Cells\Cloud\Model; +use \Aspose\Cells\Cloud\ObjectSerializer; + +/** + * SqlScriptSaveOptions Class Doc Comment + * + * @category Class + * @package Aspose\Cells\Cloud + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen + */ +class SqlScriptSaveOptions extends SaveOptions +{ + const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $swaggerModelName = 'SqlScriptSaveOptions'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerTypes = [ + 'check_if_table_exists' => 'bool', + 'column_type_map' => 'string', + 'check_all_data_for_column_type' => 'bool', + 'add_blank_line_between_rows' => 'bool', + 'operator_type' => 'string', + 'create_table' => 'bool', + 'id_name' => 'string', + 'start_id' => 'int', + 'table_name' => 'string', + 'export_as_string' => 'bool', + 'export_area' => '\Aspose\Cells\Cloud\Model\CellArea', + 'has_header_row' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'check_if_table_exists' => null, + 'column_type_map' => null, + 'check_all_data_for_column_type' => null, + 'add_blank_line_between_rows' => null, + 'operator_type' => null, + 'create_table' => null, + 'id_name' => null, + 'start_id' => 'int32', + 'table_name' => null, + 'export_as_string' => null, + 'export_area' => null, + 'has_header_row' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats + parent::swaggerFormats(); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'check_if_table_exists' => 'CheckIfTableExists', + 'column_type_map' => 'ColumnTypeMap', + 'check_all_data_for_column_type' => 'CheckAllDataForColumnType', + 'add_blank_line_between_rows' => 'AddBlankLineBetweenRows', + 'operator_type' => 'OperatorType', + 'create_table' => 'CreateTable', + 'id_name' => 'IdName', + 'start_id' => 'StartId', + 'table_name' => 'TableName', + 'export_as_string' => 'ExportAsString', + 'export_area' => 'ExportArea', + 'has_header_row' => 'HasHeaderRow' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'check_if_table_exists' => 'setCheckIfTableExists', + 'column_type_map' => 'setColumnTypeMap', + 'check_all_data_for_column_type' => 'setCheckAllDataForColumnType', + 'add_blank_line_between_rows' => 'setAddBlankLineBetweenRows', + 'operator_type' => 'setOperatorType', + 'create_table' => 'setCreateTable', + 'id_name' => 'setIdName', + 'start_id' => 'setStartId', + 'table_name' => 'setTableName', + 'export_as_string' => 'setExportAsString', + 'export_area' => 'setExportArea', + 'has_header_row' => 'setHasHeaderRow' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'check_if_table_exists' => 'getCheckIfTableExists', + 'column_type_map' => 'getColumnTypeMap', + 'check_all_data_for_column_type' => 'getCheckAllDataForColumnType', + 'add_blank_line_between_rows' => 'getAddBlankLineBetweenRows', + 'operator_type' => 'getOperatorType', + 'create_table' => 'getCreateTable', + 'id_name' => 'getIdName', + 'start_id' => 'getStartId', + 'table_name' => 'getTableName', + 'export_as_string' => 'getExportAsString', + 'export_area' => 'getExportArea', + 'has_header_row' => 'getHasHeaderRow' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return parent::attributeMap() + self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return parent::setters() + self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return parent::getters() + self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + parent::__construct($data); + + $this->container['check_if_table_exists'] = isset($data['check_if_table_exists']) ? $data['check_if_table_exists'] : null; + $this->container['column_type_map'] = isset($data['column_type_map']) ? $data['column_type_map'] : null; + $this->container['check_all_data_for_column_type'] = isset($data['check_all_data_for_column_type']) ? $data['check_all_data_for_column_type'] : null; + $this->container['add_blank_line_between_rows'] = isset($data['add_blank_line_between_rows']) ? $data['add_blank_line_between_rows'] : null; + $this->container['operator_type'] = isset($data['operator_type']) ? $data['operator_type'] : null; + $this->container['create_table'] = isset($data['create_table']) ? $data['create_table'] : null; + $this->container['id_name'] = isset($data['id_name']) ? $data['id_name'] : null; + $this->container['start_id'] = isset($data['start_id']) ? $data['start_id'] : null; + $this->container['table_name'] = isset($data['table_name']) ? $data['table_name'] : null; + $this->container['export_as_string'] = isset($data['export_as_string']) ? $data['export_as_string'] : null; + $this->container['export_area'] = isset($data['export_area']) ? $data['export_area'] : null; + $this->container['has_header_row'] = isset($data['has_header_row']) ? $data['has_header_row'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = parent::listInvalidProperties(); + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + if (!parent::valid()) { + return false; + } + + return true; + } + + + /** + * Gets check_if_table_exists + * + * @return bool + */ + public function getCheckIfTableExists() + { + return $this->container['check_if_table_exists']; + } + + /** + * Sets check_if_table_exists + * + * @param bool $check_if_table_exists check_if_table_exists + * + * @return $this + */ + public function setCheckIfTableExists($check_if_table_exists) + { + $this->container['check_if_table_exists'] = $check_if_table_exists; + + return $this; + } + + /** + * Gets column_type_map + * + * @return string + */ + public function getColumnTypeMap() + { + return $this->container['column_type_map']; + } + + /** + * Sets column_type_map + * + * @param string $column_type_map column_type_map + * + * @return $this + */ + public function setColumnTypeMap($column_type_map) + { + $this->container['column_type_map'] = $column_type_map; + + return $this; + } + + /** + * Gets check_all_data_for_column_type + * + * @return bool + */ + public function getCheckAllDataForColumnType() + { + return $this->container['check_all_data_for_column_type']; + } + + /** + * Sets check_all_data_for_column_type + * + * @param bool $check_all_data_for_column_type check_all_data_for_column_type + * + * @return $this + */ + public function setCheckAllDataForColumnType($check_all_data_for_column_type) + { + $this->container['check_all_data_for_column_type'] = $check_all_data_for_column_type; + + return $this; + } + + /** + * Gets add_blank_line_between_rows + * + * @return bool + */ + public function getAddBlankLineBetweenRows() + { + return $this->container['add_blank_line_between_rows']; + } + + /** + * Sets add_blank_line_between_rows + * + * @param bool $add_blank_line_between_rows add_blank_line_between_rows + * + * @return $this + */ + public function setAddBlankLineBetweenRows($add_blank_line_between_rows) + { + $this->container['add_blank_line_between_rows'] = $add_blank_line_between_rows; + + return $this; + } + + /** + * Gets operator_type + * + * @return string + */ + public function getOperatorType() + { + return $this->container['operator_type']; + } + + /** + * Sets operator_type + * + * @param string $operator_type operator_type + * + * @return $this + */ + public function setOperatorType($operator_type) + { + $this->container['operator_type'] = $operator_type; + + return $this; + } + + /** + * Gets create_table + * + * @return bool + */ + public function getCreateTable() + { + return $this->container['create_table']; + } + + /** + * Sets create_table + * + * @param bool $create_table create_table + * + * @return $this + */ + public function setCreateTable($create_table) + { + $this->container['create_table'] = $create_table; + + return $this; + } + + /** + * Gets id_name + * + * @return string + */ + public function getIdName() + { + return $this->container['id_name']; + } + + /** + * Sets id_name + * + * @param string $id_name id_name + * + * @return $this + */ + public function setIdName($id_name) + { + $this->container['id_name'] = $id_name; + + return $this; + } + + /** + * Gets start_id + * + * @return int + */ + public function getStartId() + { + return $this->container['start_id']; + } + + /** + * Sets start_id + * + * @param int $start_id start_id + * + * @return $this + */ + public function setStartId($start_id) + { + $this->container['start_id'] = $start_id; + + return $this; + } + + /** + * Gets table_name + * + * @return string + */ + public function getTableName() + { + return $this->container['table_name']; + } + + /** + * Sets table_name + * + * @param string $table_name table_name + * + * @return $this + */ + public function setTableName($table_name) + { + $this->container['table_name'] = $table_name; + + return $this; + } + + /** + * Gets export_as_string + * + * @return bool + */ + public function getExportAsString() + { + return $this->container['export_as_string']; + } + + /** + * Sets export_as_string + * + * @param bool $export_as_string export_as_string + * + * @return $this + */ + public function setExportAsString($export_as_string) + { + $this->container['export_as_string'] = $export_as_string; + + return $this; + } + + /** + * Gets export_area + * + * @return \Aspose\Cells\Cloud\Model\CellArea + */ + public function getExportArea() + { + return $this->container['export_area']; + } + + /** + * Sets export_area + * + * @param \Aspose\Cells\Cloud\Model\CellArea $export_area export_area + * + * @return $this + */ + public function setExportArea($export_area) + { + $this->container['export_area'] = $export_area; + + return $this; + } + + /** + * Gets has_header_row + * + * @return bool + */ + public function getHasHeaderRow() + { + return $this->container['has_header_row']; + } + + /** + * Sets has_header_row + * + * @param bool $has_header_row has_header_row + * + * @return $this + */ + public function setHasHeaderRow($has_header_row) + { + $this->container['has_header_row'] = $has_header_row; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + +