class DocuSign_eSign::RadioGroup
This group tab is used to place radio buttons on a document. The `radios` property contains a list of [`radio`](/docs/esign-rest-api/reference/envelopes/enveloperecipienttabs/) objects associated with the group. Only one radio button can be selected in a group.
Attributes
For conditional fields this is the TabLabel of the parent tab that controls this tab's visibility.
Metadata that indicates whether the `conditionalParentLabel` property is editable.
Metadata that indicates whether the `conditionalParentValue` property is editable.
Specifies the document ID number that the tab is placed on. This must refer to an existing Document's ID attribute.
Metadata that indicates whether the `documentId` property is editable.
The name of the group.
Metadata that indicates whether the `groupName` property is editable.
The initial value of the tab when it was sent to the recipient.
Metadata that indicates whether the `originalValue` property is editable.
Specifies the locations and status for radio buttons that are grouped together.
Unique for the recipient. It is used by the tab element to indicate which recipient is to sign the Document
.
Metadata that indicates whether the `recipientIdGuid` property is editable.
Metadata that indicates whether the `recipientId` property is editable.
When set to *true* and shared is true, information must be entered in this field to complete the envelope.
Metadata that indicates whether the `requireAll` property is editable.
Metadata that indicates whether the `tabType` property is editable.
When set to *true*, the sender cannot change any attributes of the recipient. Used only when working with template recipients.
Metadata that indicates whether the `templateLocked` property is editable.
When set to *true*, the sender may not remove the recipient. Used only when working with template recipients.
Metadata that indicates whether the `templateRequired` property is editable.
Metadata that indicates whether the `tooltip` property is editable.
Specifies the value of the tab.
Metadata that indicates whether the `value` property is editable.
Public Class Methods
Attribute mapping from ruby-style variable name to JSON key.
# File lib/docusign_esign/models/radio_group.rb, line 117 def self.attribute_map { :'conditional_parent_label' => :'conditionalParentLabel', :'conditional_parent_label_metadata' => :'conditionalParentLabelMetadata', :'conditional_parent_value' => :'conditionalParentValue', :'conditional_parent_value_metadata' => :'conditionalParentValueMetadata', :'document_id' => :'documentId', :'document_id_metadata' => :'documentIdMetadata', :'group_name' => :'groupName', :'group_name_metadata' => :'groupNameMetadata', :'original_value' => :'originalValue', :'original_value_metadata' => :'originalValueMetadata', :'radios' => :'radios', :'recipient_id' => :'recipientId', :'recipient_id_guid' => :'recipientIdGuid', :'recipient_id_guid_metadata' => :'recipientIdGuidMetadata', :'recipient_id_metadata' => :'recipientIdMetadata', :'require_all' => :'requireAll', :'require_all_metadata' => :'requireAllMetadata', :'require_initial_on_shared_change' => :'requireInitialOnSharedChange', :'require_initial_on_shared_change_metadata' => :'requireInitialOnSharedChangeMetadata', :'shared' => :'shared', :'shared_metadata' => :'sharedMetadata', :'share_to_recipients' => :'shareToRecipients', :'share_to_recipients_metadata' => :'shareToRecipientsMetadata', :'tab_type' => :'tabType', :'tab_type_metadata' => :'tabTypeMetadata', :'template_locked' => :'templateLocked', :'template_locked_metadata' => :'templateLockedMetadata', :'template_required' => :'templateRequired', :'template_required_metadata' => :'templateRequiredMetadata', :'tooltip' => :'tooltip', :'tooltip_metadata' => :'tooltipMetadata', :'value' => :'value', :'value_metadata' => :'valueMetadata' } end
Initializes the object @param [Hash] attributes Model attributes in the form of hash
# File lib/docusign_esign/models/radio_group.rb, line 196 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?(:'conditionalParentLabel') self.conditional_parent_label = attributes[:'conditionalParentLabel'] end if attributes.has_key?(:'conditionalParentLabelMetadata') self.conditional_parent_label_metadata = attributes[:'conditionalParentLabelMetadata'] end if attributes.has_key?(:'conditionalParentValue') self.conditional_parent_value = attributes[:'conditionalParentValue'] end if attributes.has_key?(:'conditionalParentValueMetadata') self.conditional_parent_value_metadata = attributes[:'conditionalParentValueMetadata'] end if attributes.has_key?(:'documentId') self.document_id = attributes[:'documentId'] end if attributes.has_key?(:'documentIdMetadata') self.document_id_metadata = attributes[:'documentIdMetadata'] end if attributes.has_key?(:'groupName') self.group_name = attributes[:'groupName'] end if attributes.has_key?(:'groupNameMetadata') self.group_name_metadata = attributes[:'groupNameMetadata'] end if attributes.has_key?(:'originalValue') self.original_value = attributes[:'originalValue'] end if attributes.has_key?(:'originalValueMetadata') self.original_value_metadata = attributes[:'originalValueMetadata'] end if attributes.has_key?(:'radios') if (value = attributes[:'radios']).is_a?(Array) self.radios = value end end if attributes.has_key?(:'recipientId') self.recipient_id = attributes[:'recipientId'] end if attributes.has_key?(:'recipientIdGuid') self.recipient_id_guid = attributes[:'recipientIdGuid'] end if attributes.has_key?(:'recipientIdGuidMetadata') self.recipient_id_guid_metadata = attributes[:'recipientIdGuidMetadata'] end if attributes.has_key?(:'recipientIdMetadata') self.recipient_id_metadata = attributes[:'recipientIdMetadata'] end if attributes.has_key?(:'requireAll') self.require_all = attributes[:'requireAll'] end if attributes.has_key?(:'requireAllMetadata') self.require_all_metadata = attributes[:'requireAllMetadata'] end if attributes.has_key?(:'requireInitialOnSharedChange') self.require_initial_on_shared_change = attributes[:'requireInitialOnSharedChange'] end if attributes.has_key?(:'requireInitialOnSharedChangeMetadata') self.require_initial_on_shared_change_metadata = attributes[:'requireInitialOnSharedChangeMetadata'] end if attributes.has_key?(:'shared') self.shared = attributes[:'shared'] end if attributes.has_key?(:'sharedMetadata') self.shared_metadata = attributes[:'sharedMetadata'] end if attributes.has_key?(:'shareToRecipients') self.share_to_recipients = attributes[:'shareToRecipients'] end if attributes.has_key?(:'shareToRecipientsMetadata') self.share_to_recipients_metadata = attributes[:'shareToRecipientsMetadata'] end if attributes.has_key?(:'tabType') self.tab_type = attributes[:'tabType'] end if attributes.has_key?(:'tabTypeMetadata') self.tab_type_metadata = attributes[:'tabTypeMetadata'] end if attributes.has_key?(:'templateLocked') self.template_locked = attributes[:'templateLocked'] end if attributes.has_key?(:'templateLockedMetadata') self.template_locked_metadata = attributes[:'templateLockedMetadata'] end if attributes.has_key?(:'templateRequired') self.template_required = attributes[:'templateRequired'] end if attributes.has_key?(:'templateRequiredMetadata') self.template_required_metadata = attributes[:'templateRequiredMetadata'] end if attributes.has_key?(:'tooltip') self.tooltip = attributes[:'tooltip'] end if attributes.has_key?(:'tooltipMetadata') self.tooltip_metadata = attributes[:'tooltipMetadata'] end if attributes.has_key?(:'value') self.value = attributes[:'value'] end if attributes.has_key?(:'valueMetadata') self.value_metadata = attributes[:'valueMetadata'] end end
Attribute type mapping.
# File lib/docusign_esign/models/radio_group.rb, line 156 def self.swagger_types { :'conditional_parent_label' => :'String', :'conditional_parent_label_metadata' => :'PropertyMetadata', :'conditional_parent_value' => :'String', :'conditional_parent_value_metadata' => :'PropertyMetadata', :'document_id' => :'String', :'document_id_metadata' => :'PropertyMetadata', :'group_name' => :'String', :'group_name_metadata' => :'PropertyMetadata', :'original_value' => :'String', :'original_value_metadata' => :'PropertyMetadata', :'radios' => :'Array<Radio>', :'recipient_id' => :'String', :'recipient_id_guid' => :'String', :'recipient_id_guid_metadata' => :'PropertyMetadata', :'recipient_id_metadata' => :'PropertyMetadata', :'require_all' => :'String', :'require_all_metadata' => :'PropertyMetadata', :'require_initial_on_shared_change' => :'String', :'require_initial_on_shared_change_metadata' => :'PropertyMetadata', :'shared' => :'String', :'shared_metadata' => :'PropertyMetadata', :'share_to_recipients' => :'String', :'share_to_recipients_metadata' => :'PropertyMetadata', :'tab_type' => :'String', :'tab_type_metadata' => :'PropertyMetadata', :'template_locked' => :'String', :'template_locked_metadata' => :'PropertyMetadata', :'template_required' => :'String', :'template_required_metadata' => :'PropertyMetadata', :'tooltip' => :'String', :'tooltip_metadata' => :'PropertyMetadata', :'value' => :'String', :'value_metadata' => :'PropertyMetadata' } end
Public Instance Methods
Checks equality by comparing each attribute. @param [Object] Object
to be compared
# File lib/docusign_esign/models/radio_group.rb, line 352 def ==(o) return true if self.equal?(o) self.class == o.class && conditional_parent_label == o.conditional_parent_label && conditional_parent_label_metadata == o.conditional_parent_label_metadata && conditional_parent_value == o.conditional_parent_value && conditional_parent_value_metadata == o.conditional_parent_value_metadata && document_id == o.document_id && document_id_metadata == o.document_id_metadata && group_name == o.group_name && group_name_metadata == o.group_name_metadata && original_value == o.original_value && original_value_metadata == o.original_value_metadata && radios == o.radios && recipient_id == o.recipient_id && recipient_id_guid == o.recipient_id_guid && recipient_id_guid_metadata == o.recipient_id_guid_metadata && recipient_id_metadata == o.recipient_id_metadata && require_all == o.require_all && require_all_metadata == o.require_all_metadata && require_initial_on_shared_change == o.require_initial_on_shared_change && require_initial_on_shared_change_metadata == o.require_initial_on_shared_change_metadata && shared == o.shared && shared_metadata == o.shared_metadata && share_to_recipients == o.share_to_recipients && share_to_recipients_metadata == o.share_to_recipients_metadata && tab_type == o.tab_type && tab_type_metadata == o.tab_type_metadata && template_locked == o.template_locked && template_locked_metadata == o.template_locked_metadata && template_required == o.template_required && template_required_metadata == o.template_required_metadata && tooltip == o.tooltip && tooltip_metadata == o.tooltip_metadata && value == o.value && value_metadata == o.value_metadata end
Deserializes the data based on type @param string type Data type @param string value Value to be deserialized @return [Object] Deserialized data
# File lib/docusign_esign/models/radio_group.rb, line 426 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
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
# File lib/docusign_esign/models/radio_group.rb, line 492 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
Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself
# File lib/docusign_esign/models/radio_group.rb, line 405 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
@see the `==` method @param [Object] Object
to be compared
# File lib/docusign_esign/models/radio_group.rb, line 392 def eql?(o) self == o end
Calculates hash code according to all attributes. @return [Fixnum] Hash code
# File lib/docusign_esign/models/radio_group.rb, line 398 def hash [conditional_parent_label, conditional_parent_label_metadata, conditional_parent_value, conditional_parent_value_metadata, document_id, document_id_metadata, group_name, group_name_metadata, original_value, original_value_metadata, radios, recipient_id, recipient_id_guid, recipient_id_guid_metadata, recipient_id_metadata, require_all, require_all_metadata, require_initial_on_shared_change, require_initial_on_shared_change_metadata, shared, shared_metadata, share_to_recipients, share_to_recipients_metadata, tab_type, tab_type_metadata, template_locked, template_locked_metadata, template_required, template_required_metadata, tooltip, tooltip_metadata, value, value_metadata].hash end
Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons
# File lib/docusign_esign/models/radio_group.rb, line 339 def list_invalid_properties invalid_properties = Array.new invalid_properties end
Returns the object in the form of hash @return [Hash] Returns the object in the form of hash
# File lib/docusign_esign/models/radio_group.rb, line 478 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
Returns the string representation of the object @return [String] String presentation of the object
# File lib/docusign_esign/models/radio_group.rb, line 466 def to_s to_hash.to_s end
Check to see if the all the properties in the model are valid @return true if the model is valid
# File lib/docusign_esign/models/radio_group.rb, line 346 def valid? true end