<?php
/**
 * @license    License compatible with GNU General Public License (GNU GPL); see file LICENSE
 */

/**
 * InlineResponseDefault
 *
 * PHP version 5
 *
 * @category Class
 * @package  Swagger\Client
 * @author   Swagger Codegen team
 * @link     https://github.com/swagger-api/swagger-codegen
 */

/**
 * LogicalDOC REST API
 *
 * This is the interactive documentation of the REST APIs exposed by LogicalDOC. You can find more information about LogicalDOC at <a href=\"https://www.logicaldoc.com\">https://www.logicaldoc.com</a> or on Twitter @logicaldoc.<br/>                Note: The access path to the API is protected with basic authentication, to be able to run the samples you must log in using the credentials of a Logicaldoc user, or passing to the request the session ID (SID) as a cookie (cookie name: `ldoc-sid`).<br/><br/>             Here is an example to list the children folders: <br/> <pre>curl -u admin:admin -H 'Accept: application/json' http://localhost:8080/services/rest/folder/listChildren?folderId=4</pre><br/><br/>RESTful Guide with curl:  <a href='https://wiki.logicaldoc.com/wiki/RESTful_Guide_with_curl'>https://wiki.logicaldoc.com/wiki/RESTful_Guide_with_curl</a> <br/><br/>Practical examples of use are available for various programming languages at: <a href='http://wiki.logicaldoc.com/wiki/Bindings_And_Samples'>http://wiki.logicaldoc.com/wiki/Bindings_And_Samples</a>
 *
 * OpenAPI spec version: 8.6.0-oas3
 * Contact: devel@logicaldoc.com
 * Generated by: https://github.com/swagger-api/swagger-codegen.git
 * Swagger Codegen version: 3.0.33
 */
/**
 * 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 Swagger\Client\Model;

defined('_JEXEC') or die('Restricted access');


use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;

/**
 * InlineResponseDefault Class Doc Comment
 *
 * @category Class
 * @package  Swagger\Client
 * @author   Swagger Codegen team
 * @link     https://github.com/swagger-api/swagger-codegen
 */
class InlineResponseDefault implements ModelInterface, ArrayAccess
{
    const DISCRIMINATOR = null;

    /**
      * The original name of the model.
      *
      * @var string
      */
    protected static $swaggerModelName = 'inline_response_default';

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $swaggerTypes = [
        'data_source' => '\Swagger\Client\Model\InlineResponseDefaultDataSource',
'name' => 'string',
'content' => 'object',
'input_stream' => 'object',
'content_type' => 'string',
'output_stream' => 'object',
'command_map' => '\Swagger\Client\Model\InlineResponseDefaultCommandMap',
'all_commands' => '\Swagger\Client\Model\InlineResponseDefaultAllCommands[]',
'preferred_commands' => '\Swagger\Client\Model\InlineResponseDefaultAllCommands[]',
'transfer_data_flavors' => '\Swagger\Client\Model\InlineResponseDefaultTransferDataFlavors[]'    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $swaggerFormats = [
        'data_source' => null,
'name' => null,
'content' => null,
'input_stream' => null,
'content_type' => null,
'output_stream' => null,
'command_map' => null,
'all_commands' => null,
'preferred_commands' => null,
'transfer_data_flavors' => null    ];

    /**
     * Array of property to type mappings. Used for (de)serialization
     *
     * @return array
     */
    public static function swaggerTypes()
    {
        return self::$swaggerTypes;
    }

    /**
     * Array of property to format mappings. Used for (de)serialization
     *
     * @return array
     */
    public static function swaggerFormats()
    {
        return self::$swaggerFormats;
    }

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @var string[]
     */
    protected static $attributeMap = [
        'data_source' => 'dataSource',
'name' => 'name',
'content' => 'content',
'input_stream' => 'inputStream',
'content_type' => 'contentType',
'output_stream' => 'outputStream',
'command_map' => 'commandMap',
'all_commands' => 'allCommands',
'preferred_commands' => 'preferredCommands',
'transfer_data_flavors' => 'transferDataFlavors'    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'data_source' => 'setDataSource',
'name' => 'setName',
'content' => 'setContent',
'input_stream' => 'setInputStream',
'content_type' => 'setContentType',
'output_stream' => 'setOutputStream',
'command_map' => 'setCommandMap',
'all_commands' => 'setAllCommands',
'preferred_commands' => 'setPreferredCommands',
'transfer_data_flavors' => 'setTransferDataFlavors'    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'data_source' => 'getDataSource',
'name' => 'getName',
'content' => 'getContent',
'input_stream' => 'getInputStream',
'content_type' => 'getContentType',
'output_stream' => 'getOutputStream',
'command_map' => 'getCommandMap',
'all_commands' => 'getAllCommands',
'preferred_commands' => 'getPreferredCommands',
'transfer_data_flavors' => 'getTransferDataFlavors'    ];

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @return array
     */
    public static function attributeMap()
    {
        return self::$attributeMap;
    }

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @return array
     */
    public static function setters()
    {
        return self::$setters;
    }

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @return array
     */
    public static function getters()
    {
        return self::$getters;
    }

    /**
     * The original name of the model.
     *
     * @return string
     */
    public function getModelName()
    {
        return self::$swaggerModelName;
    }

    

    /**
     * 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['data_source'] = isset($data['data_source']) ? $data['data_source'] : null;
        $this->container['name'] = isset($data['name']) ? $data['name'] : null;
        $this->container['content'] = isset($data['content']) ? $data['content'] : null;
        $this->container['input_stream'] = isset($data['input_stream']) ? $data['input_stream'] : null;
        $this->container['content_type'] = isset($data['content_type']) ? $data['content_type'] : null;
        $this->container['output_stream'] = isset($data['output_stream']) ? $data['output_stream'] : null;
        $this->container['command_map'] = isset($data['command_map']) ? $data['command_map'] : null;
        $this->container['all_commands'] = isset($data['all_commands']) ? $data['all_commands'] : null;
        $this->container['preferred_commands'] = isset($data['preferred_commands']) ? $data['preferred_commands'] : null;
        $this->container['transfer_data_flavors'] = isset($data['transfer_data_flavors']) ? $data['transfer_data_flavors'] : null;
    }

    /**
     * Show all the invalid properties with reasons.
     *
     * @return array invalid properties with reasons
     */
    public function listInvalidProperties()
    {
        $invalidProperties = [];

        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()
    {
        return count($this->listInvalidProperties()) === 0;
    }


    /**
     * Gets data_source
     *
     * @return \Swagger\Client\Model\InlineResponseDefaultDataSource
     */
    public function getDataSource()
    {
        return $this->container['data_source'];
    }

    /**
     * Sets data_source
     *
     * @param \Swagger\Client\Model\InlineResponseDefaultDataSource $data_source data_source
     *
     * @return $this
     */
    public function setDataSource($data_source)
    {
        $this->container['data_source'] = $data_source;

        return $this;
    }

    /**
     * Gets name
     *
     * @return string
     */
    public function getName()
    {
        return $this->container['name'];
    }

    /**
     * Sets name
     *
     * @param string $name name
     *
     * @return $this
     */
    public function setName($name)
    {
        $this->container['name'] = $name;

        return $this;
    }

    /**
     * Gets content
     *
     * @return object
     */
    public function getContent()
    {
        return $this->container['content'];
    }

    /**
     * Sets content
     *
     * @param object $content content
     *
     * @return $this
     */
    public function setContent($content)
    {
        $this->container['content'] = $content;

        return $this;
    }

    /**
     * Gets input_stream
     *
     * @return object
     */
    public function getInputStream()
    {
        return $this->container['input_stream'];
    }

    /**
     * Sets input_stream
     *
     * @param object $input_stream input_stream
     *
     * @return $this
     */
    public function setInputStream($input_stream)
    {
        $this->container['input_stream'] = $input_stream;

        return $this;
    }

    /**
     * Gets content_type
     *
     * @return string
     */
    public function getContentType()
    {
        return $this->container['content_type'];
    }

    /**
     * Sets content_type
     *
     * @param string $content_type content_type
     *
     * @return $this
     */
    public function setContentType($content_type)
    {
        $this->container['content_type'] = $content_type;

        return $this;
    }

    /**
     * Gets output_stream
     *
     * @return object
     */
    public function getOutputStream()
    {
        return $this->container['output_stream'];
    }

    /**
     * Sets output_stream
     *
     * @param object $output_stream output_stream
     *
     * @return $this
     */
    public function setOutputStream($output_stream)
    {
        $this->container['output_stream'] = $output_stream;

        return $this;
    }

    /**
     * Gets command_map
     *
     * @return \Swagger\Client\Model\InlineResponseDefaultCommandMap
     */
    public function getCommandMap()
    {
        return $this->container['command_map'];
    }

    /**
     * Sets command_map
     *
     * @param \Swagger\Client\Model\InlineResponseDefaultCommandMap $command_map command_map
     *
     * @return $this
     */
    public function setCommandMap($command_map)
    {
        $this->container['command_map'] = $command_map;

        return $this;
    }

    /**
     * Gets all_commands
     *
     * @return \Swagger\Client\Model\InlineResponseDefaultAllCommands[]
     */
    public function getAllCommands()
    {
        return $this->container['all_commands'];
    }

    /**
     * Sets all_commands
     *
     * @param \Swagger\Client\Model\InlineResponseDefaultAllCommands[] $all_commands all_commands
     *
     * @return $this
     */
    public function setAllCommands($all_commands)
    {
        $this->container['all_commands'] = $all_commands;

        return $this;
    }

    /**
     * Gets preferred_commands
     *
     * @return \Swagger\Client\Model\InlineResponseDefaultAllCommands[]
     */
    public function getPreferredCommands()
    {
        return $this->container['preferred_commands'];
    }

    /**
     * Sets preferred_commands
     *
     * @param \Swagger\Client\Model\InlineResponseDefaultAllCommands[] $preferred_commands preferred_commands
     *
     * @return $this
     */
    public function setPreferredCommands($preferred_commands)
    {
        $this->container['preferred_commands'] = $preferred_commands;

        return $this;
    }

    /**
     * Gets transfer_data_flavors
     *
     * @return \Swagger\Client\Model\InlineResponseDefaultTransferDataFlavors[]
     */
    public function getTransferDataFlavors()
    {
        return $this->container['transfer_data_flavors'];
    }

    /**
     * Sets transfer_data_flavors
     *
     * @param \Swagger\Client\Model\InlineResponseDefaultTransferDataFlavors[] $transfer_data_flavors transfer_data_flavors
     *
     * @return $this
     */
    public function setTransferDataFlavors($transfer_data_flavors)
    {
        $this->container['transfer_data_flavors'] = $transfer_data_flavors;

        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));
    }
}
