Class: MicrosoftGraph::Models::BookingQuestionAnswer
- Inherits:
-
Object
- Object
- MicrosoftGraph::Models::BookingQuestionAnswer
- Includes:
- MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/booking_question_answer.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
-
#additional_data ⇒ Object
Gets the additionalData property value.
-
#additional_data=(value) ⇒ Object
Sets the additionalData property value.
-
#answer ⇒ Object
Gets the answer property value.
-
#answer=(value) ⇒ Object
Sets the answer property value.
-
#answer_input_type ⇒ Object
Gets the answerInputType property value.
-
#answer_input_type=(value) ⇒ Object
Sets the answerInputType property value.
-
#answer_options ⇒ Object
Gets the answerOptions property value.
-
#answer_options=(value) ⇒ Object
Sets the answerOptions property value.
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#initialize ⇒ Object
constructor
Instantiates a new bookingQuestionAnswer and sets the default values.
-
#is_required ⇒ Object
Gets the isRequired property value.
-
#is_required=(value) ⇒ Object
Sets the isRequired property value.
-
#odata_type ⇒ Object
Gets the @odata.type property value.
-
#odata_type=(value) ⇒ Object
Sets the @odata.type property value.
-
#question ⇒ Object
Gets the question property value.
-
#question=(value) ⇒ Object
Sets the question property value.
-
#question_id ⇒ Object
Gets the questionId property value.
-
#question_id=(value) ⇒ Object
Sets the questionId property value.
-
#selected_options ⇒ Object
Gets the selectedOptions property value.
-
#selected_options=(value) ⇒ Object
Sets the selectedOptions property value.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
Constructor Details
#initialize ⇒ Object
Instantiates a new bookingQuestionAnswer and sets the default values.
100 101 102 |
# File 'lib/models/booking_question_answer.rb', line 100 def initialize() @additional_data = Hash.new end |
Class Method Details
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value
108 109 110 111 |
# File 'lib/models/booking_question_answer.rb', line 108 def self.create_from_discriminator_value(parse_node) raise StandardError, 'parse_node cannot be null' if parse_node.nil? return BookingQuestionAnswer.new end |
Instance Method Details
#additional_data ⇒ Object
Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
40 41 42 |
# File 'lib/models/booking_question_answer.rb', line 40 def additional_data return @additional_data end |
#additional_data=(value) ⇒ Object
Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
48 49 50 |
# File 'lib/models/booking_question_answer.rb', line 48 def additional_data=(value) @additional_data = value end |
#answer ⇒ Object
Gets the answer property value. The answer given by the user in case the answerInputType is text.
55 56 57 |
# File 'lib/models/booking_question_answer.rb', line 55 def answer return @answer end |
#answer=(value) ⇒ Object
Sets the answer property value. The answer given by the user in case the answerInputType is text.
63 64 65 |
# File 'lib/models/booking_question_answer.rb', line 63 def answer=(value) @answer = value end |
#answer_input_type ⇒ Object
Gets the answerInputType property value. The expected answer type. The possible values are: text, radioButton, unknownFutureValue.
70 71 72 |
# File 'lib/models/booking_question_answer.rb', line 70 def answer_input_type return @answer_input_type end |
#answer_input_type=(value) ⇒ Object
Sets the answerInputType property value. The expected answer type. The possible values are: text, radioButton, unknownFutureValue.
78 79 80 |
# File 'lib/models/booking_question_answer.rb', line 78 def answer_input_type=(value) @answer_input_type = value end |
#answer_options ⇒ Object
Gets the answerOptions property value. In case the answerInputType is radioButton, this will consists of a list of possible answer values.
85 86 87 |
# File 'lib/models/booking_question_answer.rb', line 85 def return @answer_options end |
#answer_options=(value) ⇒ Object
Sets the answerOptions property value. In case the answerInputType is radioButton, this will consists of a list of possible answer values.
93 94 95 |
# File 'lib/models/booking_question_answer.rb', line 93 def (value) @answer_options = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/models/booking_question_answer.rb', line 116 def get_field_deserializers() return { "answer" => lambda {|n| @answer = n.get_string_value() }, "answerInputType" => lambda {|n| @answer_input_type = n.get_enum_value(MicrosoftGraph::Models::AnswerInputType) }, "answerOptions" => lambda {|n| @answer_options = n.get_collection_of_primitive_values(String) }, "isRequired" => lambda {|n| @is_required = n.get_boolean_value() }, "@odata.type" => lambda {|n| @odata_type = n.get_string_value() }, "question" => lambda {|n| @question = n.get_string_value() }, "questionId" => lambda {|n| @question_id = n.get_string_value() }, "selectedOptions" => lambda {|n| @selected_options = n.get_collection_of_primitive_values(String) }, } end |
#is_required ⇒ Object
Gets the isRequired property value. Indicates whether it is mandatory to answer the custom question.
132 133 134 |
# File 'lib/models/booking_question_answer.rb', line 132 def is_required return @is_required end |
#is_required=(value) ⇒ Object
Sets the isRequired property value. Indicates whether it is mandatory to answer the custom question.
140 141 142 |
# File 'lib/models/booking_question_answer.rb', line 140 def is_required=(value) @is_required = value end |
#odata_type ⇒ Object
Gets the @odata.type property value. The OdataType property
147 148 149 |
# File 'lib/models/booking_question_answer.rb', line 147 def odata_type return @odata_type end |
#odata_type=(value) ⇒ Object
Sets the @odata.type property value. The OdataType property
155 156 157 |
# File 'lib/models/booking_question_answer.rb', line 155 def odata_type=(value) @odata_type = value end |
#question ⇒ Object
Gets the question property value. The question.
162 163 164 |
# File 'lib/models/booking_question_answer.rb', line 162 def question return @question end |
#question=(value) ⇒ Object
Sets the question property value. The question.
170 171 172 |
# File 'lib/models/booking_question_answer.rb', line 170 def question=(value) @question = value end |
#question_id ⇒ Object
Gets the questionId property value. The ID of the custom question.
177 178 179 |
# File 'lib/models/booking_question_answer.rb', line 177 def question_id return @question_id end |
#question_id=(value) ⇒ Object
Sets the questionId property value. The ID of the custom question.
185 186 187 |
# File 'lib/models/booking_question_answer.rb', line 185 def question_id=(value) @question_id = value end |
#selected_options ⇒ Object
Gets the selectedOptions property value. The answers selected by the user.
192 193 194 |
# File 'lib/models/booking_question_answer.rb', line 192 def return @selected_options end |
#selected_options=(value) ⇒ Object
Sets the selectedOptions property value. The answers selected by the user.
200 201 202 |
# File 'lib/models/booking_question_answer.rb', line 200 def (value) @selected_options = value end |
#serialize(writer) ⇒ Object
Serializes information the current object
208 209 210 211 212 213 214 215 216 217 218 219 |
# File 'lib/models/booking_question_answer.rb', line 208 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? writer.write_string_value("answer", @answer) writer.write_enum_value("answerInputType", @answer_input_type) writer.write_collection_of_primitive_values("answerOptions", @answer_options) writer.write_boolean_value("isRequired", @is_required) writer.write_string_value("@odata.type", @odata_type) writer.write_string_value("question", @question) writer.write_string_value("questionId", @question_id) writer.write_collection_of_primitive_values("selectedOptions", @selected_options) writer.write_additional_data(@additional_data) end |