rocket_stack_sdk 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +31 -13
  3. data/docs/CreateCronJob201ResponseData.md +3 -1
  4. data/docs/CreateCronJobRequestDeliveryTarget.md +9 -9
  5. data/docs/CreateCronJobRequestDeliveryTargetAnyOf.md +30 -0
  6. data/docs/CreateCronJobRequestDeliveryTargetAnyOf1.md +30 -0
  7. data/docs/CreateCronJobRequestSchedule.md +1 -1
  8. data/docs/CreateDownloadUrlRequest.md +1 -1
  9. data/docs/CreateQueueRequestDeliveryTarget.md +9 -9
  10. data/docs/CreateQueueRequestDeliveryTargetAnyOf.md +30 -0
  11. data/docs/CreateQueueRequestDeliveryTargetAnyOf1.md +30 -0
  12. data/docs/CreateScheduleRequest.md +1 -1
  13. data/docs/CronApi.md +85 -7
  14. data/docs/DeleteCronJob200Response.md +22 -0
  15. data/docs/DeleteCronJob200ResponseData.md +20 -0
  16. data/docs/FinalizeUploadRequest.md +1 -1
  17. data/docs/FunctionsApi.md +72 -2
  18. data/docs/GetFunctionCode200Response.md +22 -0
  19. data/docs/GetFunctionCode200ResponseData.md +28 -0
  20. data/docs/GetFunctionCode200ResponseDataFilesInner.md +20 -0
  21. data/docs/GetMessageStatus200Response.md +1 -1
  22. data/docs/GetMessageStatus200ResponseData.md +2 -2
  23. data/docs/InvokeFunctionRequest.md +2 -2
  24. data/docs/KvApi.md +26 -26
  25. data/docs/ListCronInvocations200Response.md +22 -0
  26. data/docs/ListCronInvocations200ResponseData.md +20 -0
  27. data/docs/ListCronInvocations200ResponseDataItemsInner.md +42 -0
  28. data/docs/ListQueueMessages200Response.md +22 -0
  29. data/docs/ListQueueMessages200ResponseData.md +20 -0
  30. data/docs/ListQueueMessages200ResponseDataItemsInner.md +32 -0
  31. data/docs/PutKvItemRequest.md +3 -3
  32. data/docs/QueuesApi.md +80 -2
  33. data/docs/ResourcesApi.md +1 -1
  34. data/docs/SchedulerApi.md +81 -3
  35. data/docs/StorageApi.md +5 -5
  36. data/docs/UpdateCronJobRequestSchedule.md +1 -1
  37. data/docs/UpdateScheduleRequest.md +1 -1
  38. data/lib/rocket_stack_sdk/api/cron_api.rb +92 -8
  39. data/lib/rocket_stack_sdk/api/functions_api.rb +68 -5
  40. data/lib/rocket_stack_sdk/api/kv_api.rb +38 -50
  41. data/lib/rocket_stack_sdk/api/queues_api.rb +89 -5
  42. data/lib/rocket_stack_sdk/api/resources_api.rb +3 -3
  43. data/lib/rocket_stack_sdk/api/scheduler_api.rb +89 -5
  44. data/lib/rocket_stack_sdk/api/storage_api.rb +9 -9
  45. data/lib/rocket_stack_sdk/api_client.rb +3 -3
  46. data/lib/rocket_stack_sdk/api_error.rb +3 -3
  47. data/lib/rocket_stack_sdk/api_model_base.rb +3 -3
  48. data/lib/rocket_stack_sdk/configuration.rb +5 -5
  49. data/lib/rocket_stack_sdk/models/create_cron_job201_response.rb +3 -3
  50. data/lib/rocket_stack_sdk/models/create_cron_job201_response_data.rb +33 -7
  51. data/lib/rocket_stack_sdk/models/create_cron_job_request.rb +3 -3
  52. data/lib/rocket_stack_sdk/models/create_cron_job_request_delivery_target.rb +79 -319
  53. data/lib/rocket_stack_sdk/models/create_cron_job_request_delivery_target_any_of.rb +351 -0
  54. data/lib/rocket_stack_sdk/models/create_cron_job_request_delivery_target_any_of1.rb +351 -0
  55. data/lib/rocket_stack_sdk/models/create_cron_job_request_schedule.rb +3 -5
  56. data/lib/rocket_stack_sdk/models/create_download_url200_response.rb +3 -3
  57. data/lib/rocket_stack_sdk/models/create_download_url200_response_data.rb +3 -3
  58. data/lib/rocket_stack_sdk/models/create_download_url_request.rb +4 -3
  59. data/lib/rocket_stack_sdk/models/create_function202_response.rb +3 -3
  60. data/lib/rocket_stack_sdk/models/create_function202_response_data.rb +3 -3
  61. data/lib/rocket_stack_sdk/models/create_queue201_response.rb +3 -3
  62. data/lib/rocket_stack_sdk/models/create_queue201_response_data.rb +3 -3
  63. data/lib/rocket_stack_sdk/models/create_queue_request.rb +3 -3
  64. data/lib/rocket_stack_sdk/models/create_queue_request_delivery_target.rb +79 -319
  65. data/lib/rocket_stack_sdk/models/create_queue_request_delivery_target_any_of.rb +351 -0
  66. data/lib/rocket_stack_sdk/models/create_queue_request_delivery_target_any_of1.rb +351 -0
  67. data/lib/rocket_stack_sdk/models/create_schedule201_response.rb +3 -3
  68. data/lib/rocket_stack_sdk/models/create_schedule201_response_data.rb +3 -3
  69. data/lib/rocket_stack_sdk/models/create_schedule_request.rb +4 -3
  70. data/lib/rocket_stack_sdk/models/delete_cron_job200_response.rb +182 -0
  71. data/lib/rocket_stack_sdk/models/delete_cron_job200_response_data.rb +190 -0
  72. data/lib/rocket_stack_sdk/models/delete_kv_item200_response.rb +3 -3
  73. data/lib/rocket_stack_sdk/models/delete_kv_item200_response_data.rb +3 -3
  74. data/lib/rocket_stack_sdk/models/enqueue_message201_response.rb +3 -3
  75. data/lib/rocket_stack_sdk/models/enqueue_message201_response_data.rb +3 -3
  76. data/lib/rocket_stack_sdk/models/enqueue_message_request.rb +3 -3
  77. data/lib/rocket_stack_sdk/models/finalize_upload200_response.rb +3 -3
  78. data/lib/rocket_stack_sdk/models/finalize_upload200_response_data.rb +3 -3
  79. data/lib/rocket_stack_sdk/models/finalize_upload_request.rb +4 -3
  80. data/lib/rocket_stack_sdk/models/get_cron_job200_response.rb +3 -3
  81. data/lib/rocket_stack_sdk/models/get_function200_response.rb +3 -3
  82. data/lib/rocket_stack_sdk/models/get_function_code200_response.rb +182 -0
  83. data/lib/rocket_stack_sdk/models/get_function_code200_response_data.rb +290 -0
  84. data/lib/rocket_stack_sdk/models/get_function_code200_response_data_files_inner.rb +190 -0
  85. data/lib/rocket_stack_sdk/models/get_kv_item200_response.rb +3 -3
  86. data/lib/rocket_stack_sdk/models/get_kv_item200_response_data.rb +3 -3
  87. data/lib/rocket_stack_sdk/models/get_message_status200_response.rb +4 -4
  88. data/lib/rocket_stack_sdk/models/get_message_status200_response_data.rb +3 -3
  89. data/lib/rocket_stack_sdk/models/get_queue200_response.rb +3 -3
  90. data/lib/rocket_stack_sdk/models/get_schedule200_response.rb +3 -3
  91. data/lib/rocket_stack_sdk/models/get_schedule_status200_response.rb +3 -3
  92. data/lib/rocket_stack_sdk/models/get_schedule_status200_response_data.rb +3 -3
  93. data/lib/rocket_stack_sdk/models/get_template200_response.rb +3 -3
  94. data/lib/rocket_stack_sdk/models/invoke_function200_response.rb +3 -3
  95. data/lib/rocket_stack_sdk/models/invoke_function200_response_data.rb +3 -3
  96. data/lib/rocket_stack_sdk/models/invoke_function_request.rb +3 -7
  97. data/lib/rocket_stack_sdk/models/list_capabilities200_response.rb +3 -3
  98. data/lib/rocket_stack_sdk/models/list_capabilities200_response_data_inner.rb +3 -3
  99. data/lib/rocket_stack_sdk/models/list_cron_invocations200_response.rb +182 -0
  100. data/lib/rocket_stack_sdk/models/list_cron_invocations200_response_data.rb +176 -0
  101. data/lib/rocket_stack_sdk/models/list_cron_invocations200_response_data_items_inner.rb +347 -0
  102. data/lib/rocket_stack_sdk/models/list_cron_jobs200_response.rb +3 -3
  103. data/lib/rocket_stack_sdk/models/list_cron_jobs200_response_data.rb +3 -3
  104. data/lib/rocket_stack_sdk/models/list_cron_jobs200_response_data_items_inner.rb +3 -3
  105. data/lib/rocket_stack_sdk/models/list_cron_jobs200_response_data_items_inner_schedule.rb +3 -3
  106. data/lib/rocket_stack_sdk/models/list_functions200_response.rb +3 -3
  107. data/lib/rocket_stack_sdk/models/list_functions200_response_data.rb +3 -3
  108. data/lib/rocket_stack_sdk/models/list_functions200_response_data_items_inner.rb +3 -3
  109. data/lib/rocket_stack_sdk/models/list_functions200_response_data_items_inner_actual_spec.rb +3 -3
  110. data/lib/rocket_stack_sdk/models/list_functions200_response_data_items_inner_desired_spec.rb +3 -3
  111. data/lib/rocket_stack_sdk/models/list_functions200_response_data_items_inner_desired_spec_code.rb +3 -3
  112. data/lib/rocket_stack_sdk/models/list_functions200_response_error.rb +3 -3
  113. data/lib/rocket_stack_sdk/models/list_functions401_response.rb +3 -3
  114. data/lib/rocket_stack_sdk/models/list_kv_items200_response.rb +3 -3
  115. data/lib/rocket_stack_sdk/models/list_kv_items200_response_data.rb +3 -3
  116. data/lib/rocket_stack_sdk/models/list_kv_items200_response_data_items_inner.rb +3 -3
  117. data/lib/rocket_stack_sdk/models/list_queue_messages200_response.rb +182 -0
  118. data/lib/rocket_stack_sdk/models/list_queue_messages200_response_data.rb +176 -0
  119. data/lib/rocket_stack_sdk/models/list_queue_messages200_response_data_items_inner.rb +312 -0
  120. data/lib/rocket_stack_sdk/models/list_queues200_response.rb +3 -3
  121. data/lib/rocket_stack_sdk/models/list_queues200_response_data.rb +3 -3
  122. data/lib/rocket_stack_sdk/models/list_queues200_response_data_items_inner.rb +3 -3
  123. data/lib/rocket_stack_sdk/models/list_queues200_response_data_items_inner_delivery_target.rb +3 -3
  124. data/lib/rocket_stack_sdk/models/list_schedules200_response.rb +3 -3
  125. data/lib/rocket_stack_sdk/models/list_schedules200_response_data.rb +3 -3
  126. data/lib/rocket_stack_sdk/models/list_schedules200_response_data_items_inner.rb +3 -3
  127. data/lib/rocket_stack_sdk/models/list_snippets200_response.rb +3 -3
  128. data/lib/rocket_stack_sdk/models/list_snippets200_response_data_inner.rb +3 -3
  129. data/lib/rocket_stack_sdk/models/list_storage_objects200_response.rb +3 -3
  130. data/lib/rocket_stack_sdk/models/list_storage_objects200_response_data.rb +3 -3
  131. data/lib/rocket_stack_sdk/models/list_storage_objects200_response_data_items_inner.rb +3 -3
  132. data/lib/rocket_stack_sdk/models/list_templates200_response.rb +3 -3
  133. data/lib/rocket_stack_sdk/models/list_templates200_response_data_inner.rb +3 -3
  134. data/lib/rocket_stack_sdk/models/put_kv_item200_response.rb +3 -3
  135. data/lib/rocket_stack_sdk/models/put_kv_item200_response_data.rb +3 -3
  136. data/lib/rocket_stack_sdk/models/put_kv_item_request.rb +7 -4
  137. data/lib/rocket_stack_sdk/models/put_kv_item_request_if_version.rb +4 -3
  138. data/lib/rocket_stack_sdk/models/update_cron_job200_response.rb +3 -3
  139. data/lib/rocket_stack_sdk/models/update_cron_job200_response_data.rb +3 -3
  140. data/lib/rocket_stack_sdk/models/update_cron_job_request.rb +3 -3
  141. data/lib/rocket_stack_sdk/models/update_cron_job_request_schedule.rb +3 -5
  142. data/lib/rocket_stack_sdk/models/update_function_request.rb +3 -3
  143. data/lib/rocket_stack_sdk/models/update_queue200_response.rb +3 -3
  144. data/lib/rocket_stack_sdk/models/update_queue200_response_data.rb +3 -3
  145. data/lib/rocket_stack_sdk/models/update_queue_request.rb +3 -3
  146. data/lib/rocket_stack_sdk/models/update_schedule200_response.rb +3 -3
  147. data/lib/rocket_stack_sdk/models/update_schedule200_response_data.rb +3 -3
  148. data/lib/rocket_stack_sdk/models/update_schedule_request.rb +4 -3
  149. data/lib/rocket_stack_sdk/models/upload_object201_response.rb +3 -3
  150. data/lib/rocket_stack_sdk/models/upload_object201_response_data.rb +3 -3
  151. data/lib/rocket_stack_sdk/version.rb +4 -4
  152. data/lib/rocket_stack_sdk.rb +18 -4
  153. data/rocket_stack_sdk.gemspec +5 -5
  154. data/spec/models/create_cron_job_request_delivery_target_any_of1_spec.rb +76 -0
  155. data/spec/models/create_cron_job_request_delivery_target_any_of_spec.rb +76 -0
  156. data/spec/models/create_queue_request_delivery_target_any_of1_spec.rb +76 -0
  157. data/spec/models/create_queue_request_delivery_target_any_of_spec.rb +76 -0
  158. data/spec/models/delete_cron_job200_response_data_spec.rb +42 -0
  159. data/spec/models/delete_cron_job200_response_spec.rb +48 -0
  160. data/spec/models/get_function_code200_response_data_files_inner_spec.rb +42 -0
  161. data/spec/models/get_function_code200_response_data_spec.rb +74 -0
  162. data/spec/models/get_function_code200_response_spec.rb +48 -0
  163. data/spec/models/list_cron_invocations200_response_data_items_inner_spec.rb +112 -0
  164. data/spec/models/list_cron_invocations200_response_data_spec.rb +42 -0
  165. data/spec/models/list_cron_invocations200_response_spec.rb +48 -0
  166. data/spec/models/list_queue_messages200_response_data_items_inner_spec.rb +78 -0
  167. data/spec/models/list_queue_messages200_response_data_spec.rb +42 -0
  168. data/spec/models/list_queue_messages200_response_spec.rb +48 -0
  169. data/spec/spec_helper.rb +3 -3
  170. metadata +141 -81
@@ -0,0 +1,182 @@
1
+ =begin
2
+ #Rocketstack Control Plane API
3
+
4
+ #Combined API for Functions, Queues, KV, Storage, Cron, and Scheduler.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module RocketStackSdk
17
+ class ListQueueMessages200Response < ApiModelBase
18
+ attr_accessor :request_id
19
+
20
+ attr_accessor :data
21
+
22
+ attr_accessor :error
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'request_id' => :'requestId',
28
+ :'data' => :'data',
29
+ :'error' => :'error'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'request_id' => :'String',
47
+ :'data' => :'ListQueueMessages200ResponseData',
48
+ :'error' => :'ListFunctions200ResponseError'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `RocketStackSdk::ListQueueMessages200Response` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `RocketStackSdk::ListQueueMessages200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'request_id')
75
+ self.request_id = attributes[:'request_id']
76
+ else
77
+ self.request_id = nil
78
+ end
79
+
80
+ if attributes.key?(:'data')
81
+ self.data = attributes[:'data']
82
+ end
83
+
84
+ if attributes.key?(:'error')
85
+ self.error = attributes[:'error']
86
+ end
87
+ end
88
+
89
+ # Show invalid properties with the reasons. Usually used together with valid?
90
+ # @return Array for valid properties with the reasons
91
+ def list_invalid_properties
92
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
93
+ invalid_properties = Array.new
94
+ if @request_id.nil?
95
+ invalid_properties.push('invalid value for "request_id", request_id cannot be nil.')
96
+ end
97
+
98
+ invalid_properties
99
+ end
100
+
101
+ # Check to see if the all the properties in the model are valid
102
+ # @return true if the model is valid
103
+ def valid?
104
+ warn '[DEPRECATED] the `valid?` method is obsolete'
105
+ return false if @request_id.nil?
106
+ true
107
+ end
108
+
109
+ # Custom attribute writer method with validation
110
+ # @param [Object] request_id Value to be assigned
111
+ def request_id=(request_id)
112
+ if request_id.nil?
113
+ fail ArgumentError, 'request_id cannot be nil'
114
+ end
115
+
116
+ @request_id = request_id
117
+ end
118
+
119
+ # Checks equality by comparing each attribute.
120
+ # @param [Object] Object to be compared
121
+ def ==(o)
122
+ return true if self.equal?(o)
123
+ self.class == o.class &&
124
+ request_id == o.request_id &&
125
+ data == o.data &&
126
+ error == o.error
127
+ end
128
+
129
+ # @see the `==` method
130
+ # @param [Object] Object to be compared
131
+ def eql?(o)
132
+ self == o
133
+ end
134
+
135
+ # Calculates hash code according to all attributes.
136
+ # @return [Integer] Hash code
137
+ def hash
138
+ [request_id, data, error].hash
139
+ end
140
+
141
+ # Builds the object from hash
142
+ # @param [Hash] attributes Model attributes in the form of hash
143
+ # @return [Object] Returns the model itself
144
+ def self.build_from_hash(attributes)
145
+ return nil unless attributes.is_a?(Hash)
146
+ attributes = attributes.transform_keys(&:to_sym)
147
+ transformed_hash = {}
148
+ openapi_types.each_pair do |key, type|
149
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
150
+ transformed_hash["#{key}"] = nil
151
+ elsif type =~ /\AArray<(.*)>/i
152
+ # check to ensure the input is an array given that the attribute
153
+ # is documented as an array but the input is not
154
+ if attributes[attribute_map[key]].is_a?(Array)
155
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
156
+ end
157
+ elsif !attributes[attribute_map[key]].nil?
158
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
159
+ end
160
+ end
161
+ new(transformed_hash)
162
+ end
163
+
164
+ # Returns the object in the form of hash
165
+ # @return [Hash] Returns the object in the form of hash
166
+ def to_hash
167
+ hash = {}
168
+ self.class.attribute_map.each_pair do |attr, param|
169
+ value = self.send(attr)
170
+ if value.nil?
171
+ is_nullable = self.class.openapi_nullable.include?(attr)
172
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
173
+ end
174
+
175
+ hash[param] = _to_hash(value)
176
+ end
177
+ hash
178
+ end
179
+
180
+ end
181
+
182
+ end
@@ -0,0 +1,176 @@
1
+ =begin
2
+ #Rocketstack Control Plane API
3
+
4
+ #Combined API for Functions, Queues, KV, Storage, Cron, and Scheduler.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module RocketStackSdk
17
+ class ListQueueMessages200ResponseData < ApiModelBase
18
+ attr_accessor :items
19
+
20
+ attr_accessor :next_cursor
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'items' => :'items',
26
+ :'next_cursor' => :'nextCursor'
27
+ }
28
+ end
29
+
30
+ # Returns attribute mapping this model knows about
31
+ def self.acceptable_attribute_map
32
+ attribute_map
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ acceptable_attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'items' => :'Array<ListQueueMessages200ResponseDataItemsInner>',
44
+ :'next_cursor' => :'String'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ :'next_cursor'
52
+ ])
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param [Hash] attributes Model attributes in the form of hash
57
+ def initialize(attributes = {})
58
+ if (!attributes.is_a?(Hash))
59
+ fail ArgumentError, "The input argument (attributes) must be a hash in `RocketStackSdk::ListQueueMessages200ResponseData` initialize method"
60
+ end
61
+
62
+ # check to see if the attribute exists and convert string to symbol for hash key
63
+ acceptable_attribute_map = self.class.acceptable_attribute_map
64
+ attributes = attributes.each_with_object({}) { |(k, v), h|
65
+ if (!acceptable_attribute_map.key?(k.to_sym))
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `RocketStackSdk::ListQueueMessages200ResponseData`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
67
+ end
68
+ h[k.to_sym] = v
69
+ }
70
+
71
+ if attributes.key?(:'items')
72
+ if (value = attributes[:'items']).is_a?(Array)
73
+ self.items = value
74
+ end
75
+ else
76
+ self.items = nil
77
+ end
78
+
79
+ if attributes.key?(:'next_cursor')
80
+ self.next_cursor = attributes[:'next_cursor']
81
+ end
82
+ end
83
+
84
+ # Show invalid properties with the reasons. Usually used together with valid?
85
+ # @return Array for valid properties with the reasons
86
+ def list_invalid_properties
87
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
88
+ invalid_properties = Array.new
89
+ if @items.nil?
90
+ invalid_properties.push('invalid value for "items", items cannot be nil.')
91
+ end
92
+
93
+ invalid_properties
94
+ end
95
+
96
+ # Check to see if the all the properties in the model are valid
97
+ # @return true if the model is valid
98
+ def valid?
99
+ warn '[DEPRECATED] the `valid?` method is obsolete'
100
+ return false if @items.nil?
101
+ true
102
+ end
103
+
104
+ # Custom attribute writer method with validation
105
+ # @param [Object] items Value to be assigned
106
+ def items=(items)
107
+ if items.nil?
108
+ fail ArgumentError, 'items cannot be nil'
109
+ end
110
+
111
+ @items = items
112
+ end
113
+
114
+ # Checks equality by comparing each attribute.
115
+ # @param [Object] Object to be compared
116
+ def ==(o)
117
+ return true if self.equal?(o)
118
+ self.class == o.class &&
119
+ items == o.items &&
120
+ next_cursor == o.next_cursor
121
+ end
122
+
123
+ # @see the `==` method
124
+ # @param [Object] Object to be compared
125
+ def eql?(o)
126
+ self == o
127
+ end
128
+
129
+ # Calculates hash code according to all attributes.
130
+ # @return [Integer] Hash code
131
+ def hash
132
+ [items, next_cursor].hash
133
+ end
134
+
135
+ # Builds the object from hash
136
+ # @param [Hash] attributes Model attributes in the form of hash
137
+ # @return [Object] Returns the model itself
138
+ def self.build_from_hash(attributes)
139
+ return nil unless attributes.is_a?(Hash)
140
+ attributes = attributes.transform_keys(&:to_sym)
141
+ transformed_hash = {}
142
+ openapi_types.each_pair do |key, type|
143
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
144
+ transformed_hash["#{key}"] = nil
145
+ elsif type =~ /\AArray<(.*)>/i
146
+ # check to ensure the input is an array given that the attribute
147
+ # is documented as an array but the input is not
148
+ if attributes[attribute_map[key]].is_a?(Array)
149
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
150
+ end
151
+ elsif !attributes[attribute_map[key]].nil?
152
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
153
+ end
154
+ end
155
+ new(transformed_hash)
156
+ end
157
+
158
+ # Returns the object in the form of hash
159
+ # @return [Hash] Returns the object in the form of hash
160
+ def to_hash
161
+ hash = {}
162
+ self.class.attribute_map.each_pair do |attr, param|
163
+ value = self.send(attr)
164
+ if value.nil?
165
+ is_nullable = self.class.openapi_nullable.include?(attr)
166
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
167
+ end
168
+
169
+ hash[param] = _to_hash(value)
170
+ end
171
+ hash
172
+ end
173
+
174
+ end
175
+
176
+ end
@@ -0,0 +1,312 @@
1
+ =begin
2
+ #Rocketstack Control Plane API
3
+
4
+ #Combined API for Functions, Queues, KV, Storage, Cron, and Scheduler.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module RocketStackSdk
17
+ class ListQueueMessages200ResponseDataItemsInner < ApiModelBase
18
+ attr_accessor :message_id
19
+
20
+ attr_accessor :status
21
+
22
+ attr_accessor :attempts
23
+
24
+ attr_accessor :last_error
25
+
26
+ attr_accessor :payload_size_bytes
27
+
28
+ attr_accessor :idempotency_key
29
+
30
+ attr_accessor :created_at
31
+
32
+ attr_accessor :updated_at
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ def self.attribute_map
36
+ {
37
+ :'message_id' => :'messageId',
38
+ :'status' => :'status',
39
+ :'attempts' => :'attempts',
40
+ :'last_error' => :'lastError',
41
+ :'payload_size_bytes' => :'payloadSizeBytes',
42
+ :'idempotency_key' => :'idempotencyKey',
43
+ :'created_at' => :'createdAt',
44
+ :'updated_at' => :'updatedAt'
45
+ }
46
+ end
47
+
48
+ # Returns attribute mapping this model knows about
49
+ def self.acceptable_attribute_map
50
+ attribute_map
51
+ end
52
+
53
+ # Returns all the JSON keys this model knows about
54
+ def self.acceptable_attributes
55
+ acceptable_attribute_map.values
56
+ end
57
+
58
+ # Attribute type mapping.
59
+ def self.openapi_types
60
+ {
61
+ :'message_id' => :'String',
62
+ :'status' => :'String',
63
+ :'attempts' => :'Float',
64
+ :'last_error' => :'String',
65
+ :'payload_size_bytes' => :'Float',
66
+ :'idempotency_key' => :'String',
67
+ :'created_at' => :'String',
68
+ :'updated_at' => :'String'
69
+ }
70
+ end
71
+
72
+ # List of attributes with nullable: true
73
+ def self.openapi_nullable
74
+ Set.new([
75
+ ])
76
+ end
77
+
78
+ # Initializes the object
79
+ # @param [Hash] attributes Model attributes in the form of hash
80
+ def initialize(attributes = {})
81
+ if (!attributes.is_a?(Hash))
82
+ fail ArgumentError, "The input argument (attributes) must be a hash in `RocketStackSdk::ListQueueMessages200ResponseDataItemsInner` initialize method"
83
+ end
84
+
85
+ # check to see if the attribute exists and convert string to symbol for hash key
86
+ acceptable_attribute_map = self.class.acceptable_attribute_map
87
+ attributes = attributes.each_with_object({}) { |(k, v), h|
88
+ if (!acceptable_attribute_map.key?(k.to_sym))
89
+ fail ArgumentError, "`#{k}` is not a valid attribute in `RocketStackSdk::ListQueueMessages200ResponseDataItemsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
90
+ end
91
+ h[k.to_sym] = v
92
+ }
93
+
94
+ if attributes.key?(:'message_id')
95
+ self.message_id = attributes[:'message_id']
96
+ else
97
+ self.message_id = nil
98
+ end
99
+
100
+ if attributes.key?(:'status')
101
+ self.status = attributes[:'status']
102
+ else
103
+ self.status = nil
104
+ end
105
+
106
+ if attributes.key?(:'attempts')
107
+ self.attempts = attributes[:'attempts']
108
+ else
109
+ self.attempts = nil
110
+ end
111
+
112
+ if attributes.key?(:'last_error')
113
+ self.last_error = attributes[:'last_error']
114
+ end
115
+
116
+ if attributes.key?(:'payload_size_bytes')
117
+ self.payload_size_bytes = attributes[:'payload_size_bytes']
118
+ else
119
+ self.payload_size_bytes = nil
120
+ end
121
+
122
+ if attributes.key?(:'idempotency_key')
123
+ self.idempotency_key = attributes[:'idempotency_key']
124
+ end
125
+
126
+ if attributes.key?(:'created_at')
127
+ self.created_at = attributes[:'created_at']
128
+ else
129
+ self.created_at = nil
130
+ end
131
+
132
+ if attributes.key?(:'updated_at')
133
+ self.updated_at = attributes[:'updated_at']
134
+ else
135
+ self.updated_at = nil
136
+ end
137
+ end
138
+
139
+ # Show invalid properties with the reasons. Usually used together with valid?
140
+ # @return Array for valid properties with the reasons
141
+ def list_invalid_properties
142
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
143
+ invalid_properties = Array.new
144
+ if @message_id.nil?
145
+ invalid_properties.push('invalid value for "message_id", message_id cannot be nil.')
146
+ end
147
+
148
+ if @status.nil?
149
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
150
+ end
151
+
152
+ if @attempts.nil?
153
+ invalid_properties.push('invalid value for "attempts", attempts cannot be nil.')
154
+ end
155
+
156
+ if @payload_size_bytes.nil?
157
+ invalid_properties.push('invalid value for "payload_size_bytes", payload_size_bytes cannot be nil.')
158
+ end
159
+
160
+ if @created_at.nil?
161
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
162
+ end
163
+
164
+ if @updated_at.nil?
165
+ invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
166
+ end
167
+
168
+ invalid_properties
169
+ end
170
+
171
+ # Check to see if the all the properties in the model are valid
172
+ # @return true if the model is valid
173
+ def valid?
174
+ warn '[DEPRECATED] the `valid?` method is obsolete'
175
+ return false if @message_id.nil?
176
+ return false if @status.nil?
177
+ return false if @attempts.nil?
178
+ return false if @payload_size_bytes.nil?
179
+ return false if @created_at.nil?
180
+ return false if @updated_at.nil?
181
+ true
182
+ end
183
+
184
+ # Custom attribute writer method with validation
185
+ # @param [Object] message_id Value to be assigned
186
+ def message_id=(message_id)
187
+ if message_id.nil?
188
+ fail ArgumentError, 'message_id cannot be nil'
189
+ end
190
+
191
+ @message_id = message_id
192
+ end
193
+
194
+ # Custom attribute writer method with validation
195
+ # @param [Object] status Value to be assigned
196
+ def status=(status)
197
+ if status.nil?
198
+ fail ArgumentError, 'status cannot be nil'
199
+ end
200
+
201
+ @status = status
202
+ end
203
+
204
+ # Custom attribute writer method with validation
205
+ # @param [Object] attempts Value to be assigned
206
+ def attempts=(attempts)
207
+ if attempts.nil?
208
+ fail ArgumentError, 'attempts cannot be nil'
209
+ end
210
+
211
+ @attempts = attempts
212
+ end
213
+
214
+ # Custom attribute writer method with validation
215
+ # @param [Object] payload_size_bytes Value to be assigned
216
+ def payload_size_bytes=(payload_size_bytes)
217
+ if payload_size_bytes.nil?
218
+ fail ArgumentError, 'payload_size_bytes cannot be nil'
219
+ end
220
+
221
+ @payload_size_bytes = payload_size_bytes
222
+ end
223
+
224
+ # Custom attribute writer method with validation
225
+ # @param [Object] created_at Value to be assigned
226
+ def created_at=(created_at)
227
+ if created_at.nil?
228
+ fail ArgumentError, 'created_at cannot be nil'
229
+ end
230
+
231
+ @created_at = created_at
232
+ end
233
+
234
+ # Custom attribute writer method with validation
235
+ # @param [Object] updated_at Value to be assigned
236
+ def updated_at=(updated_at)
237
+ if updated_at.nil?
238
+ fail ArgumentError, 'updated_at cannot be nil'
239
+ end
240
+
241
+ @updated_at = updated_at
242
+ end
243
+
244
+ # Checks equality by comparing each attribute.
245
+ # @param [Object] Object to be compared
246
+ def ==(o)
247
+ return true if self.equal?(o)
248
+ self.class == o.class &&
249
+ message_id == o.message_id &&
250
+ status == o.status &&
251
+ attempts == o.attempts &&
252
+ last_error == o.last_error &&
253
+ payload_size_bytes == o.payload_size_bytes &&
254
+ idempotency_key == o.idempotency_key &&
255
+ created_at == o.created_at &&
256
+ updated_at == o.updated_at
257
+ end
258
+
259
+ # @see the `==` method
260
+ # @param [Object] Object to be compared
261
+ def eql?(o)
262
+ self == o
263
+ end
264
+
265
+ # Calculates hash code according to all attributes.
266
+ # @return [Integer] Hash code
267
+ def hash
268
+ [message_id, status, attempts, last_error, payload_size_bytes, idempotency_key, created_at, updated_at].hash
269
+ end
270
+
271
+ # Builds the object from hash
272
+ # @param [Hash] attributes Model attributes in the form of hash
273
+ # @return [Object] Returns the model itself
274
+ def self.build_from_hash(attributes)
275
+ return nil unless attributes.is_a?(Hash)
276
+ attributes = attributes.transform_keys(&:to_sym)
277
+ transformed_hash = {}
278
+ openapi_types.each_pair do |key, type|
279
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
280
+ transformed_hash["#{key}"] = nil
281
+ elsif type =~ /\AArray<(.*)>/i
282
+ # check to ensure the input is an array given that the attribute
283
+ # is documented as an array but the input is not
284
+ if attributes[attribute_map[key]].is_a?(Array)
285
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
286
+ end
287
+ elsif !attributes[attribute_map[key]].nil?
288
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
289
+ end
290
+ end
291
+ new(transformed_hash)
292
+ end
293
+
294
+ # Returns the object in the form of hash
295
+ # @return [Hash] Returns the object in the form of hash
296
+ def to_hash
297
+ hash = {}
298
+ self.class.attribute_map.each_pair do |attr, param|
299
+ value = self.send(attr)
300
+ if value.nil?
301
+ is_nullable = self.class.openapi_nullable.include?(attr)
302
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
303
+ end
304
+
305
+ hash[param] = _to_hash(value)
306
+ end
307
+ hash
308
+ end
309
+
310
+ end
311
+
312
+ end
@@ -1,9 +1,9 @@
1
1
  =begin
2
- #Rocketstack API
2
+ #Rocketstack Control Plane API
3
3
 
4
- #API for Functions, Queues, KV, Storage, Cron, and Scheduler.
4
+ #Combined API for Functions, Queues, KV, Storage, Cron, and Scheduler.
5
5
 
6
- The version of the OpenAPI document: 1.0.3
6
+ The version of the OpenAPI document: 1.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -1,9 +1,9 @@
1
1
  =begin
2
- #Rocketstack API
2
+ #Rocketstack Control Plane API
3
3
 
4
- #API for Functions, Queues, KV, Storage, Cron, and Scheduler.
4
+ #Combined API for Functions, Queues, KV, Storage, Cron, and Scheduler.
5
5
 
6
- The version of the OpenAPI document: 1.0.3
6
+ The version of the OpenAPI document: 1.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -1,9 +1,9 @@
1
1
  =begin
2
- #Rocketstack API
2
+ #Rocketstack Control Plane API
3
3
 
4
- #API for Functions, Queues, KV, Storage, Cron, and Scheduler.
4
+ #Combined API for Functions, Queues, KV, Storage, Cron, and Scheduler.
5
5
 
6
- The version of the OpenAPI document: 1.0.3
6
+ The version of the OpenAPI document: 1.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0