Class: MicrosoftGraph::Models::Drive

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



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

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

Raises:

  • (StandardError)


70
71
72
73
# File 'lib/models/drive.rb', line 70

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

Instance Method Details

#bundlesObject

Gets the bundles property value. Collection of [bundles] (albums and multi-select-shared sets of items). Only in personal OneDrive.

Returns:

  • a drive_item



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

def bundles
    return @bundles
end

#bundles=(value) ⇒ Object

Sets the bundles property value. Collection of [bundles] (albums and multi-select-shared sets of items). Only in personal OneDrive.

Parameters:

  • value

    Value to set for the bundles property.

Returns:

  • a void



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

def bundles=(value)
    @bundles = value
end

#drive_typeObject

Gets the driveType property value. Describes the type of drive represented by this resource. OneDrive personal drives will return personal. OneDrive for Business will return business. SharePoint document libraries will return documentLibrary. Read-only.

Returns:

  • a string



78
79
80
# File 'lib/models/drive.rb', line 78

def drive_type
    return @drive_type
end

#drive_type=(value) ⇒ Object

Sets the driveType property value. Describes the type of drive represented by this resource. OneDrive personal drives will return personal. OneDrive for Business will return business. SharePoint document libraries will return documentLibrary. Read-only.

Parameters:

  • value

    Value to set for the driveType property.

Returns:

  • a void



86
87
88
# File 'lib/models/drive.rb', line 86

def drive_type=(value)
    @drive_type = value
end

#followingObject

Gets the following property value. The list of items the user is following. Only in OneDrive for Business.

Returns:

  • a drive_item



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

def following
    return @following
end

#following=(value) ⇒ Object

Sets the following property value. The list of items the user is following. Only in OneDrive for Business.

Parameters:

  • value

    Value to set for the following property.

Returns:

  • a void



101
102
103
# File 'lib/models/drive.rb', line 101

def following=(value)
    @following = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# File 'lib/models/drive.rb', line 108

def get_field_deserializers()
    return super.merge({
        "bundles" => lambda {|n| @bundles = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DriveItem.create_from_discriminator_value(pn) }) },
        "driveType" => lambda {|n| @drive_type = n.get_string_value() },
        "following" => lambda {|n| @following = n.get_collection_of_object_values(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) }) },
        "owner" => lambda {|n| @owner = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::IdentitySet.create_from_discriminator_value(pn) }) },
        "quota" => lambda {|n| @quota = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Quota.create_from_discriminator_value(pn) }) },
        "root" => lambda {|n| @root = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::DriveItem.create_from_discriminator_value(pn) }) },
        "sharePointIds" => lambda {|n| @share_point_ids = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SharepointIds.create_from_discriminator_value(pn) }) },
        "special" => lambda {|n| @special = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DriveItem.create_from_discriminator_value(pn) }) },
        "system" => lambda {|n| @system = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SystemFacet.create_from_discriminator_value(pn) }) },
    })
end

#itemsObject

Gets the items property value. All items contained in the drive. Read-only. Nullable.

Returns:

  • a drive_item



127
128
129
# File 'lib/models/drive.rb', line 127

def items
    return @items
end

#items=(value) ⇒ Object

Sets the items property value. All items contained in the drive. Read-only. Nullable.

Parameters:

  • value

    Value to set for the items property.

Returns:

  • a void



135
136
137
# File 'lib/models/drive.rb', line 135

def items=(value)
    @items = value
end

#listObject

Gets the list property value. For drives in SharePoint, the underlying document library list. Read-only. Nullable.

Returns:

  • a list



142
143
144
# File 'lib/models/drive.rb', line 142

def list
    return @list
end

#list=(value) ⇒ Object

Sets the list property value. For drives in SharePoint, the underlying document library list. Read-only. Nullable.

Parameters:

  • value

    Value to set for the list property.

Returns:

  • a void



150
151
152
# File 'lib/models/drive.rb', line 150

def list=(value)
    @list = value
end

#ownerObject

Gets the owner property value. Optional. The user account that owns the drive. Read-only.

Returns:

  • a identity_set



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

def owner
    return @owner
end

#owner=(value) ⇒ Object

Sets the owner property value. Optional. The user account that owns the drive. Read-only.

Parameters:

  • value

    Value to set for the owner property.

Returns:

  • a void



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

def owner=(value)
    @owner = value
end

#quotaObject

Gets the quota property value. Optional. Information about the drive’s storage space quota. Read-only.

Returns:

  • a quota



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

def quota
    return @quota
end

#quota=(value) ⇒ Object

Sets the quota property value. Optional. Information about the drive’s storage space quota. Read-only.

Parameters:

  • value

    Value to set for the quota property.

Returns:

  • a void



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

def quota=(value)
    @quota = value
end

#rootObject

Gets the root property value. The root folder of the drive. Read-only.

Returns:

  • a drive_item



187
188
189
# File 'lib/models/drive.rb', line 187

def root
    return @root
end

#root=(value) ⇒ Object

Sets the root property value. The root folder of the drive. Read-only.

Parameters:

  • value

    Value to set for the root property.

Returns:

  • a void



195
196
197
# File 'lib/models/drive.rb', line 195

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)


203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
# File 'lib/models/drive.rb', line 203

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_collection_of_object_values("bundles", @bundles)
    writer.write_string_value("driveType", @drive_type)
    writer.write_collection_of_object_values("following", @following)
    writer.write_collection_of_object_values("items", @items)
    writer.write_object_value("list", @list)
    writer.write_object_value("owner", @owner)
    writer.write_object_value("quota", @quota)
    writer.write_object_value("root", @root)
    writer.write_object_value("sharePointIds", @share_point_ids)
    writer.write_collection_of_object_values("special", @special)
    writer.write_object_value("system", @system)
end

#share_point_idsObject

Gets the sharePointIds property value. The sharePointIds property

Returns:

  • a sharepoint_ids



222
223
224
# File 'lib/models/drive.rb', line 222

def share_point_ids
    return @share_point_ids
end

#share_point_ids=(value) ⇒ Object

Sets the sharePointIds property value. The sharePointIds property

Parameters:

  • value

    Value to set for the sharePointIds property.

Returns:

  • a void



230
231
232
# File 'lib/models/drive.rb', line 230

def share_point_ids=(value)
    @share_point_ids = value
end

#specialObject

Gets the special property value. Collection of common folders available in OneDrive. Read-only. Nullable.

Returns:

  • a drive_item



237
238
239
# File 'lib/models/drive.rb', line 237

def special
    return @special
end

#special=(value) ⇒ Object

Sets the special property value. Collection of common folders available in OneDrive. Read-only. Nullable.

Parameters:

  • value

    Value to set for the special property.

Returns:

  • a void



245
246
247
# File 'lib/models/drive.rb', line 245

def special=(value)
    @special = value
end

#systemObject

Gets the system property value. If present, indicates that this is a system-managed drive. Read-only.

Returns:

  • a system_facet



252
253
254
# File 'lib/models/drive.rb', line 252

def system
    return @system
end

#system=(value) ⇒ Object

Sets the system property value. If present, indicates that this is a system-managed drive. Read-only.

Parameters:

  • value

    Value to set for the system property.

Returns:

  • a void



260
261
262
# File 'lib/models/drive.rb', line 260

def system=(value)
    @system = value
end