Class: Appwrite::Models::Execution
- Inherits:
-
Object
- Object
- Appwrite::Models::Execution
- Defined in:
- lib/appwrite/models/execution.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#deployment_id ⇒ Object
readonly
Returns the value of attribute deployment_id.
-
#duration ⇒ Object
readonly
Returns the value of attribute duration.
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#function_id ⇒ Object
readonly
Returns the value of attribute function_id.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#logs ⇒ Object
readonly
Returns the value of attribute logs.
-
#permissions ⇒ Object
readonly
Returns the value of attribute permissions.
-
#request_headers ⇒ Object
readonly
Returns the value of attribute request_headers.
-
#request_method ⇒ Object
readonly
Returns the value of attribute request_method.
-
#request_path ⇒ Object
readonly
Returns the value of attribute request_path.
-
#response_body ⇒ Object
readonly
Returns the value of attribute response_body.
-
#response_headers ⇒ Object
readonly
Returns the value of attribute response_headers.
-
#response_status_code ⇒ Object
readonly
Returns the value of attribute response_status_code.
-
#scheduled_at ⇒ Object
readonly
Returns the value of attribute scheduled_at.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#trigger ⇒ Object
readonly
Returns the value of attribute trigger.
-
#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:, permissions:, function_id:, deployment_id:, trigger:, status:, request_method:, request_path:, request_headers:, response_status_code:, response_body:, response_headers:, logs:, errors:, duration:, scheduled_at:) ⇒ Execution
constructor
A new instance of Execution.
- #to_map ⇒ Object
Constructor Details
#initialize(id:, created_at:, updated_at:, permissions:, function_id:, deployment_id:, trigger:, status:, request_method:, request_path:, request_headers:, response_status_code:, response_body:, response_headers:, logs:, errors:, duration:, scheduled_at:) ⇒ Execution
Returns a new instance of Execution.
25 26 27 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 |
# File 'lib/appwrite/models/execution.rb', line 25 def initialize( id:, created_at:, updated_at:, permissions:, function_id:, deployment_id:, trigger:, status:, request_method:, request_path:, request_headers:, response_status_code:, response_body:, response_headers:, logs:, errors:, duration:, scheduled_at: ) @id = id @created_at = created_at @updated_at = updated_at @permissions = @function_id = function_id @deployment_id = deployment_id @trigger = validate_trigger(trigger) @status = validate_status(status) @request_method = request_method @request_path = request_path @request_headers = request_headers @response_status_code = response_status_code @response_body = response_body @response_headers = response_headers @logs = logs @errors = errors @duration = duration @scheduled_at = scheduled_at end |
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
7 8 9 |
# File 'lib/appwrite/models/execution.rb', line 7 def created_at @created_at end |
#deployment_id ⇒ Object (readonly)
Returns the value of attribute deployment_id.
11 12 13 |
# File 'lib/appwrite/models/execution.rb', line 11 def deployment_id @deployment_id end |
#duration ⇒ Object (readonly)
Returns the value of attribute duration.
22 23 24 |
# File 'lib/appwrite/models/execution.rb', line 22 def duration @duration end |
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
21 22 23 |
# File 'lib/appwrite/models/execution.rb', line 21 def errors @errors end |
#function_id ⇒ Object (readonly)
Returns the value of attribute function_id.
10 11 12 |
# File 'lib/appwrite/models/execution.rb', line 10 def function_id @function_id end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/appwrite/models/execution.rb', line 6 def id @id end |
#logs ⇒ Object (readonly)
Returns the value of attribute logs.
20 21 22 |
# File 'lib/appwrite/models/execution.rb', line 20 def logs @logs end |
#permissions ⇒ Object (readonly)
Returns the value of attribute permissions.
9 10 11 |
# File 'lib/appwrite/models/execution.rb', line 9 def @permissions end |
#request_headers ⇒ Object (readonly)
Returns the value of attribute request_headers.
16 17 18 |
# File 'lib/appwrite/models/execution.rb', line 16 def request_headers @request_headers end |
#request_method ⇒ Object (readonly)
Returns the value of attribute request_method.
14 15 16 |
# File 'lib/appwrite/models/execution.rb', line 14 def request_method @request_method end |
#request_path ⇒ Object (readonly)
Returns the value of attribute request_path.
15 16 17 |
# File 'lib/appwrite/models/execution.rb', line 15 def request_path @request_path end |
#response_body ⇒ Object (readonly)
Returns the value of attribute response_body.
18 19 20 |
# File 'lib/appwrite/models/execution.rb', line 18 def response_body @response_body end |
#response_headers ⇒ Object (readonly)
Returns the value of attribute response_headers.
19 20 21 |
# File 'lib/appwrite/models/execution.rb', line 19 def response_headers @response_headers end |
#response_status_code ⇒ Object (readonly)
Returns the value of attribute response_status_code.
17 18 19 |
# File 'lib/appwrite/models/execution.rb', line 17 def response_status_code @response_status_code end |
#scheduled_at ⇒ Object (readonly)
Returns the value of attribute scheduled_at.
23 24 25 |
# File 'lib/appwrite/models/execution.rb', line 23 def scheduled_at @scheduled_at end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
13 14 15 |
# File 'lib/appwrite/models/execution.rb', line 13 def status @status end |
#trigger ⇒ Object (readonly)
Returns the value of attribute trigger.
12 13 14 |
# File 'lib/appwrite/models/execution.rb', line 12 def trigger @trigger end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
8 9 10 |
# File 'lib/appwrite/models/execution.rb', line 8 def updated_at @updated_at end |
Class Method Details
.from(map:) ⇒ Object
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/appwrite/models/execution.rb', line 65 def self.from(map:) Execution.new( id: map["$id"], created_at: map["$createdAt"], updated_at: map["$updatedAt"], permissions: map["$permissions"], function_id: map["functionId"], deployment_id: map["deploymentId"], trigger: map["trigger"], status: map["status"], request_method: map["requestMethod"], request_path: map["requestPath"], request_headers: map["requestHeaders"].map { |it| Headers.from(map: it) }, response_status_code: map["responseStatusCode"], response_body: map["responseBody"], response_headers: map["responseHeaders"].map { |it| Headers.from(map: it) }, logs: map["logs"], errors: map["errors"], duration: map["duration"], scheduled_at: map["scheduledAt"] ) end |
Instance Method Details
#to_map ⇒ Object
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/appwrite/models/execution.rb', line 88 def to_map { "$id": @id, "$createdAt": @created_at, "$updatedAt": @updated_at, "$permissions": @permissions, "functionId": @function_id, "deploymentId": @deployment_id, "trigger": @trigger, "status": @status, "requestMethod": @request_method, "requestPath": @request_path, "requestHeaders": @request_headers.map { |it| it.to_map }, "responseStatusCode": @response_status_code, "responseBody": @response_body, "responseHeaders": @response_headers.map { |it| it.to_map }, "logs": @logs, "errors": @errors, "duration": @duration, "scheduledAt": @scheduled_at } end |