Class: Appwrite::Models::Variable
- Inherits:
-
Object
- Object
- Appwrite::Models::Variable
- Defined in:
- lib/appwrite/models/variable.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#resource_id ⇒ Object
readonly
Returns the value of attribute resource_id.
-
#resource_type ⇒ Object
readonly
Returns the value of attribute resource_type.
-
#secret ⇒ Object
readonly
Returns the value of attribute secret.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:, created_at:, updated_at:, key:, value:, secret:, resource_type:, resource_id:) ⇒ Variable
constructor
A new instance of Variable.
- #to_map ⇒ Object
Constructor Details
#initialize(id:, created_at:, updated_at:, key:, value:, secret:, resource_type:, resource_id:) ⇒ Variable
Returns a new instance of Variable.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/appwrite/models/variable.rb', line 15 def initialize( id:, created_at:, updated_at:, key:, value:, secret:, resource_type:, resource_id: ) @id = id @created_at = created_at @updated_at = updated_at @key = key @value = value @secret = secret @resource_type = resource_type @resource_id = resource_id end |
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
7 8 9 |
# File 'lib/appwrite/models/variable.rb', line 7 def created_at @created_at end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/appwrite/models/variable.rb', line 6 def id @id end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
9 10 11 |
# File 'lib/appwrite/models/variable.rb', line 9 def key @key end |
#resource_id ⇒ Object (readonly)
Returns the value of attribute resource_id.
13 14 15 |
# File 'lib/appwrite/models/variable.rb', line 13 def resource_id @resource_id end |
#resource_type ⇒ Object (readonly)
Returns the value of attribute resource_type.
12 13 14 |
# File 'lib/appwrite/models/variable.rb', line 12 def resource_type @resource_type end |
#secret ⇒ Object (readonly)
Returns the value of attribute secret.
11 12 13 |
# File 'lib/appwrite/models/variable.rb', line 11 def secret @secret end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
8 9 10 |
# File 'lib/appwrite/models/variable.rb', line 8 def updated_at @updated_at end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
10 11 12 |
# File 'lib/appwrite/models/variable.rb', line 10 def value @value end |
Class Method Details
.from(map:) ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/appwrite/models/variable.rb', line 35 def self.from(map:) Variable.new( id: map["$id"], created_at: map["$createdAt"], updated_at: map["$updatedAt"], key: map["key"], value: map["value"], secret: map["secret"], resource_type: map["resourceType"], resource_id: map["resourceId"] ) end |
Instance Method Details
#to_map ⇒ Object
48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/appwrite/models/variable.rb', line 48 def to_map { "$id": @id, "$createdAt": @created_at, "$updatedAt": @updated_at, "key": @key, "value": @value, "secret": @secret, "resourceType": @resource_type, "resourceId": @resource_id } end |