Class: MicrosoftGraph::Models::ItemReference

Inherits:
Object
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/item_reference.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new itemReference and sets the default values.



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

def initialize()
    @additional_data = Hash.new
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 item_reference

Raises:

  • (StandardError)


66
67
68
69
# File 'lib/models/item_reference.rb', line 66

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

Instance Method Details

#additional_dataObject

Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Returns:

  • a i_dictionary



43
44
45
# File 'lib/models/item_reference.rb', line 43

def additional_data
    return @additional_data
end

#additional_data=(value) ⇒ Object

Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Parameters:

  • value

    Value to set for the additionalData property.

Returns:

  • a void



51
52
53
# File 'lib/models/item_reference.rb', line 51

def additional_data=(value)
    @additional_data = value
end

#drive_idObject

Gets the driveId property value. Unique identifier of the drive instance that contains the driveItem. Only returned if the item is located in a [drive][]. Read-only.

Returns:

  • a string



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

def drive_id
    return @drive_id
end

#drive_id=(value) ⇒ Object

Sets the driveId property value. Unique identifier of the drive instance that contains the driveItem. Only returned if the item is located in a [drive][]. Read-only.

Parameters:

  • value

    Value to set for the driveId property.

Returns:

  • a void



82
83
84
# File 'lib/models/item_reference.rb', line 82

def drive_id=(value)
    @drive_id = value
end

#drive_typeObject

Gets the driveType property value. Identifies the type of drive. Only returned if the item is located in a [drive][]. See [drive][] resource for values.

Returns:

  • a string



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

def drive_type
    return @drive_type
end

#drive_type=(value) ⇒ Object

Sets the driveType property value. Identifies the type of drive. Only returned if the item is located in a [drive][]. See [drive][] resource for values.

Parameters:

  • value

    Value to set for the driveType property.

Returns:

  • a void



97
98
99
# File 'lib/models/item_reference.rb', line 97

def drive_type=(value)
    @drive_type = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



104
105
106
107
108
109
110
111
112
113
114
115
116
# File 'lib/models/item_reference.rb', line 104

def get_field_deserializers()
    return {
        "driveId" => lambda {|n| @drive_id = n.get_string_value() },
        "driveType" => lambda {|n| @drive_type = n.get_string_value() },
        "id" => lambda {|n| @id = n.get_string_value() },
        "name" => lambda {|n| @name = n.get_string_value() },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "path" => lambda {|n| @path = n.get_string_value() },
        "shareId" => lambda {|n| @share_id = n.get_string_value() },
        "sharepointIds" => lambda {|n| @sharepoint_ids = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SharepointIds.create_from_discriminator_value(pn) }) },
        "siteId" => lambda {|n| @site_id = n.get_string_value() },
    }
end

#idObject

Gets the id property value. Unique identifier of the driveItem in the drive or a listItem in a list. Read-only.

Returns:

  • a string



121
122
123
# File 'lib/models/item_reference.rb', line 121

def id
    return @id
end

#id=(value) ⇒ Object

Sets the id property value. Unique identifier of the driveItem in the drive or a listItem in a list. Read-only.

Parameters:

  • value

    Value to set for the id property.

Returns:

  • a void



129
130
131
# File 'lib/models/item_reference.rb', line 129

def id=(value)
    @id = value
end

#nameObject

Gets the name property value. The name of the item being referenced. Read-only.

Returns:

  • a string



136
137
138
# File 'lib/models/item_reference.rb', line 136

def name
    return @name
end

#name=(value) ⇒ Object

Sets the name property value. The name of the item being referenced. Read-only.

Parameters:

  • value

    Value to set for the name property.

Returns:

  • a void



144
145
146
# File 'lib/models/item_reference.rb', line 144

def name=(value)
    @name = value
end

#odata_typeObject

Gets the @odata.type property value. The OdataType property

Returns:

  • a string



151
152
153
# File 'lib/models/item_reference.rb', line 151

def odata_type
    return @odata_type
end

#odata_type=(value) ⇒ Object

Sets the @odata.type property value. The OdataType property

Parameters:

  • value

    Value to set for the @odata.type property.

Returns:

  • a void



159
160
161
# File 'lib/models/item_reference.rb', line 159

def odata_type=(value)
    @odata_type = value
end

#pathObject

Gets the path property value. Path that can be used to navigate to the item. Read-only.

Returns:

  • a string



166
167
168
# File 'lib/models/item_reference.rb', line 166

def path
    return @path
end

#path=(value) ⇒ Object

Sets the path property value. Path that can be used to navigate to the item. Read-only.

Parameters:

  • value

    Value to set for the path property.

Returns:

  • a void



174
175
176
# File 'lib/models/item_reference.rb', line 174

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


182
183
184
185
186
187
188
189
190
191
192
193
194
# File 'lib/models/item_reference.rb', line 182

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_string_value("driveId", @drive_id)
    writer.write_string_value("driveType", @drive_type)
    writer.write_string_value("id", @id)
    writer.write_string_value("name", @name)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_string_value("path", @path)
    writer.write_string_value("shareId", @share_id)
    writer.write_object_value("sharepointIds", @sharepoint_ids)
    writer.write_string_value("siteId", @site_id)
    writer.write_additional_data(@additional_data)
end

#share_idObject

Gets the shareId property value. A unique identifier for a shared resource that can be accessed via the [Shares][] API.

Returns:

  • a string



199
200
201
# File 'lib/models/item_reference.rb', line 199

def share_id
    return @share_id
end

#share_id=(value) ⇒ Object

Sets the shareId property value. A unique identifier for a shared resource that can be accessed via the [Shares][] API.

Parameters:

  • value

    Value to set for the shareId property.

Returns:

  • a void



207
208
209
# File 'lib/models/item_reference.rb', line 207

def share_id=(value)
    @share_id = value
end

#sharepoint_idsObject

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

Returns:

  • a sharepoint_ids



214
215
216
# File 'lib/models/item_reference.rb', line 214

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



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

def sharepoint_ids=(value)
    @sharepoint_ids = value
end

#site_idObject

Gets the siteId property value. For OneDrive for Business and SharePoint, this property represents the ID of the site that contains the parent document library of the driveItem resource or the parent list of the listItem resource. The value is the same as the id property of that [site][] resource. It is an opaque string that consists of three identifiers of the site. For OneDrive, this property is not populated.

Returns:

  • a string



229
230
231
# File 'lib/models/item_reference.rb', line 229

def site_id
    return @site_id
end

#site_id=(value) ⇒ Object

Sets the siteId property value. For OneDrive for Business and SharePoint, this property represents the ID of the site that contains the parent document library of the driveItem resource or the parent list of the listItem resource. The value is the same as the id property of that [site][] resource. It is an opaque string that consists of three identifiers of the site. For OneDrive, this property is not populated.

Parameters:

  • value

    Value to set for the siteId property.

Returns:

  • a void



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

def site_id=(value)
    @site_id = value
end