<?php
/**
 * EnvelopeViewSettings
 *
 * PHP version 7.4
 *
 * @category Class
 * @package  DocuSign\eSign
 * @author   Swagger Codegen team <apihelp@docusign.com>
 * @license  The Docusign PHP Client SDK is licensed under the MIT License.
 * @link     https://github.com/swagger-api/swagger-codegen
 */

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

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

/**
 * EnvelopeViewSettings Class Doc Comment
 *
 * @category    Class
 * @package     DocuSign\eSign
 * @author      Swagger Codegen team <apihelp@docusign.com>
 * @license     The Docusign PHP Client SDK is licensed under the MIT License.
 * @link        https://github.com/swagger-api/swagger-codegen
 */
class EnvelopeViewSettings implements ModelInterface, ArrayAccess
{
    const DISCRIMINATOR = null;

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $swaggerTypes = [
        'back_button_action' => '?string',
        'document_settings' => '\DocuSign\eSign\Model\EnvelopeViewDocumentSettings',
        'envelope_custom_field_settings' => '\DocuSign\eSign\Model\EnvelopeViewEnvelopeCustomFieldSettings',
        'lock_token' => '?string',
        'recipient_settings' => '\DocuSign\eSign\Model\EnvelopeViewRecipientSettings',
        'send_button_action' => '?string',
        'show_advanced_options' => '?string',
        'show_back_button' => '?string',
        'show_discard_action' => '?string',
        'show_header_actions' => '?string',
        'starting_screen' => '?string',
        'tagger_settings' => '\DocuSign\eSign\Model\EnvelopeViewTaggerSettings',
        'template_settings' => '\DocuSign\eSign\Model\EnvelopeViewTemplateSettings'
    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $swaggerFormats = [
        'back_button_action' => null,
        'document_settings' => null,
        'envelope_custom_field_settings' => null,
        'lock_token' => null,
        'recipient_settings' => null,
        'send_button_action' => null,
        'show_advanced_options' => null,
        'show_back_button' => null,
        'show_discard_action' => null,
        'show_header_actions' => null,
        'starting_screen' => null,
        'tagger_settings' => null,
        'template_settings' => 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 = [
        'back_button_action' => 'backButtonAction',
        'document_settings' => 'documentSettings',
        'envelope_custom_field_settings' => 'envelopeCustomFieldSettings',
        'lock_token' => 'lockToken',
        'recipient_settings' => 'recipientSettings',
        'send_button_action' => 'sendButtonAction',
        'show_advanced_options' => 'showAdvancedOptions',
        'show_back_button' => 'showBackButton',
        'show_discard_action' => 'showDiscardAction',
        'show_header_actions' => 'showHeaderActions',
        'starting_screen' => 'startingScreen',
        'tagger_settings' => 'taggerSettings',
        'template_settings' => 'templateSettings'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'back_button_action' => 'setBackButtonAction',
        'document_settings' => 'setDocumentSettings',
        'envelope_custom_field_settings' => 'setEnvelopeCustomFieldSettings',
        'lock_token' => 'setLockToken',
        'recipient_settings' => 'setRecipientSettings',
        'send_button_action' => 'setSendButtonAction',
        'show_advanced_options' => 'setShowAdvancedOptions',
        'show_back_button' => 'setShowBackButton',
        'show_discard_action' => 'setShowDiscardAction',
        'show_header_actions' => 'setShowHeaderActions',
        'starting_screen' => 'setStartingScreen',
        'tagger_settings' => 'setTaggerSettings',
        'template_settings' => 'setTemplateSettings'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'back_button_action' => 'getBackButtonAction',
        'document_settings' => 'getDocumentSettings',
        'envelope_custom_field_settings' => 'getEnvelopeCustomFieldSettings',
        'lock_token' => 'getLockToken',
        'recipient_settings' => 'getRecipientSettings',
        'send_button_action' => 'getSendButtonAction',
        'show_advanced_options' => 'getShowAdvancedOptions',
        'show_back_button' => 'getShowBackButton',
        'show_discard_action' => 'getShowDiscardAction',
        'show_header_actions' => 'getShowHeaderActions',
        'starting_screen' => 'getStartingScreen',
        'tagger_settings' => 'getTaggerSettings',
        'template_settings' => 'getTemplateSettings'
    ];

    /**
     * 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['back_button_action'] = isset($data['back_button_action']) ? $data['back_button_action'] : null;
        $this->container['document_settings'] = isset($data['document_settings']) ? $data['document_settings'] : null;
        $this->container['envelope_custom_field_settings'] = isset($data['envelope_custom_field_settings']) ? $data['envelope_custom_field_settings'] : null;
        $this->container['lock_token'] = isset($data['lock_token']) ? $data['lock_token'] : null;
        $this->container['recipient_settings'] = isset($data['recipient_settings']) ? $data['recipient_settings'] : null;
        $this->container['send_button_action'] = isset($data['send_button_action']) ? $data['send_button_action'] : null;
        $this->container['show_advanced_options'] = isset($data['show_advanced_options']) ? $data['show_advanced_options'] : null;
        $this->container['show_back_button'] = isset($data['show_back_button']) ? $data['show_back_button'] : null;
        $this->container['show_discard_action'] = isset($data['show_discard_action']) ? $data['show_discard_action'] : null;
        $this->container['show_header_actions'] = isset($data['show_header_actions']) ? $data['show_header_actions'] : null;
        $this->container['starting_screen'] = isset($data['starting_screen']) ? $data['starting_screen'] : null;
        $this->container['tagger_settings'] = isset($data['tagger_settings']) ? $data['tagger_settings'] : null;
        $this->container['template_settings'] = isset($data['template_settings']) ? $data['template_settings'] : 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 back_button_action
     *
     * @return ?string
     */
    public function getBackButtonAction()
    {
        return $this->container['back_button_action'];
    }

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }
    /**
     * Returns true if offset exists. False otherwise.
     *
     * @param integer $offset Offset
     *
     * @return boolean
     */
    #[\ReturnTypeWillChange]
    public function offsetExists($offset)
    {
        return isset($this->container[$offset]);
    }

    /**
     * Gets offset.
     *
     * @param integer $offset Offset
     *
     * @return mixed
     */
    #[\ReturnTypeWillChange]
    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
     */
    #[\ReturnTypeWillChange]
    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
     */
    #[\ReturnTypeWillChange]
    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));
    }
}

