docusign_webforms.models.web_form
Web Forms API version 1.1
The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501
OpenAPI spec version: 1.1.0 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.git
1# coding: utf-8 2 3""" 4 Web Forms API version 1.1 5 6 The Web Forms API facilitates generating semantic HTML forms around everyday contracts. # noqa: E501 7 8 OpenAPI spec version: 1.1.0 9 Contact: devcenter@docusign.com 10 Generated by: https://github.com/swagger-api/swagger-codegen.git 11""" 12 13 14import pprint 15import re # noqa: F401 16 17import six 18 19from docusign_webforms.models.web_form_summary import WebFormSummary # noqa: F401,E501 20from docusign_webforms.client.configuration import Configuration 21 22 23class WebForm(WebFormSummary): 24 """NOTE: This class is auto generated by the swagger code generator program. 25 26 Do not edit the class manually. 27 """ 28 """ 29 Attributes: 30 swagger_types (dict): The key is attribute name 31 and the value is attribute type. 32 attribute_map (dict): The key is attribute name 33 and the value is json key in definition. 34 """ 35 swagger_types = { 36 'version_id': 'int', 37 'form_content': 'WebFormContent' 38 } 39 if hasattr(WebFormSummary, "swagger_types"): 40 swagger_types.update(WebFormSummary.swagger_types) 41 42 attribute_map = { 43 'version_id': 'versionId', 44 'form_content': 'formContent' 45 } 46 if hasattr(WebFormSummary, "attribute_map"): 47 attribute_map.update(WebFormSummary.attribute_map) 48 49 def __init__(self, _configuration=None, **kwargs): # noqa: E501 50 """WebForm - a model defined in Swagger""" # noqa: E501 51 if _configuration is None: 52 _configuration = Configuration() 53 self._configuration = _configuration 54 55 self._version_id = None 56 self._form_content = None 57 self.discriminator = None 58 WebFormSummary.__init__(self, _configuration, **kwargs) 59 60 setattr(self, "_{}".format('version_id'), kwargs.get('version_id', None)) 61 setattr(self, "_{}".format('form_content'), kwargs.get('form_content', None)) 62 63 @property 64 def version_id(self): 65 """Gets the version_id of this WebForm. # noqa: E501 66 67 68 :return: The version_id of this WebForm. # noqa: E501 69 :rtype: int 70 """ 71 return self._version_id 72 73 @version_id.setter 74 def version_id(self, version_id): 75 """Sets the version_id of this WebForm. 76 77 78 :param version_id: The version_id of this WebForm. # noqa: E501 79 :type: int 80 """ 81 82 self._version_id = version_id 83 84 @property 85 def form_content(self): 86 """Gets the form_content of this WebForm. # noqa: E501 87 88 89 :return: The form_content of this WebForm. # noqa: E501 90 :rtype: WebFormContent 91 """ 92 return self._form_content 93 94 @form_content.setter 95 def form_content(self, form_content): 96 """Sets the form_content of this WebForm. 97 98 99 :param form_content: The form_content of this WebForm. # noqa: E501 100 :type: WebFormContent 101 """ 102 103 self._form_content = form_content 104 105 def to_dict(self): 106 """Returns the model properties as a dict""" 107 result = {} 108 109 for attr, _ in six.iteritems(self.swagger_types): 110 value = getattr(self, attr) 111 if isinstance(value, list): 112 result[attr] = list(map( 113 lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 114 value 115 )) 116 elif hasattr(value, "to_dict"): 117 result[attr] = value.to_dict() 118 elif isinstance(value, dict): 119 result[attr] = dict(map( 120 lambda item: (item[0], item[1].to_dict()) 121 if hasattr(item[1], "to_dict") else item, 122 value.items() 123 )) 124 else: 125 result[attr] = value 126 if issubclass(WebForm, dict): 127 for key, value in self.items(): 128 result[key] = value 129 130 return result 131 132 def to_str(self): 133 """Returns the string representation of the model""" 134 return pprint.pformat(self.to_dict()) 135 136 def __repr__(self): 137 """For `print` and `pprint`""" 138 return self.to_str() 139 140 def __eq__(self, other): 141 """Returns true if both objects are equal""" 142 if not isinstance(other, WebForm): 143 return False 144 145 return self.to_dict() == other.to_dict() 146 147 def __ne__(self, other): 148 """Returns true if both objects are not equal""" 149 if not isinstance(other, WebForm): 150 return True 151 152 return self.to_dict() != other.to_dict()
24class WebForm(WebFormSummary): 25 """NOTE: This class is auto generated by the swagger code generator program. 26 27 Do not edit the class manually. 28 """ 29 """ 30 Attributes: 31 swagger_types (dict): The key is attribute name 32 and the value is attribute type. 33 attribute_map (dict): The key is attribute name 34 and the value is json key in definition. 35 """ 36 swagger_types = { 37 'version_id': 'int', 38 'form_content': 'WebFormContent' 39 } 40 if hasattr(WebFormSummary, "swagger_types"): 41 swagger_types.update(WebFormSummary.swagger_types) 42 43 attribute_map = { 44 'version_id': 'versionId', 45 'form_content': 'formContent' 46 } 47 if hasattr(WebFormSummary, "attribute_map"): 48 attribute_map.update(WebFormSummary.attribute_map) 49 50 def __init__(self, _configuration=None, **kwargs): # noqa: E501 51 """WebForm - a model defined in Swagger""" # noqa: E501 52 if _configuration is None: 53 _configuration = Configuration() 54 self._configuration = _configuration 55 56 self._version_id = None 57 self._form_content = None 58 self.discriminator = None 59 WebFormSummary.__init__(self, _configuration, **kwargs) 60 61 setattr(self, "_{}".format('version_id'), kwargs.get('version_id', None)) 62 setattr(self, "_{}".format('form_content'), kwargs.get('form_content', None)) 63 64 @property 65 def version_id(self): 66 """Gets the version_id of this WebForm. # noqa: E501 67 68 69 :return: The version_id of this WebForm. # noqa: E501 70 :rtype: int 71 """ 72 return self._version_id 73 74 @version_id.setter 75 def version_id(self, version_id): 76 """Sets the version_id of this WebForm. 77 78 79 :param version_id: The version_id of this WebForm. # noqa: E501 80 :type: int 81 """ 82 83 self._version_id = version_id 84 85 @property 86 def form_content(self): 87 """Gets the form_content of this WebForm. # noqa: E501 88 89 90 :return: The form_content of this WebForm. # noqa: E501 91 :rtype: WebFormContent 92 """ 93 return self._form_content 94 95 @form_content.setter 96 def form_content(self, form_content): 97 """Sets the form_content of this WebForm. 98 99 100 :param form_content: The form_content of this WebForm. # noqa: E501 101 :type: WebFormContent 102 """ 103 104 self._form_content = form_content 105 106 def to_dict(self): 107 """Returns the model properties as a dict""" 108 result = {} 109 110 for attr, _ in six.iteritems(self.swagger_types): 111 value = getattr(self, attr) 112 if isinstance(value, list): 113 result[attr] = list(map( 114 lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 115 value 116 )) 117 elif hasattr(value, "to_dict"): 118 result[attr] = value.to_dict() 119 elif isinstance(value, dict): 120 result[attr] = dict(map( 121 lambda item: (item[0], item[1].to_dict()) 122 if hasattr(item[1], "to_dict") else item, 123 value.items() 124 )) 125 else: 126 result[attr] = value 127 if issubclass(WebForm, dict): 128 for key, value in self.items(): 129 result[key] = value 130 131 return result 132 133 def to_str(self): 134 """Returns the string representation of the model""" 135 return pprint.pformat(self.to_dict()) 136 137 def __repr__(self): 138 """For `print` and `pprint`""" 139 return self.to_str() 140 141 def __eq__(self, other): 142 """Returns true if both objects are equal""" 143 if not isinstance(other, WebForm): 144 return False 145 146 return self.to_dict() == other.to_dict() 147 148 def __ne__(self, other): 149 """Returns true if both objects are not equal""" 150 if not isinstance(other, WebForm): 151 return True 152 153 return self.to_dict() != other.to_dict()
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
WebForm(_configuration=None, **kwargs)
50 def __init__(self, _configuration=None, **kwargs): # noqa: E501 51 """WebForm - a model defined in Swagger""" # noqa: E501 52 if _configuration is None: 53 _configuration = Configuration() 54 self._configuration = _configuration 55 56 self._version_id = None 57 self._form_content = None 58 self.discriminator = None 59 WebFormSummary.__init__(self, _configuration, **kwargs) 60 61 setattr(self, "_{}".format('version_id'), kwargs.get('version_id', None)) 62 setattr(self, "_{}".format('form_content'), kwargs.get('form_content', None))
WebForm - a model defined in Swagger
swagger_types = {'version_id': 'int', 'form_content': 'WebFormContent', 'id': 'str', 'account_id': 'str', 'is_published': 'bool', 'is_enabled': 'bool', 'is_uploaded': 'bool', 'has_draft_changes': 'bool', 'form_state': 'WebFormState', 'form_properties': 'WebFormProperties', 'form_metadata': 'WebFormMetadata'}
attribute_map = {'version_id': 'versionId', 'form_content': 'formContent', 'id': 'id', 'account_id': 'accountId', 'is_published': 'isPublished', 'is_enabled': 'isEnabled', 'is_uploaded': 'isUploaded', 'has_draft_changes': 'hasDraftChanges', 'form_state': 'formState', 'form_properties': 'formProperties', 'form_metadata': 'formMetadata'}
version_id
Gets the version_id of this WebForm. # noqa: E501
Returns
The version_id of this WebForm. # noqa: E501
form_content
Gets the form_content of this WebForm. # noqa: E501
Returns
The form_content of this WebForm. # noqa: E501
def
to_dict(self)
106 def to_dict(self): 107 """Returns the model properties as a dict""" 108 result = {} 109 110 for attr, _ in six.iteritems(self.swagger_types): 111 value = getattr(self, attr) 112 if isinstance(value, list): 113 result[attr] = list(map( 114 lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 115 value 116 )) 117 elif hasattr(value, "to_dict"): 118 result[attr] = value.to_dict() 119 elif isinstance(value, dict): 120 result[attr] = dict(map( 121 lambda item: (item[0], item[1].to_dict()) 122 if hasattr(item[1], "to_dict") else item, 123 value.items() 124 )) 125 else: 126 result[attr] = value 127 if issubclass(WebForm, dict): 128 for key, value in self.items(): 129 result[key] = value 130 131 return result
Returns the model properties as a dict