docusign_webforms.models.web_form_component
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.client.configuration import Configuration 20 21 22class WebFormComponent(object): 23 """NOTE: This class is auto generated by the swagger code generator program. 24 25 Do not edit the class manually. 26 """ 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 'component_key': 'str', 37 'component_type': 'str', 38 'component_name': 'str' 39 } 40 41 attribute_map = { 42 'component_key': 'componentKey', 43 'component_type': 'componentType', 44 'component_name': 'componentName' 45 } 46 47 def __init__(self, _configuration=None, **kwargs): # noqa: E501 48 """WebFormComponent - a model defined in Swagger""" # noqa: E501 49 if _configuration is None: 50 _configuration = Configuration() 51 self._configuration = _configuration 52 53 self._component_key = None 54 self._component_type = None 55 self._component_name = None 56 self.discriminator = None 57 58 setattr(self, "_{}".format('component_key'), kwargs.get('component_key', None)) 59 setattr(self, "_{}".format('component_type'), kwargs.get('component_type', None)) 60 setattr(self, "_{}".format('component_name'), kwargs.get('component_name', None)) 61 62 @property 63 def component_key(self): 64 """Gets the component_key of this WebFormComponent. # noqa: E501 65 66 67 :return: The component_key of this WebFormComponent. # noqa: E501 68 :rtype: str 69 """ 70 return self._component_key 71 72 @component_key.setter 73 def component_key(self, component_key): 74 """Sets the component_key of this WebFormComponent. 75 76 77 :param component_key: The component_key of this WebFormComponent. # noqa: E501 78 :type: str 79 """ 80 if self._configuration.client_side_validation and component_key is None: 81 raise ValueError("Invalid value for `component_key`, must not be `None`") # noqa: E501 82 83 self._component_key = component_key 84 85 @property 86 def component_type(self): 87 """Gets the component_type of this WebFormComponent. # noqa: E501 88 89 The type of component this object represents # noqa: E501 90 91 :return: The component_type of this WebFormComponent. # noqa: E501 92 :rtype: str 93 """ 94 return self._component_type 95 96 @component_type.setter 97 def component_type(self, component_type): 98 """Sets the component_type of this WebFormComponent. 99 100 The type of component this object represents # noqa: E501 101 102 :param component_type: The component_type of this WebFormComponent. # noqa: E501 103 :type: str 104 """ 105 if self._configuration.client_side_validation and component_type is None: 106 raise ValueError("Invalid value for `component_type`, must not be `None`") # noqa: E501 107 if (self._configuration.client_side_validation and 108 component_type is not None and len(component_type) > 100): 109 raise ValueError("Invalid value for `component_type`, length must be less than or equal to `100`") # noqa: E501 110 111 self._component_type = component_type 112 113 @property 114 def component_name(self): 115 """Gets the component_name of this WebFormComponent. # noqa: E501 116 117 Name value that is used for mapping components to external sources # noqa: E501 118 119 :return: The component_name of this WebFormComponent. # noqa: E501 120 :rtype: str 121 """ 122 return self._component_name 123 124 @component_name.setter 125 def component_name(self, component_name): 126 """Sets the component_name of this WebFormComponent. 127 128 Name value that is used for mapping components to external sources # noqa: E501 129 130 :param component_name: The component_name of this WebFormComponent. # noqa: E501 131 :type: str 132 """ 133 if (self._configuration.client_side_validation and 134 component_name is not None and len(component_name) > 100): 135 raise ValueError("Invalid value for `component_name`, length must be less than or equal to `100`") # noqa: E501 136 137 self._component_name = component_name 138 139 def to_dict(self): 140 """Returns the model properties as a dict""" 141 result = {} 142 143 for attr, _ in six.iteritems(self.swagger_types): 144 value = getattr(self, attr) 145 if isinstance(value, list): 146 result[attr] = list(map( 147 lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 148 value 149 )) 150 elif hasattr(value, "to_dict"): 151 result[attr] = value.to_dict() 152 elif isinstance(value, dict): 153 result[attr] = dict(map( 154 lambda item: (item[0], item[1].to_dict()) 155 if hasattr(item[1], "to_dict") else item, 156 value.items() 157 )) 158 else: 159 result[attr] = value 160 if issubclass(WebFormComponent, dict): 161 for key, value in self.items(): 162 result[key] = value 163 164 return result 165 166 def to_str(self): 167 """Returns the string representation of the model""" 168 return pprint.pformat(self.to_dict()) 169 170 def __repr__(self): 171 """For `print` and `pprint`""" 172 return self.to_str() 173 174 def __eq__(self, other): 175 """Returns true if both objects are equal""" 176 if not isinstance(other, WebFormComponent): 177 return False 178 179 return self.to_dict() == other.to_dict() 180 181 def __ne__(self, other): 182 """Returns true if both objects are not equal""" 183 if not isinstance(other, WebFormComponent): 184 return True 185 186 return self.to_dict() != other.to_dict()
23class WebFormComponent(object): 24 """NOTE: This class is auto generated by the swagger code generator program. 25 26 Do not edit the class manually. 27 """ 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 'component_key': 'str', 38 'component_type': 'str', 39 'component_name': 'str' 40 } 41 42 attribute_map = { 43 'component_key': 'componentKey', 44 'component_type': 'componentType', 45 'component_name': 'componentName' 46 } 47 48 def __init__(self, _configuration=None, **kwargs): # noqa: E501 49 """WebFormComponent - a model defined in Swagger""" # noqa: E501 50 if _configuration is None: 51 _configuration = Configuration() 52 self._configuration = _configuration 53 54 self._component_key = None 55 self._component_type = None 56 self._component_name = None 57 self.discriminator = None 58 59 setattr(self, "_{}".format('component_key'), kwargs.get('component_key', None)) 60 setattr(self, "_{}".format('component_type'), kwargs.get('component_type', None)) 61 setattr(self, "_{}".format('component_name'), kwargs.get('component_name', None)) 62 63 @property 64 def component_key(self): 65 """Gets the component_key of this WebFormComponent. # noqa: E501 66 67 68 :return: The component_key of this WebFormComponent. # noqa: E501 69 :rtype: str 70 """ 71 return self._component_key 72 73 @component_key.setter 74 def component_key(self, component_key): 75 """Sets the component_key of this WebFormComponent. 76 77 78 :param component_key: The component_key of this WebFormComponent. # noqa: E501 79 :type: str 80 """ 81 if self._configuration.client_side_validation and component_key is None: 82 raise ValueError("Invalid value for `component_key`, must not be `None`") # noqa: E501 83 84 self._component_key = component_key 85 86 @property 87 def component_type(self): 88 """Gets the component_type of this WebFormComponent. # noqa: E501 89 90 The type of component this object represents # noqa: E501 91 92 :return: The component_type of this WebFormComponent. # noqa: E501 93 :rtype: str 94 """ 95 return self._component_type 96 97 @component_type.setter 98 def component_type(self, component_type): 99 """Sets the component_type of this WebFormComponent. 100 101 The type of component this object represents # noqa: E501 102 103 :param component_type: The component_type of this WebFormComponent. # noqa: E501 104 :type: str 105 """ 106 if self._configuration.client_side_validation and component_type is None: 107 raise ValueError("Invalid value for `component_type`, must not be `None`") # noqa: E501 108 if (self._configuration.client_side_validation and 109 component_type is not None and len(component_type) > 100): 110 raise ValueError("Invalid value for `component_type`, length must be less than or equal to `100`") # noqa: E501 111 112 self._component_type = component_type 113 114 @property 115 def component_name(self): 116 """Gets the component_name of this WebFormComponent. # noqa: E501 117 118 Name value that is used for mapping components to external sources # noqa: E501 119 120 :return: The component_name of this WebFormComponent. # noqa: E501 121 :rtype: str 122 """ 123 return self._component_name 124 125 @component_name.setter 126 def component_name(self, component_name): 127 """Sets the component_name of this WebFormComponent. 128 129 Name value that is used for mapping components to external sources # noqa: E501 130 131 :param component_name: The component_name of this WebFormComponent. # noqa: E501 132 :type: str 133 """ 134 if (self._configuration.client_side_validation and 135 component_name is not None and len(component_name) > 100): 136 raise ValueError("Invalid value for `component_name`, length must be less than or equal to `100`") # noqa: E501 137 138 self._component_name = component_name 139 140 def to_dict(self): 141 """Returns the model properties as a dict""" 142 result = {} 143 144 for attr, _ in six.iteritems(self.swagger_types): 145 value = getattr(self, attr) 146 if isinstance(value, list): 147 result[attr] = list(map( 148 lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 149 value 150 )) 151 elif hasattr(value, "to_dict"): 152 result[attr] = value.to_dict() 153 elif isinstance(value, dict): 154 result[attr] = dict(map( 155 lambda item: (item[0], item[1].to_dict()) 156 if hasattr(item[1], "to_dict") else item, 157 value.items() 158 )) 159 else: 160 result[attr] = value 161 if issubclass(WebFormComponent, dict): 162 for key, value in self.items(): 163 result[key] = value 164 165 return result 166 167 def to_str(self): 168 """Returns the string representation of the model""" 169 return pprint.pformat(self.to_dict()) 170 171 def __repr__(self): 172 """For `print` and `pprint`""" 173 return self.to_str() 174 175 def __eq__(self, other): 176 """Returns true if both objects are equal""" 177 if not isinstance(other, WebFormComponent): 178 return False 179 180 return self.to_dict() == other.to_dict() 181 182 def __ne__(self, other): 183 """Returns true if both objects are not equal""" 184 if not isinstance(other, WebFormComponent): 185 return True 186 187 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.
48 def __init__(self, _configuration=None, **kwargs): # noqa: E501 49 """WebFormComponent - a model defined in Swagger""" # noqa: E501 50 if _configuration is None: 51 _configuration = Configuration() 52 self._configuration = _configuration 53 54 self._component_key = None 55 self._component_type = None 56 self._component_name = None 57 self.discriminator = None 58 59 setattr(self, "_{}".format('component_key'), kwargs.get('component_key', None)) 60 setattr(self, "_{}".format('component_type'), kwargs.get('component_type', None)) 61 setattr(self, "_{}".format('component_name'), kwargs.get('component_name', None))
WebFormComponent - a model defined in Swagger
Gets the component_key of this WebFormComponent. # noqa: E501
Returns
The component_key of this WebFormComponent. # noqa: E501
Gets the component_type of this WebFormComponent. # noqa: E501
The type of component this object represents # noqa: E501
Returns
The component_type of this WebFormComponent. # noqa: E501
Gets the component_name of this WebFormComponent. # noqa: E501
Name value that is used for mapping components to external sources # noqa: E501
Returns
The component_name of this WebFormComponent. # noqa: E501
140 def to_dict(self): 141 """Returns the model properties as a dict""" 142 result = {} 143 144 for attr, _ in six.iteritems(self.swagger_types): 145 value = getattr(self, attr) 146 if isinstance(value, list): 147 result[attr] = list(map( 148 lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 149 value 150 )) 151 elif hasattr(value, "to_dict"): 152 result[attr] = value.to_dict() 153 elif isinstance(value, dict): 154 result[attr] = dict(map( 155 lambda item: (item[0], item[1].to_dict()) 156 if hasattr(item[1], "to_dict") else item, 157 value.items() 158 )) 159 else: 160 result[attr] = value 161 if issubclass(WebFormComponent, dict): 162 for key, value in self.items(): 163 result[key] = value 164 165 return result
Returns the model properties as a dict