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

/**
 * ExtensionData 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 ExtensionData implements ModelInterface, ArrayAccess
{
    const DISCRIMINATOR = null;

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $swaggerTypes = [
        'action_contract' => '?string',
        'action_input_key' => '?string',
        'action_name' => '?string',
        'application_id' => '?string',
        'application_name' => '?string',
        'connected_fields_data' => '\DocuSign\eSign\Model\ConnectedData',
        'connection_instances' => '\DocuSign\eSign\Model\ConnectionInstance[]',
        'extension_contract' => '?string',
        'extension_group_id' => '?string',
        'extension_name' => '?string',
        'extension_policy' => '?string',
        'publisher_name' => '?string',
        'required_for_extension' => '?string'
    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $swaggerFormats = [
        'action_contract' => null,
        'action_input_key' => null,
        'action_name' => null,
        'application_id' => null,
        'application_name' => null,
        'connected_fields_data' => null,
        'connection_instances' => null,
        'extension_contract' => null,
        'extension_group_id' => null,
        'extension_name' => null,
        'extension_policy' => null,
        'publisher_name' => null,
        'required_for_extension' => 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 = [
        'action_contract' => 'actionContract',
        'action_input_key' => 'actionInputKey',
        'action_name' => 'actionName',
        'application_id' => 'applicationId',
        'application_name' => 'applicationName',
        'connected_fields_data' => 'connectedFieldsData',
        'connection_instances' => 'connectionInstances',
        'extension_contract' => 'extensionContract',
        'extension_group_id' => 'extensionGroupId',
        'extension_name' => 'extensionName',
        'extension_policy' => 'extensionPolicy',
        'publisher_name' => 'publisherName',
        'required_for_extension' => 'requiredForExtension'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'action_contract' => 'setActionContract',
        'action_input_key' => 'setActionInputKey',
        'action_name' => 'setActionName',
        'application_id' => 'setApplicationId',
        'application_name' => 'setApplicationName',
        'connected_fields_data' => 'setConnectedFieldsData',
        'connection_instances' => 'setConnectionInstances',
        'extension_contract' => 'setExtensionContract',
        'extension_group_id' => 'setExtensionGroupId',
        'extension_name' => 'setExtensionName',
        'extension_policy' => 'setExtensionPolicy',
        'publisher_name' => 'setPublisherName',
        'required_for_extension' => 'setRequiredForExtension'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'action_contract' => 'getActionContract',
        'action_input_key' => 'getActionInputKey',
        'action_name' => 'getActionName',
        'application_id' => 'getApplicationId',
        'application_name' => 'getApplicationName',
        'connected_fields_data' => 'getConnectedFieldsData',
        'connection_instances' => 'getConnectionInstances',
        'extension_contract' => 'getExtensionContract',
        'extension_group_id' => 'getExtensionGroupId',
        'extension_name' => 'getExtensionName',
        'extension_policy' => 'getExtensionPolicy',
        'publisher_name' => 'getPublisherName',
        'required_for_extension' => 'getRequiredForExtension'
    ];

    /**
     * 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['action_contract'] = isset($data['action_contract']) ? $data['action_contract'] : null;
        $this->container['action_input_key'] = isset($data['action_input_key']) ? $data['action_input_key'] : null;
        $this->container['action_name'] = isset($data['action_name']) ? $data['action_name'] : null;
        $this->container['application_id'] = isset($data['application_id']) ? $data['application_id'] : null;
        $this->container['application_name'] = isset($data['application_name']) ? $data['application_name'] : null;
        $this->container['connected_fields_data'] = isset($data['connected_fields_data']) ? $data['connected_fields_data'] : null;
        $this->container['connection_instances'] = isset($data['connection_instances']) ? $data['connection_instances'] : null;
        $this->container['extension_contract'] = isset($data['extension_contract']) ? $data['extension_contract'] : null;
        $this->container['extension_group_id'] = isset($data['extension_group_id']) ? $data['extension_group_id'] : null;
        $this->container['extension_name'] = isset($data['extension_name']) ? $data['extension_name'] : null;
        $this->container['extension_policy'] = isset($data['extension_policy']) ? $data['extension_policy'] : null;
        $this->container['publisher_name'] = isset($data['publisher_name']) ? $data['publisher_name'] : null;
        $this->container['required_for_extension'] = isset($data['required_for_extension']) ? $data['required_for_extension'] : 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 action_contract
     *
     * @return ?string
     */
    public function getActionContract()
    {
        return $this->container['action_contract'];
    }

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

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

