Class: MicrosoftGraph::Models::SharedDriveItem

Inherits:
BaseItem show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/shared_drive_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 sharedDriveItem and sets the default values.



37
38
39
40
# File 'lib/models/shared_drive_item.rb', line 37

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

Raises:

  • (StandardError)


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

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

Instance Method Details

#drive_itemObject

Gets the driveItem property value. Used to access the underlying driveItem

Returns:

  • a drive_item



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

def drive_item
    return @drive_item
end

#drive_item=(value) ⇒ Object

Sets the driveItem property value. Used to access the underlying driveItem

Parameters:

  • value

    Value to set for the driveItem property.

Returns:

  • a void



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

def drive_item=(value)
    @drive_item = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/models/shared_drive_item.rb', line 69

def get_field_deserializers()
    return super.merge({
        "driveItem" => lambda {|n| @drive_item = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::DriveItem.create_from_discriminator_value(pn) }) },
        "items" => lambda {|n| @items = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DriveItem.create_from_discriminator_value(pn) }) },
        "list" => lambda {|n| @list = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::List.create_from_discriminator_value(pn) }) },
        "listItem" => lambda {|n| @list_item = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ListItem.create_from_discriminator_value(pn) }) },
        "owner" => lambda {|n| @owner = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::IdentitySet.create_from_discriminator_value(pn) }) },
        "permission" => lambda {|n| @permission = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Permission.create_from_discriminator_value(pn) }) },
        "root" => lambda {|n| @root = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::DriveItem.create_from_discriminator_value(pn) }) },
        "site" => lambda {|n| @site = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Site.create_from_discriminator_value(pn) }) },
    })
end

#itemsObject

Gets the items property value. All driveItems contained in the sharing root. This collection cannot be enumerated.

Returns:

  • a drive_item



85
86
87
# File 'lib/models/shared_drive_item.rb', line 85

def items
    return @items
end

#items=(value) ⇒ Object

Sets the items property value. All driveItems contained in the sharing root. This collection cannot be enumerated.

Parameters:

  • value

    Value to set for the items property.

Returns:

  • a void



93
94
95
# File 'lib/models/shared_drive_item.rb', line 93

def items=(value)
    @items = value
end

#listObject

Gets the list property value. Used to access the underlying list

Returns:

  • a list



100
101
102
# File 'lib/models/shared_drive_item.rb', line 100

def list
    return @list
end

#list=(value) ⇒ Object

Sets the list property value. Used to access the underlying list

Parameters:

  • value

    Value to set for the list property.

Returns:

  • a void



108
109
110
# File 'lib/models/shared_drive_item.rb', line 108

def list=(value)
    @list = value
end

#list_itemObject

Gets the listItem property value. Used to access the underlying listItem

Returns:

  • a list_item



115
116
117
# File 'lib/models/shared_drive_item.rb', line 115

def list_item
    return @list_item
end

#list_item=(value) ⇒ Object

Sets the listItem property value. Used to access the underlying listItem

Parameters:

  • value

    Value to set for the listItem property.

Returns:

  • a void



123
124
125
# File 'lib/models/shared_drive_item.rb', line 123

def list_item=(value)
    @list_item = value
end

#ownerObject

Gets the owner property value. Information about the owner of the shared item being referenced.

Returns:

  • a identity_set



130
131
132
# File 'lib/models/shared_drive_item.rb', line 130

def owner
    return @owner
end

#owner=(value) ⇒ Object

Sets the owner property value. Information about the owner of the shared item being referenced.

Parameters:

  • value

    Value to set for the owner property.

Returns:

  • a void



138
139
140
# File 'lib/models/shared_drive_item.rb', line 138

def owner=(value)
    @owner = value
end

#permissionObject

Gets the permission property value. Used to access the permission representing the underlying sharing link

Returns:

  • a permission



145
146
147
# File 'lib/models/shared_drive_item.rb', line 145

def permission
    return @permission
end

#permission=(value) ⇒ Object

Sets the permission property value. Used to access the permission representing the underlying sharing link

Parameters:

  • value

    Value to set for the permission property.

Returns:

  • a void



153
154
155
# File 'lib/models/shared_drive_item.rb', line 153

def permission=(value)
    @permission = value
end

#rootObject

Gets the root property value. Used to access the underlying driveItem. Deprecated – use driveItem instead.

Returns:

  • a drive_item



160
161
162
# File 'lib/models/shared_drive_item.rb', line 160

def root
    return @root
end

#root=(value) ⇒ Object

Sets the root property value. Used to access the underlying driveItem. Deprecated – use driveItem instead.

Parameters:

  • value

    Value to set for the root property.

Returns:

  • a void



168
169
170
# File 'lib/models/shared_drive_item.rb', line 168

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


176
177
178
179
180
181
182
183
184
185
186
187
# File 'lib/models/shared_drive_item.rb', line 176

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_object_value("driveItem", @drive_item)
    writer.write_collection_of_object_values("items", @items)
    writer.write_object_value("list", @list)
    writer.write_object_value("listItem", @list_item)
    writer.write_object_value("owner", @owner)
    writer.write_object_value("permission", @permission)
    writer.write_object_value("root", @root)
    writer.write_object_value("site", @site)
end

#siteObject

Gets the site property value. Used to access the underlying site

Returns:

  • a site



192
193
194
# File 'lib/models/shared_drive_item.rb', line 192

def site
    return @site
end

#site=(value) ⇒ Object

Sets the site property value. Used to access the underlying site

Parameters:

  • value

    Value to set for the site property.

Returns:

  • a void



200
201
202
# File 'lib/models/shared_drive_item.rb', line 200

def site=(value)
    @site = value
end