Class: MicrosoftGraph::Models::ServiceAnnouncementAttachment

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



29
30
31
# File 'lib/models/service_announcement_attachment.rb', line 29

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 service_announcement_attachment

Raises:

  • (StandardError)


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

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

Instance Method Details

#contentObject

Gets the content property value. The attachment content.

Returns:

  • a base64url



36
37
38
# File 'lib/models/service_announcement_attachment.rb', line 36

def content
    return @content
end

#content=(value) ⇒ Object

Sets the content property value. The attachment content.

Parameters:

  • value

    Value to set for the content property.

Returns:

  • a void



44
45
46
# File 'lib/models/service_announcement_attachment.rb', line 44

def content=(value)
    @content = value
end

#content_typeObject

Gets the contentType property value. The contentType property

Returns:

  • a string



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

def content_type
    return @content_type
end

#content_type=(value) ⇒ Object

Sets the contentType property value. The contentType property

Parameters:

  • value

    Value to set for the contentType property.

Returns:

  • a void



59
60
61
# File 'lib/models/service_announcement_attachment.rb', line 59

def content_type=(value)
    @content_type = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



75
76
77
78
79
80
81
82
83
# File 'lib/models/service_announcement_attachment.rb', line 75

def get_field_deserializers()
    return super.merge({
        "content" => lambda {|n| @content = n.get_object_value(lambda {|pn| Base64url.create_from_discriminator_value(pn) }) },
        "contentType" => lambda {|n| @content_type = n.get_string_value() },
        "lastModifiedDateTime" => lambda {|n| @last_modified_date_time = n.get_date_time_value() },
        "name" => lambda {|n| @name = n.get_string_value() },
        "size" => lambda {|n| @size = n.get_number_value() },
    })
end

#last_modified_date_timeObject

Gets the lastModifiedDateTime property value. The lastModifiedDateTime property

Returns:

  • a date_time



88
89
90
# File 'lib/models/service_announcement_attachment.rb', line 88

def last_modified_date_time
    return @last_modified_date_time
end

#last_modified_date_time=(value) ⇒ Object

Sets the lastModifiedDateTime property value. The lastModifiedDateTime property

Parameters:

  • value

    Value to set for the lastModifiedDateTime property.

Returns:

  • a void



96
97
98
# File 'lib/models/service_announcement_attachment.rb', line 96

def last_modified_date_time=(value)
    @last_modified_date_time = value
end

#nameObject

Gets the name property value. The name property

Returns:

  • a string



103
104
105
# File 'lib/models/service_announcement_attachment.rb', line 103

def name
    return @name
end

#name=(value) ⇒ Object

Sets the name property value. The name property

Parameters:

  • value

    Value to set for the name property.

Returns:

  • a void



111
112
113
# File 'lib/models/service_announcement_attachment.rb', line 111

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


119
120
121
122
123
124
125
126
127
# File 'lib/models/service_announcement_attachment.rb', line 119

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_object_value("content", @content)
    writer.write_string_value("contentType", @content_type)
    writer.write_date_time_value("lastModifiedDateTime", @last_modified_date_time)
    writer.write_string_value("name", @name)
    writer.write_number_value("size", @size)
end

#sizeObject

Gets the size property value. The size property

Returns:

  • a integer



132
133
134
# File 'lib/models/service_announcement_attachment.rb', line 132

def size
    return @size
end

#size=(value) ⇒ Object

Sets the size property value. The size property

Parameters:

  • value

    Value to set for the size property.

Returns:

  • a void



140
141
142
# File 'lib/models/service_announcement_attachment.rb', line 140

def size=(value)
    @size = value
end