Class: MicrosoftGraph::Drives::Item::Items::Item::Workbook::Functions::Sln::SlnPostRequestBody

Inherits:
Object
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/drives/item/items/item/workbook/functions/sln/sln_post_request_body.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new slnPostRequestBody and sets the default values.



53
54
55
# File 'lib/drives/item/items/item/workbook/functions/sln/sln_post_request_body.rb', line 53

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 sln_post_request_body

Raises:

  • (StandardError)


76
77
78
79
# File 'lib/drives/item/items/item/workbook/functions/sln/sln_post_request_body.rb', line 76

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return SlnPostRequestBody.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



38
39
40
# File 'lib/drives/item/items/item/workbook/functions/sln/sln_post_request_body.rb', line 38

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



46
47
48
# File 'lib/drives/item/items/item/workbook/functions/sln/sln_post_request_body.rb', line 46

def additional_data=(value)
    @additional_data = value
end

#costObject

Gets the cost property value. The cost property

Returns:

  • a json



60
61
62
# File 'lib/drives/item/items/item/workbook/functions/sln/sln_post_request_body.rb', line 60

def cost
    return @cost
end

#cost=(value) ⇒ Object

Sets the cost property value. The cost property

Parameters:

  • value

    Value to set for the cost property.

Returns:

  • a void



68
69
70
# File 'lib/drives/item/items/item/workbook/functions/sln/sln_post_request_body.rb', line 68

def cost=(value)
    @cost = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



84
85
86
87
88
89
90
# File 'lib/drives/item/items/item/workbook/functions/sln/sln_post_request_body.rb', line 84

def get_field_deserializers()
    return {
        "cost" => lambda {|n| @cost = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) },
        "life" => lambda {|n| @life = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) },
        "salvage" => lambda {|n| @salvage = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) },
    }
end

#lifeObject

Gets the life property value. The life property

Returns:

  • a json



95
96
97
# File 'lib/drives/item/items/item/workbook/functions/sln/sln_post_request_body.rb', line 95

def life
    return @life
end

#life=(value) ⇒ Object

Sets the life property value. The life property

Parameters:

  • value

    Value to set for the life property.

Returns:

  • a void



103
104
105
# File 'lib/drives/item/items/item/workbook/functions/sln/sln_post_request_body.rb', line 103

def life=(value)
    @life = value
end

#salvageObject

Gets the salvage property value. The salvage property

Returns:

  • a json



110
111
112
# File 'lib/drives/item/items/item/workbook/functions/sln/sln_post_request_body.rb', line 110

def salvage
    return @salvage
end

#salvage=(value) ⇒ Object

Sets the salvage property value. The salvage property

Parameters:

  • value

    Value to set for the salvage property.

Returns:

  • a void



118
119
120
# File 'lib/drives/item/items/item/workbook/functions/sln/sln_post_request_body.rb', line 118

def salvage=(value)
    @salvage = 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)


126
127
128
129
130
131
132
# File 'lib/drives/item/items/item/workbook/functions/sln/sln_post_request_body.rb', line 126

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_object_value("cost", @cost)
    writer.write_object_value("life", @life)
    writer.write_object_value("salvage", @salvage)
    writer.write_additional_data(@additional_data)
end