Class: Appwrite::Models::Migration
- Inherits:
-
Object
- Object
- Appwrite::Models::Migration
- Defined in:
- lib/appwrite/models/migration.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#destination ⇒ Object
readonly
Returns the value of attribute destination.
-
#destination_resource_id ⇒ Object
readonly
Returns the value of attribute destination_resource_id.
-
#destination_resource_internal_id ⇒ Object
readonly
Returns the value of attribute destination_resource_internal_id.
-
#destination_resource_type ⇒ Object
readonly
Returns the value of attribute destination_resource_type.
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#parent_resource_id ⇒ Object
readonly
Returns the value of attribute parent_resource_id.
-
#parent_resource_internal_id ⇒ Object
readonly
Returns the value of attribute parent_resource_internal_id.
-
#parent_resource_type ⇒ Object
readonly
Returns the value of attribute parent_resource_type.
-
#resource_data ⇒ Object
readonly
Returns the value of attribute resource_data.
-
#resource_id ⇒ Object
readonly
Returns the value of attribute resource_id.
-
#resource_internal_id ⇒ Object
readonly
Returns the value of attribute resource_internal_id.
-
#resource_type ⇒ Object
readonly
Returns the value of attribute resource_type.
-
#resources ⇒ Object
readonly
Returns the value of attribute resources.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#stage ⇒ Object
readonly
Returns the value of attribute stage.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#status_counters ⇒ Object
readonly
Returns the value of attribute status_counters.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:, created_at:, updated_at:, status:, stage:, source:, destination:, resources:, resource_id:, resource_internal_id:, resource_type:, parent_resource_id:, parent_resource_internal_id:, parent_resource_type:, destination_resource_id:, destination_resource_internal_id:, destination_resource_type:, status_counters:, resource_data:, errors:, options:) ⇒ Migration
constructor
A new instance of Migration.
- #to_map ⇒ Object
Constructor Details
#initialize(id:, created_at:, updated_at:, status:, stage:, source:, destination:, resources:, resource_id:, resource_internal_id:, resource_type:, parent_resource_id:, parent_resource_internal_id:, parent_resource_type:, destination_resource_id:, destination_resource_internal_id:, destination_resource_type:, status_counters:, resource_data:, errors:, options:) ⇒ Migration
Returns a new instance of Migration.
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/appwrite/models/migration.rb', line 28 def initialize( id:, created_at:, updated_at:, status:, stage:, source:, destination:, resources:, resource_id:, resource_internal_id:, resource_type:, parent_resource_id:, parent_resource_internal_id:, parent_resource_type:, destination_resource_id:, destination_resource_internal_id:, destination_resource_type:, status_counters:, resource_data:, errors:, options: ) @id = id @created_at = created_at @updated_at = updated_at @status = status @stage = stage @source = source @destination = destination @resources = resources @resource_id = resource_id @resource_internal_id = resource_internal_id @resource_type = resource_type @parent_resource_id = parent_resource_id @parent_resource_internal_id = parent_resource_internal_id @parent_resource_type = parent_resource_type @destination_resource_id = destination_resource_id @destination_resource_internal_id = destination_resource_internal_id @destination_resource_type = destination_resource_type @status_counters = status_counters @resource_data = resource_data @errors = errors @options = end |
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
7 8 9 |
# File 'lib/appwrite/models/migration.rb', line 7 def created_at @created_at end |
#destination ⇒ Object (readonly)
Returns the value of attribute destination.
12 13 14 |
# File 'lib/appwrite/models/migration.rb', line 12 def destination @destination end |
#destination_resource_id ⇒ Object (readonly)
Returns the value of attribute destination_resource_id.
20 21 22 |
# File 'lib/appwrite/models/migration.rb', line 20 def destination_resource_id @destination_resource_id end |
#destination_resource_internal_id ⇒ Object (readonly)
Returns the value of attribute destination_resource_internal_id.
21 22 23 |
# File 'lib/appwrite/models/migration.rb', line 21 def destination_resource_internal_id @destination_resource_internal_id end |
#destination_resource_type ⇒ Object (readonly)
Returns the value of attribute destination_resource_type.
22 23 24 |
# File 'lib/appwrite/models/migration.rb', line 22 def destination_resource_type @destination_resource_type end |
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
25 26 27 |
# File 'lib/appwrite/models/migration.rb', line 25 def errors @errors end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/appwrite/models/migration.rb', line 6 def id @id end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
26 27 28 |
# File 'lib/appwrite/models/migration.rb', line 26 def @options end |
#parent_resource_id ⇒ Object (readonly)
Returns the value of attribute parent_resource_id.
17 18 19 |
# File 'lib/appwrite/models/migration.rb', line 17 def parent_resource_id @parent_resource_id end |
#parent_resource_internal_id ⇒ Object (readonly)
Returns the value of attribute parent_resource_internal_id.
18 19 20 |
# File 'lib/appwrite/models/migration.rb', line 18 def parent_resource_internal_id @parent_resource_internal_id end |
#parent_resource_type ⇒ Object (readonly)
Returns the value of attribute parent_resource_type.
19 20 21 |
# File 'lib/appwrite/models/migration.rb', line 19 def parent_resource_type @parent_resource_type end |
#resource_data ⇒ Object (readonly)
Returns the value of attribute resource_data.
24 25 26 |
# File 'lib/appwrite/models/migration.rb', line 24 def resource_data @resource_data end |
#resource_id ⇒ Object (readonly)
Returns the value of attribute resource_id.
14 15 16 |
# File 'lib/appwrite/models/migration.rb', line 14 def resource_id @resource_id end |
#resource_internal_id ⇒ Object (readonly)
Returns the value of attribute resource_internal_id.
15 16 17 |
# File 'lib/appwrite/models/migration.rb', line 15 def resource_internal_id @resource_internal_id end |
#resource_type ⇒ Object (readonly)
Returns the value of attribute resource_type.
16 17 18 |
# File 'lib/appwrite/models/migration.rb', line 16 def resource_type @resource_type end |
#resources ⇒ Object (readonly)
Returns the value of attribute resources.
13 14 15 |
# File 'lib/appwrite/models/migration.rb', line 13 def resources @resources end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
11 12 13 |
# File 'lib/appwrite/models/migration.rb', line 11 def source @source end |
#stage ⇒ Object (readonly)
Returns the value of attribute stage.
10 11 12 |
# File 'lib/appwrite/models/migration.rb', line 10 def stage @stage end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
9 10 11 |
# File 'lib/appwrite/models/migration.rb', line 9 def status @status end |
#status_counters ⇒ Object (readonly)
Returns the value of attribute status_counters.
23 24 25 |
# File 'lib/appwrite/models/migration.rb', line 23 def status_counters @status_counters end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
8 9 10 |
# File 'lib/appwrite/models/migration.rb', line 8 def updated_at @updated_at end |
Class Method Details
.from(map:) ⇒ Object
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/appwrite/models/migration.rb', line 74 def self.from(map:) map = { "$id" => "", "$createdAt" => "", "$updatedAt" => "", "status" => "", "stage" => "", "source" => "", "destination" => "Appwrite", "resources" => [], "resourceId" => "", "resourceInternalId" => "", "resourceType" => "", "parentResourceId" => "", "parentResourceInternalId" => "", "parentResourceType" => "", "destinationResourceId" => "", "destinationResourceInternalId" => "", "destinationResourceType" => "", "statusCounters" => {}, "resourceData" => [], "errors" => [], "options" => {} }.merge(map) Migration.new( id: map["$id"], created_at: map["$createdAt"], updated_at: map["$updatedAt"], status: map["status"], stage: map["stage"], source: map["source"], destination: map["destination"], resources: map["resources"], resource_id: map["resourceId"], resource_internal_id: map["resourceInternalId"], resource_type: map["resourceType"], parent_resource_id: map["parentResourceId"], parent_resource_internal_id: map["parentResourceInternalId"], parent_resource_type: map["parentResourceType"], destination_resource_id: map["destinationResourceId"], destination_resource_internal_id: map["destinationResourceInternalId"], destination_resource_type: map["destinationResourceType"], status_counters: map["statusCounters"], resource_data: map["resourceData"], errors: map["errors"], options: map["options"] ) end |
Instance Method Details
#to_map ⇒ Object
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/appwrite/models/migration.rb', line 101 def to_map { "$id": @id, "$createdAt": @created_at, "$updatedAt": @updated_at, "status": @status, "stage": @stage, "source": @source, "destination": @destination, "resources": @resources, "resourceId": @resource_id, "resourceInternalId": @resource_internal_id, "resourceType": @resource_type, "parentResourceId": @parent_resource_id, "parentResourceInternalId": @parent_resource_internal_id, "parentResourceType": @parent_resource_type, "destinationResourceId": @destination_resource_id, "destinationResourceInternalId": @destination_resource_internal_id, "destinationResourceType": @destination_resource_type, "statusCounters": @status_counters, "resourceData": @resource_data, "errors": @errors, "options": @options } end |