Class: MicrosoftGraph::Models::AccessPackageMultipleChoiceQuestion
- Inherits:
-
AccessPackageQuestion
- Object
- Entity
- AccessPackageQuestion
- MicrosoftGraph::Models::AccessPackageMultipleChoiceQuestion
- Includes:
- MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/access_package_multiple_choice_question.rb
Class Method Summary collapse
-
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value.
Instance Method Summary collapse
-
#choices ⇒ Object
Gets the choices property value.
-
#choices=(value) ⇒ Object
Sets the choices property value.
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#initialize ⇒ Object
constructor
Instantiates a new accessPackageMultipleChoiceQuestion and sets the default values.
-
#is_multiple_selection_allowed ⇒ Object
Gets the isMultipleSelectionAllowed property value.
-
#is_multiple_selection_allowed=(value) ⇒ Object
Sets the isMultipleSelectionAllowed property value.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
Methods inherited from AccessPackageQuestion
#is_answer_editable, #is_answer_editable=, #is_required, #is_required=, #localizations, #localizations=, #sequence, #sequence=, #text, #text=
Methods inherited from Entity
#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=
Constructor Details
#initialize ⇒ Object
Instantiates a new accessPackageMultipleChoiceQuestion and sets the default values.
34 35 36 37 |
# File 'lib/models/access_package_multiple_choice_question.rb', line 34 def initialize() super @odata_type = "#microsoft.graph.accessPackageMultipleChoiceQuestion" end |
Class Method Details
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value
43 44 45 46 |
# File 'lib/models/access_package_multiple_choice_question.rb', line 43 def self.create_from_discriminator_value(parse_node) raise StandardError, 'parse_node cannot be null' if parse_node.nil? return AccessPackageMultipleChoiceQuestion.new end |
Instance Method Details
#choices ⇒ Object
Gets the choices property value. List of answer choices.
19 20 21 |
# File 'lib/models/access_package_multiple_choice_question.rb', line 19 def choices return @choices end |
#choices=(value) ⇒ Object
Sets the choices property value. List of answer choices.
27 28 29 |
# File 'lib/models/access_package_multiple_choice_question.rb', line 27 def choices=(value) @choices = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
51 52 53 54 55 56 |
# File 'lib/models/access_package_multiple_choice_question.rb', line 51 def get_field_deserializers() return super.merge({ "choices" => lambda {|n| @choices = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::AccessPackageAnswerChoice.create_from_discriminator_value(pn) }) }, "isMultipleSelectionAllowed" => lambda {|n| @is_multiple_selection_allowed = n.get_boolean_value() }, }) end |
#is_multiple_selection_allowed ⇒ Object
Gets the isMultipleSelectionAllowed property value. Indicates whether requestor can select multiple choices as their answer.
61 62 63 |
# File 'lib/models/access_package_multiple_choice_question.rb', line 61 def is_multiple_selection_allowed return @is_multiple_selection_allowed end |
#is_multiple_selection_allowed=(value) ⇒ Object
Sets the isMultipleSelectionAllowed property value. Indicates whether requestor can select multiple choices as their answer.
69 70 71 |
# File 'lib/models/access_package_multiple_choice_question.rb', line 69 def is_multiple_selection_allowed=(value) @is_multiple_selection_allowed = value end |
#serialize(writer) ⇒ Object
Serializes information the current object
77 78 79 80 81 82 |
# File 'lib/models/access_package_multiple_choice_question.rb', line 77 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? super writer.write_collection_of_object_values("choices", @choices) writer.write_boolean_value("isMultipleSelectionAllowed", @is_multiple_selection_allowed) end |