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,226 @@
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 ComputerSet
18
+ attr_accessor :_class
19
+
20
+ attr_accessor :busy_executors
21
+
22
+ attr_accessor :computer
23
+
24
+ attr_accessor :display_name
25
+
26
+ attr_accessor :total_executors
27
+
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'_class' => :'_class',
33
+ :'busy_executors' => :'busyExecutors',
34
+ :'computer' => :'computer',
35
+ :'display_name' => :'displayName',
36
+ :'total_executors' => :'totalExecutors'
37
+ }
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.swagger_types
42
+ {
43
+ :'_class' => :'String',
44
+ :'busy_executors' => :'Integer',
45
+ :'computer' => :'Array<HudsonMasterComputer>',
46
+ :'display_name' => :'String',
47
+ :'total_executors' => :'Integer'
48
+ }
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ return unless attributes.is_a?(Hash)
55
+
56
+ # convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
58
+
59
+ if attributes.has_key?(:'_class')
60
+ self._class = attributes[:'_class']
61
+ end
62
+
63
+ if attributes.has_key?(:'busyExecutors')
64
+ self.busy_executors = attributes[:'busyExecutors']
65
+ end
66
+
67
+ if attributes.has_key?(:'computer')
68
+ if (value = attributes[:'computer']).is_a?(Array)
69
+ self.computer = value
70
+ end
71
+ end
72
+
73
+ if attributes.has_key?(:'displayName')
74
+ self.display_name = attributes[:'displayName']
75
+ end
76
+
77
+ if attributes.has_key?(:'totalExecutors')
78
+ self.total_executors = attributes[:'totalExecutors']
79
+ end
80
+
81
+ end
82
+
83
+ # Show invalid properties with the reasons. Usually used together with valid?
84
+ # @return Array for valid properies with the reasons
85
+ def list_invalid_properties
86
+ invalid_properties = Array.new
87
+ return invalid_properties
88
+ end
89
+
90
+ # Check to see if the all the properties in the model are valid
91
+ # @return true if the model is valid
92
+ def valid?
93
+ return true
94
+ end
95
+
96
+ # Checks equality by comparing each attribute.
97
+ # @param [Object] Object to be compared
98
+ def ==(o)
99
+ return true if self.equal?(o)
100
+ self.class == o.class &&
101
+ _class == o._class &&
102
+ busy_executors == o.busy_executors &&
103
+ computer == o.computer &&
104
+ display_name == o.display_name &&
105
+ total_executors == o.total_executors
106
+ end
107
+
108
+ # @see the `==` method
109
+ # @param [Object] Object to be compared
110
+ def eql?(o)
111
+ self == o
112
+ end
113
+
114
+ # Calculates hash code according to all attributes.
115
+ # @return [Fixnum] Hash code
116
+ def hash
117
+ [_class, busy_executors, computer, display_name, total_executors].hash
118
+ end
119
+
120
+ # Builds the object from hash
121
+ # @param [Hash] attributes Model attributes in the form of hash
122
+ # @return [Object] Returns the model itself
123
+ def build_from_hash(attributes)
124
+ return nil unless attributes.is_a?(Hash)
125
+ self.class.swagger_types.each_pair do |key, type|
126
+ if type =~ /\AArray<(.*)>/i
127
+ # check to ensure the input is an array given that the the attribute
128
+ # is documented as an array but the input is not
129
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
130
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
131
+ end
132
+ elsif !attributes[self.class.attribute_map[key]].nil?
133
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
134
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
135
+ end
136
+
137
+ self
138
+ end
139
+
140
+ # Deserializes the data based on type
141
+ # @param string type Data type
142
+ # @param string value Value to be deserialized
143
+ # @return [Object] Deserialized data
144
+ def _deserialize(type, value)
145
+ case type.to_sym
146
+ when :DateTime
147
+ DateTime.parse(value)
148
+ when :Date
149
+ Date.parse(value)
150
+ when :String
151
+ value.to_s
152
+ when :Integer
153
+ value.to_i
154
+ when :Float
155
+ value.to_f
156
+ when :BOOLEAN
157
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
158
+ true
159
+ else
160
+ false
161
+ end
162
+ when :Object
163
+ # generic object (usually a Hash), return directly
164
+ value
165
+ when /\AArray<(?<inner_type>.+)>\z/
166
+ inner_type = Regexp.last_match[:inner_type]
167
+ value.map { |v| _deserialize(inner_type, v) }
168
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
169
+ k_type = Regexp.last_match[:k_type]
170
+ v_type = Regexp.last_match[:v_type]
171
+ {}.tap do |hash|
172
+ value.each do |k, v|
173
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
174
+ end
175
+ end
176
+ else # model
177
+ temp_model = SwaggyJenkinsClient.const_get(type).new
178
+ temp_model.build_from_hash(value)
179
+ end
180
+ end
181
+
182
+ # Returns the string representation of the object
183
+ # @return [String] String presentation of the object
184
+ def to_s
185
+ to_hash.to_s
186
+ end
187
+
188
+ # to_body is an alias to to_hash (backward compatibility)
189
+ # @return [Hash] Returns the object in the form of hash
190
+ def to_body
191
+ to_hash
192
+ end
193
+
194
+ # Returns the object in the form of hash
195
+ # @return [Hash] Returns the object in the form of hash
196
+ def to_hash
197
+ hash = {}
198
+ self.class.attribute_map.each_pair do |attr, param|
199
+ value = self.send(attr)
200
+ next if value.nil?
201
+ hash[param] = _to_hash(value)
202
+ end
203
+ hash
204
+ end
205
+
206
+ # Outputs non-array value in the form of hash
207
+ # For object, use to_hash. Otherwise, just return the value
208
+ # @param [Object] value Any valid value
209
+ # @return [Hash] Returns the value in the form of hash
210
+ def _to_hash(value)
211
+ if value.is_a?(Array)
212
+ value.compact.map{ |v| _to_hash(v) }
213
+ elsif value.is_a?(Hash)
214
+ {}.tap do |hash|
215
+ value.each { |k, v| hash[k] = _to_hash(v) }
216
+ end
217
+ elsif value.respond_to? :to_hash
218
+ value.to_hash
219
+ else
220
+ value
221
+ end
222
+ end
223
+
224
+ end
225
+
226
+ end
@@ -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 DefaultCrumbIssuer
18
+ attr_accessor :_class
19
+
20
+ attr_accessor :crumb
21
+
22
+ attr_accessor :crumb_request_field
23
+
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'_class' => :'_class',
29
+ :'crumb' => :'crumb',
30
+ :'crumb_request_field' => :'crumbRequestField'
31
+ }
32
+ end
33
+
34
+ # Attribute type mapping.
35
+ def self.swagger_types
36
+ {
37
+ :'_class' => :'String',
38
+ :'crumb' => :'String',
39
+ :'crumb_request_field' => :'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?(:'crumb')
56
+ self.crumb = attributes[:'crumb']
57
+ end
58
+
59
+ if attributes.has_key?(:'crumbRequestField')
60
+ self.crumb_request_field = attributes[:'crumbRequestField']
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
+ crumb == o.crumb &&
85
+ crumb_request_field == o.crumb_request_field
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, crumb, crumb_request_field].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,215 @@
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 DiskSpaceMonitorDescriptorDiskSpace
18
+ attr_accessor :_class
19
+
20
+ attr_accessor :timestamp
21
+
22
+ attr_accessor :path
23
+
24
+ attr_accessor :size
25
+
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'_class' => :'_class',
31
+ :'timestamp' => :'timestamp',
32
+ :'path' => :'path',
33
+ :'size' => :'size'
34
+ }
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.swagger_types
39
+ {
40
+ :'_class' => :'String',
41
+ :'timestamp' => :'Integer',
42
+ :'path' => :'String',
43
+ :'size' => :'Integer'
44
+ }
45
+ end
46
+
47
+ # Initializes the object
48
+ # @param [Hash] attributes Model attributes in the form of hash
49
+ def initialize(attributes = {})
50
+ return unless attributes.is_a?(Hash)
51
+
52
+ # convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
54
+
55
+ if attributes.has_key?(:'_class')
56
+ self._class = attributes[:'_class']
57
+ end
58
+
59
+ if attributes.has_key?(:'timestamp')
60
+ self.timestamp = attributes[:'timestamp']
61
+ end
62
+
63
+ if attributes.has_key?(:'path')
64
+ self.path = attributes[:'path']
65
+ end
66
+
67
+ if attributes.has_key?(:'size')
68
+ self.size = attributes[:'size']
69
+ end
70
+
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properies with the reasons
75
+ def list_invalid_properties
76
+ invalid_properties = Array.new
77
+ return invalid_properties
78
+ end
79
+
80
+ # Check to see if the all the properties in the model are valid
81
+ # @return true if the model is valid
82
+ def valid?
83
+ return true
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] Object to be compared
88
+ def ==(o)
89
+ return true if self.equal?(o)
90
+ self.class == o.class &&
91
+ _class == o._class &&
92
+ timestamp == o.timestamp &&
93
+ path == o.path &&
94
+ size == o.size
95
+ end
96
+
97
+ # @see the `==` method
98
+ # @param [Object] Object to be compared
99
+ def eql?(o)
100
+ self == o
101
+ end
102
+
103
+ # Calculates hash code according to all attributes.
104
+ # @return [Fixnum] Hash code
105
+ def hash
106
+ [_class, timestamp, path, size].hash
107
+ end
108
+
109
+ # Builds the object from hash
110
+ # @param [Hash] attributes Model attributes in the form of hash
111
+ # @return [Object] Returns the model itself
112
+ def build_from_hash(attributes)
113
+ return nil unless attributes.is_a?(Hash)
114
+ self.class.swagger_types.each_pair do |key, type|
115
+ if type =~ /\AArray<(.*)>/i
116
+ # check to ensure the input is an array given that the the attribute
117
+ # is documented as an array but the input is not
118
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
119
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
120
+ end
121
+ elsif !attributes[self.class.attribute_map[key]].nil?
122
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
123
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
124
+ end
125
+
126
+ self
127
+ end
128
+
129
+ # Deserializes the data based on type
130
+ # @param string type Data type
131
+ # @param string value Value to be deserialized
132
+ # @return [Object] Deserialized data
133
+ def _deserialize(type, value)
134
+ case type.to_sym
135
+ when :DateTime
136
+ DateTime.parse(value)
137
+ when :Date
138
+ Date.parse(value)
139
+ when :String
140
+ value.to_s
141
+ when :Integer
142
+ value.to_i
143
+ when :Float
144
+ value.to_f
145
+ when :BOOLEAN
146
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
147
+ true
148
+ else
149
+ false
150
+ end
151
+ when :Object
152
+ # generic object (usually a Hash), return directly
153
+ value
154
+ when /\AArray<(?<inner_type>.+)>\z/
155
+ inner_type = Regexp.last_match[:inner_type]
156
+ value.map { |v| _deserialize(inner_type, v) }
157
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
158
+ k_type = Regexp.last_match[:k_type]
159
+ v_type = Regexp.last_match[:v_type]
160
+ {}.tap do |hash|
161
+ value.each do |k, v|
162
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
163
+ end
164
+ end
165
+ else # model
166
+ temp_model = SwaggyJenkinsClient.const_get(type).new
167
+ temp_model.build_from_hash(value)
168
+ end
169
+ end
170
+
171
+ # Returns the string representation of the object
172
+ # @return [String] String presentation of the object
173
+ def to_s
174
+ to_hash.to_s
175
+ end
176
+
177
+ # to_body is an alias to to_hash (backward compatibility)
178
+ # @return [Hash] Returns the object in the form of hash
179
+ def to_body
180
+ to_hash
181
+ end
182
+
183
+ # Returns the object in the form of hash
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_hash
186
+ hash = {}
187
+ self.class.attribute_map.each_pair do |attr, param|
188
+ value = self.send(attr)
189
+ next if value.nil?
190
+ hash[param] = _to_hash(value)
191
+ end
192
+ hash
193
+ end
194
+
195
+ # Outputs non-array value in the form of hash
196
+ # For object, use to_hash. Otherwise, just return the value
197
+ # @param [Object] value Any valid value
198
+ # @return [Hash] Returns the value in the form of hash
199
+ def _to_hash(value)
200
+ if value.is_a?(Array)
201
+ value.compact.map{ |v| _to_hash(v) }
202
+ elsif value.is_a?(Hash)
203
+ {}.tap do |hash|
204
+ value.each { |k, v| hash[k] = _to_hash(v) }
205
+ end
206
+ elsif value.respond_to? :to_hash
207
+ value.to_hash
208
+ else
209
+ value
210
+ end
211
+ end
212
+
213
+ end
214
+
215
+ end