swaggy_jenkins 0.0.1

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