<?php
/**
 * EnvelopeDocument
 *
 * 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;

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

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      * @var string[]
      */
    protected static $swaggerTypes = [
        'attachment_tab_id' => 'string',
        'available_document_types' => '\DocuSign\eSign\Model\SignatureType[]',
        'contains_pdf_form_fields' => 'string',
        'display' => 'string',
        'document_fields' => '\DocuSign\eSign\Model\NameValue[]',
        'document_group' => 'string',
        'document_id' => 'string',
        'error_details' => '\DocuSign\eSign\Model\ErrorDetails',
        'include_in_download' => 'string',
        'name' => 'string',
        'order' => 'string',
        'pages' => 'string',
        'signer_must_acknowledge' => 'string',
        'template_locked' => 'string',
        'template_required' => '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 = [
        'attachment_tab_id' => 'attachmentTabId',
        'available_document_types' => 'availableDocumentTypes',
        'contains_pdf_form_fields' => 'containsPdfFormFields',
        'display' => 'display',
        'document_fields' => 'documentFields',
        'document_group' => 'documentGroup',
        'document_id' => 'documentId',
        'error_details' => 'errorDetails',
        'include_in_download' => 'includeInDownload',
        'name' => 'name',
        'order' => 'order',
        'pages' => 'pages',
        'signer_must_acknowledge' => 'signerMustAcknowledge',
        'template_locked' => 'templateLocked',
        'template_required' => 'templateRequired',
        'type' => 'type',
        'uri' => 'uri'
    ];


    /**
     * Array of attributes to setter functions (for deserialization of responses)
     * @var string[]
     */
    protected static $setters = [
        'attachment_tab_id' => 'setAttachmentTabId',
        'available_document_types' => 'setAvailableDocumentTypes',
        'contains_pdf_form_fields' => 'setContainsPdfFormFields',
        'display' => 'setDisplay',
        'document_fields' => 'setDocumentFields',
        'document_group' => 'setDocumentGroup',
        'document_id' => 'setDocumentId',
        'error_details' => 'setErrorDetails',
        'include_in_download' => 'setIncludeInDownload',
        'name' => 'setName',
        'order' => 'setOrder',
        'pages' => 'setPages',
        'signer_must_acknowledge' => 'setSignerMustAcknowledge',
        'template_locked' => 'setTemplateLocked',
        'template_required' => 'setTemplateRequired',
        'type' => 'setType',
        'uri' => 'setUri'
    ];


    /**
     * Array of attributes to getter functions (for serialization of requests)
     * @var string[]
     */
    protected static $getters = [
        'attachment_tab_id' => 'getAttachmentTabId',
        'available_document_types' => 'getAvailableDocumentTypes',
        'contains_pdf_form_fields' => 'getContainsPdfFormFields',
        'display' => 'getDisplay',
        'document_fields' => 'getDocumentFields',
        'document_group' => 'getDocumentGroup',
        'document_id' => 'getDocumentId',
        'error_details' => 'getErrorDetails',
        'include_in_download' => 'getIncludeInDownload',
        'name' => 'getName',
        'order' => 'getOrder',
        'pages' => 'getPages',
        'signer_must_acknowledge' => 'getSignerMustAcknowledge',
        'template_locked' => 'getTemplateLocked',
        'template_required' => 'getTemplateRequired',
        '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['attachment_tab_id'] = isset($data['attachment_tab_id']) ? $data['attachment_tab_id'] : null;
        $this->container['available_document_types'] = isset($data['available_document_types']) ? $data['available_document_types'] : null;
        $this->container['contains_pdf_form_fields'] = isset($data['contains_pdf_form_fields']) ? $data['contains_pdf_form_fields'] : null;
        $this->container['display'] = isset($data['display']) ? $data['display'] : null;
        $this->container['document_fields'] = isset($data['document_fields']) ? $data['document_fields'] : null;
        $this->container['document_group'] = isset($data['document_group']) ? $data['document_group'] : null;
        $this->container['document_id'] = isset($data['document_id']) ? $data['document_id'] : null;
        $this->container['error_details'] = isset($data['error_details']) ? $data['error_details'] : null;
        $this->container['include_in_download'] = isset($data['include_in_download']) ? $data['include_in_download'] : null;
        $this->container['name'] = isset($data['name']) ? $data['name'] : null;
        $this->container['order'] = isset($data['order']) ? $data['order'] : null;
        $this->container['pages'] = isset($data['pages']) ? $data['pages'] : null;
        $this->container['signer_must_acknowledge'] = isset($data['signer_must_acknowledge']) ? $data['signer_must_acknowledge'] : null;
        $this->container['template_locked'] = isset($data['template_locked']) ? $data['template_locked'] : null;
        $this->container['template_required'] = isset($data['template_required']) ? $data['template_required'] : 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 attachment_tab_id
     * @return string
     */
    public function getAttachmentTabId()
    {
        return $this->container['attachment_tab_id'];
    }

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Sets document_id
     * @param string $document_id Specifies the document ID number that the tab is placed on. This must refer to an existing Document's ID attribute.
     * @return $this
     */
    public function setDocumentId($document_id)
    {
        $this->container['document_id'] = $document_id;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Sets template_locked
     * @param string $template_locked When set to **true**, the sender cannot change any attributes of the recipient. Used only when working with template recipients.
     * @return $this
     */
    public function setTemplateLocked($template_locked)
    {
        $this->container['template_locked'] = $template_locked;

        return $this;
    }

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

    /**
     * Sets template_required
     * @param string $template_required When set to **true**, the sender may not remove the recipient. Used only when working with template recipients.
     * @return $this
     */
    public function setTemplateRequired($template_required)
    {
        $this->container['template_required'] = $template_required;

        return $this;
    }

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

    /**
     * Sets type
     * @param string $type 
     * @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));
    }
}


