Class: MicrosoftGraph::Models::LearningContent

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/learning_content.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Entity

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

Constructor Details

#initializeObject

Instantiates a new learningContent and sets the default values.



83
84
85
# File 'lib/models/learning_content.rb', line 83

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

Parameters:

  • parse_node

    The parse node to use to read the discriminator value and create the object

Returns:

  • a learning_content

Raises:

  • (StandardError)


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

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

Instance Method Details

#additional_tagsObject

Gets the additionalTags property value. Keywords, topics, and other tags associated with the learning content. Optional.

Returns:

  • a string



68
69
70
# File 'lib/models/learning_content.rb', line 68

def additional_tags
    return @additional_tags
end

#additional_tags=(value) ⇒ Object

Sets the additionalTags property value. Keywords, topics, and other tags associated with the learning content. Optional.

Parameters:

  • value

    Value to set for the additionalTags property.

Returns:

  • a void



76
77
78
# File 'lib/models/learning_content.rb', line 76

def additional_tags=(value)
    @additional_tags = value
end

#content_web_urlObject

Gets the contentWebUrl property value. The content web URL for the learning content. Required.

Returns:

  • a string



90
91
92
# File 'lib/models/learning_content.rb', line 90

def content_web_url
    return @content_web_url
end

#content_web_url=(value) ⇒ Object

Sets the contentWebUrl property value. The content web URL for the learning content. Required.

Parameters:

  • value

    Value to set for the contentWebUrl property.

Returns:

  • a void



98
99
100
# File 'lib/models/learning_content.rb', line 98

def content_web_url=(value)
    @content_web_url = value
end

#contributorsObject

Gets the contributors property value. The authors, creators, or contributors of the learning content. Optional.

Returns:

  • a string



105
106
107
# File 'lib/models/learning_content.rb', line 105

def contributors
    return @contributors
end

#contributors=(value) ⇒ Object

Sets the contributors property value. The authors, creators, or contributors of the learning content. Optional.

Parameters:

  • value

    Value to set for the contributors property.

Returns:

  • a void



113
114
115
# File 'lib/models/learning_content.rb', line 113

def contributors=(value)
    @contributors = value
end

#created_date_timeObject

Gets the createdDateTime property value. The date and time when the learning content was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Optional.

Returns:

  • a date_time



120
121
122
# File 'lib/models/learning_content.rb', line 120

def created_date_time
    return @created_date_time
end

#created_date_time=(value) ⇒ Object

Sets the createdDateTime property value. The date and time when the learning content was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Optional.

Parameters:

  • value

    Value to set for the createdDateTime property.

Returns:

  • a void



128
129
130
# File 'lib/models/learning_content.rb', line 128

def created_date_time=(value)
    @created_date_time = value
end

#descriptionObject

Gets the description property value. The description or summary for the learning content. Optional.

Returns:

  • a string



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

def description
    return @description
end

#description=(value) ⇒ Object

Sets the description property value. The description or summary for the learning content. Optional.

Parameters:

  • value

    Value to set for the description property.

Returns:

  • a void



152
153
154
# File 'lib/models/learning_content.rb', line 152

def description=(value)
    @description = value
end

#durationObject

Gets the duration property value. The duration of the learning content in seconds. The value is represented in ISO 8601 format for durations. Optional.

Returns:

  • a microsoft_kiota_abstractions::_i_s_o_duration



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

def duration
    return @duration
end

#duration=(value) ⇒ Object

Sets the duration property value. The duration of the learning content in seconds. The value is represented in ISO 8601 format for durations. Optional.

Parameters:

  • value

    Value to set for the duration property.

Returns:

  • a void



167
168
169
# File 'lib/models/learning_content.rb', line 167

def duration=(value)
    @duration = value
end

#external_idObject

Gets the externalId property value. Unique external content ID for the learning content. Required.

Returns:

  • a string



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

def external_id
    return @external_id
end

#external_id=(value) ⇒ Object

Sets the externalId property value. Unique external content ID for the learning content. Required.

Parameters:

  • value

    Value to set for the externalId property.

Returns:

  • a void



182
183
184
# File 'lib/models/learning_content.rb', line 182

def external_id=(value)
    @external_id = value
end

#formatObject

Gets the format property value. The format of the learning content. For example, Course, Video, Book, Book Summary, Audiobook Summary. Optional.

Returns:

  • a string



189
190
191
# File 'lib/models/learning_content.rb', line 189

def format
    return @format
end

#format=(value) ⇒ Object

Sets the format property value. The format of the learning content. For example, Course, Video, Book, Book Summary, Audiobook Summary. Optional.

Parameters:

  • value

    Value to set for the format property.

Returns:

  • a void



197
198
199
# File 'lib/models/learning_content.rb', line 197

def format=(value)
    @format = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
# File 'lib/models/learning_content.rb', line 204

def get_field_deserializers()
    return super.merge({
        "additionalTags" => lambda {|n| @additional_tags = n.get_collection_of_primitive_values(String) },
        "contentWebUrl" => lambda {|n| @content_web_url = n.get_string_value() },
        "contributors" => lambda {|n| @contributors = n.get_collection_of_primitive_values(String) },
        "createdDateTime" => lambda {|n| @created_date_time = n.get_date_time_value() },
        "description" => lambda {|n| @description = n.get_string_value() },
        "duration" => lambda {|n| @duration = n.get_duration_value() },
        "externalId" => lambda {|n| @external_id = n.get_string_value() },
        "format" => lambda {|n| @format = n.get_string_value() },
        "isActive" => lambda {|n| @is_active = n.get_boolean_value() },
        "isPremium" => lambda {|n| @is_premium = n.get_boolean_value() },
        "isSearchable" => lambda {|n| @is_searchable = n.get_boolean_value() },
        "languageTag" => lambda {|n| @language_tag = n.get_string_value() },
        "lastModifiedDateTime" => lambda {|n| @last_modified_date_time = n.get_date_time_value() },
        "numberOfPages" => lambda {|n| @number_of_pages = n.get_number_value() },
        "skillTags" => lambda {|n| @skill_tags = n.get_collection_of_primitive_values(String) },
        "sourceName" => lambda {|n| @source_name = n.get_string_value() },
        "thumbnailWebUrl" => lambda {|n| @thumbnail_web_url = n.get_string_value() },
        "title" => lambda {|n| @title = n.get_string_value() },
    })
end

#is_activeObject

Gets the isActive property value. Indicates whether the content is active or not. Inactive content doesn’t show up in the UI. The default value is true. Optional.

Returns:

  • a boolean



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

def is_active
    return @is_active
end

#is_active=(value) ⇒ Object

Sets the isActive property value. Indicates whether the content is active or not. Inactive content doesn’t show up in the UI. The default value is true. Optional.

Parameters:

  • value

    Value to set for the isActive property.

Returns:

  • a void



238
239
240
# File 'lib/models/learning_content.rb', line 238

def is_active=(value)
    @is_active = value
end

#is_premiumObject

Gets the isPremium property value. Indicates whether the learning content requires the user to sign-in on the learning provider platform or not. The default value is false. Optional.

Returns:

  • a boolean



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

def is_premium
    return @is_premium
end

#is_premium=(value) ⇒ Object

Sets the isPremium property value. Indicates whether the learning content requires the user to sign-in on the learning provider platform or not. The default value is false. Optional.

Parameters:

  • value

    Value to set for the isPremium property.

Returns:

  • a void



253
254
255
# File 'lib/models/learning_content.rb', line 253

def is_premium=(value)
    @is_premium = value
end

#is_searchableObject

Gets the isSearchable property value. Indicates whether the learning content is searchable or not. The default value is true. Optional.

Returns:

  • a boolean



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

def is_searchable
    return @is_searchable
end

#is_searchable=(value) ⇒ Object

Sets the isSearchable property value. Indicates whether the learning content is searchable or not. The default value is true. Optional.

Parameters:

  • value

    Value to set for the isSearchable property.

Returns:

  • a void



268
269
270
# File 'lib/models/learning_content.rb', line 268

def is_searchable=(value)
    @is_searchable = value
end

#language_tagObject

Gets the languageTag property value. The language of the learning content, for example, en-us or fr-fr. Required.

Returns:

  • a string



275
276
277
# File 'lib/models/learning_content.rb', line 275

def language_tag
    return @language_tag
end

#language_tag=(value) ⇒ Object

Sets the languageTag property value. The language of the learning content, for example, en-us or fr-fr. Required.

Parameters:

  • value

    Value to set for the languageTag property.

Returns:

  • a void



283
284
285
# File 'lib/models/learning_content.rb', line 283

def language_tag=(value)
    @language_tag = value
end

#last_modified_date_timeObject

Gets the lastModifiedDateTime property value. The date and time when the learning content was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Optional.

Returns:

  • a date_time



290
291
292
# File 'lib/models/learning_content.rb', line 290

def last_modified_date_time
    return @last_modified_date_time
end

#last_modified_date_time=(value) ⇒ Object

Sets the lastModifiedDateTime property value. The date and time when the learning content was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Optional.

Parameters:

  • value

    Value to set for the lastModifiedDateTime property.

Returns:

  • a void



298
299
300
# File 'lib/models/learning_content.rb', line 298

def last_modified_date_time=(value)
    @last_modified_date_time = value
end

#number_of_pagesObject

Gets the numberOfPages property value. The number of pages of the learning content, for example, 9. Optional.

Returns:

  • a integer



305
306
307
# File 'lib/models/learning_content.rb', line 305

def number_of_pages
    return @number_of_pages
end

#number_of_pages=(value) ⇒ Object

Sets the numberOfPages property value. The number of pages of the learning content, for example, 9. Optional.

Parameters:

  • value

    Value to set for the numberOfPages property.

Returns:

  • a void



313
314
315
# File 'lib/models/learning_content.rb', line 313

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


321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
# File 'lib/models/learning_content.rb', line 321

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_collection_of_primitive_values("additionalTags", @additional_tags)
    writer.write_string_value("contentWebUrl", @content_web_url)
    writer.write_collection_of_primitive_values("contributors", @contributors)
    writer.write_date_time_value("createdDateTime", @created_date_time)
    writer.write_string_value("description", @description)
    writer.write_duration_value("duration", @duration)
    writer.write_string_value("externalId", @external_id)
    writer.write_string_value("format", @format)
    writer.write_boolean_value("isActive", @is_active)
    writer.write_boolean_value("isPremium", @is_premium)
    writer.write_boolean_value("isSearchable", @is_searchable)
    writer.write_string_value("languageTag", @language_tag)
    writer.write_date_time_value("lastModifiedDateTime", @last_modified_date_time)
    writer.write_number_value("numberOfPages", @number_of_pages)
    writer.write_collection_of_primitive_values("skillTags", @skill_tags)
    writer.write_string_value("sourceName", @source_name)
    writer.write_string_value("thumbnailWebUrl", @thumbnail_web_url)
    writer.write_string_value("title", @title)
end

#skill_tagsObject

Gets the skillTags property value. The skills tags associated with the learning content. Optional.

Returns:

  • a string



347
348
349
# File 'lib/models/learning_content.rb', line 347

def skill_tags
    return @skill_tags
end

#skill_tags=(value) ⇒ Object

Sets the skillTags property value. The skills tags associated with the learning content. Optional.

Parameters:

  • value

    Value to set for the skillTags property.

Returns:

  • a void



355
356
357
# File 'lib/models/learning_content.rb', line 355

def skill_tags=(value)
    @skill_tags = value
end

#source_nameObject

Gets the sourceName property value. The source name of the learning content, such as LinkedIn Learning or Coursera. Optional.

Returns:

  • a string



362
363
364
# File 'lib/models/learning_content.rb', line 362

def source_name
    return @source_name
end

#source_name=(value) ⇒ Object

Sets the sourceName property value. The source name of the learning content, such as LinkedIn Learning or Coursera. Optional.

Parameters:

  • value

    Value to set for the sourceName property.

Returns:

  • a void



370
371
372
# File 'lib/models/learning_content.rb', line 370

def source_name=(value)
    @source_name = value
end

#thumbnail_web_urlObject

Gets the thumbnailWebUrl property value. The URL of learning content thumbnail image. Optional.

Returns:

  • a string



377
378
379
# File 'lib/models/learning_content.rb', line 377

def thumbnail_web_url
    return @thumbnail_web_url
end

#thumbnail_web_url=(value) ⇒ Object

Sets the thumbnailWebUrl property value. The URL of learning content thumbnail image. Optional.

Parameters:

  • value

    Value to set for the thumbnailWebUrl property.

Returns:

  • a void



385
386
387
# File 'lib/models/learning_content.rb', line 385

def thumbnail_web_url=(value)
    @thumbnail_web_url = value
end

#titleObject

Gets the title property value. The title of the learning content. Required.

Returns:

  • a string



392
393
394
# File 'lib/models/learning_content.rb', line 392

def title
    return @title
end

#title=(value) ⇒ Object

Sets the title property value. The title of the learning content. Required.

Parameters:

  • value

    Value to set for the title property.

Returns:

  • a void



400
401
402
# File 'lib/models/learning_content.rb', line 400

def title=(value)
    @title = value
end