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,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: 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 FavoriteImpllinks
18
18
  attr_accessor :_self
19
19
 
20
20
  attr_accessor :_class
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
  :'_self' => :'Link',
35
39
  :'_class' => :'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::FavoriteImpllinks` 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::FavoriteImpllinks`. 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?(:'self')
48
- self._self = attributes[:'self']
64
+ if attributes.key?(:'_self')
65
+ self._self = attributes[:'_self']
49
66
  end
50
67
 
51
- if attributes.has_key?(:'_class')
68
+ if attributes.key?(:'_class')
52
69
  self._class = attributes[:'_class']
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,36 @@ 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
  [_self, _class].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
+ attributes = attributes.transform_keys(&:to_sym)
120
+ self.class.openapi_types.each_pair do |key, type|
121
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
122
+ self.send("#{key}=", nil)
123
+ elsif type =~ /\AArray<(.*)>/i
124
+ # check to ensure the input is an array given that the attribute
99
125
  # is documented as an array but the input is not
100
126
  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) } )
127
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
102
128
  end
103
129
  elsif !attributes[self.class.attribute_map[key]].nil?
104
130
  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
131
+ end
106
132
  end
107
133
 
108
134
  self
@@ -114,8 +140,8 @@ module SwaggyJenkinsClient
114
140
  # @return [Object] Deserialized data
115
141
  def _deserialize(type, value)
116
142
  case type.to_sym
117
- when :DateTime
118
- DateTime.parse(value)
143
+ when :Time
144
+ Time.parse(value)
119
145
  when :Date
120
146
  Date.parse(value)
121
147
  when :String
@@ -124,7 +150,7 @@ module SwaggyJenkinsClient
124
150
  value.to_i
125
151
  when :Float
126
152
  value.to_f
127
- when :BOOLEAN
153
+ when :Boolean
128
154
  if value.to_s =~ /\A(true|t|yes|y|1)\z/i
129
155
  true
130
156
  else
@@ -145,8 +171,9 @@ module SwaggyJenkinsClient
145
171
  end
146
172
  end
147
173
  else # model
148
- temp_model = SwaggyJenkinsClient.const_get(type).new
149
- temp_model.build_from_hash(value)
174
+ # models (e.g. Pet) or oneOf
175
+ klass = SwaggyJenkinsClient.const_get(type)
176
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
150
177
  end
151
178
  end
152
179
 
@@ -168,7 +195,11 @@ module SwaggyJenkinsClient
168
195
  hash = {}
169
196
  self.class.attribute_map.each_pair do |attr, param|
170
197
  value = self.send(attr)
171
- next if value.nil?
198
+ if value.nil?
199
+ is_nullable = self.class.openapi_nullable.include?(attr)
200
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
201
+ end
202
+
172
203
  hash[param] = _to_hash(value)
173
204
  end
174
205
  hash
@@ -180,7 +211,7 @@ module SwaggyJenkinsClient
180
211
  # @return [Hash] Returns the value in the form of hash
181
212
  def _to_hash(value)
182
213
  if value.is_a?(Array)
183
- value.compact.map{ |v| _to_hash(v) }
214
+ value.compact.map { |v| _to_hash(v) }
184
215
  elsif value.is_a?(Hash)
185
216
  {}.tap do |hash|
186
217
  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 FreeStyleBuild
18
18
  attr_accessor :_class
19
19
 
@@ -51,7 +51,6 @@ module SwaggyJenkinsClient
51
51
 
52
52
  attr_accessor :change_set
53
53
 
54
-
55
54
  # Attribute mapping from ruby-style variable name to JSON key.
56
55
  def self.attribute_map
57
56
  {
@@ -76,14 +75,19 @@ module SwaggyJenkinsClient
76
75
  }
77
76
  end
78
77
 
78
+ # Returns all the JSON keys this model knows about
79
+ def self.acceptable_attributes
80
+ attribute_map.values
81
+ end
82
+
79
83
  # Attribute type mapping.
80
- def self.swagger_types
84
+ def self.openapi_types
81
85
  {
82
86
  :'_class' => :'String',
83
87
  :'number' => :'Integer',
84
88
  :'url' => :'String',
85
89
  :'actions' => :'Array<CauseAction>',
86
- :'building' => :'BOOLEAN',
90
+ :'building' => :'Boolean',
87
91
  :'description' => :'String',
88
92
  :'display_name' => :'String',
89
93
  :'duration' => :'Integer',
@@ -91,7 +95,7 @@ module SwaggyJenkinsClient
91
95
  :'executor' => :'String',
92
96
  :'full_display_name' => :'String',
93
97
  :'id' => :'String',
94
- :'keep_log' => :'BOOLEAN',
98
+ :'keep_log' => :'Boolean',
95
99
  :'queue_id' => :'Integer',
96
100
  :'result' => :'String',
97
101
  :'timestamp' => :'Integer',
@@ -100,101 +104,113 @@ module SwaggyJenkinsClient
100
104
  }
101
105
  end
102
106
 
107
+ # List of attributes with nullable: true
108
+ def self.openapi_nullable
109
+ Set.new([
110
+ ])
111
+ end
112
+
103
113
  # Initializes the object
104
114
  # @param [Hash] attributes Model attributes in the form of hash
105
115
  def initialize(attributes = {})
106
- return unless attributes.is_a?(Hash)
116
+ if (!attributes.is_a?(Hash))
117
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggyJenkinsClient::FreeStyleBuild` initialize method"
118
+ end
107
119
 
108
- # convert string to symbol for hash key
109
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
120
+ # check to see if the attribute exists and convert string to symbol for hash key
121
+ attributes = attributes.each_with_object({}) { |(k, v), h|
122
+ if (!self.class.attribute_map.key?(k.to_sym))
123
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::FreeStyleBuild`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
124
+ end
125
+ h[k.to_sym] = v
126
+ }
110
127
 
111
- if attributes.has_key?(:'_class')
128
+ if attributes.key?(:'_class')
112
129
  self._class = attributes[:'_class']
113
130
  end
114
131
 
115
- if attributes.has_key?(:'number')
132
+ if attributes.key?(:'number')
116
133
  self.number = attributes[:'number']
117
134
  end
118
135
 
119
- if attributes.has_key?(:'url')
136
+ if attributes.key?(:'url')
120
137
  self.url = attributes[:'url']
121
138
  end
122
139
 
123
- if attributes.has_key?(:'actions')
140
+ if attributes.key?(:'actions')
124
141
  if (value = attributes[:'actions']).is_a?(Array)
125
142
  self.actions = value
126
143
  end
127
144
  end
128
145
 
129
- if attributes.has_key?(:'building')
146
+ if attributes.key?(:'building')
130
147
  self.building = attributes[:'building']
131
148
  end
132
149
 
133
- if attributes.has_key?(:'description')
150
+ if attributes.key?(:'description')
134
151
  self.description = attributes[:'description']
135
152
  end
136
153
 
137
- if attributes.has_key?(:'displayName')
138
- self.display_name = attributes[:'displayName']
154
+ if attributes.key?(:'display_name')
155
+ self.display_name = attributes[:'display_name']
139
156
  end
140
157
 
141
- if attributes.has_key?(:'duration')
158
+ if attributes.key?(:'duration')
142
159
  self.duration = attributes[:'duration']
143
160
  end
144
161
 
145
- if attributes.has_key?(:'estimatedDuration')
146
- self.estimated_duration = attributes[:'estimatedDuration']
162
+ if attributes.key?(:'estimated_duration')
163
+ self.estimated_duration = attributes[:'estimated_duration']
147
164
  end
148
165
 
149
- if attributes.has_key?(:'executor')
166
+ if attributes.key?(:'executor')
150
167
  self.executor = attributes[:'executor']
151
168
  end
152
169
 
153
- if attributes.has_key?(:'fullDisplayName')
154
- self.full_display_name = attributes[:'fullDisplayName']
170
+ if attributes.key?(:'full_display_name')
171
+ self.full_display_name = attributes[:'full_display_name']
155
172
  end
156
173
 
157
- if attributes.has_key?(:'id')
174
+ if attributes.key?(:'id')
158
175
  self.id = attributes[:'id']
159
176
  end
160
177
 
161
- if attributes.has_key?(:'keepLog')
162
- self.keep_log = attributes[:'keepLog']
178
+ if attributes.key?(:'keep_log')
179
+ self.keep_log = attributes[:'keep_log']
163
180
  end
164
181
 
165
- if attributes.has_key?(:'queueId')
166
- self.queue_id = attributes[:'queueId']
182
+ if attributes.key?(:'queue_id')
183
+ self.queue_id = attributes[:'queue_id']
167
184
  end
168
185
 
169
- if attributes.has_key?(:'result')
186
+ if attributes.key?(:'result')
170
187
  self.result = attributes[:'result']
171
188
  end
172
189
 
173
- if attributes.has_key?(:'timestamp')
190
+ if attributes.key?(:'timestamp')
174
191
  self.timestamp = attributes[:'timestamp']
175
192
  end
176
193
 
177
- if attributes.has_key?(:'builtOn')
178
- self.built_on = attributes[:'builtOn']
194
+ if attributes.key?(:'built_on')
195
+ self.built_on = attributes[:'built_on']
179
196
  end
180
197
 
181
- if attributes.has_key?(:'changeSet')
182
- self.change_set = attributes[:'changeSet']
198
+ if attributes.key?(:'change_set')
199
+ self.change_set = attributes[:'change_set']
183
200
  end
184
-
185
201
  end
186
202
 
187
203
  # Show invalid properties with the reasons. Usually used together with valid?
188
- # @return Array for valid properies with the reasons
204
+ # @return Array for valid properties with the reasons
189
205
  def list_invalid_properties
190
206
  invalid_properties = Array.new
191
- return invalid_properties
207
+ invalid_properties
192
208
  end
193
209
 
194
210
  # Check to see if the all the properties in the model are valid
195
211
  # @return true if the model is valid
196
212
  def valid?
197
- return true
213
+ true
198
214
  end
199
215
 
200
216
  # Checks equality by comparing each attribute.
@@ -229,26 +245,36 @@ module SwaggyJenkinsClient
229
245
  end
230
246
 
231
247
  # Calculates hash code according to all attributes.
232
- # @return [Fixnum] Hash code
248
+ # @return [Integer] Hash code
233
249
  def hash
234
250
  [_class, number, url, actions, building, description, display_name, duration, estimated_duration, executor, full_display_name, id, keep_log, queue_id, result, timestamp, built_on, change_set].hash
235
251
  end
236
252
 
253
+ # Builds the object from hash
254
+ # @param [Hash] attributes Model attributes in the form of hash
255
+ # @return [Object] Returns the model itself
256
+ def self.build_from_hash(attributes)
257
+ new.build_from_hash(attributes)
258
+ end
259
+
237
260
  # Builds the object from hash
238
261
  # @param [Hash] attributes Model attributes in the form of hash
239
262
  # @return [Object] Returns the model itself
240
263
  def build_from_hash(attributes)
241
264
  return nil unless attributes.is_a?(Hash)
242
- self.class.swagger_types.each_pair do |key, type|
243
- if type =~ /\AArray<(.*)>/i
244
- # check to ensure the input is an array given that the the attribute
265
+ attributes = attributes.transform_keys(&:to_sym)
266
+ self.class.openapi_types.each_pair do |key, type|
267
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
268
+ self.send("#{key}=", nil)
269
+ elsif type =~ /\AArray<(.*)>/i
270
+ # check to ensure the input is an array given that the attribute
245
271
  # is documented as an array but the input is not
246
272
  if attributes[self.class.attribute_map[key]].is_a?(Array)
247
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
273
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
248
274
  end
249
275
  elsif !attributes[self.class.attribute_map[key]].nil?
250
276
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
251
- end # or else data not found in attributes(hash), not an issue as the data can be optional
277
+ end
252
278
  end
253
279
 
254
280
  self
@@ -260,8 +286,8 @@ module SwaggyJenkinsClient
260
286
  # @return [Object] Deserialized data
261
287
  def _deserialize(type, value)
262
288
  case type.to_sym
263
- when :DateTime
264
- DateTime.parse(value)
289
+ when :Time
290
+ Time.parse(value)
265
291
  when :Date
266
292
  Date.parse(value)
267
293
  when :String
@@ -270,7 +296,7 @@ module SwaggyJenkinsClient
270
296
  value.to_i
271
297
  when :Float
272
298
  value.to_f
273
- when :BOOLEAN
299
+ when :Boolean
274
300
  if value.to_s =~ /\A(true|t|yes|y|1)\z/i
275
301
  true
276
302
  else
@@ -291,8 +317,9 @@ module SwaggyJenkinsClient
291
317
  end
292
318
  end
293
319
  else # model
294
- temp_model = SwaggyJenkinsClient.const_get(type).new
295
- temp_model.build_from_hash(value)
320
+ # models (e.g. Pet) or oneOf
321
+ klass = SwaggyJenkinsClient.const_get(type)
322
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
296
323
  end
297
324
  end
298
325
 
@@ -314,7 +341,11 @@ module SwaggyJenkinsClient
314
341
  hash = {}
315
342
  self.class.attribute_map.each_pair do |attr, param|
316
343
  value = self.send(attr)
317
- next if value.nil?
344
+ if value.nil?
345
+ is_nullable = self.class.openapi_nullable.include?(attr)
346
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
347
+ end
348
+
318
349
  hash[param] = _to_hash(value)
319
350
  end
320
351
  hash
@@ -326,7 +357,7 @@ module SwaggyJenkinsClient
326
357
  # @return [Hash] Returns the value in the form of hash
327
358
  def _to_hash(value)
328
359
  if value.is_a?(Array)
329
- value.compact.map{ |v| _to_hash(v) }
360
+ value.compact.map { |v| _to_hash(v) }
330
361
  elsif value.is_a?(Hash)
331
362
  {}.tap do |hash|
332
363
  value.each { |k, v| hash[k] = _to_hash(v) }