Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.

Commit b4f674d

Browse files
Merge pull request #24 from Autodesk-Forge/dev
support ifc
2 parents 73959dd + 78bc267 commit b4f674d

File tree

3 files changed

+22
-15
lines changed

3 files changed

+22
-15
lines changed

lib/Model/JobPayloadItem.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ public static function getters()
121121
const TYPE_STEP = 'step';
122122
const TYPE_IGES = 'iges';
123123
const TYPE_OBJ = 'obj';
124+
const TYPE_IFC = 'ifc';
124125
const VIEWS__2D = '2d';
125126
const VIEWS__3D = '3d';
126127

@@ -139,6 +140,8 @@ public function getTypeAllowableValues()
139140
self::TYPE_STEP,
140141
self::TYPE_IGES,
141142
self::TYPE_OBJ,
143+
self::TYPE_IFC,
144+
142145
];
143146
}
144147

@@ -184,9 +187,9 @@ public function listInvalidProperties()
184187
if ($this->container['type'] === null) {
185188
$invalid_properties[] = "'type' can't be null";
186189
}
187-
$allowed_values = ["svf", "thumbnail", "stl", "step", "iges", "obj"];
190+
$allowed_values = ["svf", "thumbnail", "stl", "step", "iges", "obj", "ifc"];
188191
if (!in_array($this->container['type'], $allowed_values)) {
189-
$invalid_properties[] = "invalid value for 'type', must be one of 'svf', 'thumbnail', 'stl', 'step', 'iges', 'obj'.";
192+
$invalid_properties[] = "invalid value for 'type', must be one of 'svf', 'thumbnail', 'stl', 'step', 'iges', 'obj', 'ifc'.";
190193
}
191194

192195
return $invalid_properties;
@@ -204,7 +207,7 @@ public function valid()
204207
if ($this->container['type'] === null) {
205208
return false;
206209
}
207-
$allowed_values = ["svf", "thumbnail", "stl", "step", "iges", "obj"];
210+
$allowed_values = ["svf", "thumbnail", "stl", "step", "iges", "obj", "ifc"];
208211
if (!in_array($this->container['type'], $allowed_values)) {
209212
return false;
210213
}
@@ -223,14 +226,14 @@ public function getType()
223226

224227
/**
225228
* Sets type
226-
* @param string $type The requested output types. Possible values include `svf`, `thumbnai`, `stl`, `step`, `iges`, or `obj`. For a list of supported types, call the [GET formats](https://developer.autodesk.com/en/docs/model-derivative/v2/reference/http/formats-GET) endpoint.
229+
* @param string $type The requested output types. Possible values include `svf`, `thumbnai`, `stl`, `step`, `iges`, 'ifc', or `obj`. For a list of supported types, call the [GET formats](https://developer.autodesk.com/en/docs/model-derivative/v2/reference/http/formats-GET) endpoint.
227230
* @return $this
228231
*/
229232
public function setType($type)
230233
{
231-
$allowed_values = array('svf', 'thumbnail', 'stl', 'step', 'iges', 'obj');
234+
$allowed_values = array('svf', 'thumbnail', 'stl', 'step', 'iges', 'obj', 'ifc');
232235
if ((!in_array($type, $allowed_values))) {
233-
throw new \InvalidArgumentException("Invalid value for 'type', must be one of 'svf', 'thumbnail', 'stl', 'step', 'iges', 'obj'");
236+
throw new \InvalidArgumentException("Invalid value for 'type', must be one of 'svf', 'thumbnail', 'stl', 'step', 'iges', 'obj','ifc' ");
234237
}
235238
$this->container['type'] = $type;
236239

lib/Model/ManifestChildren.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ public static function getters()
161161
const TYPE_VIEW = 'view';
162162
const ROLE__2D = '2d';
163163
const ROLE__3D = '3d';
164+
const ROLE__IFC = 'ifc';
164165
const ROLE_GRAPHICS = 'graphics';
165166
const ROLE_MANIFEST = 'manifest';
166167
const ROLE_THUMBNAIL = 'thumbnail';
@@ -196,6 +197,7 @@ public function getRoleAllowableValues()
196197
return [
197198
self::ROLE__2D,
198199
self::ROLE__3D,
200+
self::ROLE__IFC,
199201
self::ROLE_GRAPHICS,
200202
self::ROLE_MANIFEST,
201203
self::ROLE_THUMBNAIL,
@@ -266,9 +268,9 @@ public function listInvalidProperties()
266268
if ($this->container['role'] === null) {
267269
$invalid_properties[] = "'role' can't be null";
268270
}
269-
$allowed_values = ["2d", "3d", "graphics", "manifest", "thumbnail"];
271+
$allowed_values = ["2d", "3d", "graphics", "manifest", "thumbnail", "ifc"];
270272
if (!in_array($this->container['role'], $allowed_values)) {
271-
$invalid_properties[] = "invalid value for 'role', must be one of '2d', '3d', 'graphics', 'manifest', 'thumbnail'.";
273+
$invalid_properties[] = "invalid value for 'role', must be one of '2d', '3d', 'graphics', 'manifest', 'thumbnail', 'ifc'.";
272274
}
273275

274276
if ($this->container['mime'] === null) {
@@ -358,9 +360,9 @@ public function getRole()
358360
*/
359361
public function setRole($role)
360362
{
361-
$allowed_values = array('2d', '3d', 'graphics', 'manifest', 'thumbnail','Autodesk.CloudPlatform.PropertyDatabase','viewable');
363+
$allowed_values = array('2d', '3d', 'graphics', 'manifest', 'thumbnail','Autodesk.CloudPlatform.PropertyDatabase','viewable', 'ifc');
362364
if ((!in_array($role, $allowed_values))) {
363-
throw new \InvalidArgumentException("Invalid value for 'role', must be one of '2d', '3d', 'graphics', 'manifest', 'thumbnail','Autodesk.CloudPlatform.PropertyDatabase','viewable'");
365+
throw new \InvalidArgumentException("Invalid value for 'role', must be one of '2d', '3d', 'graphics', 'manifest', 'thumbnail','Autodesk.CloudPlatform.PropertyDatabase','viewable', 'ifc'");
364366
}
365367
$this->container['role'] = $role;
366368

lib/Model/ManifestDerivative.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ public static function getters()
132132
const OUTPUT_TYPE_IGES = 'iges';
133133
const OUTPUT_TYPE_OBJ = 'obj';
134134
const OUTPUT_TYPE_SVF = 'svf';
135+
const OUTPUT_TYPE_IFC = 'ifc';
135136
const OUTPUT_TYPE_THUMBNAIL = 'thumbnail';
136137
const STATUS_PENDING = 'pending';
137138
const STATUS_INPROGRESS = 'inprogress';
@@ -154,6 +155,7 @@ public function getOutputTypeAllowableValues()
154155
self::OUTPUT_TYPE_IGES,
155156
self::OUTPUT_TYPE_OBJ,
156157
self::OUTPUT_TYPE_SVF,
158+
self::OUTPUT_TYPE_IFC,
157159
self::OUTPUT_TYPE_THUMBNAIL,
158160
];
159161
}
@@ -210,9 +212,9 @@ public function listInvalidProperties()
210212
if ($this->container['has_thumbnail'] === null) {
211213
$invalid_properties[] = "'has_thumbnail' can't be null";
212214
}
213-
$allowed_values = ["stl", "step", "iges", "obj", "svf", "thumbnail"];
215+
$allowed_values = ["stl", "step", "iges", "obj", "svf", "thumbnail", "ifc"];
214216
if (!in_array($this->container['output_type'], $allowed_values)) {
215-
$invalid_properties[] = "invalid value for 'output_type', must be one of 'stl', 'step', 'iges', 'obj', 'svf', 'thumbnail'.";
217+
$invalid_properties[] = "invalid value for 'output_type', must be one of 'stl', 'step', 'iges', 'obj', 'svf', 'thumbnail', 'ifc'.";
216218
}
217219

218220
if ($this->container['progress'] === null) {
@@ -247,7 +249,7 @@ public function valid()
247249
if ($this->container['has_thumbnail'] === null) {
248250
return false;
249251
}
250-
$allowed_values = ["stl", "step", "iges", "obj", "svf", "thumbnail"];
252+
$allowed_values = ["stl", "step", "iges", "obj", "svf", "thumbnail", "ifc"];
251253
if (!in_array($this->container['output_type'], $allowed_values)) {
252254
return false;
253255
}
@@ -326,9 +328,9 @@ public function getOutputType()
326328
*/
327329
public function setOutputType($output_type)
328330
{
329-
$allowed_values = array('stl', 'step', 'iges', 'obj', 'svf', 'thumbnail');
331+
$allowed_values = array('stl', 'step', 'iges', 'obj', 'svf', 'thumbnail', 'ifc');
330332
if (!is_null($output_type) && (!in_array($output_type, $allowed_values))) {
331-
throw new \InvalidArgumentException("Invalid value for 'output_type', must be one of 'stl', 'step', 'iges', 'obj', 'svf', 'thumbnail'");
333+
throw new \InvalidArgumentException("Invalid value for 'output_type', must be one of 'stl', 'step', 'iges', 'obj', 'svf', 'thumbnail', 'ifc'");
332334
}
333335
$this->container['output_type'] = $output_type;
334336

0 commit comments

Comments
 (0)