swaggy_jenkins 0.0.1 → 1.3.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 (315) hide show
  1. checksums.yaml +5 -5
  2. data/Gemfile +3 -1
  3. data/Gemfile.lock +51 -50
  4. data/README.md +25 -33
  5. data/Rakefile +2 -0
  6. data/bin/bundle +114 -0
  7. data/bin/byebug +29 -0
  8. data/bin/coderay +29 -0
  9. data/bin/htmldiff +29 -0
  10. data/bin/ldiff +29 -0
  11. data/bin/pry +29 -0
  12. data/bin/rake +29 -0
  13. data/bin/rspec +29 -0
  14. data/bin/rubocop +29 -0
  15. data/bin/ruby-parse +29 -0
  16. data/bin/ruby-rewrite +29 -0
  17. data/docs/AllView.md +17 -5
  18. data/docs/BaseApi.md +75 -0
  19. data/docs/BlueOceanApi.md +1347 -631
  20. data/docs/BranchImpl.md +37 -15
  21. data/docs/BranchImpllinks.md +21 -7
  22. data/docs/BranchImplpermissions.md +21 -7
  23. data/docs/CauseAction.md +15 -4
  24. data/docs/CauseUserIdCause.md +19 -6
  25. data/docs/ClassesByClass.md +15 -4
  26. data/docs/ClockDifference.md +15 -4
  27. data/docs/ComputerSet.md +21 -7
  28. data/docs/DefaultCrumbIssuer.md +17 -5
  29. data/docs/DiskSpaceMonitorDescriptorDiskSpace.md +19 -6
  30. data/docs/EmptyChangeLogSet.md +15 -4
  31. data/docs/ExtensionClassContainerImpl1.md +17 -5
  32. data/docs/ExtensionClassContainerImpl1links.md +15 -4
  33. data/docs/ExtensionClassContainerImpl1map.md +17 -5
  34. data/docs/ExtensionClassImpl.md +17 -5
  35. data/docs/ExtensionClassImpllinks.md +15 -4
  36. data/docs/FavoriteImpl.md +17 -5
  37. data/docs/FavoriteImpllinks.md +15 -4
  38. data/docs/FreeStyleBuild.md +47 -20
  39. data/docs/FreeStyleProject.md +65 -29
  40. data/docs/FreeStyleProjectactions.md +13 -3
  41. data/docs/FreeStyleProjecthealthReport.md +21 -7
  42. data/docs/GenericResource.md +23 -8
  43. data/docs/GithubContent.md +27 -10
  44. data/docs/GithubFile.md +15 -4
  45. data/docs/GithubOrganization.md +19 -6
  46. data/docs/GithubOrganizationlinks.md +17 -5
  47. data/docs/GithubRepositories.md +23 -8
  48. data/docs/GithubRepositorieslinks.md +15 -4
  49. data/docs/GithubRepository.md +27 -10
  50. data/docs/GithubRepositorylinks.md +15 -4
  51. data/docs/GithubRepositorypermissions.md +19 -6
  52. data/docs/GithubRespositoryContainer.md +17 -5
  53. data/docs/GithubRespositoryContainerlinks.md +15 -4
  54. data/docs/GithubScm.md +21 -7
  55. data/docs/GithubScmlinks.md +15 -4
  56. data/docs/Hudson.md +41 -17
  57. data/docs/HudsonMasterComputer.md +43 -18
  58. data/docs/HudsonMasterComputerexecutors.md +23 -8
  59. data/docs/HudsonMasterComputermonitorData.md +25 -9
  60. data/docs/HudsonassignedLabels.md +13 -3
  61. data/docs/InputStepImpl.md +25 -9
  62. data/docs/InputStepImpllinks.md +15 -4
  63. data/docs/Label1.md +13 -3
  64. data/docs/Link.md +15 -4
  65. data/docs/ListView.md +21 -7
  66. data/docs/MultibranchPipeline.md +39 -16
  67. data/docs/NullSCM.md +13 -3
  68. data/docs/Organisation.md +15 -4
  69. data/docs/Pipeline.md +27 -10
  70. data/docs/PipelineActivity.md +41 -17
  71. data/docs/PipelineActivityartifacts.md +19 -6
  72. data/docs/PipelineBranchesitem.md +29 -11
  73. data/docs/PipelineBranchesitemlatestRun.md +39 -16
  74. data/docs/PipelineBranchesitempullRequest.md +23 -8
  75. data/docs/PipelineBranchesitempullRequestlinks.md +15 -4
  76. data/docs/PipelineFolderImpl.md +25 -9
  77. data/docs/PipelineImpl.md +29 -11
  78. data/docs/PipelineImpllinks.md +21 -7
  79. data/docs/PipelineRun.md +41 -17
  80. data/docs/PipelineRunImpl.md +41 -17
  81. data/docs/PipelineRunImpllinks.md +23 -8
  82. data/docs/PipelineRunNode.md +27 -10
  83. data/docs/PipelineRunNodeedges.md +15 -4
  84. data/docs/PipelineRunartifacts.md +19 -6
  85. data/docs/PipelineStepImpl.md +29 -11
  86. data/docs/PipelineStepImpllinks.md +17 -5
  87. data/docs/PipelinelatestRun.md +41 -17
  88. data/docs/PipelinelatestRunartifacts.md +19 -6
  89. data/docs/Queue.md +15 -4
  90. data/docs/QueueBlockedItem.md +35 -14
  91. data/docs/QueueItemImpl.md +21 -7
  92. data/docs/QueueLeftItem.md +37 -15
  93. data/docs/RemoteAccessApi.md +666 -350
  94. data/docs/ResponseTimeMonitorData.md +17 -5
  95. data/docs/StringParameterDefinition.md +21 -7
  96. data/docs/StringParameterValue.md +17 -5
  97. data/docs/SwapSpaceMonitorMemoryUsage2.md +21 -7
  98. data/docs/UnlabeledLoadStatistics.md +13 -3
  99. data/docs/User.md +21 -7
  100. data/git_push.sh +12 -10
  101. data/lib/swaggy_jenkins/api/base_api.rb +77 -0
  102. data/lib/swaggy_jenkins/api/blue_ocean_api.rb +1048 -643
  103. data/lib/swaggy_jenkins/api/remote_access_api.rb +506 -361
  104. data/lib/swaggy_jenkins/api_client.rb +95 -94
  105. data/lib/swaggy_jenkins/api_error.rb +22 -3
  106. data/lib/swaggy_jenkins/configuration.rb +91 -15
  107. data/lib/swaggy_jenkins/models/all_view.rb +59 -29
  108. data/lib/swaggy_jenkins/models/branch_impl.rb +76 -46
  109. data/lib/swaggy_jenkins/models/branch_impllinks.rb +62 -32
  110. data/lib/swaggy_jenkins/models/branch_implpermissions.rb +65 -35
  111. data/lib/swaggy_jenkins/models/cause_action.rb +58 -28
  112. data/lib/swaggy_jenkins/models/cause_user_id_cause.rb +63 -33
  113. data/lib/swaggy_jenkins/models/classes_by_class.rb +58 -28
  114. data/lib/swaggy_jenkins/models/clock_difference.rb +58 -28
  115. data/lib/swaggy_jenkins/models/computer_set.rb +64 -34
  116. data/lib/swaggy_jenkins/models/default_crumb_issuer.rb +60 -30
  117. data/lib/swaggy_jenkins/models/disk_space_monitor_descriptor_disk_space.rb +60 -30
  118. data/lib/swaggy_jenkins/models/empty_change_log_set.rb +58 -28
  119. data/lib/swaggy_jenkins/models/extension_class_container_impl1.rb +59 -29
  120. data/lib/swaggy_jenkins/models/extension_class_container_impl1links.rb +59 -29
  121. data/lib/swaggy_jenkins/models/extension_class_container_impl1map.rb +61 -31
  122. data/lib/swaggy_jenkins/models/extension_class_impl.rb +59 -29
  123. data/lib/swaggy_jenkins/models/extension_class_impllinks.rb +59 -29
  124. data/lib/swaggy_jenkins/models/favorite_impl.rb +59 -29
  125. data/lib/swaggy_jenkins/models/favorite_impllinks.rb +59 -29
  126. data/lib/swaggy_jenkins/models/free_style_build.rb +83 -53
  127. data/lib/swaggy_jenkins/models/free_style_project.rb +105 -75
  128. data/lib/swaggy_jenkins/models/free_style_projectactions.rb +57 -27
  129. data/lib/swaggy_jenkins/models/free_style_projecthealth_report.rb +63 -33
  130. data/lib/swaggy_jenkins/models/generic_resource.rb +65 -35
  131. data/lib/swaggy_jenkins/models/github_content.rb +65 -35
  132. data/lib/swaggy_jenkins/models/github_file.rb +58 -28
  133. data/lib/swaggy_jenkins/models/github_organization.rb +62 -32
  134. data/lib/swaggy_jenkins/models/github_organizationlinks.rb +60 -30
  135. data/lib/swaggy_jenkins/models/github_repositories.rb +65 -35
  136. data/lib/swaggy_jenkins/models/github_repositorieslinks.rb +59 -29
  137. data/lib/swaggy_jenkins/models/github_repository.rb +67 -37
  138. data/lib/swaggy_jenkins/models/github_repositorylinks.rb +59 -29
  139. data/lib/swaggy_jenkins/models/github_repositorypermissions.rb +63 -33
  140. data/lib/swaggy_jenkins/models/github_respository_container.rb +59 -29
  141. data/lib/swaggy_jenkins/models/github_respository_containerlinks.rb +59 -29
  142. data/lib/swaggy_jenkins/models/github_scm.rb +62 -32
  143. data/lib/swaggy_jenkins/models/github_scmlinks.rb +59 -29
  144. data/lib/swaggy_jenkins/models/hudson.rb +84 -54
  145. data/lib/swaggy_jenkins/models/hudson_master_computer.rb +89 -59
  146. data/lib/swaggy_jenkins/models/hudson_master_computerexecutors.rb +66 -36
  147. data/lib/swaggy_jenkins/models/hudson_master_computermonitor_data.rb +69 -39
  148. data/lib/swaggy_jenkins/models/hudsonassigned_labels.rb +57 -27
  149. data/lib/swaggy_jenkins/models/input_step_impl.rb +63 -33
  150. data/lib/swaggy_jenkins/models/input_step_impllinks.rb +59 -29
  151. data/lib/swaggy_jenkins/models/label1.rb +57 -27
  152. data/lib/swaggy_jenkins/models/link.rb +58 -28
  153. data/lib/swaggy_jenkins/models/list_view.rb +61 -31
  154. data/lib/swaggy_jenkins/models/multibranch_pipeline.rb +81 -51
  155. data/lib/swaggy_jenkins/models/null_scm.rb +57 -27
  156. data/lib/swaggy_jenkins/models/organisation.rb +58 -28
  157. data/lib/swaggy_jenkins/models/pipeline.rb +69 -39
  158. data/lib/swaggy_jenkins/models/pipeline_activity.rb +78 -48
  159. data/lib/swaggy_jenkins/models/pipeline_activityartifacts.rb +60 -30
  160. data/lib/swaggy_jenkins/models/pipeline_branchesitem.rb +71 -41
  161. data/lib/swaggy_jenkins/models/pipeline_branchesitemlatest_run.rb +77 -47
  162. data/lib/swaggy_jenkins/models/pipeline_branchesitempull_request.rb +62 -32
  163. data/lib/swaggy_jenkins/models/pipeline_branchesitempull_requestlinks.rb +59 -29
  164. data/lib/swaggy_jenkins/models/pipeline_folder_impl.rb +67 -37
  165. data/lib/swaggy_jenkins/models/pipeline_impl.rb +70 -40
  166. data/lib/swaggy_jenkins/models/pipeline_impllinks.rb +62 -32
  167. data/lib/swaggy_jenkins/models/pipeline_run.rb +78 -48
  168. data/lib/swaggy_jenkins/models/pipeline_run_impl.rb +78 -48
  169. data/lib/swaggy_jenkins/models/pipeline_run_impllinks.rb +63 -33
  170. data/lib/swaggy_jenkins/models/pipeline_run_node.rb +67 -37
  171. data/lib/swaggy_jenkins/models/pipeline_run_nodeedges.rb +58 -28
  172. data/lib/swaggy_jenkins/models/pipeline_runartifacts.rb +60 -30
  173. data/lib/swaggy_jenkins/models/pipeline_step_impl.rb +68 -38
  174. data/lib/swaggy_jenkins/models/pipeline_step_impllinks.rb +60 -30
  175. data/lib/swaggy_jenkins/models/pipelinelatest_run.rb +78 -48
  176. data/lib/swaggy_jenkins/models/pipelinelatest_runartifacts.rb +60 -30
  177. data/lib/swaggy_jenkins/models/queue.rb +58 -28
  178. data/lib/swaggy_jenkins/models/queue_blocked_item.rb +73 -43
  179. data/lib/swaggy_jenkins/models/queue_item_impl.rb +63 -33
  180. data/lib/swaggy_jenkins/models/queue_left_item.rb +74 -44
  181. data/lib/swaggy_jenkins/models/response_time_monitor_data.rb +59 -29
  182. data/lib/swaggy_jenkins/models/string_parameter_definition.rb +62 -32
  183. data/lib/swaggy_jenkins/models/string_parameter_value.rb +59 -29
  184. data/lib/swaggy_jenkins/models/swap_space_monitor_memory_usage2.rb +65 -35
  185. data/lib/swaggy_jenkins/models/unlabeled_load_statistics.rb +57 -27
  186. data/lib/swaggy_jenkins/models/user.rb +62 -32
  187. data/lib/swaggy_jenkins/version.rb +4 -4
  188. data/lib/swaggy_jenkins.rb +4 -16
  189. data/spec/api/base_api_spec.rb +45 -0
  190. data/spec/api/blue_ocean_api_spec.rb +76 -88
  191. data/spec/api/remote_access_api_spec.rb +28 -59
  192. data/spec/api_client_spec.rb +40 -40
  193. data/spec/configuration_spec.rb +11 -11
  194. data/spec/models/all_view_spec.rb +10 -18
  195. data/spec/models/branch_impl_spec.rb +20 -28
  196. data/spec/models/branch_impllinks_spec.rb +12 -20
  197. data/spec/models/branch_implpermissions_spec.rb +12 -20
  198. data/spec/models/cause_action_spec.rb +9 -17
  199. data/spec/models/cause_user_id_cause_spec.rb +11 -19
  200. data/spec/models/classes_by_class_spec.rb +9 -17
  201. data/spec/models/clock_difference_spec.rb +9 -17
  202. data/spec/models/computer_set_spec.rb +12 -20
  203. data/spec/models/default_crumb_issuer_spec.rb +10 -18
  204. data/spec/models/disk_space_monitor_descriptor_disk_space_spec.rb +11 -19
  205. data/spec/models/empty_change_log_set_spec.rb +9 -17
  206. data/spec/models/extension_class_container_impl1_spec.rb +10 -18
  207. data/spec/models/extension_class_container_impl1links_spec.rb +9 -17
  208. data/spec/models/extension_class_container_impl1map_spec.rb +10 -18
  209. data/spec/models/extension_class_impl_spec.rb +10 -18
  210. data/spec/models/extension_class_impllinks_spec.rb +9 -17
  211. data/spec/models/favorite_impl_spec.rb +10 -18
  212. data/spec/models/favorite_impllinks_spec.rb +9 -17
  213. data/spec/models/free_style_build_spec.rb +25 -33
  214. data/spec/models/free_style_project_spec.rb +34 -42
  215. data/spec/models/free_style_projectactions_spec.rb +8 -16
  216. data/spec/models/free_style_projecthealth_report_spec.rb +12 -20
  217. data/spec/models/generic_resource_spec.rb +13 -21
  218. data/spec/models/github_content_spec.rb +15 -23
  219. data/spec/models/github_file_spec.rb +9 -17
  220. data/spec/models/github_organization_spec.rb +11 -19
  221. data/spec/models/github_organizationlinks_spec.rb +10 -18
  222. data/spec/models/github_repositories_spec.rb +13 -21
  223. data/spec/models/github_repositorieslinks_spec.rb +9 -17
  224. data/spec/models/github_repository_spec.rb +15 -23
  225. data/spec/models/github_repositorylinks_spec.rb +9 -17
  226. data/spec/models/github_repositorypermissions_spec.rb +11 -19
  227. data/spec/models/github_respository_container_spec.rb +10 -18
  228. data/spec/models/github_respository_containerlinks_spec.rb +9 -17
  229. data/spec/models/github_scm_spec.rb +12 -20
  230. data/spec/models/github_scmlinks_spec.rb +9 -17
  231. data/spec/models/hudson_master_computer_spec.rb +23 -31
  232. data/spec/models/hudson_master_computerexecutors_spec.rb +13 -21
  233. data/spec/models/hudson_master_computermonitor_data_spec.rb +14 -22
  234. data/spec/models/hudson_spec.rb +22 -30
  235. data/spec/models/hudsonassigned_labels_spec.rb +8 -16
  236. data/spec/models/input_step_impl_spec.rb +14 -22
  237. data/spec/models/input_step_impllinks_spec.rb +9 -17
  238. data/spec/models/label1_spec.rb +8 -16
  239. data/spec/models/link_spec.rb +9 -17
  240. data/spec/models/list_view_spec.rb +12 -20
  241. data/spec/models/multibranch_pipeline_spec.rb +21 -29
  242. data/spec/models/null_scm_spec.rb +8 -16
  243. data/spec/models/organisation_spec.rb +9 -17
  244. data/spec/models/pipeline_activity_spec.rb +22 -30
  245. data/spec/models/pipeline_activityartifacts_spec.rb +11 -19
  246. data/spec/models/pipeline_branchesitem_spec.rb +16 -24
  247. data/spec/models/pipeline_branchesitemlatest_run_spec.rb +21 -29
  248. data/spec/models/pipeline_branchesitempull_request_spec.rb +13 -21
  249. data/spec/models/pipeline_branchesitempull_requestlinks_spec.rb +9 -17
  250. data/spec/models/pipeline_folder_impl_spec.rb +14 -22
  251. data/spec/models/pipeline_impl_spec.rb +16 -24
  252. data/spec/models/pipeline_impllinks_spec.rb +12 -20
  253. data/spec/models/pipeline_run_impl_spec.rb +22 -30
  254. data/spec/models/pipeline_run_impllinks_spec.rb +13 -21
  255. data/spec/models/pipeline_run_node_spec.rb +15 -23
  256. data/spec/models/pipeline_run_nodeedges_spec.rb +9 -17
  257. data/spec/models/pipeline_run_spec.rb +22 -30
  258. data/spec/models/pipeline_runartifacts_spec.rb +11 -19
  259. data/spec/models/pipeline_spec.rb +15 -23
  260. data/spec/models/pipeline_step_impl_spec.rb +16 -24
  261. data/spec/models/pipeline_step_impllinks_spec.rb +10 -18
  262. data/spec/models/pipelinelatest_run_spec.rb +22 -30
  263. data/spec/models/pipelinelatest_runartifacts_spec.rb +11 -19
  264. data/spec/models/queue_blocked_item_spec.rb +19 -27
  265. data/spec/models/queue_item_impl_spec.rb +12 -20
  266. data/spec/models/queue_left_item_spec.rb +20 -28
  267. data/spec/models/queue_spec.rb +9 -17
  268. data/spec/models/response_time_monitor_data_spec.rb +10 -18
  269. data/spec/models/string_parameter_definition_spec.rb +12 -20
  270. data/spec/models/string_parameter_value_spec.rb +10 -18
  271. data/spec/models/swap_space_monitor_memory_usage2_spec.rb +12 -20
  272. data/spec/models/unlabeled_load_statistics_spec.rb +8 -16
  273. data/spec/models/user_spec.rb +12 -20
  274. data/spec/spec_helper.rb +3 -3
  275. data/swaggy_jenkins.gemspec +6 -13
  276. metadata +97 -275
  277. data/docs/Body.md +0 -8
  278. data/docs/Organisations.md +0 -7
  279. data/docs/PipelineActivities.md +0 -7
  280. data/docs/PipelineBranches.md +0 -7
  281. data/docs/PipelineQueue.md +0 -7
  282. data/docs/PipelineRunNodeSteps.md +0 -7
  283. data/docs/PipelineRunNodes.md +0 -7
  284. data/docs/PipelineRunSteps.md +0 -7
  285. data/docs/PipelineRuns.md +0 -7
  286. data/docs/Pipelines.md +0 -7
  287. data/docs/ScmOrganisations.md +0 -7
  288. data/docs/UserFavorites.md +0 -7
  289. data/docs/Users.md +0 -7
  290. data/lib/swaggy_jenkins/models/body.rb +0 -193
  291. data/lib/swaggy_jenkins/models/organisations.rb +0 -179
  292. data/lib/swaggy_jenkins/models/pipeline_activities.rb +0 -179
  293. data/lib/swaggy_jenkins/models/pipeline_branches.rb +0 -179
  294. data/lib/swaggy_jenkins/models/pipeline_queue.rb +0 -179
  295. data/lib/swaggy_jenkins/models/pipeline_run_node_steps.rb +0 -179
  296. data/lib/swaggy_jenkins/models/pipeline_run_nodes.rb +0 -179
  297. data/lib/swaggy_jenkins/models/pipeline_run_steps.rb +0 -179
  298. data/lib/swaggy_jenkins/models/pipeline_runs.rb +0 -179
  299. data/lib/swaggy_jenkins/models/pipelines.rb +0 -179
  300. data/lib/swaggy_jenkins/models/scm_organisations.rb +0 -179
  301. data/lib/swaggy_jenkins/models/user_favorites.rb +0 -179
  302. data/lib/swaggy_jenkins/models/users.rb +0 -179
  303. data/spec/models/body_spec.rb +0 -42
  304. data/spec/models/organisations_spec.rb +0 -36
  305. data/spec/models/pipeline_activities_spec.rb +0 -36
  306. data/spec/models/pipeline_branches_spec.rb +0 -36
  307. data/spec/models/pipeline_queue_spec.rb +0 -36
  308. data/spec/models/pipeline_run_node_steps_spec.rb +0 -36
  309. data/spec/models/pipeline_run_nodes_spec.rb +0 -36
  310. data/spec/models/pipeline_run_steps_spec.rb +0 -36
  311. data/spec/models/pipeline_runs_spec.rb +0 -36
  312. data/spec/models/pipelines_spec.rb +0 -36
  313. data/spec/models/scm_organisations_spec.rb +0 -36
  314. data/spec/models/user_favorites_spec.rb +0 -36
  315. data/spec/models/users_spec.rb +0 -36
@@ -3,21 +3,20 @@
3
3
 
4
4
  #Jenkins API clients generated from Swagger / Open API specification
5
5
 
6
- OpenAPI spec version: 0.1.0
6
+ The version of the OpenAPI document: 1.3.0
7
7
  Contact: blah@cliffano.com
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.0-SNAPSHOT
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.4.0
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module SwaggyJenkinsClient
16
-
17
17
  class NullSCM
18
18
  attr_accessor :_class
19
19
 
20
-
21
20
  # Attribute mapping from ruby-style variable name to JSON key.
22
21
  def self.attribute_map
23
22
  {
@@ -25,38 +24,55 @@ module SwaggyJenkinsClient
25
24
  }
26
25
  end
27
26
 
27
+ # Returns all the JSON keys this model knows about
28
+ def self.acceptable_attributes
29
+ attribute_map.values
30
+ end
31
+
28
32
  # Attribute type mapping.
29
- def self.swagger_types
33
+ def self.openapi_types
30
34
  {
31
35
  :'_class' => :'String'
32
36
  }
33
37
  end
34
38
 
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ ])
43
+ end
44
+
35
45
  # Initializes the object
36
46
  # @param [Hash] attributes Model attributes in the form of hash
37
47
  def initialize(attributes = {})
38
- return unless attributes.is_a?(Hash)
48
+ if (!attributes.is_a?(Hash))
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggyJenkinsClient::NullSCM` initialize method"
50
+ end
39
51
 
40
- # convert string to symbol for hash key
41
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
52
+ # check to see if the attribute exists and convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}) { |(k, v), h|
54
+ if (!self.class.attribute_map.key?(k.to_sym))
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::NullSCM`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ end
57
+ h[k.to_sym] = v
58
+ }
42
59
 
43
- if attributes.has_key?(:'_class')
60
+ if attributes.key?(:'_class')
44
61
  self._class = attributes[:'_class']
45
62
  end
46
-
47
63
  end
48
64
 
49
65
  # Show invalid properties with the reasons. Usually used together with valid?
50
- # @return Array for valid properies with the reasons
66
+ # @return Array for valid properties with the reasons
51
67
  def list_invalid_properties
52
68
  invalid_properties = Array.new
53
- return invalid_properties
69
+ invalid_properties
54
70
  end
55
71
 
56
72
  # Check to see if the all the properties in the model are valid
57
73
  # @return true if the model is valid
58
74
  def valid?
59
- return true
75
+ true
60
76
  end
61
77
 
62
78
  # Checks equality by comparing each attribute.
@@ -74,26 +90,35 @@ module SwaggyJenkinsClient
74
90
  end
75
91
 
76
92
  # Calculates hash code according to all attributes.
77
- # @return [Fixnum] Hash code
93
+ # @return [Integer] Hash code
78
94
  def hash
79
95
  [_class].hash
80
96
  end
81
97
 
98
+ # Builds the object from hash
99
+ # @param [Hash] attributes Model attributes in the form of hash
100
+ # @return [Object] Returns the model itself
101
+ def self.build_from_hash(attributes)
102
+ new.build_from_hash(attributes)
103
+ end
104
+
82
105
  # Builds the object from hash
83
106
  # @param [Hash] attributes Model attributes in the form of hash
84
107
  # @return [Object] Returns the model itself
85
108
  def build_from_hash(attributes)
86
109
  return nil unless attributes.is_a?(Hash)
87
- self.class.swagger_types.each_pair do |key, type|
88
- if type =~ /\AArray<(.*)>/i
89
- # check to ensure the input is an array given that the the attribute
110
+ self.class.openapi_types.each_pair do |key, type|
111
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
112
+ self.send("#{key}=", nil)
113
+ elsif type =~ /\AArray<(.*)>/i
114
+ # check to ensure the input is an array given that the attribute
90
115
  # is documented as an array but the input is not
91
116
  if attributes[self.class.attribute_map[key]].is_a?(Array)
92
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
117
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
93
118
  end
94
119
  elsif !attributes[self.class.attribute_map[key]].nil?
95
120
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
96
- end # or else data not found in attributes(hash), not an issue as the data can be optional
121
+ end
97
122
  end
98
123
 
99
124
  self
@@ -105,8 +130,8 @@ module SwaggyJenkinsClient
105
130
  # @return [Object] Deserialized data
106
131
  def _deserialize(type, value)
107
132
  case type.to_sym
108
- when :DateTime
109
- DateTime.parse(value)
133
+ when :Time
134
+ Time.parse(value)
110
135
  when :Date
111
136
  Date.parse(value)
112
137
  when :String
@@ -115,7 +140,7 @@ module SwaggyJenkinsClient
115
140
  value.to_i
116
141
  when :Float
117
142
  value.to_f
118
- when :BOOLEAN
143
+ when :Boolean
119
144
  if value.to_s =~ /\A(true|t|yes|y|1)\z/i
120
145
  true
121
146
  else
@@ -136,8 +161,9 @@ module SwaggyJenkinsClient
136
161
  end
137
162
  end
138
163
  else # model
139
- temp_model = SwaggyJenkinsClient.const_get(type).new
140
- temp_model.build_from_hash(value)
164
+ # models (e.g. Pet) or oneOf
165
+ klass = SwaggyJenkinsClient.const_get(type)
166
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
141
167
  end
142
168
  end
143
169
 
@@ -159,7 +185,11 @@ module SwaggyJenkinsClient
159
185
  hash = {}
160
186
  self.class.attribute_map.each_pair do |attr, param|
161
187
  value = self.send(attr)
162
- next if value.nil?
188
+ if value.nil?
189
+ is_nullable = self.class.openapi_nullable.include?(attr)
190
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
191
+ end
192
+
163
193
  hash[param] = _to_hash(value)
164
194
  end
165
195
  hash
@@ -171,7 +201,7 @@ module SwaggyJenkinsClient
171
201
  # @return [Hash] Returns the value in the form of hash
172
202
  def _to_hash(value)
173
203
  if value.is_a?(Array)
174
- value.compact.map{ |v| _to_hash(v) }
204
+ value.compact.map { |v| _to_hash(v) }
175
205
  elsif value.is_a?(Hash)
176
206
  {}.tap do |hash|
177
207
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -3,23 +3,22 @@
3
3
 
4
4
  #Jenkins API clients generated from Swagger / Open API specification
5
5
 
6
- OpenAPI spec version: 0.1.0
6
+ The version of the OpenAPI document: 1.3.0
7
7
  Contact: blah@cliffano.com
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.0-SNAPSHOT
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.4.0
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module SwaggyJenkinsClient
16
-
17
17
  class Organisation
18
18
  attr_accessor :_class
19
19
 
20
20
  attr_accessor :name
21
21
 
22
-
23
22
  # Attribute mapping from ruby-style variable name to JSON key.
24
23
  def self.attribute_map
25
24
  {
@@ -28,43 +27,60 @@ module SwaggyJenkinsClient
28
27
  }
29
28
  end
30
29
 
30
+ # Returns all the JSON keys this model knows about
31
+ def self.acceptable_attributes
32
+ attribute_map.values
33
+ end
34
+
31
35
  # Attribute type mapping.
32
- def self.swagger_types
36
+ def self.openapi_types
33
37
  {
34
38
  :'_class' => :'String',
35
39
  :'name' => :'String'
36
40
  }
37
41
  end
38
42
 
43
+ # List of attributes with nullable: true
44
+ def self.openapi_nullable
45
+ Set.new([
46
+ ])
47
+ end
48
+
39
49
  # Initializes the object
40
50
  # @param [Hash] attributes Model attributes in the form of hash
41
51
  def initialize(attributes = {})
42
- return unless attributes.is_a?(Hash)
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggyJenkinsClient::Organisation` initialize method"
54
+ end
43
55
 
44
- # convert string to symbol for hash key
45
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::Organisation`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
46
63
 
47
- if attributes.has_key?(:'_class')
64
+ if attributes.key?(:'_class')
48
65
  self._class = attributes[:'_class']
49
66
  end
50
67
 
51
- if attributes.has_key?(:'name')
68
+ if attributes.key?(:'name')
52
69
  self.name = attributes[:'name']
53
70
  end
54
-
55
71
  end
56
72
 
57
73
  # Show invalid properties with the reasons. Usually used together with valid?
58
- # @return Array for valid properies with the reasons
74
+ # @return Array for valid properties with the reasons
59
75
  def list_invalid_properties
60
76
  invalid_properties = Array.new
61
- return invalid_properties
77
+ invalid_properties
62
78
  end
63
79
 
64
80
  # Check to see if the all the properties in the model are valid
65
81
  # @return true if the model is valid
66
82
  def valid?
67
- return true
83
+ true
68
84
  end
69
85
 
70
86
  # Checks equality by comparing each attribute.
@@ -83,26 +99,35 @@ module SwaggyJenkinsClient
83
99
  end
84
100
 
85
101
  # Calculates hash code according to all attributes.
86
- # @return [Fixnum] Hash code
102
+ # @return [Integer] Hash code
87
103
  def hash
88
104
  [_class, name].hash
89
105
  end
90
106
 
107
+ # Builds the object from hash
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ # @return [Object] Returns the model itself
110
+ def self.build_from_hash(attributes)
111
+ new.build_from_hash(attributes)
112
+ end
113
+
91
114
  # Builds the object from hash
92
115
  # @param [Hash] attributes Model attributes in the form of hash
93
116
  # @return [Object] Returns the model itself
94
117
  def build_from_hash(attributes)
95
118
  return nil unless attributes.is_a?(Hash)
96
- self.class.swagger_types.each_pair do |key, type|
97
- if type =~ /\AArray<(.*)>/i
98
- # check to ensure the input is an array given that the the attribute
119
+ self.class.openapi_types.each_pair do |key, type|
120
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
121
+ self.send("#{key}=", nil)
122
+ elsif type =~ /\AArray<(.*)>/i
123
+ # check to ensure the input is an array given that the attribute
99
124
  # is documented as an array but the input is not
100
125
  if attributes[self.class.attribute_map[key]].is_a?(Array)
101
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
126
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
102
127
  end
103
128
  elsif !attributes[self.class.attribute_map[key]].nil?
104
129
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
105
- end # or else data not found in attributes(hash), not an issue as the data can be optional
130
+ end
106
131
  end
107
132
 
108
133
  self
@@ -114,8 +139,8 @@ module SwaggyJenkinsClient
114
139
  # @return [Object] Deserialized data
115
140
  def _deserialize(type, value)
116
141
  case type.to_sym
117
- when :DateTime
118
- DateTime.parse(value)
142
+ when :Time
143
+ Time.parse(value)
119
144
  when :Date
120
145
  Date.parse(value)
121
146
  when :String
@@ -124,7 +149,7 @@ module SwaggyJenkinsClient
124
149
  value.to_i
125
150
  when :Float
126
151
  value.to_f
127
- when :BOOLEAN
152
+ when :Boolean
128
153
  if value.to_s =~ /\A(true|t|yes|y|1)\z/i
129
154
  true
130
155
  else
@@ -145,8 +170,9 @@ module SwaggyJenkinsClient
145
170
  end
146
171
  end
147
172
  else # model
148
- temp_model = SwaggyJenkinsClient.const_get(type).new
149
- temp_model.build_from_hash(value)
173
+ # models (e.g. Pet) or oneOf
174
+ klass = SwaggyJenkinsClient.const_get(type)
175
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
150
176
  end
151
177
  end
152
178
 
@@ -168,7 +194,11 @@ module SwaggyJenkinsClient
168
194
  hash = {}
169
195
  self.class.attribute_map.each_pair do |attr, param|
170
196
  value = self.send(attr)
171
- next if value.nil?
197
+ if value.nil?
198
+ is_nullable = self.class.openapi_nullable.include?(attr)
199
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
200
+ end
201
+
172
202
  hash[param] = _to_hash(value)
173
203
  end
174
204
  hash
@@ -180,7 +210,7 @@ module SwaggyJenkinsClient
180
210
  # @return [Hash] Returns the value in the form of hash
181
211
  def _to_hash(value)
182
212
  if value.is_a?(Array)
183
- value.compact.map{ |v| _to_hash(v) }
213
+ value.compact.map { |v| _to_hash(v) }
184
214
  elsif value.is_a?(Hash)
185
215
  {}.tap do |hash|
186
216
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -3,17 +3,17 @@
3
3
 
4
4
  #Jenkins API clients generated from Swagger / Open API specification
5
5
 
6
- OpenAPI spec version: 0.1.0
6
+ The version of the OpenAPI document: 1.3.0
7
7
  Contact: blah@cliffano.com
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.0-SNAPSHOT
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.4.0
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module SwaggyJenkinsClient
16
-
17
17
  class Pipeline
18
18
  attr_accessor :_class
19
19
 
@@ -31,7 +31,6 @@ module SwaggyJenkinsClient
31
31
 
32
32
  attr_accessor :latest_run
33
33
 
34
-
35
34
  # Attribute mapping from ruby-style variable name to JSON key.
36
35
  def self.attribute_map
37
36
  {
@@ -46,8 +45,13 @@ module SwaggyJenkinsClient
46
45
  }
47
46
  end
48
47
 
48
+ # Returns all the JSON keys this model knows about
49
+ def self.acceptable_attributes
50
+ attribute_map.values
51
+ end
52
+
49
53
  # Attribute type mapping.
50
- def self.swagger_types
54
+ def self.openapi_types
51
55
  {
52
56
  :'_class' => :'String',
53
57
  :'organization' => :'String',
@@ -60,59 +64,71 @@ module SwaggyJenkinsClient
60
64
  }
61
65
  end
62
66
 
67
+ # List of attributes with nullable: true
68
+ def self.openapi_nullable
69
+ Set.new([
70
+ ])
71
+ end
72
+
63
73
  # Initializes the object
64
74
  # @param [Hash] attributes Model attributes in the form of hash
65
75
  def initialize(attributes = {})
66
- return unless attributes.is_a?(Hash)
76
+ if (!attributes.is_a?(Hash))
77
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggyJenkinsClient::Pipeline` initialize method"
78
+ end
67
79
 
68
- # convert string to symbol for hash key
69
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
80
+ # check to see if the attribute exists and convert string to symbol for hash key
81
+ attributes = attributes.each_with_object({}) { |(k, v), h|
82
+ if (!self.class.attribute_map.key?(k.to_sym))
83
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::Pipeline`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
84
+ end
85
+ h[k.to_sym] = v
86
+ }
70
87
 
71
- if attributes.has_key?(:'_class')
88
+ if attributes.key?(:'_class')
72
89
  self._class = attributes[:'_class']
73
90
  end
74
91
 
75
- if attributes.has_key?(:'organization')
92
+ if attributes.key?(:'organization')
76
93
  self.organization = attributes[:'organization']
77
94
  end
78
95
 
79
- if attributes.has_key?(:'name')
96
+ if attributes.key?(:'name')
80
97
  self.name = attributes[:'name']
81
98
  end
82
99
 
83
- if attributes.has_key?(:'displayName')
84
- self.display_name = attributes[:'displayName']
100
+ if attributes.key?(:'display_name')
101
+ self.display_name = attributes[:'display_name']
85
102
  end
86
103
 
87
- if attributes.has_key?(:'fullName')
88
- self.full_name = attributes[:'fullName']
104
+ if attributes.key?(:'full_name')
105
+ self.full_name = attributes[:'full_name']
89
106
  end
90
107
 
91
- if attributes.has_key?(:'weatherScore')
92
- self.weather_score = attributes[:'weatherScore']
108
+ if attributes.key?(:'weather_score')
109
+ self.weather_score = attributes[:'weather_score']
93
110
  end
94
111
 
95
- if attributes.has_key?(:'estimatedDurationInMillis')
96
- self.estimated_duration_in_millis = attributes[:'estimatedDurationInMillis']
112
+ if attributes.key?(:'estimated_duration_in_millis')
113
+ self.estimated_duration_in_millis = attributes[:'estimated_duration_in_millis']
97
114
  end
98
115
 
99
- if attributes.has_key?(:'latestRun')
100
- self.latest_run = attributes[:'latestRun']
116
+ if attributes.key?(:'latest_run')
117
+ self.latest_run = attributes[:'latest_run']
101
118
  end
102
-
103
119
  end
104
120
 
105
121
  # Show invalid properties with the reasons. Usually used together with valid?
106
- # @return Array for valid properies with the reasons
122
+ # @return Array for valid properties with the reasons
107
123
  def list_invalid_properties
108
124
  invalid_properties = Array.new
109
- return invalid_properties
125
+ invalid_properties
110
126
  end
111
127
 
112
128
  # Check to see if the all the properties in the model are valid
113
129
  # @return true if the model is valid
114
130
  def valid?
115
- return true
131
+ true
116
132
  end
117
133
 
118
134
  # Checks equality by comparing each attribute.
@@ -137,26 +153,35 @@ module SwaggyJenkinsClient
137
153
  end
138
154
 
139
155
  # Calculates hash code according to all attributes.
140
- # @return [Fixnum] Hash code
156
+ # @return [Integer] Hash code
141
157
  def hash
142
158
  [_class, organization, name, display_name, full_name, weather_score, estimated_duration_in_millis, latest_run].hash
143
159
  end
144
160
 
161
+ # Builds the object from hash
162
+ # @param [Hash] attributes Model attributes in the form of hash
163
+ # @return [Object] Returns the model itself
164
+ def self.build_from_hash(attributes)
165
+ new.build_from_hash(attributes)
166
+ end
167
+
145
168
  # Builds the object from hash
146
169
  # @param [Hash] attributes Model attributes in the form of hash
147
170
  # @return [Object] Returns the model itself
148
171
  def build_from_hash(attributes)
149
172
  return nil unless attributes.is_a?(Hash)
150
- self.class.swagger_types.each_pair do |key, type|
151
- if type =~ /\AArray<(.*)>/i
152
- # check to ensure the input is an array given that the the attribute
173
+ self.class.openapi_types.each_pair do |key, type|
174
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
175
+ self.send("#{key}=", nil)
176
+ elsif type =~ /\AArray<(.*)>/i
177
+ # check to ensure the input is an array given that the attribute
153
178
  # is documented as an array but the input is not
154
179
  if attributes[self.class.attribute_map[key]].is_a?(Array)
155
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
180
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
156
181
  end
157
182
  elsif !attributes[self.class.attribute_map[key]].nil?
158
183
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
159
- end # or else data not found in attributes(hash), not an issue as the data can be optional
184
+ end
160
185
  end
161
186
 
162
187
  self
@@ -168,8 +193,8 @@ module SwaggyJenkinsClient
168
193
  # @return [Object] Deserialized data
169
194
  def _deserialize(type, value)
170
195
  case type.to_sym
171
- when :DateTime
172
- DateTime.parse(value)
196
+ when :Time
197
+ Time.parse(value)
173
198
  when :Date
174
199
  Date.parse(value)
175
200
  when :String
@@ -178,7 +203,7 @@ module SwaggyJenkinsClient
178
203
  value.to_i
179
204
  when :Float
180
205
  value.to_f
181
- when :BOOLEAN
206
+ when :Boolean
182
207
  if value.to_s =~ /\A(true|t|yes|y|1)\z/i
183
208
  true
184
209
  else
@@ -199,8 +224,9 @@ module SwaggyJenkinsClient
199
224
  end
200
225
  end
201
226
  else # model
202
- temp_model = SwaggyJenkinsClient.const_get(type).new
203
- temp_model.build_from_hash(value)
227
+ # models (e.g. Pet) or oneOf
228
+ klass = SwaggyJenkinsClient.const_get(type)
229
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
204
230
  end
205
231
  end
206
232
 
@@ -222,7 +248,11 @@ module SwaggyJenkinsClient
222
248
  hash = {}
223
249
  self.class.attribute_map.each_pair do |attr, param|
224
250
  value = self.send(attr)
225
- next if value.nil?
251
+ if value.nil?
252
+ is_nullable = self.class.openapi_nullable.include?(attr)
253
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
254
+ end
255
+
226
256
  hash[param] = _to_hash(value)
227
257
  end
228
258
  hash
@@ -234,7 +264,7 @@ module SwaggyJenkinsClient
234
264
  # @return [Hash] Returns the value in the form of hash
235
265
  def _to_hash(value)
236
266
  if value.is_a?(Array)
237
- value.compact.map{ |v| _to_hash(v) }
267
+ value.compact.map { |v| _to_hash(v) }
238
268
  elsif value.is_a?(Hash)
239
269
  {}.tap do |hash|
240
270
  value.each { |k, v| hash[k] = _to_hash(v) }