Class: MicrosoftGraph::Models::ListItem

Inherits:
BaseItem show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/list_item.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseItem

#created_by, #created_by=, #created_by_user, #created_by_user=, #created_date_time, #created_date_time=, #description, #description=, #e_tag, #e_tag=, #last_modified_by, #last_modified_by=, #last_modified_by_user, #last_modified_by_user=, #last_modified_date_time, #last_modified_date_time=, #name, #name=, #parent_reference, #parent_reference=, #web_url, #web_url=

Methods inherited from Entity

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

Constructor Details

#initializeObject

Instantiates a new listItem and sets the default values.



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

def initialize()
    super
    @odata_type = "#microsoft.graph.listItem"
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 list_item

Raises:

  • (StandardError)


73
74
75
76
# File 'lib/models/list_item.rb', line 73

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

Instance Method Details

#analyticsObject

Gets the analytics property value. Analytics about the view activities that took place on this item.

Returns:

  • a item_analytics



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

def analytics
    return @analytics
end

#analytics=(value) ⇒ Object

Sets the analytics property value. Analytics about the view activities that took place on this item.

Parameters:

  • value

    Value to set for the analytics property.

Returns:

  • a void



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

def analytics=(value)
    @analytics = value
end

#content_typeObject

Gets the contentType property value. The content type of this list item

Returns:

  • a content_type_info



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

def content_type
    return @content_type
end

#content_type=(value) ⇒ Object

Sets the contentType property value. The content type of this list item

Parameters:

  • value

    Value to set for the contentType property.

Returns:

  • a void



65
66
67
# File 'lib/models/list_item.rb', line 65

def content_type=(value)
    @content_type = value
end

#document_set_versionsObject

Gets the documentSetVersions property value. Version information for a document set version created by a user.

Returns:

  • a document_set_version



81
82
83
# File 'lib/models/list_item.rb', line 81

def document_set_versions
    return @document_set_versions
end

#document_set_versions=(value) ⇒ Object

Sets the documentSetVersions property value. Version information for a document set version created by a user.

Parameters:

  • value

    Value to set for the documentSetVersions property.

Returns:

  • a void



89
90
91
# File 'lib/models/list_item.rb', line 89

def document_set_versions=(value)
    @document_set_versions = value
end

#drive_itemObject

Gets the driveItem property value. For document libraries, the driveItem relationship exposes the listItem as a [driveItem][]

Returns:

  • a drive_item



96
97
98
# File 'lib/models/list_item.rb', line 96

def drive_item
    return @drive_item
end

#drive_item=(value) ⇒ Object

Sets the driveItem property value. For document libraries, the driveItem relationship exposes the listItem as a [driveItem][]

Parameters:

  • value

    Value to set for the driveItem property.

Returns:

  • a void



104
105
106
# File 'lib/models/list_item.rb', line 104

def drive_item=(value)
    @drive_item = value
end

#fieldsObject

Gets the fields property value. The values of the columns set on this list item.

Returns:

  • a field_value_set



111
112
113
# File 'lib/models/list_item.rb', line 111

def fields
    return @fields
end

#fields=(value) ⇒ Object

Sets the fields property value. The values of the columns set on this list item.

Parameters:

  • value

    Value to set for the fields property.

Returns:

  • a void



119
120
121
# File 'lib/models/list_item.rb', line 119

def fields=(value)
    @fields = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



126
127
128
129
130
131
132
133
134
135
136
# File 'lib/models/list_item.rb', line 126

def get_field_deserializers()
    return super.merge({
        "analytics" => lambda {|n| @analytics = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ItemAnalytics.create_from_discriminator_value(pn) }) },
        "contentType" => lambda {|n| @content_type = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ContentTypeInfo.create_from_discriminator_value(pn) }) },
        "documentSetVersions" => lambda {|n| @document_set_versions = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DocumentSetVersion.create_from_discriminator_value(pn) }) },
        "driveItem" => lambda {|n| @drive_item = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::DriveItem.create_from_discriminator_value(pn) }) },
        "fields" => lambda {|n| @fields = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::FieldValueSet.create_from_discriminator_value(pn) }) },
        "sharepointIds" => lambda {|n| @sharepoint_ids = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SharepointIds.create_from_discriminator_value(pn) }) },
        "versions" => lambda {|n| @versions = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ListItemVersion.create_from_discriminator_value(pn) }) },
    })
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


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

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_object_value("analytics", @analytics)
    writer.write_object_value("contentType", @content_type)
    writer.write_collection_of_object_values("documentSetVersions", @document_set_versions)
    writer.write_object_value("driveItem", @drive_item)
    writer.write_object_value("fields", @fields)
    writer.write_object_value("sharepointIds", @sharepoint_ids)
    writer.write_collection_of_object_values("versions", @versions)
end

#sharepoint_idsObject

Gets the sharepointIds property value. Returns identifiers useful for SharePoint REST compatibility. Read-only.

Returns:

  • a sharepoint_ids



157
158
159
# File 'lib/models/list_item.rb', line 157

def sharepoint_ids
    return @sharepoint_ids
end

#sharepoint_ids=(value) ⇒ Object

Sets the sharepointIds property value. Returns identifiers useful for SharePoint REST compatibility. Read-only.

Parameters:

  • value

    Value to set for the sharepointIds property.

Returns:

  • a void



165
166
167
# File 'lib/models/list_item.rb', line 165

def sharepoint_ids=(value)
    @sharepoint_ids = value
end

#versionsObject

Gets the versions property value. The list of previous versions of the list item.

Returns:

  • a list_item_version



172
173
174
# File 'lib/models/list_item.rb', line 172

def versions
    return @versions
end

#versions=(value) ⇒ Object

Sets the versions property value. The list of previous versions of the list item.

Parameters:

  • value

    Value to set for the versions property.

Returns:

  • a void



180
181
182
# File 'lib/models/list_item.rb', line 180

def versions=(value)
    @versions = value
end