ittybit 0.8.14 → 1.0.0

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 (187) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ittybit/automations/client.rb +80 -60
  3. data/lib/ittybit/automations/types/automations_create_request_workflow_item.rb +81 -0
  4. data/lib/ittybit/automations/types/automations_create_request_workflow_item_kind.rb +20 -0
  5. data/lib/ittybit/automations/types/automations_create_request_workflow_item_next_item.rb +71 -0
  6. data/lib/ittybit/automations/types/automations_create_response.rb +133 -0
  7. data/lib/ittybit/automations/types/automations_create_response_status.rb +10 -0
  8. data/lib/ittybit/automations/types/automations_create_response_trigger.rb +67 -0
  9. data/lib/ittybit/automations/types/automations_create_response_workflow_item.rb +61 -0
  10. data/lib/ittybit/automations/types/automations_create_response_workflow_item_conditions.rb +86 -0
  11. data/lib/ittybit/automations/types/automations_create_response_workflow_item_conditions_conditions_item.rb +71 -0
  12. data/lib/ittybit/automations/types/automations_create_response_workflow_item_conditions_next_item.rb +71 -0
  13. data/lib/ittybit/automations/types/automations_create_response_workflow_item_ref.rb +83 -0
  14. data/lib/ittybit/automations/types/automations_create_response_workflow_item_ref_kind.rb +20 -0
  15. data/lib/ittybit/automations/types/automations_create_response_workflow_item_ref_next_item.rb +71 -0
  16. data/lib/ittybit/automations/types/automations_delete_response.rb +59 -0
  17. data/lib/ittybit/automations/types/automations_get_response.rb +133 -0
  18. data/lib/ittybit/automations/types/automations_get_response_status.rb +10 -0
  19. data/lib/ittybit/automations/types/automations_get_response_trigger.rb +67 -0
  20. data/lib/ittybit/automations/types/automations_get_response_workflow_item.rb +60 -0
  21. data/lib/ittybit/automations/types/automations_get_response_workflow_item_conditions.rb +86 -0
  22. data/lib/ittybit/automations/types/automations_get_response_workflow_item_conditions_conditions_item.rb +71 -0
  23. data/lib/ittybit/automations/types/automations_get_response_workflow_item_conditions_next_item.rb +71 -0
  24. data/lib/ittybit/automations/types/automations_get_response_workflow_item_ref.rb +82 -0
  25. data/lib/ittybit/automations/types/automations_get_response_workflow_item_ref_kind.rb +20 -0
  26. data/lib/ittybit/automations/types/automations_get_response_workflow_item_ref_next_item.rb +71 -0
  27. data/lib/ittybit/automations/types/automations_list_response_item.rb +133 -0
  28. data/lib/ittybit/automations/types/automations_list_response_item_status.rb +10 -0
  29. data/lib/ittybit/automations/types/automations_list_response_item_trigger.rb +67 -0
  30. data/lib/ittybit/automations/types/automations_list_response_item_workflow_item.rb +61 -0
  31. data/lib/ittybit/automations/types/automations_list_response_item_workflow_item_conditions.rb +86 -0
  32. data/lib/ittybit/automations/types/automations_list_response_item_workflow_item_conditions_conditions_item.rb +71 -0
  33. data/lib/ittybit/automations/types/automations_list_response_item_workflow_item_conditions_next_item.rb +71 -0
  34. data/lib/ittybit/automations/types/automations_list_response_item_workflow_item_ref.rb +83 -0
  35. data/lib/ittybit/automations/types/automations_list_response_item_workflow_item_ref_kind.rb +20 -0
  36. data/lib/ittybit/automations/types/automations_list_response_item_workflow_item_ref_next_item.rb +71 -0
  37. data/lib/ittybit/automations/types/automations_update_request_workflow_item.rb +81 -0
  38. data/lib/ittybit/automations/types/automations_update_request_workflow_item_kind.rb +20 -0
  39. data/lib/ittybit/automations/types/automations_update_request_workflow_item_next_item.rb +71 -0
  40. data/lib/ittybit/automations/types/automations_update_response.rb +133 -0
  41. data/lib/ittybit/automations/types/automations_update_response_status.rb +10 -0
  42. data/lib/ittybit/automations/types/automations_update_response_trigger.rb +67 -0
  43. data/lib/ittybit/automations/types/automations_update_response_workflow_item.rb +61 -0
  44. data/lib/ittybit/automations/types/automations_update_response_workflow_item_conditions.rb +86 -0
  45. data/lib/ittybit/automations/types/automations_update_response_workflow_item_conditions_conditions_item.rb +71 -0
  46. data/lib/ittybit/automations/types/automations_update_response_workflow_item_conditions_next_item.rb +71 -0
  47. data/lib/ittybit/automations/types/automations_update_response_workflow_item_ref.rb +83 -0
  48. data/lib/ittybit/automations/types/automations_update_response_workflow_item_ref_kind.rb +20 -0
  49. data/lib/ittybit/automations/types/automations_update_response_workflow_item_ref_next_item.rb +71 -0
  50. data/lib/ittybit/files/client.rb +76 -55
  51. data/lib/ittybit/files/types/files_create_response.rb +317 -0
  52. data/lib/ittybit/files/types/files_create_response_kind.rb +11 -0
  53. data/lib/ittybit/files/types/files_create_response_object.rb +11 -0
  54. data/lib/ittybit/files/types/files_create_response_status.rb +12 -0
  55. data/lib/ittybit/files/types/files_delete_response.rb +59 -0
  56. data/lib/ittybit/files/types/files_get_response.rb +317 -0
  57. data/lib/ittybit/files/types/files_get_response_kind.rb +11 -0
  58. data/lib/ittybit/files/types/files_get_response_object.rb +11 -0
  59. data/lib/ittybit/files/types/files_get_response_status.rb +12 -0
  60. data/lib/ittybit/files/types/files_list_response_item.rb +317 -0
  61. data/lib/ittybit/files/types/files_list_response_item_kind.rb +11 -0
  62. data/lib/ittybit/files/types/files_list_response_item_object.rb +11 -0
  63. data/lib/ittybit/files/types/files_list_response_item_status.rb +12 -0
  64. data/lib/ittybit/files/types/files_update_response.rb +317 -0
  65. data/lib/ittybit/files/types/files_update_response_kind.rb +11 -0
  66. data/lib/ittybit/files/types/files_update_response_object.rb +11 -0
  67. data/lib/ittybit/files/types/files_update_response_status.rb +12 -0
  68. data/lib/ittybit/media/client.rb +77 -56
  69. data/lib/ittybit/media/types/media_create_response.rb +175 -0
  70. data/lib/ittybit/media/types/media_create_response_files_item.rb +262 -0
  71. data/lib/ittybit/media/types/media_create_response_files_item_kind.rb +11 -0
  72. data/lib/ittybit/media/types/media_create_response_files_item_object.rb +11 -0
  73. data/lib/ittybit/media/types/media_create_response_files_item_orientation.rb +11 -0
  74. data/lib/ittybit/media/types/media_create_response_files_item_status.rb +12 -0
  75. data/lib/ittybit/media/types/media_create_response_kind.rb +11 -0
  76. data/lib/ittybit/media/types/media_delete_response.rb +59 -0
  77. data/lib/ittybit/media/types/media_get_response.rb +175 -0
  78. data/lib/ittybit/media/types/media_get_response_files_item.rb +262 -0
  79. data/lib/ittybit/media/types/media_get_response_files_item_kind.rb +11 -0
  80. data/lib/ittybit/media/types/media_get_response_files_item_object.rb +11 -0
  81. data/lib/ittybit/media/types/media_get_response_files_item_orientation.rb +11 -0
  82. data/lib/ittybit/media/types/media_get_response_files_item_status.rb +12 -0
  83. data/lib/ittybit/media/types/media_get_response_kind.rb +11 -0
  84. data/lib/ittybit/media/types/media_update_response.rb +175 -0
  85. data/lib/ittybit/media/types/media_update_response_files_item.rb +262 -0
  86. data/lib/ittybit/media/types/media_update_response_files_item_kind.rb +11 -0
  87. data/lib/ittybit/media/types/media_update_response_files_item_object.rb +11 -0
  88. data/lib/ittybit/media/types/media_update_response_files_item_orientation.rb +11 -0
  89. data/lib/ittybit/media/types/media_update_response_files_item_status.rb +12 -0
  90. data/lib/ittybit/media/types/media_update_response_kind.rb +11 -0
  91. data/lib/ittybit/signatures/client.rb +13 -11
  92. data/lib/ittybit/signatures/types/signatures_create_response.rb +112 -0
  93. data/lib/ittybit/tasks/client.rb +47 -99
  94. data/lib/ittybit/tasks/types/tasks_create_response.rb +186 -0
  95. data/lib/ittybit/tasks/types/tasks_create_response_kind.rb +23 -0
  96. data/lib/ittybit/tasks/types/tasks_create_response_results.rb +76 -0
  97. data/lib/ittybit/tasks/types/tasks_create_response_status.rb +16 -0
  98. data/lib/ittybit/tasks/types/tasks_get_response.rb +186 -0
  99. data/lib/ittybit/tasks/types/tasks_get_response_kind.rb +23 -0
  100. data/lib/ittybit/tasks/types/tasks_get_response_results.rb +76 -0
  101. data/lib/ittybit/tasks/types/tasks_get_response_status.rb +16 -0
  102. data/lib/ittybit/tasks/types/tasks_list_response_item.rb +186 -0
  103. data/lib/ittybit/tasks/types/tasks_list_response_item_kind.rb +23 -0
  104. data/lib/ittybit/tasks/types/tasks_list_response_item_results.rb +76 -0
  105. data/lib/ittybit/tasks/types/tasks_list_response_item_status.rb +16 -0
  106. data/lib/ittybit/types/automation_list_response.rb +2 -98
  107. data/lib/ittybit/types/automation_list_response_item.rb +131 -0
  108. data/lib/ittybit/types/automation_list_response_item_status.rb +8 -0
  109. data/lib/ittybit/types/automation_list_response_item_trigger.rb +65 -0
  110. data/lib/ittybit/types/automation_list_response_item_workflow_item.rb +57 -0
  111. data/lib/ittybit/types/automation_list_response_item_workflow_item_conditions.rb +84 -0
  112. data/lib/ittybit/types/automation_list_response_item_workflow_item_conditions_conditions_item.rb +69 -0
  113. data/lib/ittybit/types/automation_list_response_item_workflow_item_conditions_next_item.rb +69 -0
  114. data/lib/ittybit/types/automation_list_response_item_workflow_item_ref.rb +81 -0
  115. data/lib/ittybit/types/automation_list_response_item_workflow_item_ref_kind.rb +18 -0
  116. data/lib/ittybit/types/automation_list_response_item_workflow_item_ref_next_item.rb +69 -0
  117. data/lib/ittybit/types/automation_response.rb +77 -46
  118. data/lib/ittybit/types/automation_response_status.rb +8 -0
  119. data/lib/ittybit/types/automation_response_trigger.rb +65 -0
  120. data/lib/ittybit/types/automation_response_workflow_item.rb +54 -0
  121. data/lib/ittybit/types/automation_response_workflow_item_conditions.rb +84 -0
  122. data/lib/ittybit/types/automation_response_workflow_item_conditions_conditions_item.rb +69 -0
  123. data/lib/ittybit/types/automation_response_workflow_item_conditions_next_item.rb +69 -0
  124. data/lib/ittybit/types/automation_response_workflow_item_ref.rb +79 -0
  125. data/lib/ittybit/types/automation_response_workflow_item_ref_kind.rb +18 -0
  126. data/lib/ittybit/types/automation_response_workflow_item_ref_next_item.rb +69 -0
  127. data/lib/ittybit/types/automation_workflow_item.rb +8 -8
  128. data/lib/ittybit/types/automation_workflow_item_conditions.rb +82 -0
  129. data/lib/ittybit/types/automation_workflow_item_conditions_conditions_item.rb +69 -0
  130. data/lib/ittybit/types/automation_workflow_item_conditions_next_item.rb +69 -0
  131. data/lib/ittybit/types/automation_workflow_item_ref.rb +79 -0
  132. data/lib/ittybit/types/automation_workflow_item_ref_kind.rb +18 -0
  133. data/lib/ittybit/types/automation_workflow_item_ref_next_item.rb +67 -0
  134. data/lib/ittybit/types/confirmation_response.rb +9 -52
  135. data/lib/ittybit/types/created_by.rb +5 -0
  136. data/lib/ittybit/types/error.rb +1 -53
  137. data/lib/ittybit/types/file_list_response.rb +2 -98
  138. data/lib/ittybit/types/file_list_response_item.rb +315 -0
  139. data/lib/ittybit/types/file_list_response_item_kind.rb +9 -0
  140. data/lib/ittybit/types/file_list_response_item_object.rb +9 -0
  141. data/lib/ittybit/types/file_list_response_item_status.rb +10 -0
  142. data/lib/ittybit/types/file_response.rb +264 -49
  143. data/lib/ittybit/types/file_response_kind.rb +9 -0
  144. data/lib/ittybit/types/file_response_object.rb +9 -0
  145. data/lib/ittybit/types/file_response_status.rb +10 -0
  146. data/lib/ittybit/types/kind.rb +21 -0
  147. data/lib/ittybit/types/links.rb +1 -63
  148. data/lib/ittybit/types/media.rb +4 -4
  149. data/lib/ittybit/types/media_files_item.rb +260 -0
  150. data/lib/ittybit/types/media_files_item_kind.rb +9 -0
  151. data/lib/ittybit/types/media_files_item_object.rb +9 -0
  152. data/lib/ittybit/types/media_files_item_orientation.rb +9 -0
  153. data/lib/ittybit/types/media_files_item_status.rb +10 -0
  154. data/lib/ittybit/types/media_list_response.rb +2 -98
  155. data/lib/ittybit/types/media_list_response_item.rb +173 -0
  156. data/lib/ittybit/types/media_list_response_item_files_item.rb +260 -0
  157. data/lib/ittybit/types/media_list_response_item_files_item_kind.rb +9 -0
  158. data/lib/ittybit/types/media_list_response_item_files_item_object.rb +9 -0
  159. data/lib/ittybit/types/media_list_response_item_files_item_orientation.rb +9 -0
  160. data/lib/ittybit/types/media_list_response_item_files_item_status.rb +10 -0
  161. data/lib/ittybit/types/media_list_response_item_kind.rb +9 -0
  162. data/lib/ittybit/types/media_response.rb +121 -48
  163. data/lib/ittybit/types/media_response_files_item.rb +260 -0
  164. data/lib/ittybit/types/media_response_files_item_kind.rb +9 -0
  165. data/lib/ittybit/types/media_response_files_item_object.rb +9 -0
  166. data/lib/ittybit/types/media_response_files_item_orientation.rb +9 -0
  167. data/lib/ittybit/types/media_response_files_item_status.rb +10 -0
  168. data/lib/ittybit/types/media_response_kind.rb +9 -0
  169. data/lib/ittybit/types/parent_id.rb +5 -0
  170. data/lib/ittybit/types/progress.rb +5 -0
  171. data/lib/ittybit/types/signature_response.rb +59 -49
  172. data/lib/ittybit/types/status.rb +14 -0
  173. data/lib/ittybit/types/task_list_response.rb +2 -98
  174. data/lib/ittybit/types/task_list_response_item.rb +184 -0
  175. data/lib/ittybit/types/task_list_response_item_kind.rb +21 -0
  176. data/lib/ittybit/types/task_list_response_item_results.rb +74 -0
  177. data/lib/ittybit/types/task_list_response_item_status.rb +14 -0
  178. data/lib/ittybit/types/task_response.rb +128 -44
  179. data/lib/ittybit/types/task_response_kind.rb +21 -0
  180. data/lib/ittybit/types/task_response_results.rb +74 -0
  181. data/lib/ittybit/types/task_response_status.rb +14 -0
  182. data/lib/requests.rb +2 -2
  183. data/lib/types_export.rb +168 -9
  184. metadata +163 -5
  185. data/lib/ittybit/types/links_list.rb +0 -88
  186. data/lib/ittybit/types/meta_list.rb +0 -128
  187. data/lib/ittybit/types/meta_list_type.rb +0 -8
@@ -0,0 +1,262 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "media_update_response_files_item_object"
4
+ require_relative "media_update_response_files_item_kind"
5
+ require_relative "media_update_response_files_item_orientation"
6
+ require "date"
7
+ require_relative "media_update_response_files_item_status"
8
+ require "ostruct"
9
+ require "json"
10
+
11
+ module Ittybit
12
+ class Media
13
+ class MediaUpdateResponseFilesItem
14
+ # @return [String]
15
+ attr_reader :id
16
+ # @return [Ittybit::Media::MediaUpdateResponseFilesItemObject]
17
+ attr_reader :object
18
+ # @return [Ittybit::Media::MediaUpdateResponseFilesItemKind]
19
+ attr_reader :kind
20
+ # @return [String]
21
+ attr_reader :type
22
+ # @return [String]
23
+ attr_reader :codec
24
+ # @return [String]
25
+ attr_reader :container
26
+ # @return [Integer]
27
+ attr_reader :width
28
+ # @return [Integer]
29
+ attr_reader :height
30
+ # @return [Ittybit::Media::MediaUpdateResponseFilesItemOrientation]
31
+ attr_reader :orientation
32
+ # @return [Float]
33
+ attr_reader :rotation
34
+ # @return [Boolean]
35
+ attr_reader :transparency
36
+ # @return [Integer]
37
+ attr_reader :frames
38
+ # @return [Float]
39
+ attr_reader :duration
40
+ # @return [Float]
41
+ attr_reader :fps
42
+ # @return [Integer]
43
+ attr_reader :filesize
44
+ # @return [Integer]
45
+ attr_reader :bitrate
46
+ # @return [String]
47
+ attr_reader :ref
48
+ # @return [String]
49
+ attr_reader :folder
50
+ # @return [String]
51
+ attr_reader :filename
52
+ # @return [String]
53
+ attr_reader :url
54
+ # @return [Hash{String => Object}]
55
+ attr_reader :metadata
56
+ # @return [Boolean]
57
+ attr_reader :original
58
+ # @return [DateTime]
59
+ attr_reader :created
60
+ # @return [DateTime]
61
+ attr_reader :updated
62
+ # @return [Ittybit::Media::MediaUpdateResponseFilesItemStatus]
63
+ attr_reader :status
64
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
65
+ attr_reader :additional_properties
66
+ # @return [Object]
67
+ attr_reader :_field_set
68
+ protected :_field_set
69
+
70
+ OMIT = Object.new
71
+
72
+ # @param id [String]
73
+ # @param object [Ittybit::Media::MediaUpdateResponseFilesItemObject]
74
+ # @param kind [Ittybit::Media::MediaUpdateResponseFilesItemKind]
75
+ # @param type [String]
76
+ # @param codec [String]
77
+ # @param container [String]
78
+ # @param width [Integer]
79
+ # @param height [Integer]
80
+ # @param orientation [Ittybit::Media::MediaUpdateResponseFilesItemOrientation]
81
+ # @param rotation [Float]
82
+ # @param transparency [Boolean]
83
+ # @param frames [Integer]
84
+ # @param duration [Float]
85
+ # @param fps [Float]
86
+ # @param filesize [Integer]
87
+ # @param bitrate [Integer]
88
+ # @param ref [String]
89
+ # @param folder [String]
90
+ # @param filename [String]
91
+ # @param url [String]
92
+ # @param metadata [Hash{String => Object}]
93
+ # @param original [Boolean]
94
+ # @param created [DateTime]
95
+ # @param updated [DateTime]
96
+ # @param status [Ittybit::Media::MediaUpdateResponseFilesItemStatus]
97
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
98
+ # @return [Ittybit::Media::MediaUpdateResponseFilesItem]
99
+ def initialize(id:, object:, kind:, type:, filesize:, url:, created:, updated:, status:, codec: OMIT, container: OMIT, width: OMIT, height: OMIT,
100
+ orientation: OMIT, rotation: OMIT, transparency: OMIT, frames: OMIT, duration: OMIT, fps: OMIT, bitrate: OMIT, ref: OMIT, folder: OMIT, filename: OMIT, metadata: OMIT, original: OMIT, additional_properties: nil)
101
+ @id = id
102
+ @object = object
103
+ @kind = kind
104
+ @type = type
105
+ @codec = codec if codec != OMIT
106
+ @container = container if container != OMIT
107
+ @width = width if width != OMIT
108
+ @height = height if height != OMIT
109
+ @orientation = orientation if orientation != OMIT
110
+ @rotation = rotation if rotation != OMIT
111
+ @transparency = transparency if transparency != OMIT
112
+ @frames = frames if frames != OMIT
113
+ @duration = duration if duration != OMIT
114
+ @fps = fps if fps != OMIT
115
+ @filesize = filesize
116
+ @bitrate = bitrate if bitrate != OMIT
117
+ @ref = ref if ref != OMIT
118
+ @folder = folder if folder != OMIT
119
+ @filename = filename if filename != OMIT
120
+ @url = url
121
+ @metadata = metadata if metadata != OMIT
122
+ @original = original if original != OMIT
123
+ @created = created
124
+ @updated = updated
125
+ @status = status
126
+ @additional_properties = additional_properties
127
+ @_field_set = {
128
+ "id": id,
129
+ "object": object,
130
+ "kind": kind,
131
+ "type": type,
132
+ "codec": codec,
133
+ "container": container,
134
+ "width": width,
135
+ "height": height,
136
+ "orientation": orientation,
137
+ "rotation": rotation,
138
+ "transparency": transparency,
139
+ "frames": frames,
140
+ "duration": duration,
141
+ "fps": fps,
142
+ "filesize": filesize,
143
+ "bitrate": bitrate,
144
+ "ref": ref,
145
+ "folder": folder,
146
+ "filename": filename,
147
+ "url": url,
148
+ "metadata": metadata,
149
+ "original": original,
150
+ "created": created,
151
+ "updated": updated,
152
+ "status": status
153
+ }.reject do |_k, v|
154
+ v == OMIT
155
+ end
156
+ end
157
+
158
+ # Deserialize a JSON object to an instance of MediaUpdateResponseFilesItem
159
+ #
160
+ # @param json_object [String]
161
+ # @return [Ittybit::Media::MediaUpdateResponseFilesItem]
162
+ def self.from_json(json_object:)
163
+ struct = JSON.parse(json_object, object_class: OpenStruct)
164
+ parsed_json = JSON.parse(json_object)
165
+ id = parsed_json["id"]
166
+ object = parsed_json["object"]
167
+ kind = parsed_json["kind"]
168
+ type = parsed_json["type"]
169
+ codec = parsed_json["codec"]
170
+ container = parsed_json["container"]
171
+ width = parsed_json["width"]
172
+ height = parsed_json["height"]
173
+ orientation = parsed_json["orientation"]
174
+ rotation = parsed_json["rotation"]
175
+ transparency = parsed_json["transparency"]
176
+ frames = parsed_json["frames"]
177
+ duration = parsed_json["duration"]
178
+ fps = parsed_json["fps"]
179
+ filesize = parsed_json["filesize"]
180
+ bitrate = parsed_json["bitrate"]
181
+ ref = parsed_json["ref"]
182
+ folder = parsed_json["folder"]
183
+ filename = parsed_json["filename"]
184
+ url = parsed_json["url"]
185
+ metadata = parsed_json["metadata"]
186
+ original = parsed_json["original"]
187
+ created = (DateTime.parse(parsed_json["created"]) unless parsed_json["created"].nil?)
188
+ updated = (DateTime.parse(parsed_json["updated"]) unless parsed_json["updated"].nil?)
189
+ status = parsed_json["status"]
190
+ new(
191
+ id: id,
192
+ object: object,
193
+ kind: kind,
194
+ type: type,
195
+ codec: codec,
196
+ container: container,
197
+ width: width,
198
+ height: height,
199
+ orientation: orientation,
200
+ rotation: rotation,
201
+ transparency: transparency,
202
+ frames: frames,
203
+ duration: duration,
204
+ fps: fps,
205
+ filesize: filesize,
206
+ bitrate: bitrate,
207
+ ref: ref,
208
+ folder: folder,
209
+ filename: filename,
210
+ url: url,
211
+ metadata: metadata,
212
+ original: original,
213
+ created: created,
214
+ updated: updated,
215
+ status: status,
216
+ additional_properties: struct
217
+ )
218
+ end
219
+
220
+ # Serialize an instance of MediaUpdateResponseFilesItem to a JSON object
221
+ #
222
+ # @return [String]
223
+ def to_json(*_args)
224
+ @_field_set&.to_json
225
+ end
226
+
227
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
228
+ # hash and check each fields type against the current object's property
229
+ # definitions.
230
+ #
231
+ # @param obj [Object]
232
+ # @return [Void]
233
+ def self.validate_raw(obj:)
234
+ obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
235
+ obj.object.is_a?(Ittybit::Media::MediaUpdateResponseFilesItemObject) != false || raise("Passed value for field obj.object is not the expected type, validation failed.")
236
+ obj.kind.is_a?(Ittybit::Media::MediaUpdateResponseFilesItemKind) != false || raise("Passed value for field obj.kind is not the expected type, validation failed.")
237
+ obj.type.is_a?(String) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
238
+ obj.codec&.is_a?(String) != false || raise("Passed value for field obj.codec is not the expected type, validation failed.")
239
+ obj.container&.is_a?(String) != false || raise("Passed value for field obj.container is not the expected type, validation failed.")
240
+ obj.width&.is_a?(Integer) != false || raise("Passed value for field obj.width is not the expected type, validation failed.")
241
+ obj.height&.is_a?(Integer) != false || raise("Passed value for field obj.height is not the expected type, validation failed.")
242
+ obj.orientation&.is_a?(Ittybit::Media::MediaUpdateResponseFilesItemOrientation) != false || raise("Passed value for field obj.orientation is not the expected type, validation failed.")
243
+ obj.rotation&.is_a?(Float) != false || raise("Passed value for field obj.rotation is not the expected type, validation failed.")
244
+ obj.transparency&.is_a?(Boolean) != false || raise("Passed value for field obj.transparency is not the expected type, validation failed.")
245
+ obj.frames&.is_a?(Integer) != false || raise("Passed value for field obj.frames is not the expected type, validation failed.")
246
+ obj.duration&.is_a?(Float) != false || raise("Passed value for field obj.duration is not the expected type, validation failed.")
247
+ obj.fps&.is_a?(Float) != false || raise("Passed value for field obj.fps is not the expected type, validation failed.")
248
+ obj.filesize.is_a?(Integer) != false || raise("Passed value for field obj.filesize is not the expected type, validation failed.")
249
+ obj.bitrate&.is_a?(Integer) != false || raise("Passed value for field obj.bitrate is not the expected type, validation failed.")
250
+ obj.ref&.is_a?(String) != false || raise("Passed value for field obj.ref is not the expected type, validation failed.")
251
+ obj.folder&.is_a?(String) != false || raise("Passed value for field obj.folder is not the expected type, validation failed.")
252
+ obj.filename&.is_a?(String) != false || raise("Passed value for field obj.filename is not the expected type, validation failed.")
253
+ obj.url.is_a?(String) != false || raise("Passed value for field obj.url is not the expected type, validation failed.")
254
+ obj.metadata&.is_a?(Hash) != false || raise("Passed value for field obj.metadata is not the expected type, validation failed.")
255
+ obj.original&.is_a?(Boolean) != false || raise("Passed value for field obj.original is not the expected type, validation failed.")
256
+ obj.created.is_a?(DateTime) != false || raise("Passed value for field obj.created is not the expected type, validation failed.")
257
+ obj.updated.is_a?(DateTime) != false || raise("Passed value for field obj.updated is not the expected type, validation failed.")
258
+ obj.status.is_a?(Ittybit::Media::MediaUpdateResponseFilesItemStatus) != false || raise("Passed value for field obj.status is not the expected type, validation failed.")
259
+ end
260
+ end
261
+ end
262
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Ittybit
4
+ class Media
5
+ class MediaUpdateResponseFilesItemKind
6
+ VIDEO = "video"
7
+ IMAGE = "image"
8
+ AUDIO = "audio"
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Ittybit
4
+ class Media
5
+ class MediaUpdateResponseFilesItemObject
6
+ SOURCE = "source"
7
+ TRACK = "track"
8
+ INTELLIGENCE = "intelligence"
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Ittybit
4
+ class Media
5
+ class MediaUpdateResponseFilesItemOrientation
6
+ LANDSCAPE = "landscape"
7
+ PORTRAIT = "portrait"
8
+ SQUARE = "square"
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Ittybit
4
+ class Media
5
+ class MediaUpdateResponseFilesItemStatus
6
+ WAITING = "waiting"
7
+ PROCESSING = "processing"
8
+ READY = "ready"
9
+ FAILED = "failed"
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Ittybit
4
+ class Media
5
+ class MediaUpdateResponseKind
6
+ VIDEO = "video"
7
+ IMAGE = "image"
8
+ AUDIO = "audio"
9
+ end
10
+ end
11
+ end
@@ -2,7 +2,7 @@
2
2
 
3
3
  require_relative "../../requests"
4
4
  require_relative "types/signatures_create_request_method"
5
- require_relative "../types/signature_response"
5
+ require_relative "types/signatures_create_response"
6
6
  require "async"
7
7
 
8
8
  module Ittybit
@@ -26,7 +26,7 @@ module Ittybit
26
26
  # @param expiry [Integer]
27
27
  # @param method [Ittybit::Signatures::SignaturesCreateRequestMethod]
28
28
  # @param request_options [Ittybit::RequestOptions]
29
- # @return [Ittybit::SignatureResponse]
29
+ # @return [Ittybit::Signatures::SignaturesCreateResponse]
30
30
  # @example
31
31
  # api = Ittybit::Client.new(
32
32
  # base_url: "https://api.example.com",
@@ -45,9 +45,10 @@ module Ittybit
45
45
  req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
46
46
  req.headers["ACCEPT_VERSION"] = request_options.version unless request_options&.version.nil?
47
47
  req.headers = {
48
- **(req.headers || {}),
49
- **@request_client.get_headers,
50
- **(request_options&.additional_headers || {})
48
+ **(req.headers || {}),
49
+ **@request_client.get_headers,
50
+ **(request_options&.additional_headers || {}),
51
+ "Accept-Version": "2025-08-20"
51
52
  }.compact
52
53
  unless request_options.nil? || request_options&.additional_query_parameters.nil?
53
54
  req.params = { **(request_options&.additional_query_parameters || {}) }.compact
@@ -61,7 +62,7 @@ module Ittybit
61
62
  }.compact
62
63
  req.url "#{@request_client.get_url(request_options: request_options)}/signatures"
63
64
  end
64
- Ittybit::SignatureResponse.from_json(json_object: response.body)
65
+ Ittybit::Signatures::SignaturesCreateResponse.from_json(json_object: response.body)
65
66
  end
66
67
  end
67
68
 
@@ -85,7 +86,7 @@ module Ittybit
85
86
  # @param expiry [Integer]
86
87
  # @param method [Ittybit::Signatures::SignaturesCreateRequestMethod]
87
88
  # @param request_options [Ittybit::RequestOptions]
88
- # @return [Ittybit::SignatureResponse]
89
+ # @return [Ittybit::Signatures::SignaturesCreateResponse]
89
90
  # @example
90
91
  # api = Ittybit::Client.new(
91
92
  # base_url: "https://api.example.com",
@@ -105,9 +106,10 @@ module Ittybit
105
106
  req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
106
107
  req.headers["ACCEPT_VERSION"] = request_options.version unless request_options&.version.nil?
107
108
  req.headers = {
108
- **(req.headers || {}),
109
- **@request_client.get_headers,
110
- **(request_options&.additional_headers || {})
109
+ **(req.headers || {}),
110
+ **@request_client.get_headers,
111
+ **(request_options&.additional_headers || {}),
112
+ "Accept-Version": "2025-08-20"
111
113
  }.compact
112
114
  unless request_options.nil? || request_options&.additional_query_parameters.nil?
113
115
  req.params = { **(request_options&.additional_query_parameters || {}) }.compact
@@ -121,7 +123,7 @@ module Ittybit
121
123
  }.compact
122
124
  req.url "#{@request_client.get_url(request_options: request_options)}/signatures"
123
125
  end
124
- Ittybit::SignatureResponse.from_json(json_object: response.body)
126
+ Ittybit::Signatures::SignaturesCreateResponse.from_json(json_object: response.body)
125
127
  end
126
128
  end
127
129
  end
@@ -0,0 +1,112 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "ostruct"
4
+ require "json"
5
+
6
+ module Ittybit
7
+ class Signatures
8
+ class SignaturesCreateResponse
9
+ # @return [String]
10
+ attr_reader :domain
11
+ # @return [String]
12
+ attr_reader :filename
13
+ # @return [String]
14
+ attr_reader :folder
15
+ # @return [Integer]
16
+ attr_reader :expiry
17
+ # @return [String]
18
+ attr_reader :method
19
+ # @return [String]
20
+ attr_reader :signature
21
+ # @return [String]
22
+ attr_reader :url
23
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
24
+ attr_reader :additional_properties
25
+ # @return [Object]
26
+ attr_reader :_field_set
27
+ protected :_field_set
28
+
29
+ OMIT = Object.new
30
+
31
+ # @param domain [String]
32
+ # @param filename [String]
33
+ # @param folder [String]
34
+ # @param expiry [Integer]
35
+ # @param method [String]
36
+ # @param signature [String]
37
+ # @param url [String]
38
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
39
+ # @return [Ittybit::Signatures::SignaturesCreateResponse]
40
+ def initialize(domain:, filename:, expiry:, method:, signature:, url:, folder: OMIT, additional_properties: nil)
41
+ @domain = domain
42
+ @filename = filename
43
+ @folder = folder if folder != OMIT
44
+ @expiry = expiry
45
+ @method = method
46
+ @signature = signature
47
+ @url = url
48
+ @additional_properties = additional_properties
49
+ @_field_set = {
50
+ "domain": domain,
51
+ "filename": filename,
52
+ "folder": folder,
53
+ "expiry": expiry,
54
+ "method": method,
55
+ "signature": signature,
56
+ "url": url
57
+ }.reject do |_k, v|
58
+ v == OMIT
59
+ end
60
+ end
61
+
62
+ # Deserialize a JSON object to an instance of SignaturesCreateResponse
63
+ #
64
+ # @param json_object [String]
65
+ # @return [Ittybit::Signatures::SignaturesCreateResponse]
66
+ def self.from_json(json_object:)
67
+ struct = JSON.parse(json_object, object_class: OpenStruct)
68
+ parsed_json = JSON.parse(json_object)
69
+ domain = parsed_json["domain"]
70
+ filename = parsed_json["filename"]
71
+ folder = parsed_json["folder"]
72
+ expiry = parsed_json["expiry"]
73
+ method = parsed_json["method"]
74
+ signature = parsed_json["signature"]
75
+ url = parsed_json["url"]
76
+ new(
77
+ domain: domain,
78
+ filename: filename,
79
+ folder: folder,
80
+ expiry: expiry,
81
+ method: method,
82
+ signature: signature,
83
+ url: url,
84
+ additional_properties: struct
85
+ )
86
+ end
87
+
88
+ # Serialize an instance of SignaturesCreateResponse to a JSON object
89
+ #
90
+ # @return [String]
91
+ def to_json(*_args)
92
+ @_field_set&.to_json
93
+ end
94
+
95
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
96
+ # hash and check each fields type against the current object's property
97
+ # definitions.
98
+ #
99
+ # @param obj [Object]
100
+ # @return [Void]
101
+ def self.validate_raw(obj:)
102
+ obj.domain.is_a?(String) != false || raise("Passed value for field obj.domain is not the expected type, validation failed.")
103
+ obj.filename.is_a?(String) != false || raise("Passed value for field obj.filename is not the expected type, validation failed.")
104
+ obj.folder&.is_a?(String) != false || raise("Passed value for field obj.folder is not the expected type, validation failed.")
105
+ obj.expiry.is_a?(Integer) != false || raise("Passed value for field obj.expiry is not the expected type, validation failed.")
106
+ obj.method.is_a?(String) != false || raise("Passed value for field obj.method is not the expected type, validation failed.")
107
+ obj.signature.is_a?(String) != false || raise("Passed value for field obj.signature is not the expected type, validation failed.")
108
+ obj.url.is_a?(String) != false || raise("Passed value for field obj.url is not the expected type, validation failed.")
109
+ end
110
+ end
111
+ end
112
+ end