Class: MicrosoftGraph::Models::AttachmentSession

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



23
24
25
# File 'lib/models/attachment_session.rb', line 23

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 attachment_session

Raises:

  • (StandardError)


46
47
48
49
# File 'lib/models/attachment_session.rb', line 46

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

Instance Method Details

#contentObject

Gets the content property value. The content streams that are uploaded.

Returns:

  • a base64url



30
31
32
# File 'lib/models/attachment_session.rb', line 30

def content
    return @content
end

#content=(value) ⇒ Object

Sets the content property value. The content streams that are uploaded.

Parameters:

  • value

    Value to set for the content property.

Returns:

  • a void



38
39
40
# File 'lib/models/attachment_session.rb', line 38

def content=(value)
    @content = value
end

#expiration_date_timeObject

Gets the expirationDateTime property value. The date and time in UTC when the upload session will expire. The complete file must be uploaded before this expiration time is reached.

Returns:

  • a date_time



54
55
56
# File 'lib/models/attachment_session.rb', line 54

def expiration_date_time
    return @expiration_date_time
end

#expiration_date_time=(value) ⇒ Object

Sets the expirationDateTime property value. The date and time in UTC when the upload session will expire. The complete file must be uploaded before this expiration time is reached.

Parameters:

  • value

    Value to set for the expirationDateTime property.

Returns:

  • a void



62
63
64
# File 'lib/models/attachment_session.rb', line 62

def expiration_date_time=(value)
    @expiration_date_time = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



69
70
71
72
73
74
75
# File 'lib/models/attachment_session.rb', line 69

def get_field_deserializers()
    return super.merge({
        "content" => lambda {|n| @content = n.get_object_value(lambda {|pn| Base64url.create_from_discriminator_value(pn) }) },
        "expirationDateTime" => lambda {|n| @expiration_date_time = n.get_date_time_value() },
        "nextExpectedRanges" => lambda {|n| @next_expected_ranges = n.get_collection_of_primitive_values(String) },
    })
end

#next_expected_rangesObject

Gets the nextExpectedRanges property value. Indicates a single value start that represents the location in the file where the next upload should begin.

Returns:

  • a string



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

def next_expected_ranges
    return @next_expected_ranges
end

#next_expected_ranges=(value) ⇒ Object

Sets the nextExpectedRanges property value. Indicates a single value start that represents the location in the file where the next upload should begin.

Parameters:

  • value

    Value to set for the nextExpectedRanges property.

Returns:

  • a void



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

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


96
97
98
99
100
101
102
# File 'lib/models/attachment_session.rb', line 96

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_object_value("content", @content)
    writer.write_date_time_value("expirationDateTime", @expiration_date_time)
    writer.write_collection_of_primitive_values("nextExpectedRanges", @next_expected_ranges)
end