Class: MicrosoftGraph::Models::WorkbookNamedItem

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/workbook_named_item.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 workbookNamedItem and sets the default values.



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

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_named_item

Raises:

  • (StandardError)


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

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

Instance Method Details

#commentObject

Gets the comment property value. Represents the comment associated with this name.

Returns:

  • a string



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

def comment
    return @comment
end

#comment=(value) ⇒ Object

Sets the comment property value. Represents the comment associated with this name.

Parameters:

  • value

    Value to set for the comment property.

Returns:

  • a void



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

def comment=(value)
    @comment = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



65
66
67
68
69
70
71
72
73
74
75
# File 'lib/models/workbook_named_item.rb', line 65

def get_field_deserializers()
    return super.merge({
        "comment" => lambda {|n| @comment = n.get_string_value() },
        "name" => lambda {|n| @name = n.get_string_value() },
        "scope" => lambda {|n| @scope = n.get_string_value() },
        "type" => lambda {|n| @type = n.get_string_value() },
        "value" => lambda {|n| @value = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) },
        "visible" => lambda {|n| @visible = n.get_boolean_value() },
        "worksheet" => lambda {|n| @worksheet = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::WorkbookWorksheet.create_from_discriminator_value(pn) }) },
    })
end

#nameObject

Gets the name property value. The name of the object. Read-only.

Returns:

  • a string



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

def name
    return @name
end

#name=(value) ⇒ Object

Sets the name property value. The name of the object. Read-only.

Parameters:

  • value

    Value to set for the name property.

Returns:

  • a void



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

def name=(value)
    @name = value
end

#scopeObject

Gets the scope property value. Indicates whether the name is scoped to the workbook or to a specific worksheet. Read-only.

Returns:

  • a string



95
96
97
# File 'lib/models/workbook_named_item.rb', line 95

def scope
    return @scope
end

#scope=(value) ⇒ Object

Sets the scope property value. Indicates whether the name is scoped to the workbook or to a specific worksheet. Read-only.

Parameters:

  • value

    Value to set for the scope property.

Returns:

  • a void



103
104
105
# File 'lib/models/workbook_named_item.rb', line 103

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


111
112
113
114
115
116
117
118
119
120
121
# File 'lib/models/workbook_named_item.rb', line 111

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_string_value("comment", @comment)
    writer.write_string_value("name", @name)
    writer.write_string_value("scope", @scope)
    writer.write_string_value("type", @type)
    writer.write_object_value("value", @value)
    writer.write_boolean_value("visible", @visible)
    writer.write_object_value("worksheet", @worksheet)
end

#typeObject

Gets the type property value. Indicates what type of reference is associated with the name. The possible values are: String, Integer, Double, Boolean, Range. Read-only.

Returns:

  • a string



126
127
128
# File 'lib/models/workbook_named_item.rb', line 126

def type
    return @type
end

#type=(value) ⇒ Object

Sets the type property value. Indicates what type of reference is associated with the name. The possible values are: String, Integer, Double, Boolean, Range. Read-only.

Parameters:

  • value

    Value to set for the type property.

Returns:

  • a void



134
135
136
# File 'lib/models/workbook_named_item.rb', line 134

def type=(value)
    @type = value
end

#valueObject

Gets the value property value. Represents the formula that the name is defined to refer to. E.g. =Sheet14!$B$2:$H$12, =4.75, etc. Read-only.

Returns:

  • a json



141
142
143
# File 'lib/models/workbook_named_item.rb', line 141

def value
    return @value
end

#value=(value) ⇒ Object

Sets the value property value. Represents the formula that the name is defined to refer to. E.g. =Sheet14!$B$2:$H$12, =4.75, etc. Read-only.

Parameters:

  • value

    Value to set for the value property.

Returns:

  • a void



149
150
151
# File 'lib/models/workbook_named_item.rb', line 149

def value=(value)
    @value = value
end

#visibleObject

Gets the visible property value. Specifies whether the object is visible or not.

Returns:

  • a boolean



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

def visible
    return @visible
end

#visible=(value) ⇒ Object

Sets the visible property value. Specifies whether the object is visible or not.

Parameters:

  • value

    Value to set for the visible property.

Returns:

  • a void



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

def visible=(value)
    @visible = value
end

#worksheetObject

Gets the worksheet property value. Returns the worksheet on which the named item is scoped to. Available only if the item is scoped to the worksheet. Read-only.

Returns:

  • a workbook_worksheet



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

def worksheet
    return @worksheet
end

#worksheet=(value) ⇒ Object

Sets the worksheet property value. Returns the worksheet on which the named item is scoped to. Available only if the item is scoped to the worksheet. Read-only.

Parameters:

  • value

    Value to set for the worksheet property.

Returns:

  • a void



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

def worksheet=(value)
    @worksheet = value
end