Class: MicrosoftGraph::Models::Workbook

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

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 workbook and sets the default values.



64
65
66
# File 'lib/models/workbook.rb', line 64

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 workbook

Raises:

  • (StandardError)


72
73
74
75
# File 'lib/models/workbook.rb', line 72

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

Instance Method Details

#applicationObject

Gets the application property value. The application property

Returns:

  • a workbook_application



34
35
36
# File 'lib/models/workbook.rb', line 34

def application
    return @application
end

#application=(value) ⇒ Object

Sets the application property value. The application property

Parameters:

  • value

    Value to set for the application property.

Returns:

  • a void



42
43
44
# File 'lib/models/workbook.rb', line 42

def application=(value)
    @application = value
end

#commentsObject

Gets the comments property value. Represents a collection of comments in a workbook.

Returns:

  • a workbook_comment



49
50
51
# File 'lib/models/workbook.rb', line 49

def comments
    return @comments
end

#comments=(value) ⇒ Object

Sets the comments property value. Represents a collection of comments in a workbook.

Parameters:

  • value

    Value to set for the comments property.

Returns:

  • a void



57
58
59
# File 'lib/models/workbook.rb', line 57

def comments=(value)
    @comments = value
end

#functionsObject

Gets the functions property value. The functions property

Returns:

  • a workbook_functions



80
81
82
# File 'lib/models/workbook.rb', line 80

def functions
    return @functions
end

#functions=(value) ⇒ Object

Sets the functions property value. The functions property

Parameters:

  • value

    Value to set for the functions property.

Returns:

  • a void



88
89
90
# File 'lib/models/workbook.rb', line 88

def functions=(value)
    @functions = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



95
96
97
98
99
100
101
102
103
104
105
# File 'lib/models/workbook.rb', line 95

def get_field_deserializers()
    return super.merge({
        "application" => lambda {|n| @application = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::WorkbookApplication.create_from_discriminator_value(pn) }) },
        "comments" => lambda {|n| @comments = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::WorkbookComment.create_from_discriminator_value(pn) }) },
        "functions" => lambda {|n| @functions = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::WorkbookFunctions.create_from_discriminator_value(pn) }) },
        "names" => lambda {|n| @names = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::WorkbookNamedItem.create_from_discriminator_value(pn) }) },
        "operations" => lambda {|n| @operations = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::WorkbookOperation.create_from_discriminator_value(pn) }) },
        "tables" => lambda {|n| @tables = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::WorkbookTable.create_from_discriminator_value(pn) }) },
        "worksheets" => lambda {|n| @worksheets = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::WorkbookWorksheet.create_from_discriminator_value(pn) }) },
    })
end

#namesObject

Gets the names property value. Represents a collection of workbooks scoped named items (named ranges and constants). Read-only.

Returns:

  • a workbook_named_item



110
111
112
# File 'lib/models/workbook.rb', line 110

def names
    return @names
end

#names=(value) ⇒ Object

Sets the names property value. Represents a collection of workbooks scoped named items (named ranges and constants). Read-only.

Parameters:

  • value

    Value to set for the names property.

Returns:

  • a void



118
119
120
# File 'lib/models/workbook.rb', line 118

def names=(value)
    @names = value
end

#operationsObject

Gets the operations property value. The status of workbook operations. Getting an operation collection is not supported, but you can get the status of a long-running operation if the Location header is returned in the response. Read-only.

Returns:

  • a workbook_operation



125
126
127
# File 'lib/models/workbook.rb', line 125

def operations
    return @operations
end

#operations=(value) ⇒ Object

Sets the operations property value. The status of workbook operations. Getting an operation collection is not supported, but you can get the status of a long-running operation if the Location header is returned in the response. Read-only.

Parameters:

  • value

    Value to set for the operations property.

Returns:

  • a void



133
134
135
# File 'lib/models/workbook.rb', line 133

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


141
142
143
144
145
146
147
148
149
150
151
# File 'lib/models/workbook.rb', line 141

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_object_value("application", @application)
    writer.write_collection_of_object_values("comments", @comments)
    writer.write_object_value("functions", @functions)
    writer.write_collection_of_object_values("names", @names)
    writer.write_collection_of_object_values("operations", @operations)
    writer.write_collection_of_object_values("tables", @tables)
    writer.write_collection_of_object_values("worksheets", @worksheets)
end

#tablesObject

Gets the tables property value. Represents a collection of tables associated with the workbook. Read-only.

Returns:

  • a workbook_table



156
157
158
# File 'lib/models/workbook.rb', line 156

def tables
    return @tables
end

#tables=(value) ⇒ Object

Sets the tables property value. Represents a collection of tables associated with the workbook. Read-only.

Parameters:

  • value

    Value to set for the tables property.

Returns:

  • a void



164
165
166
# File 'lib/models/workbook.rb', line 164

def tables=(value)
    @tables = value
end

#worksheetsObject

Gets the worksheets property value. Represents a collection of worksheets associated with the workbook. Read-only.

Returns:

  • a workbook_worksheet



171
172
173
# File 'lib/models/workbook.rb', line 171

def worksheets
    return @worksheets
end

#worksheets=(value) ⇒ Object

Sets the worksheets property value. Represents a collection of worksheets associated with the workbook. Read-only.

Parameters:

  • value

    Value to set for the worksheets property.

Returns:

  • a void



179
180
181
# File 'lib/models/workbook.rb', line 179

def worksheets=(value)
    @worksheets = value
end