Skip to content

Commit 0ab0360

Browse files
committed
Updated sources
1 parent 403295c commit 0ab0360

7 files changed

Lines changed: 894 additions & 58 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"description": "This repository contains GroupDocs.Conversion Cloud SDK for PHP source code.",
33
"name": "groupdocscloud/groupdocs-conversion-cloud",
4-
"version": "24.3",
4+
"version": "24.4",
55
"license": "MIT",
66
"type": "library",
77
"keywords": [

composer.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/GroupDocs/Conversion/Configuration.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class Configuration
9595
* Version of client SDK
9696
*
9797
*/
98-
protected $clientVersion = '24.3';
98+
protected $clientVersion = '24.4';
9999

100100
/*
101101
* Constructor
@@ -290,7 +290,7 @@ public function getClientName()
290290
}
291291

292292
/*
293-
* Gets client version, default value is '24.3'
293+
* Gets client version, default value is '24.4'
294294
*
295295
*/
296296
public function getClientVersion()
@@ -308,7 +308,7 @@ public static function toDebugReport()
308308
$report = 'PHP SDK (GroupDocs\Conversion) Debug Report:' . PHP_EOL;
309309
$report .= ' OS: ' . php_uname() . PHP_EOL;
310310
$report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL;
311-
$report .= ' SDK Package Version: 24.3' . PHP_EOL;
311+
$report .= ' SDK Package Version: 24.4' . PHP_EOL;
312312
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;
313313

314314
return $report;

src/GroupDocs/Conversion/Model/CadLoadOptions.php

Lines changed: 73 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ class CadLoadOptions extends LoadOptions
5151
* @var string[]
5252
*/
5353
protected static $swaggerTypes = [
54-
'width' => 'int',
55-
'height' => 'int',
56-
'layoutNames' => 'string[]'
54+
'layoutNames' => 'string[]',
55+
'backgroundColor' => 'string',
56+
'drawType' => 'string'
5757
];
5858

5959
/*
@@ -62,9 +62,9 @@ class CadLoadOptions extends LoadOptions
6262
* @var string[]
6363
*/
6464
protected static $swaggerFormats = [
65-
'width' => 'int32',
66-
'height' => 'int32',
67-
'layoutNames' => null
65+
'layoutNames' => null,
66+
'backgroundColor' => null,
67+
'drawType' => null
6868
];
6969

7070
/*
@@ -94,9 +94,9 @@ public static function swaggerFormats()
9494
* @var string[]
9595
*/
9696
protected static $attributeMap = [
97-
'width' => 'Width',
98-
'height' => 'Height',
99-
'layoutNames' => 'LayoutNames'
97+
'layoutNames' => 'LayoutNames',
98+
'backgroundColor' => 'BackgroundColor',
99+
'drawType' => 'DrawType'
100100
];
101101

102102
/*
@@ -105,9 +105,9 @@ public static function swaggerFormats()
105105
* @var string[]
106106
*/
107107
protected static $setters = [
108-
'width' => 'setWidth',
109-
'height' => 'setHeight',
110-
'layoutNames' => 'setLayoutNames'
108+
'layoutNames' => 'setLayoutNames',
109+
'backgroundColor' => 'setBackgroundColor',
110+
'drawType' => 'setDrawType'
111111
];
112112

113113
/*
@@ -116,9 +116,9 @@ public static function swaggerFormats()
116116
* @var string[]
117117
*/
118118
protected static $getters = [
119-
'width' => 'getWidth',
120-
'height' => 'getHeight',
121-
'layoutNames' => 'getLayoutNames'
119+
'layoutNames' => 'getLayoutNames',
120+
'backgroundColor' => 'getBackgroundColor',
121+
'drawType' => 'getDrawType'
122122
];
123123

124124
/*
@@ -162,9 +162,24 @@ public function getModelName()
162162
return self::$swaggerModelName;
163163
}
164164

165+
const DRAW_TYPE_USE_DRAW_COLOR = 'UseDrawColor';
166+
const DRAW_TYPE_USE_OBJECT_COLOR = 'UseObjectColor';
165167

166168

167169

170+
/*
171+
* Gets allowable values of the enum
172+
*
173+
* @return string[]
174+
*/
175+
public function getDrawTypeAllowableValues()
176+
{
177+
return [
178+
self::DRAW_TYPE_USE_DRAW_COLOR,
179+
self::DRAW_TYPE_USE_OBJECT_COLOR,
180+
];
181+
}
182+
168183

169184

170185
/*
@@ -177,9 +192,9 @@ public function __construct(array $data = null)
177192
{
178193
parent::__construct($data);
179194

180-
$this->container['width'] = isset($data['width']) ? $data['width'] : null;
181-
$this->container['height'] = isset($data['height']) ? $data['height'] : null;
182195
$this->container['layoutNames'] = isset($data['layoutNames']) ? $data['layoutNames'] : null;
196+
$this->container['backgroundColor'] = isset($data['backgroundColor']) ? $data['backgroundColor'] : null;
197+
$this->container['drawType'] = isset($data['drawType']) ? $data['drawType'] : null;
183198
}
184199

185200
/*
@@ -191,12 +206,17 @@ public function listInvalidProperties()
191206
{
192207
$invalidProperties = parent::listInvalidProperties();
193208

194-
if ($this->container['width'] === null) {
195-
$invalidProperties[] = "'width' can't be null";
209+
if ($this->container['drawType'] === null) {
210+
$invalidProperties[] = "'drawType' can't be null";
196211
}
197-
if ($this->container['height'] === null) {
198-
$invalidProperties[] = "'height' can't be null";
212+
$allowedValues = $this->getDrawTypeAllowableValues();
213+
if (!in_array($this->container['drawType'], $allowedValues)) {
214+
$invalidProperties[] = sprintf(
215+
"invalid value for 'drawType', must be one of '%s'",
216+
implode("', '", $allowedValues)
217+
);
199218
}
219+
200220
return $invalidProperties;
201221
}
202222

@@ -212,84 +232,90 @@ public function valid()
212232
return false;
213233
}
214234

215-
if ($this->container['width'] === null) {
235+
if ($this->container['drawType'] === null) {
216236
return false;
217237
}
218-
if ($this->container['height'] === null) {
238+
$allowedValues = $this->getDrawTypeAllowableValues();
239+
if (!in_array($this->container['drawType'], $allowedValues)) {
219240
return false;
220241
}
221242
return true;
222243
}
223244

224245

225246
/*
226-
* Gets width
247+
* Gets layoutNames
227248
*
228-
* @return int
249+
* @return string[]
229250
*/
230-
public function getWidth()
251+
public function getLayoutNames()
231252
{
232-
return $this->container['width'];
253+
return $this->container['layoutNames'];
233254
}
234255

235256
/*
236-
* Sets width
257+
* Sets layoutNames
237258
*
238-
* @param int $width Set desired page width for converting CAD document
259+
* @param string[] $layoutNames Render specific CAD layouts
239260
*
240261
* @return $this
241262
*/
242-
public function setWidth($width)
263+
public function setLayoutNames($layoutNames)
243264
{
244-
$this->container['width'] = $width;
265+
$this->container['layoutNames'] = $layoutNames;
245266

246267
return $this;
247268
}
248269

249270
/*
250-
* Gets height
271+
* Gets backgroundColor
251272
*
252-
* @return int
273+
* @return string
253274
*/
254-
public function getHeight()
275+
public function getBackgroundColor()
255276
{
256-
return $this->container['height'];
277+
return $this->container['backgroundColor'];
257278
}
258279

259280
/*
260-
* Sets height
281+
* Sets backgroundColor
261282
*
262-
* @param int $height Set desired page height for converting CAD document
283+
* @param string $backgroundColor Gets or sets a background color.
263284
*
264285
* @return $this
265286
*/
266-
public function setHeight($height)
287+
public function setBackgroundColor($backgroundColor)
267288
{
268-
$this->container['height'] = $height;
289+
$this->container['backgroundColor'] = $backgroundColor;
269290

270291
return $this;
271292
}
272293

273294
/*
274-
* Gets layoutNames
295+
* Gets drawType
275296
*
276-
* @return string[]
297+
* @return string
277298
*/
278-
public function getLayoutNames()
299+
public function getDrawType()
279300
{
280-
return $this->container['layoutNames'];
301+
return $this->container['drawType'];
281302
}
282303

283304
/*
284-
* Sets layoutNames
305+
* Sets drawType
285306
*
286-
* @param string[] $layoutNames Render specific CAD layouts
307+
* @param string $drawType Gets or sets type of drawing.
287308
*
288309
* @return $this
289310
*/
290-
public function setLayoutNames($layoutNames)
311+
public function setDrawType($drawType)
291312
{
292-
$this->container['layoutNames'] = $layoutNames;
313+
$allowedValues = $this->getDrawTypeAllowableValues();
314+
if ((!is_numeric($drawType) && !in_array($drawType, $allowedValues)) || (is_numeric($drawType) && !in_array($allowedValues[$drawType], $allowedValues))) {
315+
throw new \InvalidArgumentException(sprintf("Invalid value for 'drawType', must be one of '%s'", implode("', '", $allowedValues)));
316+
}
317+
318+
$this->container['drawType'] = $drawType;
293319

294320
return $this;
295321
}

0 commit comments

Comments
 (0)