From 64ab78adb20aee01fd633ed166c289ca81f28775 Mon Sep 17 00:00:00 2001 From: Bryan Huang Date: Fri, 14 Feb 2020 19:46:12 +0800 Subject: [PATCH] Fix #41 - add support for misc in jobpayload --- docs/Model/JobPayload.md | 1 + docs/Model/JobPayloadMisc.md | 11 ++ lib/Model/JobPayload.php | 26 ++++ lib/Model/JobPayloadMisc.php | 234 +++++++++++++++++++++++++++++++++++ 4 files changed, 272 insertions(+) create mode 100644 docs/Model/JobPayloadMisc.md create mode 100644 lib/Model/JobPayloadMisc.php diff --git a/docs/Model/JobPayload.md b/docs/Model/JobPayload.md index 563d376..19a686e 100644 --- a/docs/Model/JobPayload.md +++ b/docs/Model/JobPayload.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **input** | [**\Autodesk\Forge\Client\Model\JobPayloadInput**](JobPayloadInput.md) | | [optional] **output** | [**\Autodesk\Forge\Client\Model\JobPayloadOutput**](JobPayloadOutput.md) | | [optional] +**misc** | [**\Autodesk\Forge\Client\Model\JobPayloadMisc**](JobPayloadMisc.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/JobPayloadMisc.md b/docs/Model/JobPayloadMisc.md new file mode 100644 index 0000000..3c14faf --- /dev/null +++ b/docs/Model/JobPayloadMisc.md @@ -0,0 +1,11 @@ +# JobPayloadMisc + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**workflow** | **string** | call MD POST job endpoint to submit a job and specify a workflow id - [documentation](https://forge.autodesk.com/en/docs/webhooks/v1/tutorials/create-a-hook-model-derivative/) | [optional] + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/lib/Model/JobPayload.php b/lib/Model/JobPayload.php index 5fa49d3..cbd44f4 100644 --- a/lib/Model/JobPayload.php +++ b/lib/Model/JobPayload.php @@ -56,6 +56,7 @@ class JobPayload implements ArrayAccess protected static $swaggerTypes = [ 'input' => '\Autodesk\Forge\Client\Model\JobPayloadInput', 'output' => '\Autodesk\Forge\Client\Model\JobPayloadOutput', + 'misc' => '\Autodesk\Forge\Client\Model\JobPayloadMisc', ]; /** @@ -73,6 +74,7 @@ public static function swaggerTypes() protected static $attributeMap = [ 'input' => 'input', 'output' => 'output', + 'misc' => 'misc', ]; @@ -83,6 +85,7 @@ public static function swaggerTypes() protected static $setters = [ 'input' => 'setInput', 'output' => 'setOutput', + 'misc' => 'setMisc', ]; @@ -93,6 +96,7 @@ public static function swaggerTypes() protected static $getters = [ 'input' => 'getInput', 'output' => 'getOutput', + 'misc' => 'getMisc', ]; public static function attributeMap() @@ -128,6 +132,7 @@ public function __construct(array $data = null) { $this->container['input'] = isset($data['input']) ? $data['input'] : null; $this->container['output'] = isset($data['output']) ? $data['output'] : null; + $this->container['misc'] = isset($data['misc']) ? $data['misc'] : null; } /** @@ -196,6 +201,27 @@ public function setOutput($output) return $this; } + + /** + * Gets misc + * @return \Autodesk\Forge\Client\Model\JobPayloadMisc + */ + public function getMisc() + { + return $this->container['misc']; + } + + /** + * Sets misc + * @param \Autodesk\Forge\Client\Model\JobPayloadMisc $Misc + * @return $this + */ + public function setMisc($misc) + { + $this->container['misc'] = $misc; + + return $this; + } /** * Returns true if offset exists. False otherwise. * @param integer $offset Offset diff --git a/lib/Model/JobPayloadMisc.php b/lib/Model/JobPayloadMisc.php new file mode 100644 index 0000000..2bc1c7c --- /dev/null +++ b/lib/Model/JobPayloadMisc.php @@ -0,0 +1,234 @@ + 'string', + ]; + + /** + * @return \string[] + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ + protected static $attributeMap = [ + 'workflow' => 'workflow', + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'workflow' => 'setWorkflow', + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'workflow' => 'getWorkflow', + ]; + + public static function attributeMap() + { + return self::$attributeMap; + } + + public static function setters() + { + return self::$setters; + } + + public static function getters() + { + return self::$getters; + } + + + + + + /** + * Associative array for storing property values + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * @param mixed[] $data Associated array of property values initializing the model + */ + public function __construct(array $data = null) + { + $this->container['workflow'] = isset($data['workflow']) ? $data['workflow'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + return $invalid_properties; + } + + /** + * validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + + return true; + } + + + /** + * Gets urn + * @return string + */ + public function getWorkflow() + { + return $this->container['workflow']; + } + + /** + * Sets workflow + * @param call MD POST job endpoint to submit a job and specify a workflow id + * @return $this + */ + public function setWorkflow($urn) + { + $this->container['workflow'] = $urn; + + 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(\Autodesk\Forge\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Autodesk\Forge\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + +