Class: MicrosoftGraph::Models::PrintDocument

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



22
23
24
# File 'lib/models/print_document.rb', line 22

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 print_document

Raises:

  • (StandardError)


45
46
47
48
# File 'lib/models/print_document.rb', line 45

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

Instance Method Details

#content_typeObject

Gets the contentType property value. The document’s content (MIME) type. Read-only.

Returns:

  • a string



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

def content_type
    return @content_type
end

#content_type=(value) ⇒ Object

Sets the contentType property value. The document’s content (MIME) type. Read-only.

Parameters:

  • value

    Value to set for the contentType property.

Returns:

  • a void



37
38
39
# File 'lib/models/print_document.rb', line 37

def content_type=(value)
    @content_type = value
end

#display_nameObject

Gets the displayName property value. The document’s name. Read-only.

Returns:

  • a string



53
54
55
# File 'lib/models/print_document.rb', line 53

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. The document’s name. Read-only.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



61
62
63
# File 'lib/models/print_document.rb', line 61

def display_name=(value)
    @display_name = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



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

def get_field_deserializers()
    return super.merge({
        "contentType" => lambda {|n| @content_type = n.get_string_value() },
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "size" => lambda {|n| @size = n.get_object_value(lambda {|pn| Int64.create_from_discriminator_value(pn) }) },
    })
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


80
81
82
83
84
85
86
# File 'lib/models/print_document.rb', line 80

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_string_value("contentType", @content_type)
    writer.write_string_value("displayName", @display_name)
    writer.write_object_value("size", @size)
end

#sizeObject

Gets the size property value. The document’s size in bytes. Read-only.

Returns:

  • a int64



91
92
93
# File 'lib/models/print_document.rb', line 91

def size
    return @size
end

#size=(value) ⇒ Object

Sets the size property value. The document’s size in bytes. Read-only.

Parameters:

  • value

    Value to set for the size property.

Returns:

  • a void



99
100
101
# File 'lib/models/print_document.rb', line 99

def size=(value)
    @size = value
end