Class: Appwrite::Models::DedicatedDatabaseSpecificationList
- Inherits:
-
Object
- Object
- Appwrite::Models::DedicatedDatabaseSpecificationList
- Defined in:
- lib/appwrite/models/dedicated_database_specification_list.rb
Instance Attribute Summary collapse
-
#specifications ⇒ Object
readonly
Returns the value of attribute specifications.
-
#total ⇒ Object
readonly
Returns the value of attribute total.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(specifications:, total:) ⇒ DedicatedDatabaseSpecificationList
constructor
A new instance of DedicatedDatabaseSpecificationList.
- #to_map ⇒ Object
Constructor Details
#initialize(specifications:, total:) ⇒ DedicatedDatabaseSpecificationList
Returns a new instance of DedicatedDatabaseSpecificationList.
9 10 11 12 13 14 15 |
# File 'lib/appwrite/models/dedicated_database_specification_list.rb', line 9 def initialize( specifications:, total: ) @specifications = specifications @total = total end |
Instance Attribute Details
#specifications ⇒ Object (readonly)
Returns the value of attribute specifications.
6 7 8 |
# File 'lib/appwrite/models/dedicated_database_specification_list.rb', line 6 def specifications @specifications end |
#total ⇒ Object (readonly)
Returns the value of attribute total.
7 8 9 |
# File 'lib/appwrite/models/dedicated_database_specification_list.rb', line 7 def total @total end |
Class Method Details
.from(map:) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/appwrite/models/dedicated_database_specification_list.rb', line 17 def self.from(map:) map = { "specifications" => [], "total" => 0 }.merge(map) DedicatedDatabaseSpecificationList.new( specifications: map["specifications"].map { |it| DedicatedDatabaseSpecification.from(map: it) }, total: map["total"] ) end |
Instance Method Details
#to_map ⇒ Object
25 26 27 28 29 30 |
# File 'lib/appwrite/models/dedicated_database_specification_list.rb', line 25 def to_map { "specifications": @specifications.map { |it| it.to_map }, "total": @total } end |