<?php
/**
 * WorkspaceItem
 *
 * PHP version 5
 *
 * @category Class
 * @package  DocuSign\eSign
 * @author   Swaagger Codegen team
 * @link     https://github.com/swagger-api/swagger-codegen
 */

/**
 * DocuSign REST API
 *
 * The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign.
 *
 * OpenAPI spec version: v2
 * Contact: devcenter@docusign.com
 * Generated by: https://github.com/swagger-api/swagger-codegen.git
 *
 */

/**
 * 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 DocuSign\eSign\Model;

use \ArrayAccess;

/**
 * WorkspaceItem Class Doc Comment
 *
 * @category    Class
 * @description A workspaceItem (file type only) representing the file. This property is only returned in response to file specific GET call.
 * @package     DocuSign\eSign
 * @author      Swagger Codegen team
 * @link        https://github.com/swagger-api/swagger-codegen
 */
class WorkspaceItem implements ArrayAccess
{
    const DISCRIMINATOR = null;

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      * @var string[]
      */
    protected static $swaggerTypes = [
        'caller_authorization' => '\DocuSign\eSign\Model\WorkspaceUserAuthorization',
        'content_type' => 'string',
        'created' => 'string',
        'created_by_id' => 'string',
        'created_by_information' => '\DocuSign\eSign\Model\WorkspaceUser',
        'extension' => 'string',
        'file_size' => 'string',
        'file_uri' => 'string',
        'id' => 'string',
        'is_public' => 'string',
        'last_modified' => 'string',
        'last_modified_by_id' => 'string',
        'last_modified_by_information' => '\DocuSign\eSign\Model\WorkspaceUser',
        'name' => 'string',
        'page_count' => 'string',
        'parent_folder_id' => 'string',
        'parent_folder_uri' => 'string',
        'type' => 'string',
        'uri' => '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 = [
        'caller_authorization' => 'callerAuthorization',
        'content_type' => 'contentType',
        'created' => 'created',
        'created_by_id' => 'createdById',
        'created_by_information' => 'createdByInformation',
        'extension' => 'extension',
        'file_size' => 'fileSize',
        'file_uri' => 'fileUri',
        'id' => 'id',
        'is_public' => 'isPublic',
        'last_modified' => 'lastModified',
        'last_modified_by_id' => 'lastModifiedById',
        'last_modified_by_information' => 'lastModifiedByInformation',
        'name' => 'name',
        'page_count' => 'pageCount',
        'parent_folder_id' => 'parentFolderId',
        'parent_folder_uri' => 'parentFolderUri',
        'type' => 'type',
        'uri' => 'uri'
    ];


    /**
     * Array of attributes to setter functions (for deserialization of responses)
     * @var string[]
     */
    protected static $setters = [
        'caller_authorization' => 'setCallerAuthorization',
        'content_type' => 'setContentType',
        'created' => 'setCreated',
        'created_by_id' => 'setCreatedById',
        'created_by_information' => 'setCreatedByInformation',
        'extension' => 'setExtension',
        'file_size' => 'setFileSize',
        'file_uri' => 'setFileUri',
        'id' => 'setId',
        'is_public' => 'setIsPublic',
        'last_modified' => 'setLastModified',
        'last_modified_by_id' => 'setLastModifiedById',
        'last_modified_by_information' => 'setLastModifiedByInformation',
        'name' => 'setName',
        'page_count' => 'setPageCount',
        'parent_folder_id' => 'setParentFolderId',
        'parent_folder_uri' => 'setParentFolderUri',
        'type' => 'setType',
        'uri' => 'setUri'
    ];


    /**
     * Array of attributes to getter functions (for serialization of requests)
     * @var string[]
     */
    protected static $getters = [
        'caller_authorization' => 'getCallerAuthorization',
        'content_type' => 'getContentType',
        'created' => 'getCreated',
        'created_by_id' => 'getCreatedById',
        'created_by_information' => 'getCreatedByInformation',
        'extension' => 'getExtension',
        'file_size' => 'getFileSize',
        'file_uri' => 'getFileUri',
        'id' => 'getId',
        'is_public' => 'getIsPublic',
        'last_modified' => 'getLastModified',
        'last_modified_by_id' => 'getLastModifiedById',
        'last_modified_by_information' => 'getLastModifiedByInformation',
        'name' => 'getName',
        'page_count' => 'getPageCount',
        'parent_folder_id' => 'getParentFolderId',
        'parent_folder_uri' => 'getParentFolderUri',
        'type' => 'getType',
        'uri' => 'getUri'
    ];

    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['caller_authorization'] = isset($data['caller_authorization']) ? $data['caller_authorization'] : null;
        $this->container['content_type'] = isset($data['content_type']) ? $data['content_type'] : null;
        $this->container['created'] = isset($data['created']) ? $data['created'] : null;
        $this->container['created_by_id'] = isset($data['created_by_id']) ? $data['created_by_id'] : null;
        $this->container['created_by_information'] = isset($data['created_by_information']) ? $data['created_by_information'] : null;
        $this->container['extension'] = isset($data['extension']) ? $data['extension'] : null;
        $this->container['file_size'] = isset($data['file_size']) ? $data['file_size'] : null;
        $this->container['file_uri'] = isset($data['file_uri']) ? $data['file_uri'] : null;
        $this->container['id'] = isset($data['id']) ? $data['id'] : null;
        $this->container['is_public'] = isset($data['is_public']) ? $data['is_public'] : null;
        $this->container['last_modified'] = isset($data['last_modified']) ? $data['last_modified'] : null;
        $this->container['last_modified_by_id'] = isset($data['last_modified_by_id']) ? $data['last_modified_by_id'] : null;
        $this->container['last_modified_by_information'] = isset($data['last_modified_by_information']) ? $data['last_modified_by_information'] : null;
        $this->container['name'] = isset($data['name']) ? $data['name'] : null;
        $this->container['page_count'] = isset($data['page_count']) ? $data['page_count'] : null;
        $this->container['parent_folder_id'] = isset($data['parent_folder_id']) ? $data['parent_folder_id'] : null;
        $this->container['parent_folder_uri'] = isset($data['parent_folder_uri']) ? $data['parent_folder_uri'] : null;
        $this->container['type'] = isset($data['type']) ? $data['type'] : null;
        $this->container['uri'] = isset($data['uri']) ? $data['uri'] : 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 properteis are valid
     */
    public function valid()
    {
        return true;
    }


    /**
     * Gets caller_authorization
     * @return \DocuSign\eSign\Model\WorkspaceUserAuthorization
     */
    public function getCallerAuthorization()
    {
        return $this->container['caller_authorization'];
    }

    /**
     * Sets caller_authorization
     * @param \DocuSign\eSign\Model\WorkspaceUserAuthorization $caller_authorization
     * @return $this
     */
    public function setCallerAuthorization($caller_authorization)
    {
        $this->container['caller_authorization'] = $caller_authorization;

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Sets created
     * @param string $created The UTC DateTime when the workspace item was created.
     * @return $this
     */
    public function setCreated($created)
    {
        $this->container['created'] = $created;

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Gets created_by_information
     * @return \DocuSign\eSign\Model\WorkspaceUser
     */
    public function getCreatedByInformation()
    {
        return $this->container['created_by_information'];
    }

    /**
     * Sets created_by_information
     * @param \DocuSign\eSign\Model\WorkspaceUser $created_by_information
     * @return $this
     */
    public function setCreatedByInformation($created_by_information)
    {
        $this->container['created_by_information'] = $created_by_information;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Sets is_public
     * @param string $is_public If true, this supersedes need for bit mask permission with workspaceUserAuthorization
     * @return $this
     */
    public function setIsPublic($is_public)
    {
        $this->container['is_public'] = $is_public;

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Sets last_modified_by_id
     * @param string $last_modified_by_id Utc date and time the comment was last updated (can only be done by creator)
     * @return $this
     */
    public function setLastModifiedById($last_modified_by_id)
    {
        $this->container['last_modified_by_id'] = $last_modified_by_id;

        return $this;
    }

    /**
     * Gets last_modified_by_information
     * @return \DocuSign\eSign\Model\WorkspaceUser
     */
    public function getLastModifiedByInformation()
    {
        return $this->container['last_modified_by_information'];
    }

    /**
     * Sets last_modified_by_information
     * @param \DocuSign\eSign\Model\WorkspaceUser $last_modified_by_information
     * @return $this
     */
    public function setLastModifiedByInformation($last_modified_by_information)
    {
        $this->container['last_modified_by_information'] = $last_modified_by_information;

        return $this;
    }

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

    /**
     * Sets name
     * @param string $name A simple string description of the item, such as a file name or a folder name.
     * @return $this
     */
    public function setName($name)
    {
        $this->container['name'] = $name;

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Sets parent_folder_id
     * @param string $parent_folder_id The ID of the parent folder. This is the GUID of the parent folder, or the special value 'root' for the root folder.
     * @return $this
     */
    public function setParentFolderId($parent_folder_id)
    {
        $this->container['parent_folder_id'] = $parent_folder_id;

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Sets type
     * @param string $type The type of the workspace item. Valid values are file, folder.
     * @return $this
     */
    public function setType($type)
    {
        $this->container['type'] = $type;

        return $this;
    }

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

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

        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(\DocuSign\eSign\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
        }

        return json_encode(\DocuSign\eSign\ObjectSerializer::sanitizeForSerialization($this));
    }
}


