Class: MicrosoftGraph::Models::SecurityArticle

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/security_article.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 securityArticle and sets the default values.



56
57
58
# File 'lib/models/security_article.rb', line 56

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 security_article

Raises:

  • (StandardError)


79
80
81
82
# File 'lib/models/security_article.rb', line 79

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

Instance Method Details

#bodyObject

Gets the body property value. The body property

Returns:

  • a security_formatted_content



41
42
43
# File 'lib/models/security_article.rb', line 41

def body
    return @body
end

#body=(value) ⇒ Object

Sets the body property value. The body property

Parameters:

  • value

    Value to set for the body property.

Returns:

  • a void



49
50
51
# File 'lib/models/security_article.rb', line 49

def body=(value)
    @body = value
end

#created_date_timeObject

Gets the createdDateTime property value. The date and time when this article 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.

Returns:

  • a date_time



63
64
65
# File 'lib/models/security_article.rb', line 63

def created_date_time
    return @created_date_time
end

#created_date_time=(value) ⇒ Object

Sets the createdDateTime property value. The date and time when this article 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.

Parameters:

  • value

    Value to set for the createdDateTime property.

Returns:

  • a void



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

def created_date_time=(value)
    @created_date_time = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'lib/models/security_article.rb', line 87

def get_field_deserializers()
    return super.merge({
        "body" => lambda {|n| @body = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SecurityFormattedContent.create_from_discriminator_value(pn) }) },
        "createdDateTime" => lambda {|n| @created_date_time = n.get_date_time_value() },
        "imageUrl" => lambda {|n| @image_url = n.get_string_value() },
        "indicators" => lambda {|n| @indicators = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::SecurityArticleIndicator.create_from_discriminator_value(pn) }) },
        "isFeatured" => lambda {|n| @is_featured = n.get_boolean_value() },
        "lastUpdatedDateTime" => lambda {|n| @last_updated_date_time = n.get_date_time_value() },
        "summary" => lambda {|n| @summary = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SecurityFormattedContent.create_from_discriminator_value(pn) }) },
        "tags" => lambda {|n| @tags = n.get_collection_of_primitive_values(String) },
        "title" => lambda {|n| @title = n.get_string_value() },
    })
end

#image_urlObject

Gets the imageUrl property value. URL of the header image for this article, used for display purposes.

Returns:

  • a string



104
105
106
# File 'lib/models/security_article.rb', line 104

def image_url
    return @image_url
end

#image_url=(value) ⇒ Object

Sets the imageUrl property value. URL of the header image for this article, used for display purposes.

Parameters:

  • value

    Value to set for the imageUrl property.

Returns:

  • a void



112
113
114
# File 'lib/models/security_article.rb', line 112

def image_url=(value)
    @image_url = value
end

#indicatorsObject

Gets the indicators property value. Indicators related to this article.

Returns:

  • a security_article_indicator



119
120
121
# File 'lib/models/security_article.rb', line 119

def indicators
    return @indicators
end

#indicators=(value) ⇒ Object

Sets the indicators property value. Indicators related to this article.

Parameters:

  • value

    Value to set for the indicators property.

Returns:

  • a void



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

def indicators=(value)
    @indicators = value
end

Gets the isFeatured property value. Indicates whether this article is currently featured by Microsoft.

Returns:

  • a boolean



134
135
136
# File 'lib/models/security_article.rb', line 134

def is_featured
    return @is_featured
end

#is_featured=(value) ⇒ Object

Sets the isFeatured property value. Indicates whether this article is currently featured by Microsoft.

Parameters:

  • value

    Value to set for the isFeatured property.

Returns:

  • a void



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

def is_featured=(value)
    @is_featured = value
end

#last_updated_date_timeObject

Gets the lastUpdatedDateTime property value. The most recent date and time when this article was updated. 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.

Returns:

  • a date_time



149
150
151
# File 'lib/models/security_article.rb', line 149

def last_updated_date_time
    return @last_updated_date_time
end

#last_updated_date_time=(value) ⇒ Object

Sets the lastUpdatedDateTime property value. The most recent date and time when this article was updated. 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.

Parameters:

  • value

    Value to set for the lastUpdatedDateTime property.

Returns:

  • a void



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

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


165
166
167
168
169
170
171
172
173
174
175
176
177
# File 'lib/models/security_article.rb', line 165

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_object_value("body", @body)
    writer.write_date_time_value("createdDateTime", @created_date_time)
    writer.write_string_value("imageUrl", @image_url)
    writer.write_collection_of_object_values("indicators", @indicators)
    writer.write_boolean_value("isFeatured", @is_featured)
    writer.write_date_time_value("lastUpdatedDateTime", @last_updated_date_time)
    writer.write_object_value("summary", @summary)
    writer.write_collection_of_primitive_values("tags", @tags)
    writer.write_string_value("title", @title)
end

#summaryObject

Gets the summary property value. The summary property

Returns:

  • a security_formatted_content



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

def summary
    return @summary
end

#summary=(value) ⇒ Object

Sets the summary property value. The summary property

Parameters:

  • value

    Value to set for the summary property.

Returns:

  • a void



190
191
192
# File 'lib/models/security_article.rb', line 190

def summary=(value)
    @summary = value
end

#tagsObject

Gets the tags property value. Tags for this article, communicating keywords, or key concepts.

Returns:

  • a string



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

def tags
    return @tags
end

#tags=(value) ⇒ Object

Sets the tags property value. Tags for this article, communicating keywords, or key concepts.

Parameters:

  • value

    Value to set for the tags property.

Returns:

  • a void



205
206
207
# File 'lib/models/security_article.rb', line 205

def tags=(value)
    @tags = value
end

#titleObject

Gets the title property value. The title of this article.

Returns:

  • a string



212
213
214
# File 'lib/models/security_article.rb', line 212

def title
    return @title
end

#title=(value) ⇒ Object

Sets the title property value. The title of this article.

Parameters:

  • value

    Value to set for the title property.

Returns:

  • a void



220
221
222
# File 'lib/models/security_article.rb', line 220

def title=(value)
    @title = value
end