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

Commit

Permalink
Merge pull request #23 from JohnOnSoftware/master
Browse files Browse the repository at this point in the history
add support of 'ifc' in JobPayloadItem
  • Loading branch information
JohnOnSoftware authored May 25, 2018
2 parents 49fa80c + d5269dd commit 78bc267
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions lib/Model/JobPayloadItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ public static function getters()
const TYPE_STEP = 'step';
const TYPE_IGES = 'iges';
const TYPE_OBJ = 'obj';
const TYPE_IFC = 'ifc';
const VIEWS__2D = '2d';
const VIEWS__3D = '3d';

Expand All @@ -139,6 +140,8 @@ public function getTypeAllowableValues()
self::TYPE_STEP,
self::TYPE_IGES,
self::TYPE_OBJ,
self::TYPE_IFC,

];
}

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

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

/**
* Sets type
* @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.
* @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.
* @return $this
*/
public function setType($type)
{
$allowed_values = array('svf', 'thumbnail', 'stl', 'step', 'iges', 'obj');
$allowed_values = array('svf', 'thumbnail', 'stl', 'step', 'iges', 'obj', 'ifc');
if ((!in_array($type, $allowed_values))) {
throw new \InvalidArgumentException("Invalid value for 'type', must be one of 'svf', 'thumbnail', 'stl', 'step', 'iges', 'obj'");
throw new \InvalidArgumentException("Invalid value for 'type', must be one of 'svf', 'thumbnail', 'stl', 'step', 'iges', 'obj','ifc' ");
}
$this->container['type'] = $type;

Expand Down

0 comments on commit 78bc267

Please sign in to comment.