=begin
#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

=end

require 'date'

module DocuSign_eSign
  # This object defines account permissions for users who are associated with the account permission profile. 
  class AccountRoleSettings
    # 
    attr_accessor :allow_account_management

    # Metadata that indicates whether the `allowAccountManagement` property is editable. 
    attr_accessor :allow_account_management_metadata

    # 
    attr_accessor :allow_api_access

    # Metadata that indicates whether the `allowApiAccess` property is editable. 
    attr_accessor :allow_api_access_metadata

    # 
    attr_accessor :allow_api_access_to_account

    # Metadata that indicates whether the `allowApiAccessToAccount` property is editable. 
    attr_accessor :allow_api_access_to_account_metadata

    # 
    attr_accessor :allow_api_sending_on_behalf_of_others

    # Metadata that indicates whether the `allowApiSendingOnBehalfOfOthers` property is editable. 
    attr_accessor :allow_api_sending_on_behalf_of_others_metadata

    # 
    attr_accessor :allow_api_sequential_signing

    # Metadata that indicates whether the `allowApiSequentialSigning` property is editable. 
    attr_accessor :allow_api_sequential_signing_metadata

    # 
    attr_accessor :allow_auto_tagging

    # Metadata that indicates whether the `allowAutoTagging` property is editable.
    attr_accessor :allow_auto_tagging_metadata

    # 
    attr_accessor :allow_bulk_sending

    # Metadata that indicates whether the `allowBulkSending` property is editable. 
    attr_accessor :allow_bulk_sending_metadata

    # 
    attr_accessor :allow_docu_sign_desktop_client

    # Metadata that indicates whether the `allowDocuSignDesktopClient` property is editable. 
    attr_accessor :allow_docu_sign_desktop_client_metadata

    # 
    attr_accessor :allowed_address_book_access

    # Metadata that indicates whether the `allowedAddressBookAccess` property is editable. 
    attr_accessor :allowed_address_book_access_metadata

    # 
    attr_accessor :allowed_clickwraps_access

    # 
    attr_accessor :allowed_clickwraps_access_metadata

    # 
    attr_accessor :allowed_document_template_library_access

    # 
    attr_accessor :allowed_document_template_library_access_metadata

    # 
    attr_accessor :allowed_orchestration_access

    # 
    attr_accessor :allowed_orchestration_access_metadata

    # 
    attr_accessor :allowed_template_access

    # Metadata that indicates whether the `allowedTemplateAccess` property is editable. 
    attr_accessor :allowed_template_access_metadata

    # 
    attr_accessor :allowed_to_be_envelope_transfer_recipient

    # Metadata that indicates whether the `allowedToBeEnvelopeTransferRecipient` property is editable. 
    attr_accessor :allowed_to_be_envelope_transfer_recipient_metadata

    # 
    attr_accessor :allow_envelope_sending

    # Metadata that indicates whether the `allowEnvelopeSending` property is editable. 
    attr_accessor :allow_envelope_sending_metadata

    # 
    attr_accessor :allow_e_seal_recipients

    # Metadata that indicates whether the `allowESealRecipients` property is editable.
    attr_accessor :allow_e_seal_recipients_metadata

    # 
    attr_accessor :allow_power_forms_admin_to_access_all_power_form_envelopes

    # Metadata that indicates whether the `allowPowerFormsAdminToAccessAllPowerFormEnvelopes` property is editable.
    attr_accessor :allow_power_forms_admin_to_access_all_power_form_envelopes_metadata

    # 
    attr_accessor :allow_senders_to_set_recipient_email_language

    # Metadata that indicates whether the `allowSendersToSetRecipientEmailLanguage` property is editable. 
    attr_accessor :allow_senders_to_set_recipient_email_language_metadata

    # 
    attr_accessor :allow_signer_attachments

    # Metadata that indicates whether the `allowSignerAttachments` property is editable. 
    attr_accessor :allow_signer_attachments_metadata

    # 
    attr_accessor :allow_supplemental_documents

    # Metadata that indicates whether the `allowSupplementalDocuments` property is editable.
    attr_accessor :allow_supplemental_documents_metadata

    # 
    attr_accessor :allow_tagging_in_send_and_correct

    # Metadata that indicates whether the `allowTaggingInSendAndCorrect` property is editable. 
    attr_accessor :allow_tagging_in_send_and_correct_metadata

    # 
    attr_accessor :allow_transactions

    # 
    attr_accessor :allow_transactions_metadata

    # 
    attr_accessor :allow_vaulting

    # Reserved for DocuSign.
    attr_accessor :allow_vaulting_metadata

    # 
    attr_accessor :allow_wet_signing_override

    # Metadata that indicates whether the `allowWetSigningOverride` property is editable. 
    attr_accessor :allow_wet_signing_override_metadata

    # 
    attr_accessor :can_create_transaction

    # 
    attr_accessor :can_create_transaction_metadata

    # 
    attr_accessor :can_create_workspaces

    # Reserved for DocuSign.
    attr_accessor :can_create_workspaces_metadata

    # 
    attr_accessor :can_delete_documents_in_transaction

    # 
    attr_accessor :can_delete_documents_in_transaction_metadata

    # 
    attr_accessor :can_delete_transaction

    # 
    attr_accessor :can_delete_transaction_metadata

    # 
    attr_accessor :can_send_envelopes_via_sms

    # 
    attr_accessor :can_send_envelopes_via_sms_metadata

    # 
    attr_accessor :disable_document_upload

    # Metadata that indicates whether the `disableDocumentUpload` property is editable. 
    attr_accessor :disable_document_upload_metadata

    # 
    attr_accessor :disable_other_actions

    # Metadata that indicates whether the `disableOtherActions` property is editable. 
    attr_accessor :disable_other_actions_metadata

    # 
    attr_accessor :enable_api_request_logging

    # Metadata that indicates whether the `enableApiRequestLogging` property is editable. 
    attr_accessor :enable_api_request_logging_metadata

    # 
    attr_accessor :enable_key_terms_suggestions_by_document_type

    # 
    attr_accessor :enable_key_terms_suggestions_by_document_type_metadata

    # 
    attr_accessor :enable_recipient_viewing_notifications

    # Metadata that indicates whether the `enableRecipientViewingNotifications` property is editable. 
    attr_accessor :enable_recipient_viewing_notifications_metadata

    # 
    attr_accessor :enable_sequential_signing_interface

    # Metadata that indicates whether the `enableSequentialSigningInterface` property is editable. 
    attr_accessor :enable_sequential_signing_interface_metadata

    # 
    attr_accessor :enable_transaction_point_integration

    # Reserved for DocuSign.
    attr_accessor :enable_transaction_point_integration_metadata

    # 
    attr_accessor :power_form_role

    # Metadata that indicates whether the `powerFormRole` property is editable. 
    attr_accessor :power_form_role_metadata

    # 
    attr_accessor :receive_completed_self_signed_documents_as_email_links

    # Metadata that indicates whether the `receiveCompletedSelfSignedDocumentsAsEmailLinks` property is editable. 
    attr_accessor :receive_completed_self_signed_documents_as_email_links_metadata

    # Reserved for DocuSign.
    attr_accessor :signing_ui_version_metadata

    # 
    attr_accessor :supplemental_documents_must_accept

    # Metadata that indicates whether the `supplementalDocumentsMustAccept` property is editable. 
    attr_accessor :supplemental_documents_must_accept_metadata

    # 
    attr_accessor :supplemental_documents_must_read

    # Metadata that indicates whether the `supplementalDocumentsMustRead` property is editable. 
    attr_accessor :supplemental_documents_must_read_metadata

    # 
    attr_accessor :supplemental_documents_must_view

    # Metadata that indicates whether the `supplementalDocumentsMustView` property is editable. 
    attr_accessor :supplemental_documents_must_view_metadata

    # 
    attr_accessor :use_new_docu_sign_experience_interface

    # Reserved for DocuSign.
    attr_accessor :use_new_docu_sign_experience_interface_metadata

    # 
    attr_accessor :use_new_sending_interface

    # Reserved for DocuSign.
    attr_accessor :use_new_sending_interface_metadata

    # 
    attr_accessor :vaulting_mode

    # Reserved for DocuSign.
    attr_accessor :vaulting_mode_metadata

    # 
    attr_accessor :web_forms

    # 
    attr_accessor :web_forms_metadata

    # Attribute mapping from ruby-style variable name to JSON key.
    def self.attribute_map
      {
        :'allow_account_management' => :'allowAccountManagement',
        :'allow_account_management_metadata' => :'allowAccountManagementMetadata',
        :'allow_api_access' => :'allowApiAccess',
        :'allow_api_access_metadata' => :'allowApiAccessMetadata',
        :'allow_api_access_to_account' => :'allowApiAccessToAccount',
        :'allow_api_access_to_account_metadata' => :'allowApiAccessToAccountMetadata',
        :'allow_api_sending_on_behalf_of_others' => :'allowApiSendingOnBehalfOfOthers',
        :'allow_api_sending_on_behalf_of_others_metadata' => :'allowApiSendingOnBehalfOfOthersMetadata',
        :'allow_api_sequential_signing' => :'allowApiSequentialSigning',
        :'allow_api_sequential_signing_metadata' => :'allowApiSequentialSigningMetadata',
        :'allow_auto_tagging' => :'allowAutoTagging',
        :'allow_auto_tagging_metadata' => :'allowAutoTaggingMetadata',
        :'allow_bulk_sending' => :'allowBulkSending',
        :'allow_bulk_sending_metadata' => :'allowBulkSendingMetadata',
        :'allow_docu_sign_desktop_client' => :'allowDocuSignDesktopClient',
        :'allow_docu_sign_desktop_client_metadata' => :'allowDocuSignDesktopClientMetadata',
        :'allowed_address_book_access' => :'allowedAddressBookAccess',
        :'allowed_address_book_access_metadata' => :'allowedAddressBookAccessMetadata',
        :'allowed_clickwraps_access' => :'allowedClickwrapsAccess',
        :'allowed_clickwraps_access_metadata' => :'allowedClickwrapsAccessMetadata',
        :'allowed_document_template_library_access' => :'allowedDocumentTemplateLibraryAccess',
        :'allowed_document_template_library_access_metadata' => :'allowedDocumentTemplateLibraryAccessMetadata',
        :'allowed_orchestration_access' => :'allowedOrchestrationAccess',
        :'allowed_orchestration_access_metadata' => :'allowedOrchestrationAccessMetadata',
        :'allowed_template_access' => :'allowedTemplateAccess',
        :'allowed_template_access_metadata' => :'allowedTemplateAccessMetadata',
        :'allowed_to_be_envelope_transfer_recipient' => :'allowedToBeEnvelopeTransferRecipient',
        :'allowed_to_be_envelope_transfer_recipient_metadata' => :'allowedToBeEnvelopeTransferRecipientMetadata',
        :'allow_envelope_sending' => :'allowEnvelopeSending',
        :'allow_envelope_sending_metadata' => :'allowEnvelopeSendingMetadata',
        :'allow_e_seal_recipients' => :'allowESealRecipients',
        :'allow_e_seal_recipients_metadata' => :'allowESealRecipientsMetadata',
        :'allow_power_forms_admin_to_access_all_power_form_envelopes' => :'allowPowerFormsAdminToAccessAllPowerFormEnvelopes',
        :'allow_power_forms_admin_to_access_all_power_form_envelopes_metadata' => :'allowPowerFormsAdminToAccessAllPowerFormEnvelopesMetadata',
        :'allow_senders_to_set_recipient_email_language' => :'allowSendersToSetRecipientEmailLanguage',
        :'allow_senders_to_set_recipient_email_language_metadata' => :'allowSendersToSetRecipientEmailLanguageMetadata',
        :'allow_signer_attachments' => :'allowSignerAttachments',
        :'allow_signer_attachments_metadata' => :'allowSignerAttachmentsMetadata',
        :'allow_supplemental_documents' => :'allowSupplementalDocuments',
        :'allow_supplemental_documents_metadata' => :'allowSupplementalDocumentsMetadata',
        :'allow_tagging_in_send_and_correct' => :'allowTaggingInSendAndCorrect',
        :'allow_tagging_in_send_and_correct_metadata' => :'allowTaggingInSendAndCorrectMetadata',
        :'allow_transactions' => :'allowTransactions',
        :'allow_transactions_metadata' => :'allowTransactionsMetadata',
        :'allow_vaulting' => :'allowVaulting',
        :'allow_vaulting_metadata' => :'allowVaultingMetadata',
        :'allow_wet_signing_override' => :'allowWetSigningOverride',
        :'allow_wet_signing_override_metadata' => :'allowWetSigningOverrideMetadata',
        :'can_create_transaction' => :'canCreateTransaction',
        :'can_create_transaction_metadata' => :'canCreateTransactionMetadata',
        :'can_create_workspaces' => :'canCreateWorkspaces',
        :'can_create_workspaces_metadata' => :'canCreateWorkspacesMetadata',
        :'can_delete_documents_in_transaction' => :'canDeleteDocumentsInTransaction',
        :'can_delete_documents_in_transaction_metadata' => :'canDeleteDocumentsInTransactionMetadata',
        :'can_delete_transaction' => :'canDeleteTransaction',
        :'can_delete_transaction_metadata' => :'canDeleteTransactionMetadata',
        :'can_send_envelopes_via_sms' => :'canSendEnvelopesViaSMS',
        :'can_send_envelopes_via_sms_metadata' => :'canSendEnvelopesViaSMSMetadata',
        :'disable_document_upload' => :'disableDocumentUpload',
        :'disable_document_upload_metadata' => :'disableDocumentUploadMetadata',
        :'disable_other_actions' => :'disableOtherActions',
        :'disable_other_actions_metadata' => :'disableOtherActionsMetadata',
        :'enable_api_request_logging' => :'enableApiRequestLogging',
        :'enable_api_request_logging_metadata' => :'enableApiRequestLoggingMetadata',
        :'enable_key_terms_suggestions_by_document_type' => :'enableKeyTermsSuggestionsByDocumentType',
        :'enable_key_terms_suggestions_by_document_type_metadata' => :'enableKeyTermsSuggestionsByDocumentTypeMetadata',
        :'enable_recipient_viewing_notifications' => :'enableRecipientViewingNotifications',
        :'enable_recipient_viewing_notifications_metadata' => :'enableRecipientViewingNotificationsMetadata',
        :'enable_sequential_signing_interface' => :'enableSequentialSigningInterface',
        :'enable_sequential_signing_interface_metadata' => :'enableSequentialSigningInterfaceMetadata',
        :'enable_transaction_point_integration' => :'enableTransactionPointIntegration',
        :'enable_transaction_point_integration_metadata' => :'enableTransactionPointIntegrationMetadata',
        :'power_form_role' => :'powerFormRole',
        :'power_form_role_metadata' => :'powerFormRoleMetadata',
        :'receive_completed_self_signed_documents_as_email_links' => :'receiveCompletedSelfSignedDocumentsAsEmailLinks',
        :'receive_completed_self_signed_documents_as_email_links_metadata' => :'receiveCompletedSelfSignedDocumentsAsEmailLinksMetadata',
        :'signing_ui_version_metadata' => :'signingUiVersionMetadata',
        :'supplemental_documents_must_accept' => :'supplementalDocumentsMustAccept',
        :'supplemental_documents_must_accept_metadata' => :'supplementalDocumentsMustAcceptMetadata',
        :'supplemental_documents_must_read' => :'supplementalDocumentsMustRead',
        :'supplemental_documents_must_read_metadata' => :'supplementalDocumentsMustReadMetadata',
        :'supplemental_documents_must_view' => :'supplementalDocumentsMustView',
        :'supplemental_documents_must_view_metadata' => :'supplementalDocumentsMustViewMetadata',
        :'use_new_docu_sign_experience_interface' => :'useNewDocuSignExperienceInterface',
        :'use_new_docu_sign_experience_interface_metadata' => :'useNewDocuSignExperienceInterfaceMetadata',
        :'use_new_sending_interface' => :'useNewSendingInterface',
        :'use_new_sending_interface_metadata' => :'useNewSendingInterfaceMetadata',
        :'vaulting_mode' => :'vaultingMode',
        :'vaulting_mode_metadata' => :'vaultingModeMetadata',
        :'web_forms' => :'webForms',
        :'web_forms_metadata' => :'webFormsMetadata'
      }
    end

    # Attribute type mapping.
    def self.swagger_types
      {
        :'allow_account_management' => :'String',
        :'allow_account_management_metadata' => :'SettingsMetadata',
        :'allow_api_access' => :'String',
        :'allow_api_access_metadata' => :'SettingsMetadata',
        :'allow_api_access_to_account' => :'String',
        :'allow_api_access_to_account_metadata' => :'SettingsMetadata',
        :'allow_api_sending_on_behalf_of_others' => :'String',
        :'allow_api_sending_on_behalf_of_others_metadata' => :'SettingsMetadata',
        :'allow_api_sequential_signing' => :'String',
        :'allow_api_sequential_signing_metadata' => :'SettingsMetadata',
        :'allow_auto_tagging' => :'String',
        :'allow_auto_tagging_metadata' => :'SettingsMetadata',
        :'allow_bulk_sending' => :'String',
        :'allow_bulk_sending_metadata' => :'SettingsMetadata',
        :'allow_docu_sign_desktop_client' => :'String',
        :'allow_docu_sign_desktop_client_metadata' => :'SettingsMetadata',
        :'allowed_address_book_access' => :'String',
        :'allowed_address_book_access_metadata' => :'SettingsMetadata',
        :'allowed_clickwraps_access' => :'String',
        :'allowed_clickwraps_access_metadata' => :'SettingsMetadata',
        :'allowed_document_template_library_access' => :'String',
        :'allowed_document_template_library_access_metadata' => :'SettingsMetadata',
        :'allowed_orchestration_access' => :'String',
        :'allowed_orchestration_access_metadata' => :'SettingsMetadata',
        :'allowed_template_access' => :'String',
        :'allowed_template_access_metadata' => :'SettingsMetadata',
        :'allowed_to_be_envelope_transfer_recipient' => :'String',
        :'allowed_to_be_envelope_transfer_recipient_metadata' => :'SettingsMetadata',
        :'allow_envelope_sending' => :'String',
        :'allow_envelope_sending_metadata' => :'SettingsMetadata',
        :'allow_e_seal_recipients' => :'String',
        :'allow_e_seal_recipients_metadata' => :'SettingsMetadata',
        :'allow_power_forms_admin_to_access_all_power_form_envelopes' => :'String',
        :'allow_power_forms_admin_to_access_all_power_form_envelopes_metadata' => :'SettingsMetadata',
        :'allow_senders_to_set_recipient_email_language' => :'String',
        :'allow_senders_to_set_recipient_email_language_metadata' => :'SettingsMetadata',
        :'allow_signer_attachments' => :'String',
        :'allow_signer_attachments_metadata' => :'SettingsMetadata',
        :'allow_supplemental_documents' => :'String',
        :'allow_supplemental_documents_metadata' => :'SettingsMetadata',
        :'allow_tagging_in_send_and_correct' => :'String',
        :'allow_tagging_in_send_and_correct_metadata' => :'SettingsMetadata',
        :'allow_transactions' => :'String',
        :'allow_transactions_metadata' => :'SettingsMetadata',
        :'allow_vaulting' => :'String',
        :'allow_vaulting_metadata' => :'SettingsMetadata',
        :'allow_wet_signing_override' => :'String',
        :'allow_wet_signing_override_metadata' => :'SettingsMetadata',
        :'can_create_transaction' => :'String',
        :'can_create_transaction_metadata' => :'SettingsMetadata',
        :'can_create_workspaces' => :'String',
        :'can_create_workspaces_metadata' => :'SettingsMetadata',
        :'can_delete_documents_in_transaction' => :'String',
        :'can_delete_documents_in_transaction_metadata' => :'SettingsMetadata',
        :'can_delete_transaction' => :'String',
        :'can_delete_transaction_metadata' => :'SettingsMetadata',
        :'can_send_envelopes_via_sms' => :'String',
        :'can_send_envelopes_via_sms_metadata' => :'SettingsMetadata',
        :'disable_document_upload' => :'String',
        :'disable_document_upload_metadata' => :'SettingsMetadata',
        :'disable_other_actions' => :'String',
        :'disable_other_actions_metadata' => :'SettingsMetadata',
        :'enable_api_request_logging' => :'String',
        :'enable_api_request_logging_metadata' => :'SettingsMetadata',
        :'enable_key_terms_suggestions_by_document_type' => :'String',
        :'enable_key_terms_suggestions_by_document_type_metadata' => :'SettingsMetadata',
        :'enable_recipient_viewing_notifications' => :'String',
        :'enable_recipient_viewing_notifications_metadata' => :'SettingsMetadata',
        :'enable_sequential_signing_interface' => :'String',
        :'enable_sequential_signing_interface_metadata' => :'SettingsMetadata',
        :'enable_transaction_point_integration' => :'String',
        :'enable_transaction_point_integration_metadata' => :'SettingsMetadata',
        :'power_form_role' => :'String',
        :'power_form_role_metadata' => :'SettingsMetadata',
        :'receive_completed_self_signed_documents_as_email_links' => :'String',
        :'receive_completed_self_signed_documents_as_email_links_metadata' => :'SettingsMetadata',
        :'signing_ui_version_metadata' => :'SettingsMetadata',
        :'supplemental_documents_must_accept' => :'String',
        :'supplemental_documents_must_accept_metadata' => :'SettingsMetadata',
        :'supplemental_documents_must_read' => :'String',
        :'supplemental_documents_must_read_metadata' => :'SettingsMetadata',
        :'supplemental_documents_must_view' => :'String',
        :'supplemental_documents_must_view_metadata' => :'SettingsMetadata',
        :'use_new_docu_sign_experience_interface' => :'String',
        :'use_new_docu_sign_experience_interface_metadata' => :'SettingsMetadata',
        :'use_new_sending_interface' => :'String',
        :'use_new_sending_interface_metadata' => :'SettingsMetadata',
        :'vaulting_mode' => :'String',
        :'vaulting_mode_metadata' => :'SettingsMetadata',
        :'web_forms' => :'String',
        :'web_forms_metadata' => :'SettingsMetadata'
      }
    end

    # Initializes the object
    # @param [Hash] attributes Model attributes in the form of hash
    def initialize(attributes = {})
      return unless attributes.is_a?(Hash)

      # convert string to symbol for hash key
      attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

      if attributes.has_key?(:'allowAccountManagement')
        self.allow_account_management = attributes[:'allowAccountManagement']
      end

      if attributes.has_key?(:'allowAccountManagementMetadata')
        self.allow_account_management_metadata = attributes[:'allowAccountManagementMetadata']
      end

      if attributes.has_key?(:'allowApiAccess')
        self.allow_api_access = attributes[:'allowApiAccess']
      end

      if attributes.has_key?(:'allowApiAccessMetadata')
        self.allow_api_access_metadata = attributes[:'allowApiAccessMetadata']
      end

      if attributes.has_key?(:'allowApiAccessToAccount')
        self.allow_api_access_to_account = attributes[:'allowApiAccessToAccount']
      end

      if attributes.has_key?(:'allowApiAccessToAccountMetadata')
        self.allow_api_access_to_account_metadata = attributes[:'allowApiAccessToAccountMetadata']
      end

      if attributes.has_key?(:'allowApiSendingOnBehalfOfOthers')
        self.allow_api_sending_on_behalf_of_others = attributes[:'allowApiSendingOnBehalfOfOthers']
      end

      if attributes.has_key?(:'allowApiSendingOnBehalfOfOthersMetadata')
        self.allow_api_sending_on_behalf_of_others_metadata = attributes[:'allowApiSendingOnBehalfOfOthersMetadata']
      end

      if attributes.has_key?(:'allowApiSequentialSigning')
        self.allow_api_sequential_signing = attributes[:'allowApiSequentialSigning']
      end

      if attributes.has_key?(:'allowApiSequentialSigningMetadata')
        self.allow_api_sequential_signing_metadata = attributes[:'allowApiSequentialSigningMetadata']
      end

      if attributes.has_key?(:'allowAutoTagging')
        self.allow_auto_tagging = attributes[:'allowAutoTagging']
      end

      if attributes.has_key?(:'allowAutoTaggingMetadata')
        self.allow_auto_tagging_metadata = attributes[:'allowAutoTaggingMetadata']
      end

      if attributes.has_key?(:'allowBulkSending')
        self.allow_bulk_sending = attributes[:'allowBulkSending']
      end

      if attributes.has_key?(:'allowBulkSendingMetadata')
        self.allow_bulk_sending_metadata = attributes[:'allowBulkSendingMetadata']
      end

      if attributes.has_key?(:'allowDocuSignDesktopClient')
        self.allow_docu_sign_desktop_client = attributes[:'allowDocuSignDesktopClient']
      end

      if attributes.has_key?(:'allowDocuSignDesktopClientMetadata')
        self.allow_docu_sign_desktop_client_metadata = attributes[:'allowDocuSignDesktopClientMetadata']
      end

      if attributes.has_key?(:'allowedAddressBookAccess')
        self.allowed_address_book_access = attributes[:'allowedAddressBookAccess']
      end

      if attributes.has_key?(:'allowedAddressBookAccessMetadata')
        self.allowed_address_book_access_metadata = attributes[:'allowedAddressBookAccessMetadata']
      end

      if attributes.has_key?(:'allowedClickwrapsAccess')
        self.allowed_clickwraps_access = attributes[:'allowedClickwrapsAccess']
      end

      if attributes.has_key?(:'allowedClickwrapsAccessMetadata')
        self.allowed_clickwraps_access_metadata = attributes[:'allowedClickwrapsAccessMetadata']
      end

      if attributes.has_key?(:'allowedDocumentTemplateLibraryAccess')
        self.allowed_document_template_library_access = attributes[:'allowedDocumentTemplateLibraryAccess']
      end

      if attributes.has_key?(:'allowedDocumentTemplateLibraryAccessMetadata')
        self.allowed_document_template_library_access_metadata = attributes[:'allowedDocumentTemplateLibraryAccessMetadata']
      end

      if attributes.has_key?(:'allowedOrchestrationAccess')
        self.allowed_orchestration_access = attributes[:'allowedOrchestrationAccess']
      end

      if attributes.has_key?(:'allowedOrchestrationAccessMetadata')
        self.allowed_orchestration_access_metadata = attributes[:'allowedOrchestrationAccessMetadata']
      end

      if attributes.has_key?(:'allowedTemplateAccess')
        self.allowed_template_access = attributes[:'allowedTemplateAccess']
      end

      if attributes.has_key?(:'allowedTemplateAccessMetadata')
        self.allowed_template_access_metadata = attributes[:'allowedTemplateAccessMetadata']
      end

      if attributes.has_key?(:'allowedToBeEnvelopeTransferRecipient')
        self.allowed_to_be_envelope_transfer_recipient = attributes[:'allowedToBeEnvelopeTransferRecipient']
      end

      if attributes.has_key?(:'allowedToBeEnvelopeTransferRecipientMetadata')
        self.allowed_to_be_envelope_transfer_recipient_metadata = attributes[:'allowedToBeEnvelopeTransferRecipientMetadata']
      end

      if attributes.has_key?(:'allowEnvelopeSending')
        self.allow_envelope_sending = attributes[:'allowEnvelopeSending']
      end

      if attributes.has_key?(:'allowEnvelopeSendingMetadata')
        self.allow_envelope_sending_metadata = attributes[:'allowEnvelopeSendingMetadata']
      end

      if attributes.has_key?(:'allowESealRecipients')
        self.allow_e_seal_recipients = attributes[:'allowESealRecipients']
      end

      if attributes.has_key?(:'allowESealRecipientsMetadata')
        self.allow_e_seal_recipients_metadata = attributes[:'allowESealRecipientsMetadata']
      end

      if attributes.has_key?(:'allowPowerFormsAdminToAccessAllPowerFormEnvelopes')
        self.allow_power_forms_admin_to_access_all_power_form_envelopes = attributes[:'allowPowerFormsAdminToAccessAllPowerFormEnvelopes']
      end

      if attributes.has_key?(:'allowPowerFormsAdminToAccessAllPowerFormEnvelopesMetadata')
        self.allow_power_forms_admin_to_access_all_power_form_envelopes_metadata = attributes[:'allowPowerFormsAdminToAccessAllPowerFormEnvelopesMetadata']
      end

      if attributes.has_key?(:'allowSendersToSetRecipientEmailLanguage')
        self.allow_senders_to_set_recipient_email_language = attributes[:'allowSendersToSetRecipientEmailLanguage']
      end

      if attributes.has_key?(:'allowSendersToSetRecipientEmailLanguageMetadata')
        self.allow_senders_to_set_recipient_email_language_metadata = attributes[:'allowSendersToSetRecipientEmailLanguageMetadata']
      end

      if attributes.has_key?(:'allowSignerAttachments')
        self.allow_signer_attachments = attributes[:'allowSignerAttachments']
      end

      if attributes.has_key?(:'allowSignerAttachmentsMetadata')
        self.allow_signer_attachments_metadata = attributes[:'allowSignerAttachmentsMetadata']
      end

      if attributes.has_key?(:'allowSupplementalDocuments')
        self.allow_supplemental_documents = attributes[:'allowSupplementalDocuments']
      end

      if attributes.has_key?(:'allowSupplementalDocumentsMetadata')
        self.allow_supplemental_documents_metadata = attributes[:'allowSupplementalDocumentsMetadata']
      end

      if attributes.has_key?(:'allowTaggingInSendAndCorrect')
        self.allow_tagging_in_send_and_correct = attributes[:'allowTaggingInSendAndCorrect']
      end

      if attributes.has_key?(:'allowTaggingInSendAndCorrectMetadata')
        self.allow_tagging_in_send_and_correct_metadata = attributes[:'allowTaggingInSendAndCorrectMetadata']
      end

      if attributes.has_key?(:'allowTransactions')
        self.allow_transactions = attributes[:'allowTransactions']
      end

      if attributes.has_key?(:'allowTransactionsMetadata')
        self.allow_transactions_metadata = attributes[:'allowTransactionsMetadata']
      end

      if attributes.has_key?(:'allowVaulting')
        self.allow_vaulting = attributes[:'allowVaulting']
      end

      if attributes.has_key?(:'allowVaultingMetadata')
        self.allow_vaulting_metadata = attributes[:'allowVaultingMetadata']
      end

      if attributes.has_key?(:'allowWetSigningOverride')
        self.allow_wet_signing_override = attributes[:'allowWetSigningOverride']
      end

      if attributes.has_key?(:'allowWetSigningOverrideMetadata')
        self.allow_wet_signing_override_metadata = attributes[:'allowWetSigningOverrideMetadata']
      end

      if attributes.has_key?(:'canCreateTransaction')
        self.can_create_transaction = attributes[:'canCreateTransaction']
      end

      if attributes.has_key?(:'canCreateTransactionMetadata')
        self.can_create_transaction_metadata = attributes[:'canCreateTransactionMetadata']
      end

      if attributes.has_key?(:'canCreateWorkspaces')
        self.can_create_workspaces = attributes[:'canCreateWorkspaces']
      end

      if attributes.has_key?(:'canCreateWorkspacesMetadata')
        self.can_create_workspaces_metadata = attributes[:'canCreateWorkspacesMetadata']
      end

      if attributes.has_key?(:'canDeleteDocumentsInTransaction')
        self.can_delete_documents_in_transaction = attributes[:'canDeleteDocumentsInTransaction']
      end

      if attributes.has_key?(:'canDeleteDocumentsInTransactionMetadata')
        self.can_delete_documents_in_transaction_metadata = attributes[:'canDeleteDocumentsInTransactionMetadata']
      end

      if attributes.has_key?(:'canDeleteTransaction')
        self.can_delete_transaction = attributes[:'canDeleteTransaction']
      end

      if attributes.has_key?(:'canDeleteTransactionMetadata')
        self.can_delete_transaction_metadata = attributes[:'canDeleteTransactionMetadata']
      end

      if attributes.has_key?(:'canSendEnvelopesViaSMS')
        self.can_send_envelopes_via_sms = attributes[:'canSendEnvelopesViaSMS']
      end

      if attributes.has_key?(:'canSendEnvelopesViaSMSMetadata')
        self.can_send_envelopes_via_sms_metadata = attributes[:'canSendEnvelopesViaSMSMetadata']
      end

      if attributes.has_key?(:'disableDocumentUpload')
        self.disable_document_upload = attributes[:'disableDocumentUpload']
      end

      if attributes.has_key?(:'disableDocumentUploadMetadata')
        self.disable_document_upload_metadata = attributes[:'disableDocumentUploadMetadata']
      end

      if attributes.has_key?(:'disableOtherActions')
        self.disable_other_actions = attributes[:'disableOtherActions']
      end

      if attributes.has_key?(:'disableOtherActionsMetadata')
        self.disable_other_actions_metadata = attributes[:'disableOtherActionsMetadata']
      end

      if attributes.has_key?(:'enableApiRequestLogging')
        self.enable_api_request_logging = attributes[:'enableApiRequestLogging']
      end

      if attributes.has_key?(:'enableApiRequestLoggingMetadata')
        self.enable_api_request_logging_metadata = attributes[:'enableApiRequestLoggingMetadata']
      end

      if attributes.has_key?(:'enableKeyTermsSuggestionsByDocumentType')
        self.enable_key_terms_suggestions_by_document_type = attributes[:'enableKeyTermsSuggestionsByDocumentType']
      end

      if attributes.has_key?(:'enableKeyTermsSuggestionsByDocumentTypeMetadata')
        self.enable_key_terms_suggestions_by_document_type_metadata = attributes[:'enableKeyTermsSuggestionsByDocumentTypeMetadata']
      end

      if attributes.has_key?(:'enableRecipientViewingNotifications')
        self.enable_recipient_viewing_notifications = attributes[:'enableRecipientViewingNotifications']
      end

      if attributes.has_key?(:'enableRecipientViewingNotificationsMetadata')
        self.enable_recipient_viewing_notifications_metadata = attributes[:'enableRecipientViewingNotificationsMetadata']
      end

      if attributes.has_key?(:'enableSequentialSigningInterface')
        self.enable_sequential_signing_interface = attributes[:'enableSequentialSigningInterface']
      end

      if attributes.has_key?(:'enableSequentialSigningInterfaceMetadata')
        self.enable_sequential_signing_interface_metadata = attributes[:'enableSequentialSigningInterfaceMetadata']
      end

      if attributes.has_key?(:'enableTransactionPointIntegration')
        self.enable_transaction_point_integration = attributes[:'enableTransactionPointIntegration']
      end

      if attributes.has_key?(:'enableTransactionPointIntegrationMetadata')
        self.enable_transaction_point_integration_metadata = attributes[:'enableTransactionPointIntegrationMetadata']
      end

      if attributes.has_key?(:'powerFormRole')
        self.power_form_role = attributes[:'powerFormRole']
      end

      if attributes.has_key?(:'powerFormRoleMetadata')
        self.power_form_role_metadata = attributes[:'powerFormRoleMetadata']
      end

      if attributes.has_key?(:'receiveCompletedSelfSignedDocumentsAsEmailLinks')
        self.receive_completed_self_signed_documents_as_email_links = attributes[:'receiveCompletedSelfSignedDocumentsAsEmailLinks']
      end

      if attributes.has_key?(:'receiveCompletedSelfSignedDocumentsAsEmailLinksMetadata')
        self.receive_completed_self_signed_documents_as_email_links_metadata = attributes[:'receiveCompletedSelfSignedDocumentsAsEmailLinksMetadata']
      end

      if attributes.has_key?(:'signingUiVersionMetadata')
        self.signing_ui_version_metadata = attributes[:'signingUiVersionMetadata']
      end

      if attributes.has_key?(:'supplementalDocumentsMustAccept')
        self.supplemental_documents_must_accept = attributes[:'supplementalDocumentsMustAccept']
      end

      if attributes.has_key?(:'supplementalDocumentsMustAcceptMetadata')
        self.supplemental_documents_must_accept_metadata = attributes[:'supplementalDocumentsMustAcceptMetadata']
      end

      if attributes.has_key?(:'supplementalDocumentsMustRead')
        self.supplemental_documents_must_read = attributes[:'supplementalDocumentsMustRead']
      end

      if attributes.has_key?(:'supplementalDocumentsMustReadMetadata')
        self.supplemental_documents_must_read_metadata = attributes[:'supplementalDocumentsMustReadMetadata']
      end

      if attributes.has_key?(:'supplementalDocumentsMustView')
        self.supplemental_documents_must_view = attributes[:'supplementalDocumentsMustView']
      end

      if attributes.has_key?(:'supplementalDocumentsMustViewMetadata')
        self.supplemental_documents_must_view_metadata = attributes[:'supplementalDocumentsMustViewMetadata']
      end

      if attributes.has_key?(:'useNewDocuSignExperienceInterface')
        self.use_new_docu_sign_experience_interface = attributes[:'useNewDocuSignExperienceInterface']
      end

      if attributes.has_key?(:'useNewDocuSignExperienceInterfaceMetadata')
        self.use_new_docu_sign_experience_interface_metadata = attributes[:'useNewDocuSignExperienceInterfaceMetadata']
      end

      if attributes.has_key?(:'useNewSendingInterface')
        self.use_new_sending_interface = attributes[:'useNewSendingInterface']
      end

      if attributes.has_key?(:'useNewSendingInterfaceMetadata')
        self.use_new_sending_interface_metadata = attributes[:'useNewSendingInterfaceMetadata']
      end

      if attributes.has_key?(:'vaultingMode')
        self.vaulting_mode = attributes[:'vaultingMode']
      end

      if attributes.has_key?(:'vaultingModeMetadata')
        self.vaulting_mode_metadata = attributes[:'vaultingModeMetadata']
      end

      if attributes.has_key?(:'webForms')
        self.web_forms = attributes[:'webForms']
      end

      if attributes.has_key?(:'webFormsMetadata')
        self.web_forms_metadata = attributes[:'webFormsMetadata']
      end
    end

    # Show invalid properties with the reasons. Usually used together with valid?
    # @return Array for valid properties with the reasons
    def list_invalid_properties
      invalid_properties = Array.new
      invalid_properties
    end

    # Check to see if the all the properties in the model are valid
    # @return true if the model is valid
    def valid?
      true
    end

    # Checks equality by comparing each attribute.
    # @param [Object] Object to be compared
    def ==(o)
      return true if self.equal?(o)
      self.class == o.class &&
          allow_account_management == o.allow_account_management &&
          allow_account_management_metadata == o.allow_account_management_metadata &&
          allow_api_access == o.allow_api_access &&
          allow_api_access_metadata == o.allow_api_access_metadata &&
          allow_api_access_to_account == o.allow_api_access_to_account &&
          allow_api_access_to_account_metadata == o.allow_api_access_to_account_metadata &&
          allow_api_sending_on_behalf_of_others == o.allow_api_sending_on_behalf_of_others &&
          allow_api_sending_on_behalf_of_others_metadata == o.allow_api_sending_on_behalf_of_others_metadata &&
          allow_api_sequential_signing == o.allow_api_sequential_signing &&
          allow_api_sequential_signing_metadata == o.allow_api_sequential_signing_metadata &&
          allow_auto_tagging == o.allow_auto_tagging &&
          allow_auto_tagging_metadata == o.allow_auto_tagging_metadata &&
          allow_bulk_sending == o.allow_bulk_sending &&
          allow_bulk_sending_metadata == o.allow_bulk_sending_metadata &&
          allow_docu_sign_desktop_client == o.allow_docu_sign_desktop_client &&
          allow_docu_sign_desktop_client_metadata == o.allow_docu_sign_desktop_client_metadata &&
          allowed_address_book_access == o.allowed_address_book_access &&
          allowed_address_book_access_metadata == o.allowed_address_book_access_metadata &&
          allowed_clickwraps_access == o.allowed_clickwraps_access &&
          allowed_clickwraps_access_metadata == o.allowed_clickwraps_access_metadata &&
          allowed_document_template_library_access == o.allowed_document_template_library_access &&
          allowed_document_template_library_access_metadata == o.allowed_document_template_library_access_metadata &&
          allowed_orchestration_access == o.allowed_orchestration_access &&
          allowed_orchestration_access_metadata == o.allowed_orchestration_access_metadata &&
          allowed_template_access == o.allowed_template_access &&
          allowed_template_access_metadata == o.allowed_template_access_metadata &&
          allowed_to_be_envelope_transfer_recipient == o.allowed_to_be_envelope_transfer_recipient &&
          allowed_to_be_envelope_transfer_recipient_metadata == o.allowed_to_be_envelope_transfer_recipient_metadata &&
          allow_envelope_sending == o.allow_envelope_sending &&
          allow_envelope_sending_metadata == o.allow_envelope_sending_metadata &&
          allow_e_seal_recipients == o.allow_e_seal_recipients &&
          allow_e_seal_recipients_metadata == o.allow_e_seal_recipients_metadata &&
          allow_power_forms_admin_to_access_all_power_form_envelopes == o.allow_power_forms_admin_to_access_all_power_form_envelopes &&
          allow_power_forms_admin_to_access_all_power_form_envelopes_metadata == o.allow_power_forms_admin_to_access_all_power_form_envelopes_metadata &&
          allow_senders_to_set_recipient_email_language == o.allow_senders_to_set_recipient_email_language &&
          allow_senders_to_set_recipient_email_language_metadata == o.allow_senders_to_set_recipient_email_language_metadata &&
          allow_signer_attachments == o.allow_signer_attachments &&
          allow_signer_attachments_metadata == o.allow_signer_attachments_metadata &&
          allow_supplemental_documents == o.allow_supplemental_documents &&
          allow_supplemental_documents_metadata == o.allow_supplemental_documents_metadata &&
          allow_tagging_in_send_and_correct == o.allow_tagging_in_send_and_correct &&
          allow_tagging_in_send_and_correct_metadata == o.allow_tagging_in_send_and_correct_metadata &&
          allow_transactions == o.allow_transactions &&
          allow_transactions_metadata == o.allow_transactions_metadata &&
          allow_vaulting == o.allow_vaulting &&
          allow_vaulting_metadata == o.allow_vaulting_metadata &&
          allow_wet_signing_override == o.allow_wet_signing_override &&
          allow_wet_signing_override_metadata == o.allow_wet_signing_override_metadata &&
          can_create_transaction == o.can_create_transaction &&
          can_create_transaction_metadata == o.can_create_transaction_metadata &&
          can_create_workspaces == o.can_create_workspaces &&
          can_create_workspaces_metadata == o.can_create_workspaces_metadata &&
          can_delete_documents_in_transaction == o.can_delete_documents_in_transaction &&
          can_delete_documents_in_transaction_metadata == o.can_delete_documents_in_transaction_metadata &&
          can_delete_transaction == o.can_delete_transaction &&
          can_delete_transaction_metadata == o.can_delete_transaction_metadata &&
          can_send_envelopes_via_sms == o.can_send_envelopes_via_sms &&
          can_send_envelopes_via_sms_metadata == o.can_send_envelopes_via_sms_metadata &&
          disable_document_upload == o.disable_document_upload &&
          disable_document_upload_metadata == o.disable_document_upload_metadata &&
          disable_other_actions == o.disable_other_actions &&
          disable_other_actions_metadata == o.disable_other_actions_metadata &&
          enable_api_request_logging == o.enable_api_request_logging &&
          enable_api_request_logging_metadata == o.enable_api_request_logging_metadata &&
          enable_key_terms_suggestions_by_document_type == o.enable_key_terms_suggestions_by_document_type &&
          enable_key_terms_suggestions_by_document_type_metadata == o.enable_key_terms_suggestions_by_document_type_metadata &&
          enable_recipient_viewing_notifications == o.enable_recipient_viewing_notifications &&
          enable_recipient_viewing_notifications_metadata == o.enable_recipient_viewing_notifications_metadata &&
          enable_sequential_signing_interface == o.enable_sequential_signing_interface &&
          enable_sequential_signing_interface_metadata == o.enable_sequential_signing_interface_metadata &&
          enable_transaction_point_integration == o.enable_transaction_point_integration &&
          enable_transaction_point_integration_metadata == o.enable_transaction_point_integration_metadata &&
          power_form_role == o.power_form_role &&
          power_form_role_metadata == o.power_form_role_metadata &&
          receive_completed_self_signed_documents_as_email_links == o.receive_completed_self_signed_documents_as_email_links &&
          receive_completed_self_signed_documents_as_email_links_metadata == o.receive_completed_self_signed_documents_as_email_links_metadata &&
          signing_ui_version_metadata == o.signing_ui_version_metadata &&
          supplemental_documents_must_accept == o.supplemental_documents_must_accept &&
          supplemental_documents_must_accept_metadata == o.supplemental_documents_must_accept_metadata &&
          supplemental_documents_must_read == o.supplemental_documents_must_read &&
          supplemental_documents_must_read_metadata == o.supplemental_documents_must_read_metadata &&
          supplemental_documents_must_view == o.supplemental_documents_must_view &&
          supplemental_documents_must_view_metadata == o.supplemental_documents_must_view_metadata &&
          use_new_docu_sign_experience_interface == o.use_new_docu_sign_experience_interface &&
          use_new_docu_sign_experience_interface_metadata == o.use_new_docu_sign_experience_interface_metadata &&
          use_new_sending_interface == o.use_new_sending_interface &&
          use_new_sending_interface_metadata == o.use_new_sending_interface_metadata &&
          vaulting_mode == o.vaulting_mode &&
          vaulting_mode_metadata == o.vaulting_mode_metadata &&
          web_forms == o.web_forms &&
          web_forms_metadata == o.web_forms_metadata
    end

    # @see the `==` method
    # @param [Object] Object to be compared
    def eql?(o)
      self == o
    end

    # Calculates hash code according to all attributes.
    # @return [Fixnum] Hash code
    def hash
      [allow_account_management, allow_account_management_metadata, allow_api_access, allow_api_access_metadata, allow_api_access_to_account, allow_api_access_to_account_metadata, allow_api_sending_on_behalf_of_others, allow_api_sending_on_behalf_of_others_metadata, allow_api_sequential_signing, allow_api_sequential_signing_metadata, allow_auto_tagging, allow_auto_tagging_metadata, allow_bulk_sending, allow_bulk_sending_metadata, allow_docu_sign_desktop_client, allow_docu_sign_desktop_client_metadata, allowed_address_book_access, allowed_address_book_access_metadata, allowed_clickwraps_access, allowed_clickwraps_access_metadata, allowed_document_template_library_access, allowed_document_template_library_access_metadata, allowed_orchestration_access, allowed_orchestration_access_metadata, allowed_template_access, allowed_template_access_metadata, allowed_to_be_envelope_transfer_recipient, allowed_to_be_envelope_transfer_recipient_metadata, allow_envelope_sending, allow_envelope_sending_metadata, allow_e_seal_recipients, allow_e_seal_recipients_metadata, allow_power_forms_admin_to_access_all_power_form_envelopes, allow_power_forms_admin_to_access_all_power_form_envelopes_metadata, allow_senders_to_set_recipient_email_language, allow_senders_to_set_recipient_email_language_metadata, allow_signer_attachments, allow_signer_attachments_metadata, allow_supplemental_documents, allow_supplemental_documents_metadata, allow_tagging_in_send_and_correct, allow_tagging_in_send_and_correct_metadata, allow_transactions, allow_transactions_metadata, allow_vaulting, allow_vaulting_metadata, allow_wet_signing_override, allow_wet_signing_override_metadata, can_create_transaction, can_create_transaction_metadata, can_create_workspaces, can_create_workspaces_metadata, can_delete_documents_in_transaction, can_delete_documents_in_transaction_metadata, can_delete_transaction, can_delete_transaction_metadata, can_send_envelopes_via_sms, can_send_envelopes_via_sms_metadata, disable_document_upload, disable_document_upload_metadata, disable_other_actions, disable_other_actions_metadata, enable_api_request_logging, enable_api_request_logging_metadata, enable_key_terms_suggestions_by_document_type, enable_key_terms_suggestions_by_document_type_metadata, enable_recipient_viewing_notifications, enable_recipient_viewing_notifications_metadata, enable_sequential_signing_interface, enable_sequential_signing_interface_metadata, enable_transaction_point_integration, enable_transaction_point_integration_metadata, power_form_role, power_form_role_metadata, receive_completed_self_signed_documents_as_email_links, receive_completed_self_signed_documents_as_email_links_metadata, signing_ui_version_metadata, supplemental_documents_must_accept, supplemental_documents_must_accept_metadata, supplemental_documents_must_read, supplemental_documents_must_read_metadata, supplemental_documents_must_view, supplemental_documents_must_view_metadata, use_new_docu_sign_experience_interface, use_new_docu_sign_experience_interface_metadata, use_new_sending_interface, use_new_sending_interface_metadata, vaulting_mode, vaulting_mode_metadata, web_forms, web_forms_metadata].hash
    end

    # Builds the object from hash
    # @param [Hash] attributes Model attributes in the form of hash
    # @return [Object] Returns the model itself
    def build_from_hash(attributes)
      return nil unless attributes.is_a?(Hash)
      self.class.swagger_types.each_pair do |key, type|
        if type =~ /\AArray<(.*)>/i
          # check to ensure the input is an array given that the attribute
          # is documented as an array but the input is not
          if attributes[self.class.attribute_map[key]].is_a?(Array)
            self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
          end
        elsif !attributes[self.class.attribute_map[key]].nil?
          self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
        end # or else data not found in attributes(hash), not an issue as the data can be optional
      end

      self
    end

    # Deserializes the data based on type
    # @param string type Data type
    # @param string value Value to be deserialized
    # @return [Object] Deserialized data
    def _deserialize(type, value)
      case type.to_sym
      when :DateTime
        DateTime.parse(value)
      when :Date
        Date.parse(value)
      when :String
        value.to_s
      when :Integer
        value.to_i
      when :Float
        value.to_f
      when :BOOLEAN
        if value.to_s =~ /\A(true|t|yes|y|1)\z/i
          true
        else
          false
        end
      when :Object
        # generic object (usually a Hash), return directly
        value
      when /\AArray<(?<inner_type>.+)>\z/
        inner_type = Regexp.last_match[:inner_type]
        value.map { |v| _deserialize(inner_type, v) }
      when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
        k_type = Regexp.last_match[:k_type]
        v_type = Regexp.last_match[:v_type]
        {}.tap do |hash|
          value.each do |k, v|
            hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
          end
        end
      else # model
        temp_model = DocuSign_eSign.const_get(type).new
        temp_model.build_from_hash(value)
      end
    end

    # Returns the string representation of the object
    # @return [String] String presentation of the object
    def to_s
      to_hash.to_s
    end

    # to_body is an alias to to_hash (backward compatibility)
    # @return [Hash] Returns the object in the form of hash
    def to_body
      to_hash
    end

    # Returns the object in the form of hash
    # @return [Hash] Returns the object in the form of hash
    def to_hash
      hash = {}
      self.class.attribute_map.each_pair do |attr, param|
        value = self.send(attr)
        next if value.nil?
        hash[param] = _to_hash(value)
      end
      hash
    end

    # Outputs non-array value in the form of hash
    # For object, use to_hash. Otherwise, just return the value
    # @param [Object] value Any valid value
    # @return [Hash] Returns the value in the form of hash
    def _to_hash(value)
      if value.is_a?(Array)
        value.compact.map { |v| _to_hash(v) }
      elsif value.is_a?(Hash)
        {}.tap do |hash|
          value.each { |k, v| hash[k] = _to_hash(v) }
        end
      elsif value.respond_to? :to_hash
        value.to_hash
      else
        value
      end
    end

  end
end
