Class: Rixl::Models::PaginationPagination

Inherits:
Object
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/pagination_pagination.rb

Overview

Pagination data for the request.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new PaginationPagination and sets the default values.



42
43
44
# File 'lib/models/pagination_pagination.rb', line 42

def initialize()
    @additional_data = Hash.new
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 pagination_pagination

Raises:

  • (StandardError)


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

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

Instance Method Details

#additional_dataObject

Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Returns:

  • a i_dictionary



27
28
29
# File 'lib/models/pagination_pagination.rb', line 27

def additional_data
    return @additional_data
end

#additional_data=(value) ⇒ Object

Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Parameters:

  • value

    Value to set for the AdditionalData property.

Returns:

  • a void



35
36
37
# File 'lib/models/pagination_pagination.rb', line 35

def additional_data=(value)
    @additional_data = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



58
59
60
61
62
63
64
# File 'lib/models/pagination_pagination.rb', line 58

def get_field_deserializers()
    return {
        "limit" => lambda {|n| @limit = n.get_number_value() },
        "offset" => lambda {|n| @offset = n.get_number_value() },
        "total" => lambda {|n| @total = n.get_number_value() },
    }
end

#limitObject

Gets the limit property value. Maximum number of items to return in a single request.

Returns:

  • a integer



69
70
71
# File 'lib/models/pagination_pagination.rb', line 69

def limit
    return @limit
end

#limit=(value) ⇒ Object

Sets the limit property value. Maximum number of items to return in a single request.

Parameters:

  • value

    Value to set for the limit property.

Returns:

  • a void



77
78
79
# File 'lib/models/pagination_pagination.rb', line 77

def limit=(value)
    @limit = value
end

#offsetObject

Gets the offset property value. Starting point of the result set.

Returns:

  • a integer



84
85
86
# File 'lib/models/pagination_pagination.rb', line 84

def offset
    return @offset
end

#offset=(value) ⇒ Object

Sets the offset property value. Starting point of the result set.

Parameters:

  • value

    Value to set for the offset property.

Returns:

  • a void



92
93
94
# File 'lib/models/pagination_pagination.rb', line 92

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


100
101
102
103
104
105
106
# File 'lib/models/pagination_pagination.rb', line 100

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_number_value("limit", @limit)
    writer.write_number_value("offset", @offset)
    writer.write_number_value("total", @total)
    writer.write_additional_data(@additional_data)
end

#totalObject

Gets the total property value. The total number of available items in the full list.

Returns:

  • a integer



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

def total
    return @total
end

#total=(value) ⇒ Object

Sets the total property value. The total number of available items in the full list.

Parameters:

  • value

    Value to set for the total property.

Returns:

  • a void



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

def total=(value)
    @total = value
end