openlayer 0.3.0 → 0.4.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 (230) hide show
  1. checksums.yaml +4 -4
  2. data/.ignore +2 -0
  3. data/CHANGELOG.md +23 -0
  4. data/README.md +280 -39
  5. data/SECURITY.md +27 -0
  6. data/lib/openlayer/client.rb +64 -59
  7. data/lib/openlayer/errors.rb +228 -0
  8. data/lib/openlayer/file_part.rb +58 -0
  9. data/lib/openlayer/internal/transport/base_client.rb +567 -0
  10. data/lib/openlayer/internal/transport/pooled_net_requester.rb +198 -0
  11. data/lib/openlayer/internal/type/array_of.rb +168 -0
  12. data/lib/openlayer/internal/type/base_model.rb +531 -0
  13. data/lib/openlayer/internal/type/base_page.rb +55 -0
  14. data/lib/openlayer/internal/type/boolean.rb +77 -0
  15. data/lib/openlayer/internal/type/converter.rb +327 -0
  16. data/lib/openlayer/internal/type/enum.rb +131 -0
  17. data/lib/openlayer/internal/type/file_input.rb +111 -0
  18. data/lib/openlayer/internal/type/hash_of.rb +188 -0
  19. data/lib/openlayer/internal/type/request_parameters.rb +42 -0
  20. data/lib/openlayer/internal/type/union.rb +237 -0
  21. data/lib/openlayer/internal/type/unknown.rb +81 -0
  22. data/lib/openlayer/internal/util.rb +915 -0
  23. data/lib/openlayer/internal.rb +20 -0
  24. data/lib/openlayer/models/commit_retrieve_params.rb +14 -0
  25. data/lib/openlayer/models/commit_retrieve_response.rb +275 -0
  26. data/lib/openlayer/models/commits/test_result_list_params.rb +91 -0
  27. data/lib/openlayer/models/commits/test_result_list_response.rb +566 -0
  28. data/lib/openlayer/models/inference_pipeline_delete_params.rb +14 -0
  29. data/lib/openlayer/models/inference_pipeline_retrieve_params.rb +33 -0
  30. data/lib/openlayer/models/inference_pipeline_retrieve_response.rb +605 -0
  31. data/lib/openlayer/models/inference_pipeline_update_params.rb +42 -0
  32. data/lib/openlayer/models/inference_pipeline_update_response.rb +605 -0
  33. data/lib/openlayer/models/inference_pipelines/data_stream_params.rb +463 -0
  34. data/lib/openlayer/models/inference_pipelines/data_stream_response.rb +28 -0
  35. data/lib/openlayer/models/inference_pipelines/row_update_params.rb +90 -0
  36. data/lib/openlayer/models/inference_pipelines/row_update_response.rb +28 -0
  37. data/lib/openlayer/models/inference_pipelines/test_result_list_params.rb +83 -0
  38. data/lib/openlayer/models/inference_pipelines/test_result_list_response.rb +568 -0
  39. data/lib/openlayer/models/project_create_params.rb +51 -0
  40. data/lib/openlayer/models/project_create_response.rb +262 -0
  41. data/lib/openlayer/models/project_list_params.rb +59 -0
  42. data/lib/openlayer/models/project_list_response.rb +274 -0
  43. data/lib/openlayer/models/projects/commit_create_params.rb +61 -0
  44. data/lib/openlayer/models/projects/commit_create_response.rb +277 -0
  45. data/lib/openlayer/models/projects/commit_list_params.rb +32 -0
  46. data/lib/openlayer/models/projects/commit_list_response.rb +288 -0
  47. data/lib/openlayer/models/projects/inference_pipeline_create_params.rb +229 -0
  48. data/lib/openlayer/models/projects/inference_pipeline_create_response.rb +612 -0
  49. data/lib/openlayer/models/projects/inference_pipeline_list_params.rb +40 -0
  50. data/lib/openlayer/models/projects/inference_pipeline_list_response.rb +623 -0
  51. data/lib/openlayer/models/projects/test_create_params.rb +367 -0
  52. data/lib/openlayer/models/projects/test_create_response.rb +438 -0
  53. data/lib/openlayer/models/projects/test_list_params.rb +91 -0
  54. data/lib/openlayer/models/projects/test_list_response.rb +452 -0
  55. data/lib/openlayer/models/projects/test_update_params.rb +262 -0
  56. data/lib/openlayer/models/projects/test_update_response.rb +24 -0
  57. data/lib/openlayer/models/storage/presigned_url_create_params.rb +24 -0
  58. data/lib/openlayer/models/storage/presigned_url_create_response.rb +35 -0
  59. data/lib/openlayer/models.rb +61 -0
  60. data/lib/openlayer/request_options.rb +77 -0
  61. data/lib/openlayer/resources/commits/test_results.rb +51 -0
  62. data/lib/openlayer/resources/commits.rb +38 -0
  63. data/lib/openlayer/resources/inference_pipelines/data.rb +46 -0
  64. data/lib/openlayer/resources/inference_pipelines/rows.rb +46 -0
  65. data/lib/openlayer/resources/inference_pipelines/test_results.rb +49 -0
  66. data/lib/openlayer/resources/inference_pipelines.rb +101 -0
  67. data/lib/openlayer/resources/projects/commits.rb +72 -0
  68. data/lib/openlayer/resources/projects/inference_pipelines.rb +74 -0
  69. data/lib/openlayer/resources/projects/tests.rb +135 -0
  70. data/lib/openlayer/resources/projects.rb +80 -0
  71. data/lib/openlayer/resources/storage/presigned_url.rb +38 -0
  72. data/lib/openlayer/resources/storage.rb +18 -0
  73. data/lib/openlayer/version.rb +1 -1
  74. data/lib/openlayer.rb +96 -12
  75. data/manifest.yaml +15 -0
  76. data/rbi/openlayer/client.rbi +58 -0
  77. data/rbi/openlayer/errors.rbi +205 -0
  78. data/rbi/openlayer/file_part.rbi +37 -0
  79. data/rbi/openlayer/internal/transport/base_client.rbi +293 -0
  80. data/rbi/openlayer/internal/transport/pooled_net_requester.rbi +79 -0
  81. data/rbi/openlayer/internal/type/array_of.rbi +104 -0
  82. data/rbi/openlayer/internal/type/base_model.rbi +304 -0
  83. data/rbi/openlayer/internal/type/base_page.rbi +42 -0
  84. data/rbi/openlayer/internal/type/boolean.rbi +58 -0
  85. data/rbi/openlayer/internal/type/converter.rbi +216 -0
  86. data/rbi/openlayer/internal/type/enum.rbi +82 -0
  87. data/rbi/openlayer/internal/type/file_input.rbi +59 -0
  88. data/rbi/openlayer/internal/type/hash_of.rbi +104 -0
  89. data/rbi/openlayer/internal/type/request_parameters.rbi +29 -0
  90. data/rbi/openlayer/internal/type/union.rbi +128 -0
  91. data/rbi/openlayer/internal/type/unknown.rbi +58 -0
  92. data/rbi/openlayer/internal/util.rbi +487 -0
  93. data/rbi/openlayer/internal.rbi +18 -0
  94. data/rbi/openlayer/models/commit_retrieve_params.rbi +27 -0
  95. data/rbi/openlayer/models/commit_retrieve_response.rbi +393 -0
  96. data/rbi/openlayer/models/commits/test_result_list_params.rbi +214 -0
  97. data/rbi/openlayer/models/commits/test_result_list_response.rbi +1256 -0
  98. data/rbi/openlayer/models/inference_pipeline_delete_params.rbi +30 -0
  99. data/rbi/openlayer/models/inference_pipeline_retrieve_params.rbi +101 -0
  100. data/rbi/openlayer/models/inference_pipeline_retrieve_response.rbi +1022 -0
  101. data/rbi/openlayer/models/inference_pipeline_update_params.rbi +67 -0
  102. data/rbi/openlayer/models/inference_pipeline_update_response.rbi +1018 -0
  103. data/rbi/openlayer/models/inference_pipelines/data_stream_params.rbi +750 -0
  104. data/rbi/openlayer/models/inference_pipelines/data_stream_response.rbi +73 -0
  105. data/rbi/openlayer/models/inference_pipelines/row_update_params.rbi +153 -0
  106. data/rbi/openlayer/models/inference_pipelines/row_update_response.rbi +73 -0
  107. data/rbi/openlayer/models/inference_pipelines/test_result_list_params.rbi +216 -0
  108. data/rbi/openlayer/models/inference_pipelines/test_result_list_response.rbi +1258 -0
  109. data/rbi/openlayer/models/project_create_params.rbi +99 -0
  110. data/rbi/openlayer/models/project_create_response.rbi +401 -0
  111. data/rbi/openlayer/models/project_list_params.rbi +121 -0
  112. data/rbi/openlayer/models/project_list_response.rbi +442 -0
  113. data/rbi/openlayer/models/projects/commit_create_params.rbi +125 -0
  114. data/rbi/openlayer/models/projects/commit_create_response.rbi +409 -0
  115. data/rbi/openlayer/models/projects/commit_list_params.rbi +62 -0
  116. data/rbi/openlayer/models/projects/commit_list_response.rbi +454 -0
  117. data/rbi/openlayer/models/projects/inference_pipeline_create_params.rbi +560 -0
  118. data/rbi/openlayer/models/projects/inference_pipeline_create_response.rbi +1027 -0
  119. data/rbi/openlayer/models/projects/inference_pipeline_list_params.rbi +73 -0
  120. data/rbi/openlayer/models/projects/inference_pipeline_list_response.rbi +1070 -0
  121. data/rbi/openlayer/models/projects/test_create_params.rbi +940 -0
  122. data/rbi/openlayer/models/projects/test_create_response.rbi +1026 -0
  123. data/rbi/openlayer/models/projects/test_list_params.rbi +165 -0
  124. data/rbi/openlayer/models/projects/test_list_response.rbi +1067 -0
  125. data/rbi/openlayer/models/projects/test_update_params.rbi +699 -0
  126. data/rbi/openlayer/models/projects/test_update_response.rbi +43 -0
  127. data/rbi/openlayer/models/storage/presigned_url_create_params.rbi +45 -0
  128. data/rbi/openlayer/models/storage/presigned_url_create_response.rbi +55 -0
  129. data/rbi/openlayer/models.rbi +26 -0
  130. data/rbi/openlayer/request_options.rbi +59 -0
  131. data/rbi/openlayer/resources/commits/test_results.rbi +45 -0
  132. data/rbi/openlayer/resources/commits.rbi +29 -0
  133. data/rbi/openlayer/resources/inference_pipelines/data.rbi +41 -0
  134. data/rbi/openlayer/resources/inference_pipelines/rows.rbi +40 -0
  135. data/rbi/openlayer/resources/inference_pipelines/test_results.rbi +46 -0
  136. data/rbi/openlayer/resources/inference_pipelines.rbi +79 -0
  137. data/rbi/openlayer/resources/projects/commits.rbi +60 -0
  138. data/rbi/openlayer/resources/projects/inference_pipelines.rbi +69 -0
  139. data/rbi/openlayer/resources/projects/tests.rbi +123 -0
  140. data/rbi/openlayer/resources/projects.rbi +64 -0
  141. data/rbi/openlayer/resources/storage/presigned_url.rbi +28 -0
  142. data/rbi/openlayer/resources/storage.rbi +15 -0
  143. data/rbi/openlayer/version.rbi +5 -0
  144. data/sig/openlayer/client.rbs +32 -0
  145. data/sig/openlayer/errors.rbs +117 -0
  146. data/sig/openlayer/file_part.rbs +21 -0
  147. data/sig/openlayer/internal/transport/base_client.rbs +131 -0
  148. data/sig/openlayer/internal/transport/pooled_net_requester.rbs +45 -0
  149. data/sig/openlayer/internal/type/array_of.rbs +48 -0
  150. data/sig/openlayer/internal/type/base_model.rbs +102 -0
  151. data/sig/openlayer/internal/type/base_page.rbs +24 -0
  152. data/sig/openlayer/internal/type/boolean.rbs +26 -0
  153. data/sig/openlayer/internal/type/converter.rbs +79 -0
  154. data/sig/openlayer/internal/type/enum.rbs +32 -0
  155. data/sig/openlayer/internal/type/file_input.rbs +25 -0
  156. data/sig/openlayer/internal/type/hash_of.rbs +48 -0
  157. data/sig/openlayer/internal/type/request_parameters.rbs +19 -0
  158. data/sig/openlayer/internal/type/union.rbs +52 -0
  159. data/sig/openlayer/internal/type/unknown.rbs +26 -0
  160. data/sig/openlayer/internal/util.rbs +185 -0
  161. data/sig/openlayer/internal.rbs +9 -0
  162. data/sig/openlayer/models/commit_retrieve_params.rbs +15 -0
  163. data/sig/openlayer/models/commit_retrieve_response.rbs +209 -0
  164. data/sig/openlayer/models/commits/test_result_list_params.rbs +91 -0
  165. data/sig/openlayer/models/commits/test_result_list_response.rbs +529 -0
  166. data/sig/openlayer/models/inference_pipeline_delete_params.rbs +15 -0
  167. data/sig/openlayer/models/inference_pipeline_retrieve_params.rbs +41 -0
  168. data/sig/openlayer/models/inference_pipeline_retrieve_response.rbs +493 -0
  169. data/sig/openlayer/models/inference_pipeline_update_params.rbs +34 -0
  170. data/sig/openlayer/models/inference_pipeline_update_response.rbs +493 -0
  171. data/sig/openlayer/models/inference_pipelines/data_stream_params.rbs +386 -0
  172. data/sig/openlayer/models/inference_pipelines/data_stream_response.rbs +32 -0
  173. data/sig/openlayer/models/inference_pipelines/row_update_params.rbs +75 -0
  174. data/sig/openlayer/models/inference_pipelines/row_update_response.rbs +32 -0
  175. data/sig/openlayer/models/inference_pipelines/test_result_list_params.rbs +84 -0
  176. data/sig/openlayer/models/inference_pipelines/test_result_list_response.rbs +529 -0
  177. data/sig/openlayer/models/project_create_params.rbs +53 -0
  178. data/sig/openlayer/models/project_create_response.rbs +210 -0
  179. data/sig/openlayer/models/project_list_params.rbs +68 -0
  180. data/sig/openlayer/models/project_list_response.rbs +225 -0
  181. data/sig/openlayer/models/projects/commit_create_params.rbs +82 -0
  182. data/sig/openlayer/models/projects/commit_create_response.rbs +211 -0
  183. data/sig/openlayer/models/projects/commit_list_params.rbs +34 -0
  184. data/sig/openlayer/models/projects/commit_list_response.rbs +228 -0
  185. data/sig/openlayer/models/projects/inference_pipeline_create_params.rbs +308 -0
  186. data/sig/openlayer/models/projects/inference_pipeline_create_response.rbs +495 -0
  187. data/sig/openlayer/models/projects/inference_pipeline_list_params.rbs +40 -0
  188. data/sig/openlayer/models/projects/inference_pipeline_list_response.rbs +512 -0
  189. data/sig/openlayer/models/projects/test_create_params.rbs +388 -0
  190. data/sig/openlayer/models/projects/test_create_response.rbs +427 -0
  191. data/sig/openlayer/models/projects/test_list_params.rbs +85 -0
  192. data/sig/openlayer/models/projects/test_list_response.rbs +442 -0
  193. data/sig/openlayer/models/projects/test_update_params.rbs +275 -0
  194. data/sig/openlayer/models/projects/test_update_response.rbs +25 -0
  195. data/sig/openlayer/models/storage/presigned_url_create_params.rbs +25 -0
  196. data/sig/openlayer/models/storage/presigned_url_create_response.rbs +22 -0
  197. data/sig/openlayer/models.rbs +21 -0
  198. data/sig/openlayer/request_options.rbs +34 -0
  199. data/sig/openlayer/resources/commits/test_results.rbs +19 -0
  200. data/sig/openlayer/resources/commits.rbs +14 -0
  201. data/sig/openlayer/resources/inference_pipelines/data.rbs +16 -0
  202. data/sig/openlayer/resources/inference_pipelines/rows.rbs +17 -0
  203. data/sig/openlayer/resources/inference_pipelines/test_results.rbs +18 -0
  204. data/sig/openlayer/resources/inference_pipelines.rbs +32 -0
  205. data/sig/openlayer/resources/projects/commits.rbs +25 -0
  206. data/sig/openlayer/resources/projects/inference_pipelines.rbs +26 -0
  207. data/sig/openlayer/resources/projects/tests.rbs +45 -0
  208. data/sig/openlayer/resources/projects.rbs +28 -0
  209. data/sig/openlayer/resources/storage/presigned_url.rbs +14 -0
  210. data/sig/openlayer/resources/storage.rbs +9 -0
  211. data/sig/openlayer/version.rbs +3 -0
  212. metadata +223 -91
  213. data/.env +0 -0
  214. data/.rspec +0 -3
  215. data/.rubocop.yml +0 -13
  216. data/LICENSE +0 -21
  217. data/Rakefile +0 -12
  218. data/examples/staging/.DS_Store +0 -0
  219. data/examples/staging/commit.yaml +0 -2
  220. data/examples/staging/model/model_config.yaml +0 -12
  221. data/examples/staging/validation/dataset_config.yaml +0 -12
  222. data/lib/openlayer/error.rb +0 -5
  223. data/lib/openlayer/inference_pipeline.rb +0 -36
  224. data/lib/openlayer/object.rb +0 -28
  225. data/lib/openlayer/objects/project.rb +0 -185
  226. data/lib/openlayer/objects/project_version.rb +0 -89
  227. data/lib/openlayer/services/s3_presigned_client.rb +0 -47
  228. data/lib/openlayer/services/tar_file_helper.rb +0 -55
  229. data/openlayer.gemspec +0 -45
  230. data/sig/openlayer.rbs +0 -4
@@ -0,0 +1,277 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Openlayer
4
+ module Models
5
+ module Projects
6
+ # @see Openlayer::Resources::Projects::Commits#create
7
+ class CommitCreateResponse < Openlayer::Internal::Type::BaseModel
8
+ # @!attribute commit
9
+ # The details of a commit (project version).
10
+ #
11
+ # @return [Openlayer::Models::Projects::CommitCreateResponse::Commit]
12
+ required :commit, -> { Openlayer::Models::Projects::CommitCreateResponse::Commit }
13
+
14
+ # @!attribute archived
15
+ # Whether the commit is archived.
16
+ #
17
+ # @return [Boolean, nil]
18
+ optional :archived, Openlayer::Internal::Type::Boolean, nil?: true
19
+
20
+ # @!attribute deployment_status
21
+ # The deployment status associated with the commit's model.
22
+ #
23
+ # @return [String, nil]
24
+ optional :deployment_status, String, api_name: :deploymentStatus
25
+
26
+ response_only do
27
+ # @!attribute id
28
+ # The project version (commit) id.
29
+ #
30
+ # @return [String]
31
+ required :id, String
32
+
33
+ # @!attribute date_archived
34
+ # The commit archive date.
35
+ #
36
+ # @return [Time, nil]
37
+ required :date_archived, Time, api_name: :dateArchived, nil?: true
38
+
39
+ # @!attribute date_created
40
+ # The project version (commit) creation date.
41
+ #
42
+ # @return [Time]
43
+ required :date_created, Time, api_name: :dateCreated
44
+
45
+ # @!attribute failing_goal_count
46
+ # The number of tests that are failing for the commit.
47
+ #
48
+ # @return [Integer]
49
+ required :failing_goal_count, Integer, api_name: :failingGoalCount
50
+
51
+ # @!attribute ml_model_id
52
+ # The model id.
53
+ #
54
+ # @return [String, nil]
55
+ required :ml_model_id, String, api_name: :mlModelId, nil?: true
56
+
57
+ # @!attribute passing_goal_count
58
+ # The number of tests that are passing for the commit.
59
+ #
60
+ # @return [Integer]
61
+ required :passing_goal_count, Integer, api_name: :passingGoalCount
62
+
63
+ # @!attribute project_id
64
+ # The project id.
65
+ #
66
+ # @return [String]
67
+ required :project_id, String, api_name: :projectId
68
+
69
+ # @!attribute status
70
+ # The commit status. Initially, the commit is `queued`, then, it switches to
71
+ # `running`. Finally, it can be `paused`, `failed`, or `completed`.
72
+ #
73
+ # @return [Symbol, Openlayer::Models::Projects::CommitCreateResponse::Status]
74
+ required :status, enum: -> { Openlayer::Models::Projects::CommitCreateResponse::Status }
75
+
76
+ # @!attribute status_message
77
+ # The commit status message.
78
+ #
79
+ # @return [String, nil]
80
+ required :status_message, String, api_name: :statusMessage, nil?: true
81
+
82
+ # @!attribute total_goal_count
83
+ # The total number of tests for the commit.
84
+ #
85
+ # @return [Integer]
86
+ required :total_goal_count, Integer, api_name: :totalGoalCount
87
+
88
+ # @!attribute training_dataset_id
89
+ # The training dataset id.
90
+ #
91
+ # @return [String, nil]
92
+ required :training_dataset_id, String, api_name: :trainingDatasetId, nil?: true
93
+
94
+ # @!attribute validation_dataset_id
95
+ # The validation dataset id.
96
+ #
97
+ # @return [String, nil]
98
+ required :validation_dataset_id, String, api_name: :validationDatasetId, nil?: true
99
+
100
+ # @!attribute links
101
+ #
102
+ # @return [Openlayer::Models::Projects::CommitCreateResponse::Links, nil]
103
+ optional :links, -> { Openlayer::Models::Projects::CommitCreateResponse::Links }
104
+ end
105
+
106
+ # @!method initialize(id:, commit:, date_archived:, date_created:, failing_goal_count:, ml_model_id:, passing_goal_count:, project_id:, status:, status_message:, total_goal_count:, training_dataset_id:, validation_dataset_id:, archived: nil, deployment_status: nil, links: nil)
107
+ # Some parameter documentations has been truncated, see
108
+ # {Openlayer::Models::Projects::CommitCreateResponse} for more details.
109
+ #
110
+ # @param id [String] The project version (commit) id.
111
+ #
112
+ # @param commit [Openlayer::Models::Projects::CommitCreateResponse::Commit] The details of a commit (project version).
113
+ #
114
+ # @param date_archived [Time, nil] The commit archive date.
115
+ #
116
+ # @param date_created [Time] The project version (commit) creation date.
117
+ #
118
+ # @param failing_goal_count [Integer] The number of tests that are failing for the commit.
119
+ #
120
+ # @param ml_model_id [String, nil] The model id.
121
+ #
122
+ # @param passing_goal_count [Integer] The number of tests that are passing for the commit.
123
+ #
124
+ # @param project_id [String] The project id.
125
+ #
126
+ # @param status [Symbol, Openlayer::Models::Projects::CommitCreateResponse::Status] The commit status. Initially, the commit is `queued`, then, it switches to `runn
127
+ #
128
+ # @param status_message [String, nil] The commit status message.
129
+ #
130
+ # @param total_goal_count [Integer] The total number of tests for the commit.
131
+ #
132
+ # @param training_dataset_id [String, nil] The training dataset id.
133
+ #
134
+ # @param validation_dataset_id [String, nil] The validation dataset id.
135
+ #
136
+ # @param archived [Boolean, nil] Whether the commit is archived.
137
+ #
138
+ # @param deployment_status [String] The deployment status associated with the commit's model.
139
+ #
140
+ # @param links [Openlayer::Models::Projects::CommitCreateResponse::Links]
141
+
142
+ # @see Openlayer::Models::Projects::CommitCreateResponse#commit
143
+ class Commit < Openlayer::Internal::Type::BaseModel
144
+ # @!attribute message
145
+ # The commit message.
146
+ #
147
+ # @return [String]
148
+ required :message, String
149
+
150
+ response_only do
151
+ # @!attribute id
152
+ # The commit id.
153
+ #
154
+ # @return [String]
155
+ required :id, String
156
+
157
+ # @!attribute author_id
158
+ # The author id of the commit.
159
+ #
160
+ # @return [String]
161
+ required :author_id, String, api_name: :authorId
162
+
163
+ # @!attribute file_size
164
+ # The size of the commit bundle in bytes.
165
+ #
166
+ # @return [Integer, nil]
167
+ required :file_size, Integer, api_name: :fileSize, nil?: true
168
+
169
+ # @!attribute ml_model_id
170
+ # The model id.
171
+ #
172
+ # @return [String, nil]
173
+ required :ml_model_id, String, api_name: :mlModelId, nil?: true
174
+
175
+ # @!attribute storage_uri
176
+ # The storage URI where the commit bundle is stored.
177
+ #
178
+ # @return [String]
179
+ required :storage_uri, String, api_name: :storageUri
180
+
181
+ # @!attribute training_dataset_id
182
+ # The training dataset id.
183
+ #
184
+ # @return [String, nil]
185
+ required :training_dataset_id, String, api_name: :trainingDatasetId, nil?: true
186
+
187
+ # @!attribute validation_dataset_id
188
+ # The validation dataset id.
189
+ #
190
+ # @return [String, nil]
191
+ required :validation_dataset_id, String, api_name: :validationDatasetId, nil?: true
192
+
193
+ # @!attribute date_created
194
+ # The commit creation date.
195
+ #
196
+ # @return [Time, nil]
197
+ optional :date_created, Time, api_name: :dateCreated
198
+
199
+ # @!attribute git_commit_ref
200
+ # The ref of the corresponding git commit.
201
+ #
202
+ # @return [String, nil]
203
+ optional :git_commit_ref, String, api_name: :gitCommitRef
204
+
205
+ # @!attribute git_commit_sha
206
+ # The SHA of the corresponding git commit.
207
+ #
208
+ # @return [Integer, nil]
209
+ optional :git_commit_sha, Integer, api_name: :gitCommitSha
210
+
211
+ # @!attribute git_commit_url
212
+ # The URL of the corresponding git commit.
213
+ #
214
+ # @return [String, nil]
215
+ optional :git_commit_url, String, api_name: :gitCommitUrl
216
+ end
217
+
218
+ # @!method initialize(id:, author_id:, file_size:, message:, ml_model_id:, storage_uri:, training_dataset_id:, validation_dataset_id:, date_created: nil, git_commit_ref: nil, git_commit_sha: nil, git_commit_url: nil)
219
+ # The details of a commit (project version).
220
+ #
221
+ # @param id [String] The commit id.
222
+ #
223
+ # @param author_id [String] The author id of the commit.
224
+ #
225
+ # @param file_size [Integer, nil] The size of the commit bundle in bytes.
226
+ #
227
+ # @param message [String] The commit message.
228
+ #
229
+ # @param ml_model_id [String, nil] The model id.
230
+ #
231
+ # @param storage_uri [String] The storage URI where the commit bundle is stored.
232
+ #
233
+ # @param training_dataset_id [String, nil] The training dataset id.
234
+ #
235
+ # @param validation_dataset_id [String, nil] The validation dataset id.
236
+ #
237
+ # @param date_created [Time] The commit creation date.
238
+ #
239
+ # @param git_commit_ref [String] The ref of the corresponding git commit.
240
+ #
241
+ # @param git_commit_sha [Integer] The SHA of the corresponding git commit.
242
+ #
243
+ # @param git_commit_url [String] The URL of the corresponding git commit.
244
+ end
245
+
246
+ # The commit status. Initially, the commit is `queued`, then, it switches to
247
+ # `running`. Finally, it can be `paused`, `failed`, or `completed`.
248
+ #
249
+ # @see Openlayer::Models::Projects::CommitCreateResponse#status
250
+ module Status
251
+ extend Openlayer::Internal::Type::Enum
252
+
253
+ QUEUED = :queued
254
+ RUNNING = :running
255
+ PAUSED = :paused
256
+ FAILED = :failed
257
+ COMPLETED = :completed
258
+ UNKNOWN = :unknown
259
+
260
+ # @!method self.values
261
+ # @return [Array<Symbol>]
262
+ end
263
+
264
+ # @see Openlayer::Models::Projects::CommitCreateResponse#links
265
+ class Links < Openlayer::Internal::Type::BaseModel
266
+ # @!attribute app
267
+ #
268
+ # @return [String]
269
+ required :app, String
270
+
271
+ # @!method initialize(app:)
272
+ # @param app [String]
273
+ end
274
+ end
275
+ end
276
+ end
277
+ end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Openlayer
4
+ module Models
5
+ module Projects
6
+ # @see Openlayer::Resources::Projects::Commits#list
7
+ class CommitListParams < Openlayer::Internal::Type::BaseModel
8
+ extend Openlayer::Internal::Type::RequestParameters::Converter
9
+ include Openlayer::Internal::Type::RequestParameters
10
+
11
+ # @!attribute page
12
+ # The page to return in a paginated query.
13
+ #
14
+ # @return [Integer, nil]
15
+ optional :page, Integer
16
+
17
+ # @!attribute per_page
18
+ # Maximum number of items to return per page.
19
+ #
20
+ # @return [Integer, nil]
21
+ optional :per_page, Integer
22
+
23
+ # @!method initialize(page: nil, per_page: nil, request_options: {})
24
+ # @param page [Integer] The page to return in a paginated query.
25
+ #
26
+ # @param per_page [Integer] Maximum number of items to return per page.
27
+ #
28
+ # @param request_options [Openlayer::RequestOptions, Hash{Symbol=>Object}]
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,288 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Openlayer
4
+ module Models
5
+ module Projects
6
+ # @see Openlayer::Resources::Projects::Commits#list
7
+ class CommitListResponse < Openlayer::Internal::Type::BaseModel
8
+ # @!attribute items
9
+ #
10
+ # @return [Array<Openlayer::Models::Projects::CommitListResponse::Item>]
11
+ required :items,
12
+ -> { Openlayer::Internal::Type::ArrayOf[Openlayer::Models::Projects::CommitListResponse::Item] }
13
+
14
+ # @!method initialize(items:)
15
+ # @param items [Array<Openlayer::Models::Projects::CommitListResponse::Item>]
16
+
17
+ class Item < Openlayer::Internal::Type::BaseModel
18
+ # @!attribute commit
19
+ # The details of a commit (project version).
20
+ #
21
+ # @return [Openlayer::Models::Projects::CommitListResponse::Item::Commit]
22
+ required :commit, -> { Openlayer::Models::Projects::CommitListResponse::Item::Commit }
23
+
24
+ # @!attribute archived
25
+ # Whether the commit is archived.
26
+ #
27
+ # @return [Boolean, nil]
28
+ optional :archived, Openlayer::Internal::Type::Boolean, nil?: true
29
+
30
+ # @!attribute deployment_status
31
+ # The deployment status associated with the commit's model.
32
+ #
33
+ # @return [String, nil]
34
+ optional :deployment_status, String, api_name: :deploymentStatus
35
+
36
+ response_only do
37
+ # @!attribute id
38
+ # The project version (commit) id.
39
+ #
40
+ # @return [String]
41
+ required :id, String
42
+
43
+ # @!attribute date_archived
44
+ # The commit archive date.
45
+ #
46
+ # @return [Time, nil]
47
+ required :date_archived, Time, api_name: :dateArchived, nil?: true
48
+
49
+ # @!attribute date_created
50
+ # The project version (commit) creation date.
51
+ #
52
+ # @return [Time]
53
+ required :date_created, Time, api_name: :dateCreated
54
+
55
+ # @!attribute failing_goal_count
56
+ # The number of tests that are failing for the commit.
57
+ #
58
+ # @return [Integer]
59
+ required :failing_goal_count, Integer, api_name: :failingGoalCount
60
+
61
+ # @!attribute ml_model_id
62
+ # The model id.
63
+ #
64
+ # @return [String, nil]
65
+ required :ml_model_id, String, api_name: :mlModelId, nil?: true
66
+
67
+ # @!attribute passing_goal_count
68
+ # The number of tests that are passing for the commit.
69
+ #
70
+ # @return [Integer]
71
+ required :passing_goal_count, Integer, api_name: :passingGoalCount
72
+
73
+ # @!attribute project_id
74
+ # The project id.
75
+ #
76
+ # @return [String]
77
+ required :project_id, String, api_name: :projectId
78
+
79
+ # @!attribute status
80
+ # The commit status. Initially, the commit is `queued`, then, it switches to
81
+ # `running`. Finally, it can be `paused`, `failed`, or `completed`.
82
+ #
83
+ # @return [Symbol, Openlayer::Models::Projects::CommitListResponse::Item::Status]
84
+ required :status, enum: -> { Openlayer::Models::Projects::CommitListResponse::Item::Status }
85
+
86
+ # @!attribute status_message
87
+ # The commit status message.
88
+ #
89
+ # @return [String, nil]
90
+ required :status_message, String, api_name: :statusMessage, nil?: true
91
+
92
+ # @!attribute total_goal_count
93
+ # The total number of tests for the commit.
94
+ #
95
+ # @return [Integer]
96
+ required :total_goal_count, Integer, api_name: :totalGoalCount
97
+
98
+ # @!attribute training_dataset_id
99
+ # The training dataset id.
100
+ #
101
+ # @return [String, nil]
102
+ required :training_dataset_id, String, api_name: :trainingDatasetId, nil?: true
103
+
104
+ # @!attribute validation_dataset_id
105
+ # The validation dataset id.
106
+ #
107
+ # @return [String, nil]
108
+ required :validation_dataset_id, String, api_name: :validationDatasetId, nil?: true
109
+
110
+ # @!attribute links
111
+ #
112
+ # @return [Openlayer::Models::Projects::CommitListResponse::Item::Links, nil]
113
+ optional :links, -> { Openlayer::Models::Projects::CommitListResponse::Item::Links }
114
+ end
115
+
116
+ # @!method initialize(id:, commit:, date_archived:, date_created:, failing_goal_count:, ml_model_id:, passing_goal_count:, project_id:, status:, status_message:, total_goal_count:, training_dataset_id:, validation_dataset_id:, archived: nil, deployment_status: nil, links: nil)
117
+ # Some parameter documentations has been truncated, see
118
+ # {Openlayer::Models::Projects::CommitListResponse::Item} for more details.
119
+ #
120
+ # @param id [String] The project version (commit) id.
121
+ #
122
+ # @param commit [Openlayer::Models::Projects::CommitListResponse::Item::Commit] The details of a commit (project version).
123
+ #
124
+ # @param date_archived [Time, nil] The commit archive date.
125
+ #
126
+ # @param date_created [Time] The project version (commit) creation date.
127
+ #
128
+ # @param failing_goal_count [Integer] The number of tests that are failing for the commit.
129
+ #
130
+ # @param ml_model_id [String, nil] The model id.
131
+ #
132
+ # @param passing_goal_count [Integer] The number of tests that are passing for the commit.
133
+ #
134
+ # @param project_id [String] The project id.
135
+ #
136
+ # @param status [Symbol, Openlayer::Models::Projects::CommitListResponse::Item::Status] The commit status. Initially, the commit is `queued`, then, it switches to `runn
137
+ #
138
+ # @param status_message [String, nil] The commit status message.
139
+ #
140
+ # @param total_goal_count [Integer] The total number of tests for the commit.
141
+ #
142
+ # @param training_dataset_id [String, nil] The training dataset id.
143
+ #
144
+ # @param validation_dataset_id [String, nil] The validation dataset id.
145
+ #
146
+ # @param archived [Boolean, nil] Whether the commit is archived.
147
+ #
148
+ # @param deployment_status [String] The deployment status associated with the commit's model.
149
+ #
150
+ # @param links [Openlayer::Models::Projects::CommitListResponse::Item::Links]
151
+
152
+ # @see Openlayer::Models::Projects::CommitListResponse::Item#commit
153
+ class Commit < Openlayer::Internal::Type::BaseModel
154
+ # @!attribute message
155
+ # The commit message.
156
+ #
157
+ # @return [String]
158
+ required :message, String
159
+
160
+ response_only do
161
+ # @!attribute id
162
+ # The commit id.
163
+ #
164
+ # @return [String]
165
+ required :id, String
166
+
167
+ # @!attribute author_id
168
+ # The author id of the commit.
169
+ #
170
+ # @return [String]
171
+ required :author_id, String, api_name: :authorId
172
+
173
+ # @!attribute file_size
174
+ # The size of the commit bundle in bytes.
175
+ #
176
+ # @return [Integer, nil]
177
+ required :file_size, Integer, api_name: :fileSize, nil?: true
178
+
179
+ # @!attribute ml_model_id
180
+ # The model id.
181
+ #
182
+ # @return [String, nil]
183
+ required :ml_model_id, String, api_name: :mlModelId, nil?: true
184
+
185
+ # @!attribute storage_uri
186
+ # The storage URI where the commit bundle is stored.
187
+ #
188
+ # @return [String]
189
+ required :storage_uri, String, api_name: :storageUri
190
+
191
+ # @!attribute training_dataset_id
192
+ # The training dataset id.
193
+ #
194
+ # @return [String, nil]
195
+ required :training_dataset_id, String, api_name: :trainingDatasetId, nil?: true
196
+
197
+ # @!attribute validation_dataset_id
198
+ # The validation dataset id.
199
+ #
200
+ # @return [String, nil]
201
+ required :validation_dataset_id, String, api_name: :validationDatasetId, nil?: true
202
+
203
+ # @!attribute date_created
204
+ # The commit creation date.
205
+ #
206
+ # @return [Time, nil]
207
+ optional :date_created, Time, api_name: :dateCreated
208
+
209
+ # @!attribute git_commit_ref
210
+ # The ref of the corresponding git commit.
211
+ #
212
+ # @return [String, nil]
213
+ optional :git_commit_ref, String, api_name: :gitCommitRef
214
+
215
+ # @!attribute git_commit_sha
216
+ # The SHA of the corresponding git commit.
217
+ #
218
+ # @return [Integer, nil]
219
+ optional :git_commit_sha, Integer, api_name: :gitCommitSha
220
+
221
+ # @!attribute git_commit_url
222
+ # The URL of the corresponding git commit.
223
+ #
224
+ # @return [String, nil]
225
+ optional :git_commit_url, String, api_name: :gitCommitUrl
226
+ end
227
+
228
+ # @!method initialize(id:, author_id:, file_size:, message:, ml_model_id:, storage_uri:, training_dataset_id:, validation_dataset_id:, date_created: nil, git_commit_ref: nil, git_commit_sha: nil, git_commit_url: nil)
229
+ # The details of a commit (project version).
230
+ #
231
+ # @param id [String] The commit id.
232
+ #
233
+ # @param author_id [String] The author id of the commit.
234
+ #
235
+ # @param file_size [Integer, nil] The size of the commit bundle in bytes.
236
+ #
237
+ # @param message [String] The commit message.
238
+ #
239
+ # @param ml_model_id [String, nil] The model id.
240
+ #
241
+ # @param storage_uri [String] The storage URI where the commit bundle is stored.
242
+ #
243
+ # @param training_dataset_id [String, nil] The training dataset id.
244
+ #
245
+ # @param validation_dataset_id [String, nil] The validation dataset id.
246
+ #
247
+ # @param date_created [Time] The commit creation date.
248
+ #
249
+ # @param git_commit_ref [String] The ref of the corresponding git commit.
250
+ #
251
+ # @param git_commit_sha [Integer] The SHA of the corresponding git commit.
252
+ #
253
+ # @param git_commit_url [String] The URL of the corresponding git commit.
254
+ end
255
+
256
+ # The commit status. Initially, the commit is `queued`, then, it switches to
257
+ # `running`. Finally, it can be `paused`, `failed`, or `completed`.
258
+ #
259
+ # @see Openlayer::Models::Projects::CommitListResponse::Item#status
260
+ module Status
261
+ extend Openlayer::Internal::Type::Enum
262
+
263
+ QUEUED = :queued
264
+ RUNNING = :running
265
+ PAUSED = :paused
266
+ FAILED = :failed
267
+ COMPLETED = :completed
268
+ UNKNOWN = :unknown
269
+
270
+ # @!method self.values
271
+ # @return [Array<Symbol>]
272
+ end
273
+
274
+ # @see Openlayer::Models::Projects::CommitListResponse::Item#links
275
+ class Links < Openlayer::Internal::Type::BaseModel
276
+ # @!attribute app
277
+ #
278
+ # @return [String]
279
+ required :app, String
280
+
281
+ # @!method initialize(app:)
282
+ # @param app [String]
283
+ end
284
+ end
285
+ end
286
+ end
287
+ end
288
+ end