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