Class: MicrosoftGraph::Models::BookingQuestionAnswer

Inherits:
Object
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/booking_question_answer.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

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

Parameters:

  • parse_node

    The parse node to use to read the discriminator value and create the object

Returns:

  • a booking_question_answer

Raises:

  • (StandardError)


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_dataObject

Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Returns:

  • a i_dictionary



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.

Parameters:

  • value

    Value to set for the additionalData property.

Returns:

  • a void



48
49
50
# File 'lib/models/booking_question_answer.rb', line 48

def additional_data=(value)
    @additional_data = value
end

#answerObject

Gets the answer property value. The answer given by the user in case the answerInputType is text.

Returns:

  • a string



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.

Parameters:

  • value

    Value to set for the answer property.

Returns:

  • a void



63
64
65
# File 'lib/models/booking_question_answer.rb', line 63

def answer=(value)
    @answer = value
end

#answer_input_typeObject

Gets the answerInputType property value. The expected answer type. The possible values are: text, radioButton, unknownFutureValue.

Returns:

  • a answer_input_type



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.

Parameters:

  • value

    Value to set for the answerInputType property.

Returns:

  • a void



78
79
80
# File 'lib/models/booking_question_answer.rb', line 78

def answer_input_type=(value)
    @answer_input_type = value
end

#answer_optionsObject

Gets the answerOptions property value. In case the answerInputType is radioButton, this will consists of a list of possible answer values.

Returns:

  • a string



85
86
87
# File 'lib/models/booking_question_answer.rb', line 85

def answer_options
    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.

Parameters:

  • value

    Value to set for the answerOptions property.

Returns:

  • a void



93
94
95
# File 'lib/models/booking_question_answer.rb', line 93

def answer_options=(value)
    @answer_options = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



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_requiredObject

Gets the isRequired property value. Indicates whether it is mandatory to answer the custom question.

Returns:

  • a boolean



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.

Parameters:

  • value

    Value to set for the isRequired property.

Returns:

  • a void



140
141
142
# File 'lib/models/booking_question_answer.rb', line 140

def is_required=(value)
    @is_required = value
end

#odata_typeObject

Gets the @odata.type property value. The OdataType property

Returns:

  • a string



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

Parameters:

  • value

    Value to set for the @odata.type property.

Returns:

  • a void



155
156
157
# File 'lib/models/booking_question_answer.rb', line 155

def odata_type=(value)
    @odata_type = value
end

#questionObject

Gets the question property value. The question.

Returns:

  • a string



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.

Parameters:

  • value

    Value to set for the question property.

Returns:

  • a void



170
171
172
# File 'lib/models/booking_question_answer.rb', line 170

def question=(value)
    @question = value
end

#question_idObject

Gets the questionId property value. The ID of the custom question.

Returns:

  • a string



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.

Parameters:

  • value

    Value to set for the questionId property.

Returns:

  • a void



185
186
187
# File 'lib/models/booking_question_answer.rb', line 185

def question_id=(value)
    @question_id = value
end

#selected_optionsObject

Gets the selectedOptions property value. The answers selected by the user.

Returns:

  • a string



192
193
194
# File 'lib/models/booking_question_answer.rb', line 192

def selected_options
    return @selected_options
end

#selected_options=(value) ⇒ Object

Sets the selectedOptions property value. The answers selected by the user.

Parameters:

  • value

    Value to set for the selectedOptions property.

Returns:

  • a void



200
201
202
# File 'lib/models/booking_question_answer.rb', line 200

def selected_options=(value)
    @selected_options = value
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


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