Class: MicrosoftGraph::Models::BaseItem
- Includes:
- MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/base_item.rb
Class Method Summary collapse
-
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value.
Instance Method Summary collapse
-
#created_by ⇒ Object
Gets the createdBy property value.
-
#created_by=(value) ⇒ Object
Sets the createdBy property value.
-
#created_by_user ⇒ Object
Gets the createdByUser property value.
-
#created_by_user=(value) ⇒ Object
Sets the createdByUser property value.
-
#created_date_time ⇒ Object
Gets the createdDateTime property value.
-
#created_date_time=(value) ⇒ Object
Sets the createdDateTime property value.
-
#description ⇒ Object
Gets the description property value.
-
#description=(value) ⇒ Object
Sets the description property value.
-
#e_tag ⇒ Object
Gets the eTag property value.
-
#e_tag=(value) ⇒ Object
Sets the eTag property value.
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#initialize ⇒ Object
constructor
Instantiates a new baseItem and sets the default values.
-
#last_modified_by ⇒ Object
Gets the lastModifiedBy property value.
-
#last_modified_by=(value) ⇒ Object
Sets the lastModifiedBy property value.
-
#last_modified_by_user ⇒ Object
Gets the lastModifiedByUser property value.
-
#last_modified_by_user=(value) ⇒ Object
Sets the lastModifiedByUser property value.
-
#last_modified_date_time ⇒ Object
Gets the lastModifiedDateTime property value.
-
#last_modified_date_time=(value) ⇒ Object
Sets the lastModifiedDateTime property value.
-
#name ⇒ Object
Gets the name property value.
-
#name=(value) ⇒ Object
Sets the name property value.
-
#parent_reference ⇒ Object
Gets the parentReference property value.
-
#parent_reference=(value) ⇒ Object
Sets the parentReference property value.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
-
#web_url ⇒ Object
Gets the webUrl property value.
-
#web_url=(value) ⇒ Object
Sets the webUrl property value.
Methods inherited from Entity
#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=
Constructor Details
#initialize ⇒ Object
Instantiates a new baseItem and sets the default values.
47 48 49 |
# File 'lib/models/base_item.rb', line 47 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
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/models/base_item.rb', line 100 def self.create_from_discriminator_value(parse_node) raise StandardError, 'parse_node cannot be null' if parse_node.nil? mapping_value_node = parse_node.get_child_node("@odata.type") unless mapping_value_node.nil? then mapping_value = mapping_value_node.get_string_value case mapping_value when "#microsoft.graph.drive" return Drive.new when "#microsoft.graph.driveItem" return DriveItem.new when "#microsoft.graph.list" return List.new when "#microsoft.graph.listItem" return ListItem.new when "#microsoft.graph.sharedDriveItem" return SharedDriveItem.new when "#microsoft.graph.site" return Site.new end end return BaseItem.new end |
Instance Method Details
#created_by ⇒ Object
Gets the createdBy property value. Identity of the user, device, or application which created the item. Read-only.
54 55 56 |
# File 'lib/models/base_item.rb', line 54 def created_by return @created_by end |
#created_by=(value) ⇒ Object
Sets the createdBy property value. Identity of the user, device, or application which created the item. Read-only.
62 63 64 |
# File 'lib/models/base_item.rb', line 62 def created_by=(value) @created_by = value end |
#created_by_user ⇒ Object
Gets the createdByUser property value. Identity of the user who created the item. Read-only.
69 70 71 |
# File 'lib/models/base_item.rb', line 69 def created_by_user return @created_by_user end |
#created_by_user=(value) ⇒ Object
Sets the createdByUser property value. Identity of the user who created the item. Read-only.
77 78 79 |
# File 'lib/models/base_item.rb', line 77 def created_by_user=(value) @created_by_user = value end |
#created_date_time ⇒ Object
Gets the createdDateTime property value. Date and time of item creation. Read-only.
84 85 86 |
# File 'lib/models/base_item.rb', line 84 def created_date_time return @created_date_time end |
#created_date_time=(value) ⇒ Object
Sets the createdDateTime property value. Date and time of item creation. Read-only.
92 93 94 |
# File 'lib/models/base_item.rb', line 92 def created_date_time=(value) @created_date_time = value end |
#description ⇒ Object
Gets the description property value. Provides a user-visible description of the item. Optional.
126 127 128 |
# File 'lib/models/base_item.rb', line 126 def description return @description end |
#description=(value) ⇒ Object
Sets the description property value. Provides a user-visible description of the item. Optional.
134 135 136 |
# File 'lib/models/base_item.rb', line 134 def description=(value) @description = value end |
#e_tag ⇒ Object
Gets the eTag property value. ETag for the item. Read-only.
141 142 143 |
# File 'lib/models/base_item.rb', line 141 def e_tag return @e_tag end |
#e_tag=(value) ⇒ Object
Sets the eTag property value. ETag for the item. Read-only.
149 150 151 |
# File 'lib/models/base_item.rb', line 149 def e_tag=(value) @e_tag = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/models/base_item.rb', line 156 def get_field_deserializers() return super.merge({ "createdBy" => lambda {|n| @created_by = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::IdentitySet.create_from_discriminator_value(pn) }) }, "createdByUser" => lambda {|n| @created_by_user = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::User.create_from_discriminator_value(pn) }) }, "createdDateTime" => lambda {|n| @created_date_time = n.get_date_time_value() }, "description" => lambda {|n| @description = n.get_string_value() }, "eTag" => lambda {|n| @e_tag = n.get_string_value() }, "lastModifiedBy" => lambda {|n| @last_modified_by = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::IdentitySet.create_from_discriminator_value(pn) }) }, "lastModifiedByUser" => lambda {|n| @last_modified_by_user = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::User.create_from_discriminator_value(pn) }) }, "lastModifiedDateTime" => lambda {|n| @last_modified_date_time = n.get_date_time_value() }, "name" => lambda {|n| @name = n.get_string_value() }, "parentReference" => lambda {|n| @parent_reference = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ItemReference.create_from_discriminator_value(pn) }) }, "webUrl" => lambda {|n| @web_url = n.get_string_value() }, }) end |
#last_modified_by ⇒ Object
Gets the lastModifiedBy property value. Identity of the user, device, and application which last modified the item. Read-only.
175 176 177 |
# File 'lib/models/base_item.rb', line 175 def last_modified_by return @last_modified_by end |
#last_modified_by=(value) ⇒ Object
Sets the lastModifiedBy property value. Identity of the user, device, and application which last modified the item. Read-only.
183 184 185 |
# File 'lib/models/base_item.rb', line 183 def last_modified_by=(value) @last_modified_by = value end |
#last_modified_by_user ⇒ Object
Gets the lastModifiedByUser property value. Identity of the user who last modified the item. Read-only.
190 191 192 |
# File 'lib/models/base_item.rb', line 190 def last_modified_by_user return @last_modified_by_user end |
#last_modified_by_user=(value) ⇒ Object
Sets the lastModifiedByUser property value. Identity of the user who last modified the item. Read-only.
198 199 200 |
# File 'lib/models/base_item.rb', line 198 def last_modified_by_user=(value) @last_modified_by_user = value end |
#last_modified_date_time ⇒ Object
Gets the lastModifiedDateTime property value. Date and time the item was last modified. Read-only.
205 206 207 |
# File 'lib/models/base_item.rb', line 205 def last_modified_date_time return @last_modified_date_time end |
#last_modified_date_time=(value) ⇒ Object
Sets the lastModifiedDateTime property value. Date and time the item was last modified. Read-only.
213 214 215 |
# File 'lib/models/base_item.rb', line 213 def last_modified_date_time=(value) @last_modified_date_time = value end |
#name ⇒ Object
Gets the name property value. The name of the item. Read-write.
220 221 222 |
# File 'lib/models/base_item.rb', line 220 def name return @name end |
#name=(value) ⇒ Object
Sets the name property value. The name of the item. Read-write.
228 229 230 |
# File 'lib/models/base_item.rb', line 228 def name=(value) @name = value end |
#parent_reference ⇒ Object
Gets the parentReference property value. Parent information, if the item has a parent. Read-write.
235 236 237 |
# File 'lib/models/base_item.rb', line 235 def parent_reference return @parent_reference end |
#parent_reference=(value) ⇒ Object
Sets the parentReference property value. Parent information, if the item has a parent. Read-write.
243 244 245 |
# File 'lib/models/base_item.rb', line 243 def parent_reference=(value) @parent_reference = value end |
#serialize(writer) ⇒ Object
Serializes information the current object
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 |
# File 'lib/models/base_item.rb', line 251 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? super writer.write_object_value("createdBy", @created_by) writer.write_object_value("createdByUser", @created_by_user) writer.write_date_time_value("createdDateTime", @created_date_time) writer.write_string_value("description", @description) writer.write_string_value("eTag", @e_tag) writer.write_object_value("lastModifiedBy", @last_modified_by) writer.write_object_value("lastModifiedByUser", @last_modified_by_user) writer.write_date_time_value("lastModifiedDateTime", @last_modified_date_time) writer.write_string_value("name", @name) writer.write_object_value("parentReference", @parent_reference) writer.write_string_value("webUrl", @web_url) end |
#web_url ⇒ Object
Gets the webUrl property value. URL that displays the resource in the browser. Read-only.
270 271 272 |
# File 'lib/models/base_item.rb', line 270 def web_url return @web_url end |
#web_url=(value) ⇒ Object
Sets the webUrl property value. URL that displays the resource in the browser. Read-only.
278 279 280 |
# File 'lib/models/base_item.rb', line 278 def web_url=(value) @web_url = value end |