Class: MicrosoftGraph::Models::BookingCustomQuestion

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/booking_custom_question.rb

Overview

Represents a custom question of the business.

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Entity

#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=

Constructor Details

#initializeObject

Instantiates a new bookingCustomQuestion and sets the default values.



54
55
56
# File 'lib/models/booking_custom_question.rb', line 54

def initialize()
    super
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_custom_question

Raises:

  • (StandardError)


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

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return BookingCustomQuestion.new
end

Instance Method Details

#answer_input_typeObject

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

Returns:

  • a answer_input_type



24
25
26
# File 'lib/models/booking_custom_question.rb', line 24

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



32
33
34
# File 'lib/models/booking_custom_question.rb', line 32

def answer_input_type=(value)
    @answer_input_type = value
end

#answer_optionsObject

Gets the answerOptions property value. List of possible answer values.

Returns:

  • a string



39
40
41
# File 'lib/models/booking_custom_question.rb', line 39

def answer_options
    return @answer_options
end

#answer_options=(value) ⇒ Object

Sets the answerOptions property value. List of possible answer values.

Parameters:

  • value

    Value to set for the answerOptions property.

Returns:

  • a void



47
48
49
# File 'lib/models/booking_custom_question.rb', line 47

def answer_options=(value)
    @answer_options = value
end

#display_nameObject

Gets the displayName property value. The question.

Returns:

  • a string



70
71
72
# File 'lib/models/booking_custom_question.rb', line 70

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. The question.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



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

def display_name=(value)
    @display_name = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



85
86
87
88
89
90
91
# File 'lib/models/booking_custom_question.rb', line 85

def get_field_deserializers()
    return super.merge({
        "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) },
        "displayName" => lambda {|n| @display_name = n.get_string_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)


97
98
99
100
101
102
103
# File 'lib/models/booking_custom_question.rb', line 97

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_enum_value("answerInputType", @answer_input_type)
    writer.write_collection_of_primitive_values("answerOptions", @answer_options)
    writer.write_string_value("displayName", @display_name)
end