swaggy_jenkins 0.0.1 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/Gemfile +3 -1
- data/Gemfile.lock +51 -50
- data/README.md +25 -33
- data/Rakefile +2 -0
- data/bin/bundle +114 -0
- data/bin/byebug +29 -0
- data/bin/coderay +29 -0
- data/bin/htmldiff +29 -0
- data/bin/ldiff +29 -0
- data/bin/pry +29 -0
- data/bin/rake +29 -0
- data/bin/rspec +29 -0
- data/bin/rubocop +29 -0
- data/bin/ruby-parse +29 -0
- data/bin/ruby-rewrite +29 -0
- data/docs/AllView.md +17 -5
- data/docs/BaseApi.md +75 -0
- data/docs/BlueOceanApi.md +1347 -631
- data/docs/BranchImpl.md +37 -15
- data/docs/BranchImpllinks.md +21 -7
- data/docs/BranchImplpermissions.md +21 -7
- data/docs/CauseAction.md +15 -4
- data/docs/CauseUserIdCause.md +19 -6
- data/docs/ClassesByClass.md +15 -4
- data/docs/ClockDifference.md +15 -4
- data/docs/ComputerSet.md +21 -7
- data/docs/DefaultCrumbIssuer.md +17 -5
- data/docs/DiskSpaceMonitorDescriptorDiskSpace.md +19 -6
- data/docs/EmptyChangeLogSet.md +15 -4
- data/docs/ExtensionClassContainerImpl1.md +17 -5
- data/docs/ExtensionClassContainerImpl1links.md +15 -4
- data/docs/ExtensionClassContainerImpl1map.md +17 -5
- data/docs/ExtensionClassImpl.md +17 -5
- data/docs/ExtensionClassImpllinks.md +15 -4
- data/docs/FavoriteImpl.md +17 -5
- data/docs/FavoriteImpllinks.md +15 -4
- data/docs/FreeStyleBuild.md +47 -20
- data/docs/FreeStyleProject.md +65 -29
- data/docs/FreeStyleProjectactions.md +13 -3
- data/docs/FreeStyleProjecthealthReport.md +21 -7
- data/docs/GenericResource.md +23 -8
- data/docs/GithubContent.md +27 -10
- data/docs/GithubFile.md +15 -4
- data/docs/GithubOrganization.md +19 -6
- data/docs/GithubOrganizationlinks.md +17 -5
- data/docs/GithubRepositories.md +23 -8
- data/docs/GithubRepositorieslinks.md +15 -4
- data/docs/GithubRepository.md +27 -10
- data/docs/GithubRepositorylinks.md +15 -4
- data/docs/GithubRepositorypermissions.md +19 -6
- data/docs/GithubRespositoryContainer.md +17 -5
- data/docs/GithubRespositoryContainerlinks.md +15 -4
- data/docs/GithubScm.md +21 -7
- data/docs/GithubScmlinks.md +15 -4
- data/docs/Hudson.md +41 -17
- data/docs/HudsonMasterComputer.md +43 -18
- data/docs/HudsonMasterComputerexecutors.md +23 -8
- data/docs/HudsonMasterComputermonitorData.md +25 -9
- data/docs/HudsonassignedLabels.md +13 -3
- data/docs/InputStepImpl.md +25 -9
- data/docs/InputStepImpllinks.md +15 -4
- data/docs/Label1.md +13 -3
- data/docs/Link.md +15 -4
- data/docs/ListView.md +21 -7
- data/docs/MultibranchPipeline.md +39 -16
- data/docs/NullSCM.md +13 -3
- data/docs/Organisation.md +15 -4
- data/docs/Pipeline.md +27 -10
- data/docs/PipelineActivity.md +41 -17
- data/docs/PipelineActivityartifacts.md +19 -6
- data/docs/PipelineBranchesitem.md +29 -11
- data/docs/PipelineBranchesitemlatestRun.md +39 -16
- data/docs/PipelineBranchesitempullRequest.md +23 -8
- data/docs/PipelineBranchesitempullRequestlinks.md +15 -4
- data/docs/PipelineFolderImpl.md +25 -9
- data/docs/PipelineImpl.md +29 -11
- data/docs/PipelineImpllinks.md +21 -7
- data/docs/PipelineRun.md +41 -17
- data/docs/PipelineRunImpl.md +41 -17
- data/docs/PipelineRunImpllinks.md +23 -8
- data/docs/PipelineRunNode.md +27 -10
- data/docs/PipelineRunNodeedges.md +15 -4
- data/docs/PipelineRunartifacts.md +19 -6
- data/docs/PipelineStepImpl.md +29 -11
- data/docs/PipelineStepImpllinks.md +17 -5
- data/docs/PipelinelatestRun.md +41 -17
- data/docs/PipelinelatestRunartifacts.md +19 -6
- data/docs/Queue.md +15 -4
- data/docs/QueueBlockedItem.md +35 -14
- data/docs/QueueItemImpl.md +21 -7
- data/docs/QueueLeftItem.md +37 -15
- data/docs/RemoteAccessApi.md +666 -350
- data/docs/ResponseTimeMonitorData.md +17 -5
- data/docs/StringParameterDefinition.md +21 -7
- data/docs/StringParameterValue.md +17 -5
- data/docs/SwapSpaceMonitorMemoryUsage2.md +21 -7
- data/docs/UnlabeledLoadStatistics.md +13 -3
- data/docs/User.md +21 -7
- data/git_push.sh +12 -10
- data/lib/swaggy_jenkins/api/base_api.rb +77 -0
- data/lib/swaggy_jenkins/api/blue_ocean_api.rb +1048 -643
- data/lib/swaggy_jenkins/api/remote_access_api.rb +506 -361
- data/lib/swaggy_jenkins/api_client.rb +95 -94
- data/lib/swaggy_jenkins/api_error.rb +22 -3
- data/lib/swaggy_jenkins/configuration.rb +91 -15
- data/lib/swaggy_jenkins/models/all_view.rb +59 -29
- data/lib/swaggy_jenkins/models/branch_impl.rb +76 -46
- data/lib/swaggy_jenkins/models/branch_impllinks.rb +62 -32
- data/lib/swaggy_jenkins/models/branch_implpermissions.rb +65 -35
- data/lib/swaggy_jenkins/models/cause_action.rb +58 -28
- data/lib/swaggy_jenkins/models/cause_user_id_cause.rb +63 -33
- data/lib/swaggy_jenkins/models/classes_by_class.rb +58 -28
- data/lib/swaggy_jenkins/models/clock_difference.rb +58 -28
- data/lib/swaggy_jenkins/models/computer_set.rb +64 -34
- data/lib/swaggy_jenkins/models/default_crumb_issuer.rb +60 -30
- data/lib/swaggy_jenkins/models/disk_space_monitor_descriptor_disk_space.rb +60 -30
- data/lib/swaggy_jenkins/models/empty_change_log_set.rb +58 -28
- data/lib/swaggy_jenkins/models/extension_class_container_impl1.rb +59 -29
- data/lib/swaggy_jenkins/models/extension_class_container_impl1links.rb +59 -29
- data/lib/swaggy_jenkins/models/extension_class_container_impl1map.rb +61 -31
- data/lib/swaggy_jenkins/models/extension_class_impl.rb +59 -29
- data/lib/swaggy_jenkins/models/extension_class_impllinks.rb +59 -29
- data/lib/swaggy_jenkins/models/favorite_impl.rb +59 -29
- data/lib/swaggy_jenkins/models/favorite_impllinks.rb +59 -29
- data/lib/swaggy_jenkins/models/free_style_build.rb +83 -53
- data/lib/swaggy_jenkins/models/free_style_project.rb +105 -75
- data/lib/swaggy_jenkins/models/free_style_projectactions.rb +57 -27
- data/lib/swaggy_jenkins/models/free_style_projecthealth_report.rb +63 -33
- data/lib/swaggy_jenkins/models/generic_resource.rb +65 -35
- data/lib/swaggy_jenkins/models/github_content.rb +65 -35
- data/lib/swaggy_jenkins/models/github_file.rb +58 -28
- data/lib/swaggy_jenkins/models/github_organization.rb +62 -32
- data/lib/swaggy_jenkins/models/github_organizationlinks.rb +60 -30
- data/lib/swaggy_jenkins/models/github_repositories.rb +65 -35
- data/lib/swaggy_jenkins/models/github_repositorieslinks.rb +59 -29
- data/lib/swaggy_jenkins/models/github_repository.rb +67 -37
- data/lib/swaggy_jenkins/models/github_repositorylinks.rb +59 -29
- data/lib/swaggy_jenkins/models/github_repositorypermissions.rb +63 -33
- data/lib/swaggy_jenkins/models/github_respository_container.rb +59 -29
- data/lib/swaggy_jenkins/models/github_respository_containerlinks.rb +59 -29
- data/lib/swaggy_jenkins/models/github_scm.rb +62 -32
- data/lib/swaggy_jenkins/models/github_scmlinks.rb +59 -29
- data/lib/swaggy_jenkins/models/hudson.rb +84 -54
- data/lib/swaggy_jenkins/models/hudson_master_computer.rb +89 -59
- data/lib/swaggy_jenkins/models/hudson_master_computerexecutors.rb +66 -36
- data/lib/swaggy_jenkins/models/hudson_master_computermonitor_data.rb +69 -39
- data/lib/swaggy_jenkins/models/hudsonassigned_labels.rb +57 -27
- data/lib/swaggy_jenkins/models/input_step_impl.rb +63 -33
- data/lib/swaggy_jenkins/models/input_step_impllinks.rb +59 -29
- data/lib/swaggy_jenkins/models/label1.rb +57 -27
- data/lib/swaggy_jenkins/models/link.rb +58 -28
- data/lib/swaggy_jenkins/models/list_view.rb +61 -31
- data/lib/swaggy_jenkins/models/multibranch_pipeline.rb +81 -51
- data/lib/swaggy_jenkins/models/null_scm.rb +57 -27
- data/lib/swaggy_jenkins/models/organisation.rb +58 -28
- data/lib/swaggy_jenkins/models/pipeline.rb +69 -39
- data/lib/swaggy_jenkins/models/pipeline_activity.rb +78 -48
- data/lib/swaggy_jenkins/models/pipeline_activityartifacts.rb +60 -30
- data/lib/swaggy_jenkins/models/pipeline_branchesitem.rb +71 -41
- data/lib/swaggy_jenkins/models/pipeline_branchesitemlatest_run.rb +77 -47
- data/lib/swaggy_jenkins/models/pipeline_branchesitempull_request.rb +62 -32
- data/lib/swaggy_jenkins/models/pipeline_branchesitempull_requestlinks.rb +59 -29
- data/lib/swaggy_jenkins/models/pipeline_folder_impl.rb +67 -37
- data/lib/swaggy_jenkins/models/pipeline_impl.rb +70 -40
- data/lib/swaggy_jenkins/models/pipeline_impllinks.rb +62 -32
- data/lib/swaggy_jenkins/models/pipeline_run.rb +78 -48
- data/lib/swaggy_jenkins/models/pipeline_run_impl.rb +78 -48
- data/lib/swaggy_jenkins/models/pipeline_run_impllinks.rb +63 -33
- data/lib/swaggy_jenkins/models/pipeline_run_node.rb +67 -37
- data/lib/swaggy_jenkins/models/pipeline_run_nodeedges.rb +58 -28
- data/lib/swaggy_jenkins/models/pipeline_runartifacts.rb +60 -30
- data/lib/swaggy_jenkins/models/pipeline_step_impl.rb +68 -38
- data/lib/swaggy_jenkins/models/pipeline_step_impllinks.rb +60 -30
- data/lib/swaggy_jenkins/models/pipelinelatest_run.rb +78 -48
- data/lib/swaggy_jenkins/models/pipelinelatest_runartifacts.rb +60 -30
- data/lib/swaggy_jenkins/models/queue.rb +58 -28
- data/lib/swaggy_jenkins/models/queue_blocked_item.rb +73 -43
- data/lib/swaggy_jenkins/models/queue_item_impl.rb +63 -33
- data/lib/swaggy_jenkins/models/queue_left_item.rb +74 -44
- data/lib/swaggy_jenkins/models/response_time_monitor_data.rb +59 -29
- data/lib/swaggy_jenkins/models/string_parameter_definition.rb +62 -32
- data/lib/swaggy_jenkins/models/string_parameter_value.rb +59 -29
- data/lib/swaggy_jenkins/models/swap_space_monitor_memory_usage2.rb +65 -35
- data/lib/swaggy_jenkins/models/unlabeled_load_statistics.rb +57 -27
- data/lib/swaggy_jenkins/models/user.rb +62 -32
- data/lib/swaggy_jenkins/version.rb +4 -4
- data/lib/swaggy_jenkins.rb +4 -16
- data/spec/api/base_api_spec.rb +45 -0
- data/spec/api/blue_ocean_api_spec.rb +76 -88
- data/spec/api/remote_access_api_spec.rb +28 -59
- data/spec/api_client_spec.rb +40 -40
- data/spec/configuration_spec.rb +11 -11
- data/spec/models/all_view_spec.rb +10 -18
- data/spec/models/branch_impl_spec.rb +20 -28
- data/spec/models/branch_impllinks_spec.rb +12 -20
- data/spec/models/branch_implpermissions_spec.rb +12 -20
- data/spec/models/cause_action_spec.rb +9 -17
- data/spec/models/cause_user_id_cause_spec.rb +11 -19
- data/spec/models/classes_by_class_spec.rb +9 -17
- data/spec/models/clock_difference_spec.rb +9 -17
- data/spec/models/computer_set_spec.rb +12 -20
- data/spec/models/default_crumb_issuer_spec.rb +10 -18
- data/spec/models/disk_space_monitor_descriptor_disk_space_spec.rb +11 -19
- data/spec/models/empty_change_log_set_spec.rb +9 -17
- data/spec/models/extension_class_container_impl1_spec.rb +10 -18
- data/spec/models/extension_class_container_impl1links_spec.rb +9 -17
- data/spec/models/extension_class_container_impl1map_spec.rb +10 -18
- data/spec/models/extension_class_impl_spec.rb +10 -18
- data/spec/models/extension_class_impllinks_spec.rb +9 -17
- data/spec/models/favorite_impl_spec.rb +10 -18
- data/spec/models/favorite_impllinks_spec.rb +9 -17
- data/spec/models/free_style_build_spec.rb +25 -33
- data/spec/models/free_style_project_spec.rb +34 -42
- data/spec/models/free_style_projectactions_spec.rb +8 -16
- data/spec/models/free_style_projecthealth_report_spec.rb +12 -20
- data/spec/models/generic_resource_spec.rb +13 -21
- data/spec/models/github_content_spec.rb +15 -23
- data/spec/models/github_file_spec.rb +9 -17
- data/spec/models/github_organization_spec.rb +11 -19
- data/spec/models/github_organizationlinks_spec.rb +10 -18
- data/spec/models/github_repositories_spec.rb +13 -21
- data/spec/models/github_repositorieslinks_spec.rb +9 -17
- data/spec/models/github_repository_spec.rb +15 -23
- data/spec/models/github_repositorylinks_spec.rb +9 -17
- data/spec/models/github_repositorypermissions_spec.rb +11 -19
- data/spec/models/github_respository_container_spec.rb +10 -18
- data/spec/models/github_respository_containerlinks_spec.rb +9 -17
- data/spec/models/github_scm_spec.rb +12 -20
- data/spec/models/github_scmlinks_spec.rb +9 -17
- data/spec/models/hudson_master_computer_spec.rb +23 -31
- data/spec/models/hudson_master_computerexecutors_spec.rb +13 -21
- data/spec/models/hudson_master_computermonitor_data_spec.rb +14 -22
- data/spec/models/hudson_spec.rb +22 -30
- data/spec/models/hudsonassigned_labels_spec.rb +8 -16
- data/spec/models/input_step_impl_spec.rb +14 -22
- data/spec/models/input_step_impllinks_spec.rb +9 -17
- data/spec/models/label1_spec.rb +8 -16
- data/spec/models/link_spec.rb +9 -17
- data/spec/models/list_view_spec.rb +12 -20
- data/spec/models/multibranch_pipeline_spec.rb +21 -29
- data/spec/models/null_scm_spec.rb +8 -16
- data/spec/models/organisation_spec.rb +9 -17
- data/spec/models/pipeline_activity_spec.rb +22 -30
- data/spec/models/pipeline_activityartifacts_spec.rb +11 -19
- data/spec/models/pipeline_branchesitem_spec.rb +16 -24
- data/spec/models/pipeline_branchesitemlatest_run_spec.rb +21 -29
- data/spec/models/pipeline_branchesitempull_request_spec.rb +13 -21
- data/spec/models/pipeline_branchesitempull_requestlinks_spec.rb +9 -17
- data/spec/models/pipeline_folder_impl_spec.rb +14 -22
- data/spec/models/pipeline_impl_spec.rb +16 -24
- data/spec/models/pipeline_impllinks_spec.rb +12 -20
- data/spec/models/pipeline_run_impl_spec.rb +22 -30
- data/spec/models/pipeline_run_impllinks_spec.rb +13 -21
- data/spec/models/pipeline_run_node_spec.rb +15 -23
- data/spec/models/pipeline_run_nodeedges_spec.rb +9 -17
- data/spec/models/pipeline_run_spec.rb +22 -30
- data/spec/models/pipeline_runartifacts_spec.rb +11 -19
- data/spec/models/pipeline_spec.rb +15 -23
- data/spec/models/pipeline_step_impl_spec.rb +16 -24
- data/spec/models/pipeline_step_impllinks_spec.rb +10 -18
- data/spec/models/pipelinelatest_run_spec.rb +22 -30
- data/spec/models/pipelinelatest_runartifacts_spec.rb +11 -19
- data/spec/models/queue_blocked_item_spec.rb +19 -27
- data/spec/models/queue_item_impl_spec.rb +12 -20
- data/spec/models/queue_left_item_spec.rb +20 -28
- data/spec/models/queue_spec.rb +9 -17
- data/spec/models/response_time_monitor_data_spec.rb +10 -18
- data/spec/models/string_parameter_definition_spec.rb +12 -20
- data/spec/models/string_parameter_value_spec.rb +10 -18
- data/spec/models/swap_space_monitor_memory_usage2_spec.rb +12 -20
- data/spec/models/unlabeled_load_statistics_spec.rb +8 -16
- data/spec/models/user_spec.rb +12 -20
- data/spec/spec_helper.rb +3 -3
- data/swaggy_jenkins.gemspec +6 -13
- metadata +97 -275
- data/docs/Body.md +0 -8
- data/docs/Organisations.md +0 -7
- data/docs/PipelineActivities.md +0 -7
- data/docs/PipelineBranches.md +0 -7
- data/docs/PipelineQueue.md +0 -7
- data/docs/PipelineRunNodeSteps.md +0 -7
- data/docs/PipelineRunNodes.md +0 -7
- data/docs/PipelineRunSteps.md +0 -7
- data/docs/PipelineRuns.md +0 -7
- data/docs/Pipelines.md +0 -7
- data/docs/ScmOrganisations.md +0 -7
- data/docs/UserFavorites.md +0 -7
- data/docs/Users.md +0 -7
- data/lib/swaggy_jenkins/models/body.rb +0 -193
- data/lib/swaggy_jenkins/models/organisations.rb +0 -179
- data/lib/swaggy_jenkins/models/pipeline_activities.rb +0 -179
- data/lib/swaggy_jenkins/models/pipeline_branches.rb +0 -179
- data/lib/swaggy_jenkins/models/pipeline_queue.rb +0 -179
- data/lib/swaggy_jenkins/models/pipeline_run_node_steps.rb +0 -179
- data/lib/swaggy_jenkins/models/pipeline_run_nodes.rb +0 -179
- data/lib/swaggy_jenkins/models/pipeline_run_steps.rb +0 -179
- data/lib/swaggy_jenkins/models/pipeline_runs.rb +0 -179
- data/lib/swaggy_jenkins/models/pipelines.rb +0 -179
- data/lib/swaggy_jenkins/models/scm_organisations.rb +0 -179
- data/lib/swaggy_jenkins/models/user_favorites.rb +0 -179
- data/lib/swaggy_jenkins/models/users.rb +0 -179
- data/spec/models/body_spec.rb +0 -42
- data/spec/models/organisations_spec.rb +0 -36
- data/spec/models/pipeline_activities_spec.rb +0 -36
- data/spec/models/pipeline_branches_spec.rb +0 -36
- data/spec/models/pipeline_queue_spec.rb +0 -36
- data/spec/models/pipeline_run_node_steps_spec.rb +0 -36
- data/spec/models/pipeline_run_nodes_spec.rb +0 -36
- data/spec/models/pipeline_run_steps_spec.rb +0 -36
- data/spec/models/pipeline_runs_spec.rb +0 -36
- data/spec/models/pipelines_spec.rb +0 -36
- data/spec/models/scm_organisations_spec.rb +0 -36
- data/spec/models/user_favorites_spec.rb +0 -36
- data/spec/models/users_spec.rb +0 -36
@@ -3,17 +3,17 @@
|
|
3
3
|
|
4
4
|
#Jenkins API clients generated from Swagger / Open API specification
|
5
5
|
|
6
|
-
OpenAPI
|
6
|
+
The version of the OpenAPI document: 1.3.0
|
7
7
|
Contact: blah@cliffano.com
|
8
|
-
Generated by: https://
|
9
|
-
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.4.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module SwaggyJenkinsClient
|
16
|
-
|
17
17
|
class PipelineBranchesitem
|
18
18
|
attr_accessor :display_name
|
19
19
|
|
@@ -33,7 +33,6 @@ module SwaggyJenkinsClient
|
|
33
33
|
|
34
34
|
attr_accessor :_class
|
35
35
|
|
36
|
-
|
37
36
|
# Attribute mapping from ruby-style variable name to JSON key.
|
38
37
|
def self.attribute_map
|
39
38
|
{
|
@@ -49,8 +48,13 @@ module SwaggyJenkinsClient
|
|
49
48
|
}
|
50
49
|
end
|
51
50
|
|
51
|
+
# Returns all the JSON keys this model knows about
|
52
|
+
def self.acceptable_attributes
|
53
|
+
attribute_map.values
|
54
|
+
end
|
55
|
+
|
52
56
|
# Attribute type mapping.
|
53
|
-
def self.
|
57
|
+
def self.openapi_types
|
54
58
|
{
|
55
59
|
:'display_name' => :'String',
|
56
60
|
:'estimated_duration_in_millis' => :'Integer',
|
@@ -64,63 +68,75 @@ module SwaggyJenkinsClient
|
|
64
68
|
}
|
65
69
|
end
|
66
70
|
|
71
|
+
# List of attributes with nullable: true
|
72
|
+
def self.openapi_nullable
|
73
|
+
Set.new([
|
74
|
+
])
|
75
|
+
end
|
76
|
+
|
67
77
|
# Initializes the object
|
68
78
|
# @param [Hash] attributes Model attributes in the form of hash
|
69
79
|
def initialize(attributes = {})
|
70
|
-
|
80
|
+
if (!attributes.is_a?(Hash))
|
81
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggyJenkinsClient::PipelineBranchesitem` initialize method"
|
82
|
+
end
|
71
83
|
|
72
|
-
# convert string to symbol for hash key
|
73
|
-
attributes = attributes.each_with_object({}){|(k,v), h|
|
84
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
85
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
86
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
87
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::PipelineBranchesitem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
88
|
+
end
|
89
|
+
h[k.to_sym] = v
|
90
|
+
}
|
74
91
|
|
75
|
-
if attributes.
|
76
|
-
self.display_name = attributes[:'
|
92
|
+
if attributes.key?(:'display_name')
|
93
|
+
self.display_name = attributes[:'display_name']
|
77
94
|
end
|
78
95
|
|
79
|
-
if attributes.
|
80
|
-
self.estimated_duration_in_millis = attributes[:'
|
96
|
+
if attributes.key?(:'estimated_duration_in_millis')
|
97
|
+
self.estimated_duration_in_millis = attributes[:'estimated_duration_in_millis']
|
81
98
|
end
|
82
99
|
|
83
|
-
if attributes.
|
100
|
+
if attributes.key?(:'name')
|
84
101
|
self.name = attributes[:'name']
|
85
102
|
end
|
86
103
|
|
87
|
-
if attributes.
|
88
|
-
self.weather_score = attributes[:'
|
104
|
+
if attributes.key?(:'weather_score')
|
105
|
+
self.weather_score = attributes[:'weather_score']
|
89
106
|
end
|
90
107
|
|
91
|
-
if attributes.
|
92
|
-
self.latest_run = attributes[:'
|
108
|
+
if attributes.key?(:'latest_run')
|
109
|
+
self.latest_run = attributes[:'latest_run']
|
93
110
|
end
|
94
111
|
|
95
|
-
if attributes.
|
112
|
+
if attributes.key?(:'organization')
|
96
113
|
self.organization = attributes[:'organization']
|
97
114
|
end
|
98
115
|
|
99
|
-
if attributes.
|
100
|
-
self.pull_request = attributes[:'
|
116
|
+
if attributes.key?(:'pull_request')
|
117
|
+
self.pull_request = attributes[:'pull_request']
|
101
118
|
end
|
102
119
|
|
103
|
-
if attributes.
|
104
|
-
self.total_number_of_pull_requests = attributes[:'
|
120
|
+
if attributes.key?(:'total_number_of_pull_requests')
|
121
|
+
self.total_number_of_pull_requests = attributes[:'total_number_of_pull_requests']
|
105
122
|
end
|
106
123
|
|
107
|
-
if attributes.
|
124
|
+
if attributes.key?(:'_class')
|
108
125
|
self._class = attributes[:'_class']
|
109
126
|
end
|
110
|
-
|
111
127
|
end
|
112
128
|
|
113
129
|
# Show invalid properties with the reasons. Usually used together with valid?
|
114
|
-
# @return Array for valid
|
130
|
+
# @return Array for valid properties with the reasons
|
115
131
|
def list_invalid_properties
|
116
132
|
invalid_properties = Array.new
|
117
|
-
|
133
|
+
invalid_properties
|
118
134
|
end
|
119
135
|
|
120
136
|
# Check to see if the all the properties in the model are valid
|
121
137
|
# @return true if the model is valid
|
122
138
|
def valid?
|
123
|
-
|
139
|
+
true
|
124
140
|
end
|
125
141
|
|
126
142
|
# Checks equality by comparing each attribute.
|
@@ -146,26 +162,35 @@ module SwaggyJenkinsClient
|
|
146
162
|
end
|
147
163
|
|
148
164
|
# Calculates hash code according to all attributes.
|
149
|
-
# @return [
|
165
|
+
# @return [Integer] Hash code
|
150
166
|
def hash
|
151
167
|
[display_name, estimated_duration_in_millis, name, weather_score, latest_run, organization, pull_request, total_number_of_pull_requests, _class].hash
|
152
168
|
end
|
153
169
|
|
170
|
+
# Builds the object from hash
|
171
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
172
|
+
# @return [Object] Returns the model itself
|
173
|
+
def self.build_from_hash(attributes)
|
174
|
+
new.build_from_hash(attributes)
|
175
|
+
end
|
176
|
+
|
154
177
|
# Builds the object from hash
|
155
178
|
# @param [Hash] attributes Model attributes in the form of hash
|
156
179
|
# @return [Object] Returns the model itself
|
157
180
|
def build_from_hash(attributes)
|
158
181
|
return nil unless attributes.is_a?(Hash)
|
159
|
-
self.class.
|
160
|
-
if
|
161
|
-
#
|
182
|
+
self.class.openapi_types.each_pair do |key, type|
|
183
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
184
|
+
self.send("#{key}=", nil)
|
185
|
+
elsif type =~ /\AArray<(.*)>/i
|
186
|
+
# check to ensure the input is an array given that the attribute
|
162
187
|
# is documented as an array but the input is not
|
163
188
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
164
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
189
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
165
190
|
end
|
166
191
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
167
192
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
168
|
-
end
|
193
|
+
end
|
169
194
|
end
|
170
195
|
|
171
196
|
self
|
@@ -177,8 +202,8 @@ module SwaggyJenkinsClient
|
|
177
202
|
# @return [Object] Deserialized data
|
178
203
|
def _deserialize(type, value)
|
179
204
|
case type.to_sym
|
180
|
-
when :
|
181
|
-
|
205
|
+
when :Time
|
206
|
+
Time.parse(value)
|
182
207
|
when :Date
|
183
208
|
Date.parse(value)
|
184
209
|
when :String
|
@@ -187,7 +212,7 @@ module SwaggyJenkinsClient
|
|
187
212
|
value.to_i
|
188
213
|
when :Float
|
189
214
|
value.to_f
|
190
|
-
when :
|
215
|
+
when :Boolean
|
191
216
|
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
192
217
|
true
|
193
218
|
else
|
@@ -208,8 +233,9 @@ module SwaggyJenkinsClient
|
|
208
233
|
end
|
209
234
|
end
|
210
235
|
else # model
|
211
|
-
|
212
|
-
|
236
|
+
# models (e.g. Pet) or oneOf
|
237
|
+
klass = SwaggyJenkinsClient.const_get(type)
|
238
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
213
239
|
end
|
214
240
|
end
|
215
241
|
|
@@ -231,7 +257,11 @@ module SwaggyJenkinsClient
|
|
231
257
|
hash = {}
|
232
258
|
self.class.attribute_map.each_pair do |attr, param|
|
233
259
|
value = self.send(attr)
|
234
|
-
|
260
|
+
if value.nil?
|
261
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
262
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
263
|
+
end
|
264
|
+
|
235
265
|
hash[param] = _to_hash(value)
|
236
266
|
end
|
237
267
|
hash
|
@@ -243,7 +273,7 @@ module SwaggyJenkinsClient
|
|
243
273
|
# @return [Hash] Returns the value in the form of hash
|
244
274
|
def _to_hash(value)
|
245
275
|
if value.is_a?(Array)
|
246
|
-
value.compact.map{ |v| _to_hash(v) }
|
276
|
+
value.compact.map { |v| _to_hash(v) }
|
247
277
|
elsif value.is_a?(Hash)
|
248
278
|
{}.tap do |hash|
|
249
279
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
@@ -3,17 +3,17 @@
|
|
3
3
|
|
4
4
|
#Jenkins API clients generated from Swagger / Open API specification
|
5
5
|
|
6
|
-
OpenAPI
|
6
|
+
The version of the OpenAPI document: 1.3.0
|
7
7
|
Contact: blah@cliffano.com
|
8
|
-
Generated by: https://
|
9
|
-
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.4.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module SwaggyJenkinsClient
|
16
|
-
|
17
17
|
class PipelineBranchesitemlatestRun
|
18
18
|
attr_accessor :duration_in_millis
|
19
19
|
|
@@ -43,7 +43,6 @@ module SwaggyJenkinsClient
|
|
43
43
|
|
44
44
|
attr_accessor :_class
|
45
45
|
|
46
|
-
|
47
46
|
# Attribute mapping from ruby-style variable name to JSON key.
|
48
47
|
def self.attribute_map
|
49
48
|
{
|
@@ -64,8 +63,13 @@ module SwaggyJenkinsClient
|
|
64
63
|
}
|
65
64
|
end
|
66
65
|
|
66
|
+
# Returns all the JSON keys this model knows about
|
67
|
+
def self.acceptable_attributes
|
68
|
+
attribute_map.values
|
69
|
+
end
|
70
|
+
|
67
71
|
# Attribute type mapping.
|
68
|
-
def self.
|
72
|
+
def self.openapi_types
|
69
73
|
{
|
70
74
|
:'duration_in_millis' => :'Integer',
|
71
75
|
:'estimated_duration_in_millis' => :'Integer',
|
@@ -84,83 +88,95 @@ module SwaggyJenkinsClient
|
|
84
88
|
}
|
85
89
|
end
|
86
90
|
|
91
|
+
# List of attributes with nullable: true
|
92
|
+
def self.openapi_nullable
|
93
|
+
Set.new([
|
94
|
+
])
|
95
|
+
end
|
96
|
+
|
87
97
|
# Initializes the object
|
88
98
|
# @param [Hash] attributes Model attributes in the form of hash
|
89
99
|
def initialize(attributes = {})
|
90
|
-
|
100
|
+
if (!attributes.is_a?(Hash))
|
101
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggyJenkinsClient::PipelineBranchesitemlatestRun` initialize method"
|
102
|
+
end
|
91
103
|
|
92
|
-
# convert string to symbol for hash key
|
93
|
-
attributes = attributes.each_with_object({}){|(k,v), h|
|
104
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
105
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
106
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
107
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::PipelineBranchesitemlatestRun`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
108
|
+
end
|
109
|
+
h[k.to_sym] = v
|
110
|
+
}
|
94
111
|
|
95
|
-
if attributes.
|
96
|
-
self.duration_in_millis = attributes[:'
|
112
|
+
if attributes.key?(:'duration_in_millis')
|
113
|
+
self.duration_in_millis = attributes[:'duration_in_millis']
|
97
114
|
end
|
98
115
|
|
99
|
-
if attributes.
|
100
|
-
self.estimated_duration_in_millis = attributes[:'
|
116
|
+
if attributes.key?(:'estimated_duration_in_millis')
|
117
|
+
self.estimated_duration_in_millis = attributes[:'estimated_duration_in_millis']
|
101
118
|
end
|
102
119
|
|
103
|
-
if attributes.
|
104
|
-
self.en_queue_time = attributes[:'
|
120
|
+
if attributes.key?(:'en_queue_time')
|
121
|
+
self.en_queue_time = attributes[:'en_queue_time']
|
105
122
|
end
|
106
123
|
|
107
|
-
if attributes.
|
108
|
-
self.end_time = attributes[:'
|
124
|
+
if attributes.key?(:'end_time')
|
125
|
+
self.end_time = attributes[:'end_time']
|
109
126
|
end
|
110
127
|
|
111
|
-
if attributes.
|
128
|
+
if attributes.key?(:'id')
|
112
129
|
self.id = attributes[:'id']
|
113
130
|
end
|
114
131
|
|
115
|
-
if attributes.
|
132
|
+
if attributes.key?(:'organization')
|
116
133
|
self.organization = attributes[:'organization']
|
117
134
|
end
|
118
135
|
|
119
|
-
if attributes.
|
136
|
+
if attributes.key?(:'pipeline')
|
120
137
|
self.pipeline = attributes[:'pipeline']
|
121
138
|
end
|
122
139
|
|
123
|
-
if attributes.
|
140
|
+
if attributes.key?(:'result')
|
124
141
|
self.result = attributes[:'result']
|
125
142
|
end
|
126
143
|
|
127
|
-
if attributes.
|
128
|
-
self.run_summary = attributes[:'
|
144
|
+
if attributes.key?(:'run_summary')
|
145
|
+
self.run_summary = attributes[:'run_summary']
|
129
146
|
end
|
130
147
|
|
131
|
-
if attributes.
|
132
|
-
self.start_time = attributes[:'
|
148
|
+
if attributes.key?(:'start_time')
|
149
|
+
self.start_time = attributes[:'start_time']
|
133
150
|
end
|
134
151
|
|
135
|
-
if attributes.
|
152
|
+
if attributes.key?(:'state')
|
136
153
|
self.state = attributes[:'state']
|
137
154
|
end
|
138
155
|
|
139
|
-
if attributes.
|
156
|
+
if attributes.key?(:'type')
|
140
157
|
self.type = attributes[:'type']
|
141
158
|
end
|
142
159
|
|
143
|
-
if attributes.
|
144
|
-
self.commit_id = attributes[:'
|
160
|
+
if attributes.key?(:'commit_id')
|
161
|
+
self.commit_id = attributes[:'commit_id']
|
145
162
|
end
|
146
163
|
|
147
|
-
if attributes.
|
164
|
+
if attributes.key?(:'_class')
|
148
165
|
self._class = attributes[:'_class']
|
149
166
|
end
|
150
|
-
|
151
167
|
end
|
152
168
|
|
153
169
|
# Show invalid properties with the reasons. Usually used together with valid?
|
154
|
-
# @return Array for valid
|
170
|
+
# @return Array for valid properties with the reasons
|
155
171
|
def list_invalid_properties
|
156
172
|
invalid_properties = Array.new
|
157
|
-
|
173
|
+
invalid_properties
|
158
174
|
end
|
159
175
|
|
160
176
|
# Check to see if the all the properties in the model are valid
|
161
177
|
# @return true if the model is valid
|
162
178
|
def valid?
|
163
|
-
|
179
|
+
true
|
164
180
|
end
|
165
181
|
|
166
182
|
# Checks equality by comparing each attribute.
|
@@ -191,26 +207,35 @@ module SwaggyJenkinsClient
|
|
191
207
|
end
|
192
208
|
|
193
209
|
# Calculates hash code according to all attributes.
|
194
|
-
# @return [
|
210
|
+
# @return [Integer] Hash code
|
195
211
|
def hash
|
196
212
|
[duration_in_millis, estimated_duration_in_millis, en_queue_time, end_time, id, organization, pipeline, result, run_summary, start_time, state, type, commit_id, _class].hash
|
197
213
|
end
|
198
214
|
|
215
|
+
# Builds the object from hash
|
216
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
217
|
+
# @return [Object] Returns the model itself
|
218
|
+
def self.build_from_hash(attributes)
|
219
|
+
new.build_from_hash(attributes)
|
220
|
+
end
|
221
|
+
|
199
222
|
# Builds the object from hash
|
200
223
|
# @param [Hash] attributes Model attributes in the form of hash
|
201
224
|
# @return [Object] Returns the model itself
|
202
225
|
def build_from_hash(attributes)
|
203
226
|
return nil unless attributes.is_a?(Hash)
|
204
|
-
self.class.
|
205
|
-
if
|
206
|
-
#
|
227
|
+
self.class.openapi_types.each_pair do |key, type|
|
228
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
229
|
+
self.send("#{key}=", nil)
|
230
|
+
elsif type =~ /\AArray<(.*)>/i
|
231
|
+
# check to ensure the input is an array given that the attribute
|
207
232
|
# is documented as an array but the input is not
|
208
233
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
209
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
234
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
210
235
|
end
|
211
236
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
212
237
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
213
|
-
end
|
238
|
+
end
|
214
239
|
end
|
215
240
|
|
216
241
|
self
|
@@ -222,8 +247,8 @@ module SwaggyJenkinsClient
|
|
222
247
|
# @return [Object] Deserialized data
|
223
248
|
def _deserialize(type, value)
|
224
249
|
case type.to_sym
|
225
|
-
when :
|
226
|
-
|
250
|
+
when :Time
|
251
|
+
Time.parse(value)
|
227
252
|
when :Date
|
228
253
|
Date.parse(value)
|
229
254
|
when :String
|
@@ -232,7 +257,7 @@ module SwaggyJenkinsClient
|
|
232
257
|
value.to_i
|
233
258
|
when :Float
|
234
259
|
value.to_f
|
235
|
-
when :
|
260
|
+
when :Boolean
|
236
261
|
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
237
262
|
true
|
238
263
|
else
|
@@ -253,8 +278,9 @@ module SwaggyJenkinsClient
|
|
253
278
|
end
|
254
279
|
end
|
255
280
|
else # model
|
256
|
-
|
257
|
-
|
281
|
+
# models (e.g. Pet) or oneOf
|
282
|
+
klass = SwaggyJenkinsClient.const_get(type)
|
283
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
258
284
|
end
|
259
285
|
end
|
260
286
|
|
@@ -276,7 +302,11 @@ module SwaggyJenkinsClient
|
|
276
302
|
hash = {}
|
277
303
|
self.class.attribute_map.each_pair do |attr, param|
|
278
304
|
value = self.send(attr)
|
279
|
-
|
305
|
+
if value.nil?
|
306
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
307
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
308
|
+
end
|
309
|
+
|
280
310
|
hash[param] = _to_hash(value)
|
281
311
|
end
|
282
312
|
hash
|
@@ -288,7 +318,7 @@ module SwaggyJenkinsClient
|
|
288
318
|
# @return [Hash] Returns the value in the form of hash
|
289
319
|
def _to_hash(value)
|
290
320
|
if value.is_a?(Array)
|
291
|
-
value.compact.map{ |v| _to_hash(v) }
|
321
|
+
value.compact.map { |v| _to_hash(v) }
|
292
322
|
elsif value.is_a?(Hash)
|
293
323
|
{}.tap do |hash|
|
294
324
|
value.each { |k, v| hash[k] = _to_hash(v) }
|