Class: MicrosoftGraph::Models::Quota

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new quota and sets the default values.



52
53
54
# File 'lib/models/quota.rb', line 52

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 quota

Raises:

  • (StandardError)


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

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return Quota.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



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

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



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

def additional_data=(value)
    @additional_data = value
end

#deletedObject

Gets the deleted property value. Total space consumed by files in the recycle bin, in bytes. Read-only.

Returns:

  • a int64



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

def deleted
    return @deleted
end

#deleted=(value) ⇒ Object

Sets the deleted property value. Total space consumed by files in the recycle bin, in bytes. Read-only.

Parameters:

  • value

    Value to set for the deleted property.

Returns:

  • a void



76
77
78
# File 'lib/models/quota.rb', line 76

def deleted=(value)
    @deleted = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



83
84
85
86
87
88
89
90
91
92
93
# File 'lib/models/quota.rb', line 83

def get_field_deserializers()
    return {
        "deleted" => lambda {|n| @deleted = n.get_object_value(lambda {|pn| Int64.create_from_discriminator_value(pn) }) },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "remaining" => lambda {|n| @remaining = n.get_object_value(lambda {|pn| Int64.create_from_discriminator_value(pn) }) },
        "state" => lambda {|n| @state = n.get_string_value() },
        "storagePlanInformation" => lambda {|n| @storage_plan_information = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::StoragePlanInformation.create_from_discriminator_value(pn) }) },
        "total" => lambda {|n| @total = n.get_object_value(lambda {|pn| Int64.create_from_discriminator_value(pn) }) },
        "used" => lambda {|n| @used = n.get_object_value(lambda {|pn| Int64.create_from_discriminator_value(pn) }) },
    }
end

#odata_typeObject

Gets the @odata.type property value. The OdataType property

Returns:

  • a string



98
99
100
# File 'lib/models/quota.rb', line 98

def odata_type
    return @odata_type
end

#odata_type=(value) ⇒ Object

Sets the @odata.type property value. The OdataType property

Parameters:

  • value

    Value to set for the @odata.type property.

Returns:

  • a void



106
107
108
# File 'lib/models/quota.rb', line 106

def odata_type=(value)
    @odata_type = value
end

#remainingObject

Gets the remaining property value. Total space remaining before reaching the quota limit, in bytes. Read-only.

Returns:

  • a int64



113
114
115
# File 'lib/models/quota.rb', line 113

def remaining
    return @remaining
end

#remaining=(value) ⇒ Object

Sets the remaining property value. Total space remaining before reaching the quota limit, in bytes. Read-only.

Parameters:

  • value

    Value to set for the remaining property.

Returns:

  • a void



121
122
123
# File 'lib/models/quota.rb', line 121

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


129
130
131
132
133
134
135
136
137
138
139
# File 'lib/models/quota.rb', line 129

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_object_value("deleted", @deleted)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_object_value("remaining", @remaining)
    writer.write_string_value("state", @state)
    writer.write_object_value("storagePlanInformation", @storage_plan_information)
    writer.write_object_value("total", @total)
    writer.write_object_value("used", @used)
    writer.write_additional_data(@additional_data)
end

#stateObject

Gets the state property value. Enumeration value that indicates the state of the storage space. Read-only.

Returns:

  • a string



144
145
146
# File 'lib/models/quota.rb', line 144

def state
    return @state
end

#state=(value) ⇒ Object

Sets the state property value. Enumeration value that indicates the state of the storage space. Read-only.

Parameters:

  • value

    Value to set for the state property.

Returns:

  • a void



152
153
154
# File 'lib/models/quota.rb', line 152

def state=(value)
    @state = value
end

#storage_plan_informationObject

Gets the storagePlanInformation property value. Information about the drive’s storage quota plans. Only in Personal OneDrive.

Returns:

  • a storage_plan_information



159
160
161
# File 'lib/models/quota.rb', line 159

def storage_plan_information
    return @storage_plan_information
end

#storage_plan_information=(value) ⇒ Object

Sets the storagePlanInformation property value. Information about the drive’s storage quota plans. Only in Personal OneDrive.

Parameters:

  • value

    Value to set for the storagePlanInformation property.

Returns:

  • a void



167
168
169
# File 'lib/models/quota.rb', line 167

def storage_plan_information=(value)
    @storage_plan_information = value
end

#totalObject

Gets the total property value. Total allowed storage space, in bytes. Read-only.

Returns:

  • a int64



174
175
176
# File 'lib/models/quota.rb', line 174

def total
    return @total
end

#total=(value) ⇒ Object

Sets the total property value. Total allowed storage space, in bytes. Read-only.

Parameters:

  • value

    Value to set for the total property.

Returns:

  • a void



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

def total=(value)
    @total = value
end

#usedObject

Gets the used property value. Total space used, in bytes. Read-only.

Returns:

  • a int64



189
190
191
# File 'lib/models/quota.rb', line 189

def used
    return @used
end

#used=(value) ⇒ Object

Sets the used property value. Total space used, in bytes. Read-only.

Parameters:

  • value

    Value to set for the used property.

Returns:

  • a void



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

def used=(value)
    @used = value
end