swaggy_jenkins 0.0.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
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 +27 -0
  8. data/bin/coderay +27 -0
  9. data/bin/htmldiff +27 -0
  10. data/bin/ldiff +27 -0
  11. data/bin/pry +27 -0
  12. data/bin/rake +27 -0
  13. data/bin/rspec +27 -0
  14. data/bin/rubocop +27 -0
  15. data/bin/ruby-parse +27 -0
  16. data/bin/ruby-rewrite +27 -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 +98 -95
  105. data/lib/swaggy_jenkins/api_error.rb +22 -3
  106. data/lib/swaggy_jenkins/configuration.rb +93 -16
  107. data/lib/swaggy_jenkins/models/all_view.rb +60 -29
  108. data/lib/swaggy_jenkins/models/branch_impl.rb +77 -46
  109. data/lib/swaggy_jenkins/models/branch_impllinks.rb +63 -32
  110. data/lib/swaggy_jenkins/models/branch_implpermissions.rb +66 -35
  111. data/lib/swaggy_jenkins/models/cause_action.rb +59 -28
  112. data/lib/swaggy_jenkins/models/cause_user_id_cause.rb +64 -33
  113. data/lib/swaggy_jenkins/models/classes_by_class.rb +59 -28
  114. data/lib/swaggy_jenkins/models/clock_difference.rb +59 -28
  115. data/lib/swaggy_jenkins/models/computer_set.rb +65 -34
  116. data/lib/swaggy_jenkins/models/default_crumb_issuer.rb +61 -30
  117. data/lib/swaggy_jenkins/models/disk_space_monitor_descriptor_disk_space.rb +61 -30
  118. data/lib/swaggy_jenkins/models/empty_change_log_set.rb +59 -28
  119. data/lib/swaggy_jenkins/models/extension_class_container_impl1.rb +60 -29
  120. data/lib/swaggy_jenkins/models/extension_class_container_impl1links.rb +60 -29
  121. data/lib/swaggy_jenkins/models/extension_class_container_impl1map.rb +62 -31
  122. data/lib/swaggy_jenkins/models/extension_class_impl.rb +60 -29
  123. data/lib/swaggy_jenkins/models/extension_class_impllinks.rb +60 -29
  124. data/lib/swaggy_jenkins/models/favorite_impl.rb +60 -29
  125. data/lib/swaggy_jenkins/models/favorite_impllinks.rb +60 -29
  126. data/lib/swaggy_jenkins/models/free_style_build.rb +84 -53
  127. data/lib/swaggy_jenkins/models/free_style_project.rb +106 -75
  128. data/lib/swaggy_jenkins/models/free_style_projectactions.rb +58 -27
  129. data/lib/swaggy_jenkins/models/free_style_projecthealth_report.rb +64 -33
  130. data/lib/swaggy_jenkins/models/generic_resource.rb +66 -35
  131. data/lib/swaggy_jenkins/models/github_content.rb +66 -35
  132. data/lib/swaggy_jenkins/models/github_file.rb +59 -28
  133. data/lib/swaggy_jenkins/models/github_organization.rb +63 -32
  134. data/lib/swaggy_jenkins/models/github_organizationlinks.rb +61 -30
  135. data/lib/swaggy_jenkins/models/github_repositories.rb +66 -35
  136. data/lib/swaggy_jenkins/models/github_repositorieslinks.rb +60 -29
  137. data/lib/swaggy_jenkins/models/github_repository.rb +68 -37
  138. data/lib/swaggy_jenkins/models/github_repositorylinks.rb +60 -29
  139. data/lib/swaggy_jenkins/models/github_repositorypermissions.rb +64 -33
  140. data/lib/swaggy_jenkins/models/github_respository_container.rb +60 -29
  141. data/lib/swaggy_jenkins/models/github_respository_containerlinks.rb +60 -29
  142. data/lib/swaggy_jenkins/models/github_scm.rb +63 -32
  143. data/lib/swaggy_jenkins/models/github_scmlinks.rb +60 -29
  144. data/lib/swaggy_jenkins/models/hudson.rb +85 -54
  145. data/lib/swaggy_jenkins/models/hudson_master_computer.rb +90 -59
  146. data/lib/swaggy_jenkins/models/hudson_master_computerexecutors.rb +67 -36
  147. data/lib/swaggy_jenkins/models/hudson_master_computermonitor_data.rb +70 -39
  148. data/lib/swaggy_jenkins/models/hudsonassigned_labels.rb +58 -27
  149. data/lib/swaggy_jenkins/models/input_step_impl.rb +64 -33
  150. data/lib/swaggy_jenkins/models/input_step_impllinks.rb +60 -29
  151. data/lib/swaggy_jenkins/models/label1.rb +58 -27
  152. data/lib/swaggy_jenkins/models/link.rb +59 -28
  153. data/lib/swaggy_jenkins/models/list_view.rb +62 -31
  154. data/lib/swaggy_jenkins/models/multibranch_pipeline.rb +82 -51
  155. data/lib/swaggy_jenkins/models/null_scm.rb +58 -27
  156. data/lib/swaggy_jenkins/models/organisation.rb +59 -28
  157. data/lib/swaggy_jenkins/models/pipeline.rb +70 -39
  158. data/lib/swaggy_jenkins/models/pipeline_activity.rb +79 -48
  159. data/lib/swaggy_jenkins/models/pipeline_activityartifacts.rb +61 -30
  160. data/lib/swaggy_jenkins/models/pipeline_branchesitem.rb +72 -41
  161. data/lib/swaggy_jenkins/models/pipeline_branchesitemlatest_run.rb +78 -47
  162. data/lib/swaggy_jenkins/models/pipeline_branchesitempull_request.rb +63 -32
  163. data/lib/swaggy_jenkins/models/pipeline_branchesitempull_requestlinks.rb +60 -29
  164. data/lib/swaggy_jenkins/models/pipeline_folder_impl.rb +68 -37
  165. data/lib/swaggy_jenkins/models/pipeline_impl.rb +71 -40
  166. data/lib/swaggy_jenkins/models/pipeline_impllinks.rb +63 -32
  167. data/lib/swaggy_jenkins/models/pipeline_run.rb +79 -48
  168. data/lib/swaggy_jenkins/models/pipeline_run_impl.rb +79 -48
  169. data/lib/swaggy_jenkins/models/pipeline_run_impllinks.rb +64 -33
  170. data/lib/swaggy_jenkins/models/pipeline_run_node.rb +68 -37
  171. data/lib/swaggy_jenkins/models/pipeline_run_nodeedges.rb +59 -28
  172. data/lib/swaggy_jenkins/models/pipeline_runartifacts.rb +61 -30
  173. data/lib/swaggy_jenkins/models/pipeline_step_impl.rb +69 -38
  174. data/lib/swaggy_jenkins/models/pipeline_step_impllinks.rb +61 -30
  175. data/lib/swaggy_jenkins/models/pipelinelatest_run.rb +79 -48
  176. data/lib/swaggy_jenkins/models/pipelinelatest_runartifacts.rb +61 -30
  177. data/lib/swaggy_jenkins/models/queue.rb +59 -28
  178. data/lib/swaggy_jenkins/models/queue_blocked_item.rb +74 -43
  179. data/lib/swaggy_jenkins/models/queue_item_impl.rb +64 -33
  180. data/lib/swaggy_jenkins/models/queue_left_item.rb +75 -44
  181. data/lib/swaggy_jenkins/models/response_time_monitor_data.rb +60 -29
  182. data/lib/swaggy_jenkins/models/string_parameter_definition.rb +63 -32
  183. data/lib/swaggy_jenkins/models/string_parameter_value.rb +60 -29
  184. data/lib/swaggy_jenkins/models/swap_space_monitor_memory_usage2.rb +66 -35
  185. data/lib/swaggy_jenkins/models/unlabeled_load_statistics.rb +58 -27
  186. data/lib/swaggy_jenkins/models/user.rb +63 -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 +96 -274
  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,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: 2.0.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: 6.0.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 HudsonMasterComputerexecutors
18
18
  attr_accessor :current_executable
19
19
 
@@ -27,7 +27,6 @@ module SwaggyJenkinsClient
27
27
 
28
28
  attr_accessor :_class
29
29
 
30
-
31
30
  # Attribute mapping from ruby-style variable name to JSON key.
32
31
  def self.attribute_map
33
32
  {
@@ -40,63 +39,80 @@ module SwaggyJenkinsClient
40
39
  }
41
40
  end
42
41
 
42
+ # Returns all the JSON keys this model knows about
43
+ def self.acceptable_attributes
44
+ attribute_map.values
45
+ end
46
+
43
47
  # Attribute type mapping.
44
- def self.swagger_types
48
+ def self.openapi_types
45
49
  {
46
50
  :'current_executable' => :'FreeStyleBuild',
47
- :'idle' => :'BOOLEAN',
48
- :'likely_stuck' => :'BOOLEAN',
51
+ :'idle' => :'Boolean',
52
+ :'likely_stuck' => :'Boolean',
49
53
  :'number' => :'Integer',
50
54
  :'progress' => :'Integer',
51
55
  :'_class' => :'String'
52
56
  }
53
57
  end
54
58
 
59
+ # List of attributes with nullable: true
60
+ def self.openapi_nullable
61
+ Set.new([
62
+ ])
63
+ end
64
+
55
65
  # Initializes the object
56
66
  # @param [Hash] attributes Model attributes in the form of hash
57
67
  def initialize(attributes = {})
58
- return unless attributes.is_a?(Hash)
68
+ if (!attributes.is_a?(Hash))
69
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggyJenkinsClient::HudsonMasterComputerexecutors` initialize method"
70
+ end
59
71
 
60
- # convert string to symbol for hash key
61
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
72
+ # check to see if the attribute exists and convert string to symbol for hash key
73
+ attributes = attributes.each_with_object({}) { |(k, v), h|
74
+ if (!self.class.attribute_map.key?(k.to_sym))
75
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::HudsonMasterComputerexecutors`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
76
+ end
77
+ h[k.to_sym] = v
78
+ }
62
79
 
63
- if attributes.has_key?(:'currentExecutable')
64
- self.current_executable = attributes[:'currentExecutable']
80
+ if attributes.key?(:'current_executable')
81
+ self.current_executable = attributes[:'current_executable']
65
82
  end
66
83
 
67
- if attributes.has_key?(:'idle')
84
+ if attributes.key?(:'idle')
68
85
  self.idle = attributes[:'idle']
69
86
  end
70
87
 
71
- if attributes.has_key?(:'likelyStuck')
72
- self.likely_stuck = attributes[:'likelyStuck']
88
+ if attributes.key?(:'likely_stuck')
89
+ self.likely_stuck = attributes[:'likely_stuck']
73
90
  end
74
91
 
75
- if attributes.has_key?(:'number')
92
+ if attributes.key?(:'number')
76
93
  self.number = attributes[:'number']
77
94
  end
78
95
 
79
- if attributes.has_key?(:'progress')
96
+ if attributes.key?(:'progress')
80
97
  self.progress = attributes[:'progress']
81
98
  end
82
99
 
83
- if attributes.has_key?(:'_class')
100
+ if attributes.key?(:'_class')
84
101
  self._class = attributes[:'_class']
85
102
  end
86
-
87
103
  end
88
104
 
89
105
  # Show invalid properties with the reasons. Usually used together with valid?
90
- # @return Array for valid properies with the reasons
106
+ # @return Array for valid properties with the reasons
91
107
  def list_invalid_properties
92
108
  invalid_properties = Array.new
93
- return invalid_properties
109
+ invalid_properties
94
110
  end
95
111
 
96
112
  # Check to see if the all the properties in the model are valid
97
113
  # @return true if the model is valid
98
114
  def valid?
99
- return true
115
+ true
100
116
  end
101
117
 
102
118
  # Checks equality by comparing each attribute.
@@ -119,26 +135,36 @@ module SwaggyJenkinsClient
119
135
  end
120
136
 
121
137
  # Calculates hash code according to all attributes.
122
- # @return [Fixnum] Hash code
138
+ # @return [Integer] Hash code
123
139
  def hash
124
140
  [current_executable, idle, likely_stuck, number, progress, _class].hash
125
141
  end
126
142
 
143
+ # Builds the object from hash
144
+ # @param [Hash] attributes Model attributes in the form of hash
145
+ # @return [Object] Returns the model itself
146
+ def self.build_from_hash(attributes)
147
+ new.build_from_hash(attributes)
148
+ end
149
+
127
150
  # Builds the object from hash
128
151
  # @param [Hash] attributes Model attributes in the form of hash
129
152
  # @return [Object] Returns the model itself
130
153
  def build_from_hash(attributes)
131
154
  return nil unless attributes.is_a?(Hash)
132
- self.class.swagger_types.each_pair do |key, type|
133
- if type =~ /\AArray<(.*)>/i
134
- # check to ensure the input is an array given that the the attribute
155
+ attributes = attributes.transform_keys(&:to_sym)
156
+ self.class.openapi_types.each_pair do |key, type|
157
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
158
+ self.send("#{key}=", nil)
159
+ elsif type =~ /\AArray<(.*)>/i
160
+ # check to ensure the input is an array given that the attribute
135
161
  # is documented as an array but the input is not
136
162
  if attributes[self.class.attribute_map[key]].is_a?(Array)
137
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
163
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
138
164
  end
139
165
  elsif !attributes[self.class.attribute_map[key]].nil?
140
166
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
141
- end # or else data not found in attributes(hash), not an issue as the data can be optional
167
+ end
142
168
  end
143
169
 
144
170
  self
@@ -150,8 +176,8 @@ module SwaggyJenkinsClient
150
176
  # @return [Object] Deserialized data
151
177
  def _deserialize(type, value)
152
178
  case type.to_sym
153
- when :DateTime
154
- DateTime.parse(value)
179
+ when :Time
180
+ Time.parse(value)
155
181
  when :Date
156
182
  Date.parse(value)
157
183
  when :String
@@ -160,7 +186,7 @@ module SwaggyJenkinsClient
160
186
  value.to_i
161
187
  when :Float
162
188
  value.to_f
163
- when :BOOLEAN
189
+ when :Boolean
164
190
  if value.to_s =~ /\A(true|t|yes|y|1)\z/i
165
191
  true
166
192
  else
@@ -181,8 +207,9 @@ module SwaggyJenkinsClient
181
207
  end
182
208
  end
183
209
  else # model
184
- temp_model = SwaggyJenkinsClient.const_get(type).new
185
- temp_model.build_from_hash(value)
210
+ # models (e.g. Pet) or oneOf
211
+ klass = SwaggyJenkinsClient.const_get(type)
212
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
186
213
  end
187
214
  end
188
215
 
@@ -204,7 +231,11 @@ module SwaggyJenkinsClient
204
231
  hash = {}
205
232
  self.class.attribute_map.each_pair do |attr, param|
206
233
  value = self.send(attr)
207
- next if value.nil?
234
+ if value.nil?
235
+ is_nullable = self.class.openapi_nullable.include?(attr)
236
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
237
+ end
238
+
208
239
  hash[param] = _to_hash(value)
209
240
  end
210
241
  hash
@@ -216,7 +247,7 @@ module SwaggyJenkinsClient
216
247
  # @return [Hash] Returns the value in the form of hash
217
248
  def _to_hash(value)
218
249
  if value.is_a?(Array)
219
- value.compact.map{ |v| _to_hash(v) }
250
+ value.compact.map { |v| _to_hash(v) }
220
251
  elsif value.is_a?(Hash)
221
252
  {}.tap do |hash|
222
253
  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: 2.0.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: 6.0.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 HudsonMasterComputermonitorData
18
18
  attr_accessor :hudson_node_monitors_swap_space_monitor
19
19
 
@@ -29,7 +29,6 @@ module SwaggyJenkinsClient
29
29
 
30
30
  attr_accessor :_class
31
31
 
32
-
33
32
  # Attribute mapping from ruby-style variable name to JSON key.
34
33
  def self.attribute_map
35
34
  {
@@ -43,8 +42,13 @@ module SwaggyJenkinsClient
43
42
  }
44
43
  end
45
44
 
45
+ # Returns all the JSON keys this model knows about
46
+ def self.acceptable_attributes
47
+ attribute_map.values
48
+ end
49
+
46
50
  # Attribute type mapping.
47
- def self.swagger_types
51
+ def self.openapi_types
48
52
  {
49
53
  :'hudson_node_monitors_swap_space_monitor' => :'SwapSpaceMonitorMemoryUsage2',
50
54
  :'hudson_node_monitors_temporary_space_monitor' => :'DiskSpaceMonitorDescriptorDiskSpace',
@@ -56,55 +60,67 @@ module SwaggyJenkinsClient
56
60
  }
57
61
  end
58
62
 
63
+ # List of attributes with nullable: true
64
+ def self.openapi_nullable
65
+ Set.new([
66
+ ])
67
+ end
68
+
59
69
  # Initializes the object
60
70
  # @param [Hash] attributes Model attributes in the form of hash
61
71
  def initialize(attributes = {})
62
- return unless attributes.is_a?(Hash)
72
+ if (!attributes.is_a?(Hash))
73
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggyJenkinsClient::HudsonMasterComputermonitorData` initialize method"
74
+ end
63
75
 
64
- # convert string to symbol for hash key
65
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
76
+ # check to see if the attribute exists and convert string to symbol for hash key
77
+ attributes = attributes.each_with_object({}) { |(k, v), h|
78
+ if (!self.class.attribute_map.key?(k.to_sym))
79
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::HudsonMasterComputermonitorData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
80
+ end
81
+ h[k.to_sym] = v
82
+ }
66
83
 
67
- if attributes.has_key?(:'hudson.node_monitors.SwapSpaceMonitor')
68
- self.hudson_node_monitors_swap_space_monitor = attributes[:'hudson.node_monitors.SwapSpaceMonitor']
84
+ if attributes.key?(:'hudson_node_monitors_swap_space_monitor')
85
+ self.hudson_node_monitors_swap_space_monitor = attributes[:'hudson_node_monitors_swap_space_monitor']
69
86
  end
70
87
 
71
- if attributes.has_key?(:'hudson.node_monitors.TemporarySpaceMonitor')
72
- self.hudson_node_monitors_temporary_space_monitor = attributes[:'hudson.node_monitors.TemporarySpaceMonitor']
88
+ if attributes.key?(:'hudson_node_monitors_temporary_space_monitor')
89
+ self.hudson_node_monitors_temporary_space_monitor = attributes[:'hudson_node_monitors_temporary_space_monitor']
73
90
  end
74
91
 
75
- if attributes.has_key?(:'hudson.node_monitors.DiskSpaceMonitor')
76
- self.hudson_node_monitors_disk_space_monitor = attributes[:'hudson.node_monitors.DiskSpaceMonitor']
92
+ if attributes.key?(:'hudson_node_monitors_disk_space_monitor')
93
+ self.hudson_node_monitors_disk_space_monitor = attributes[:'hudson_node_monitors_disk_space_monitor']
77
94
  end
78
95
 
79
- if attributes.has_key?(:'hudson.node_monitors.ArchitectureMonitor')
80
- self.hudson_node_monitors_architecture_monitor = attributes[:'hudson.node_monitors.ArchitectureMonitor']
96
+ if attributes.key?(:'hudson_node_monitors_architecture_monitor')
97
+ self.hudson_node_monitors_architecture_monitor = attributes[:'hudson_node_monitors_architecture_monitor']
81
98
  end
82
99
 
83
- if attributes.has_key?(:'hudson.node_monitors.ResponseTimeMonitor')
84
- self.hudson_node_monitors_response_time_monitor = attributes[:'hudson.node_monitors.ResponseTimeMonitor']
100
+ if attributes.key?(:'hudson_node_monitors_response_time_monitor')
101
+ self.hudson_node_monitors_response_time_monitor = attributes[:'hudson_node_monitors_response_time_monitor']
85
102
  end
86
103
 
87
- if attributes.has_key?(:'hudson.node_monitors.ClockMonitor')
88
- self.hudson_node_monitors_clock_monitor = attributes[:'hudson.node_monitors.ClockMonitor']
104
+ if attributes.key?(:'hudson_node_monitors_clock_monitor')
105
+ self.hudson_node_monitors_clock_monitor = attributes[:'hudson_node_monitors_clock_monitor']
89
106
  end
90
107
 
91
- if attributes.has_key?(:'_class')
108
+ if attributes.key?(:'_class')
92
109
  self._class = attributes[:'_class']
93
110
  end
94
-
95
111
  end
96
112
 
97
113
  # Show invalid properties with the reasons. Usually used together with valid?
98
- # @return Array for valid properies with the reasons
114
+ # @return Array for valid properties with the reasons
99
115
  def list_invalid_properties
100
116
  invalid_properties = Array.new
101
- return invalid_properties
117
+ invalid_properties
102
118
  end
103
119
 
104
120
  # Check to see if the all the properties in the model are valid
105
121
  # @return true if the model is valid
106
122
  def valid?
107
- return true
123
+ true
108
124
  end
109
125
 
110
126
  # Checks equality by comparing each attribute.
@@ -128,26 +144,36 @@ module SwaggyJenkinsClient
128
144
  end
129
145
 
130
146
  # Calculates hash code according to all attributes.
131
- # @return [Fixnum] Hash code
147
+ # @return [Integer] Hash code
132
148
  def hash
133
149
  [hudson_node_monitors_swap_space_monitor, hudson_node_monitors_temporary_space_monitor, hudson_node_monitors_disk_space_monitor, hudson_node_monitors_architecture_monitor, hudson_node_monitors_response_time_monitor, hudson_node_monitors_clock_monitor, _class].hash
134
150
  end
135
151
 
152
+ # Builds the object from hash
153
+ # @param [Hash] attributes Model attributes in the form of hash
154
+ # @return [Object] Returns the model itself
155
+ def self.build_from_hash(attributes)
156
+ new.build_from_hash(attributes)
157
+ end
158
+
136
159
  # Builds the object from hash
137
160
  # @param [Hash] attributes Model attributes in the form of hash
138
161
  # @return [Object] Returns the model itself
139
162
  def build_from_hash(attributes)
140
163
  return nil unless attributes.is_a?(Hash)
141
- self.class.swagger_types.each_pair do |key, type|
142
- if type =~ /\AArray<(.*)>/i
143
- # check to ensure the input is an array given that the the attribute
164
+ attributes = attributes.transform_keys(&:to_sym)
165
+ self.class.openapi_types.each_pair do |key, type|
166
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
167
+ self.send("#{key}=", nil)
168
+ elsif type =~ /\AArray<(.*)>/i
169
+ # check to ensure the input is an array given that the attribute
144
170
  # is documented as an array but the input is not
145
171
  if attributes[self.class.attribute_map[key]].is_a?(Array)
146
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
172
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
147
173
  end
148
174
  elsif !attributes[self.class.attribute_map[key]].nil?
149
175
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
150
- end # or else data not found in attributes(hash), not an issue as the data can be optional
176
+ end
151
177
  end
152
178
 
153
179
  self
@@ -159,8 +185,8 @@ module SwaggyJenkinsClient
159
185
  # @return [Object] Deserialized data
160
186
  def _deserialize(type, value)
161
187
  case type.to_sym
162
- when :DateTime
163
- DateTime.parse(value)
188
+ when :Time
189
+ Time.parse(value)
164
190
  when :Date
165
191
  Date.parse(value)
166
192
  when :String
@@ -169,7 +195,7 @@ module SwaggyJenkinsClient
169
195
  value.to_i
170
196
  when :Float
171
197
  value.to_f
172
- when :BOOLEAN
198
+ when :Boolean
173
199
  if value.to_s =~ /\A(true|t|yes|y|1)\z/i
174
200
  true
175
201
  else
@@ -190,8 +216,9 @@ module SwaggyJenkinsClient
190
216
  end
191
217
  end
192
218
  else # model
193
- temp_model = SwaggyJenkinsClient.const_get(type).new
194
- temp_model.build_from_hash(value)
219
+ # models (e.g. Pet) or oneOf
220
+ klass = SwaggyJenkinsClient.const_get(type)
221
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
195
222
  end
196
223
  end
197
224
 
@@ -213,7 +240,11 @@ module SwaggyJenkinsClient
213
240
  hash = {}
214
241
  self.class.attribute_map.each_pair do |attr, param|
215
242
  value = self.send(attr)
216
- next if value.nil?
243
+ if value.nil?
244
+ is_nullable = self.class.openapi_nullable.include?(attr)
245
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
246
+ end
247
+
217
248
  hash[param] = _to_hash(value)
218
249
  end
219
250
  hash
@@ -225,7 +256,7 @@ module SwaggyJenkinsClient
225
256
  # @return [Hash] Returns the value in the form of hash
226
257
  def _to_hash(value)
227
258
  if value.is_a?(Array)
228
- value.compact.map{ |v| _to_hash(v) }
259
+ value.compact.map { |v| _to_hash(v) }
229
260
  elsif value.is_a?(Hash)
230
261
  {}.tap do |hash|
231
262
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -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: 2.0.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: 6.0.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 HudsonassignedLabels
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::HudsonassignedLabels` 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::HudsonassignedLabels`. 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,36 @@ 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
+ attributes = attributes.transform_keys(&:to_sym)
111
+ self.class.openapi_types.each_pair do |key, type|
112
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
113
+ self.send("#{key}=", nil)
114
+ elsif type =~ /\AArray<(.*)>/i
115
+ # check to ensure the input is an array given that the attribute
90
116
  # is documented as an array but the input is not
91
117
  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) } )
118
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
93
119
  end
94
120
  elsif !attributes[self.class.attribute_map[key]].nil?
95
121
  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
122
+ end
97
123
  end
98
124
 
99
125
  self
@@ -105,8 +131,8 @@ module SwaggyJenkinsClient
105
131
  # @return [Object] Deserialized data
106
132
  def _deserialize(type, value)
107
133
  case type.to_sym
108
- when :DateTime
109
- DateTime.parse(value)
134
+ when :Time
135
+ Time.parse(value)
110
136
  when :Date
111
137
  Date.parse(value)
112
138
  when :String
@@ -115,7 +141,7 @@ module SwaggyJenkinsClient
115
141
  value.to_i
116
142
  when :Float
117
143
  value.to_f
118
- when :BOOLEAN
144
+ when :Boolean
119
145
  if value.to_s =~ /\A(true|t|yes|y|1)\z/i
120
146
  true
121
147
  else
@@ -136,8 +162,9 @@ module SwaggyJenkinsClient
136
162
  end
137
163
  end
138
164
  else # model
139
- temp_model = SwaggyJenkinsClient.const_get(type).new
140
- temp_model.build_from_hash(value)
165
+ # models (e.g. Pet) or oneOf
166
+ klass = SwaggyJenkinsClient.const_get(type)
167
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
141
168
  end
142
169
  end
143
170
 
@@ -159,7 +186,11 @@ module SwaggyJenkinsClient
159
186
  hash = {}
160
187
  self.class.attribute_map.each_pair do |attr, param|
161
188
  value = self.send(attr)
162
- next if value.nil?
189
+ if value.nil?
190
+ is_nullable = self.class.openapi_nullable.include?(attr)
191
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
192
+ end
193
+
163
194
  hash[param] = _to_hash(value)
164
195
  end
165
196
  hash
@@ -171,7 +202,7 @@ module SwaggyJenkinsClient
171
202
  # @return [Hash] Returns the value in the form of hash
172
203
  def _to_hash(value)
173
204
  if value.is_a?(Array)
174
- value.compact.map{ |v| _to_hash(v) }
205
+ value.compact.map { |v| _to_hash(v) }
175
206
  elsif value.is_a?(Hash)
176
207
  {}.tap do |hash|
177
208
  value.each { |k, v| hash[k] = _to_hash(v) }