swaggy_jenkins 0.0.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- 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 +27 -0
- data/bin/coderay +27 -0
- data/bin/htmldiff +27 -0
- data/bin/ldiff +27 -0
- data/bin/pry +27 -0
- data/bin/rake +27 -0
- data/bin/rspec +27 -0
- data/bin/rubocop +27 -0
- data/bin/ruby-parse +27 -0
- data/bin/ruby-rewrite +27 -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 +98 -95
- data/lib/swaggy_jenkins/api_error.rb +22 -3
- data/lib/swaggy_jenkins/configuration.rb +93 -16
- data/lib/swaggy_jenkins/models/all_view.rb +60 -29
- data/lib/swaggy_jenkins/models/branch_impl.rb +77 -46
- data/lib/swaggy_jenkins/models/branch_impllinks.rb +63 -32
- data/lib/swaggy_jenkins/models/branch_implpermissions.rb +66 -35
- data/lib/swaggy_jenkins/models/cause_action.rb +59 -28
- data/lib/swaggy_jenkins/models/cause_user_id_cause.rb +64 -33
- data/lib/swaggy_jenkins/models/classes_by_class.rb +59 -28
- data/lib/swaggy_jenkins/models/clock_difference.rb +59 -28
- data/lib/swaggy_jenkins/models/computer_set.rb +65 -34
- data/lib/swaggy_jenkins/models/default_crumb_issuer.rb +61 -30
- data/lib/swaggy_jenkins/models/disk_space_monitor_descriptor_disk_space.rb +61 -30
- data/lib/swaggy_jenkins/models/empty_change_log_set.rb +59 -28
- data/lib/swaggy_jenkins/models/extension_class_container_impl1.rb +60 -29
- data/lib/swaggy_jenkins/models/extension_class_container_impl1links.rb +60 -29
- data/lib/swaggy_jenkins/models/extension_class_container_impl1map.rb +62 -31
- data/lib/swaggy_jenkins/models/extension_class_impl.rb +60 -29
- data/lib/swaggy_jenkins/models/extension_class_impllinks.rb +60 -29
- data/lib/swaggy_jenkins/models/favorite_impl.rb +60 -29
- data/lib/swaggy_jenkins/models/favorite_impllinks.rb +60 -29
- data/lib/swaggy_jenkins/models/free_style_build.rb +84 -53
- data/lib/swaggy_jenkins/models/free_style_project.rb +106 -75
- data/lib/swaggy_jenkins/models/free_style_projectactions.rb +58 -27
- data/lib/swaggy_jenkins/models/free_style_projecthealth_report.rb +64 -33
- data/lib/swaggy_jenkins/models/generic_resource.rb +66 -35
- data/lib/swaggy_jenkins/models/github_content.rb +66 -35
- data/lib/swaggy_jenkins/models/github_file.rb +59 -28
- data/lib/swaggy_jenkins/models/github_organization.rb +63 -32
- data/lib/swaggy_jenkins/models/github_organizationlinks.rb +61 -30
- data/lib/swaggy_jenkins/models/github_repositories.rb +66 -35
- data/lib/swaggy_jenkins/models/github_repositorieslinks.rb +60 -29
- data/lib/swaggy_jenkins/models/github_repository.rb +68 -37
- data/lib/swaggy_jenkins/models/github_repositorylinks.rb +60 -29
- data/lib/swaggy_jenkins/models/github_repositorypermissions.rb +64 -33
- data/lib/swaggy_jenkins/models/github_respository_container.rb +60 -29
- data/lib/swaggy_jenkins/models/github_respository_containerlinks.rb +60 -29
- data/lib/swaggy_jenkins/models/github_scm.rb +63 -32
- data/lib/swaggy_jenkins/models/github_scmlinks.rb +60 -29
- data/lib/swaggy_jenkins/models/hudson.rb +85 -54
- data/lib/swaggy_jenkins/models/hudson_master_computer.rb +90 -59
- data/lib/swaggy_jenkins/models/hudson_master_computerexecutors.rb +67 -36
- data/lib/swaggy_jenkins/models/hudson_master_computermonitor_data.rb +70 -39
- data/lib/swaggy_jenkins/models/hudsonassigned_labels.rb +58 -27
- data/lib/swaggy_jenkins/models/input_step_impl.rb +64 -33
- data/lib/swaggy_jenkins/models/input_step_impllinks.rb +60 -29
- data/lib/swaggy_jenkins/models/label1.rb +58 -27
- data/lib/swaggy_jenkins/models/link.rb +59 -28
- data/lib/swaggy_jenkins/models/list_view.rb +62 -31
- data/lib/swaggy_jenkins/models/multibranch_pipeline.rb +82 -51
- data/lib/swaggy_jenkins/models/null_scm.rb +58 -27
- data/lib/swaggy_jenkins/models/organisation.rb +59 -28
- data/lib/swaggy_jenkins/models/pipeline.rb +70 -39
- data/lib/swaggy_jenkins/models/pipeline_activity.rb +79 -48
- data/lib/swaggy_jenkins/models/pipeline_activityartifacts.rb +61 -30
- data/lib/swaggy_jenkins/models/pipeline_branchesitem.rb +72 -41
- data/lib/swaggy_jenkins/models/pipeline_branchesitemlatest_run.rb +78 -47
- data/lib/swaggy_jenkins/models/pipeline_branchesitempull_request.rb +63 -32
- data/lib/swaggy_jenkins/models/pipeline_branchesitempull_requestlinks.rb +60 -29
- data/lib/swaggy_jenkins/models/pipeline_folder_impl.rb +68 -37
- data/lib/swaggy_jenkins/models/pipeline_impl.rb +71 -40
- data/lib/swaggy_jenkins/models/pipeline_impllinks.rb +63 -32
- data/lib/swaggy_jenkins/models/pipeline_run.rb +79 -48
- data/lib/swaggy_jenkins/models/pipeline_run_impl.rb +79 -48
- data/lib/swaggy_jenkins/models/pipeline_run_impllinks.rb +64 -33
- data/lib/swaggy_jenkins/models/pipeline_run_node.rb +68 -37
- data/lib/swaggy_jenkins/models/pipeline_run_nodeedges.rb +59 -28
- data/lib/swaggy_jenkins/models/pipeline_runartifacts.rb +61 -30
- data/lib/swaggy_jenkins/models/pipeline_step_impl.rb +69 -38
- data/lib/swaggy_jenkins/models/pipeline_step_impllinks.rb +61 -30
- data/lib/swaggy_jenkins/models/pipelinelatest_run.rb +79 -48
- data/lib/swaggy_jenkins/models/pipelinelatest_runartifacts.rb +61 -30
- data/lib/swaggy_jenkins/models/queue.rb +59 -28
- data/lib/swaggy_jenkins/models/queue_blocked_item.rb +74 -43
- data/lib/swaggy_jenkins/models/queue_item_impl.rb +64 -33
- data/lib/swaggy_jenkins/models/queue_left_item.rb +75 -44
- data/lib/swaggy_jenkins/models/response_time_monitor_data.rb +60 -29
- data/lib/swaggy_jenkins/models/string_parameter_definition.rb +63 -32
- data/lib/swaggy_jenkins/models/string_parameter_value.rb +60 -29
- data/lib/swaggy_jenkins/models/swap_space_monitor_memory_usage2.rb +66 -35
- data/lib/swaggy_jenkins/models/unlabeled_load_statistics.rb +58 -27
- data/lib/swaggy_jenkins/models/user.rb +63 -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 +96 -274
- 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: 2.0.0
|
7
7
|
Contact: blah@cliffano.com
|
8
|
-
Generated by: https://
|
9
|
-
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module SwaggyJenkinsClient
|
16
|
-
|
17
17
|
class FreeStyleProjecthealthReport
|
18
18
|
attr_accessor :description
|
19
19
|
|
@@ -25,7 +25,6 @@ module SwaggyJenkinsClient
|
|
25
25
|
|
26
26
|
attr_accessor :_class
|
27
27
|
|
28
|
-
|
29
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
30
29
|
def self.attribute_map
|
31
30
|
{
|
@@ -37,8 +36,13 @@ module SwaggyJenkinsClient
|
|
37
36
|
}
|
38
37
|
end
|
39
38
|
|
39
|
+
# Returns all the JSON keys this model knows about
|
40
|
+
def self.acceptable_attributes
|
41
|
+
attribute_map.values
|
42
|
+
end
|
43
|
+
|
40
44
|
# Attribute type mapping.
|
41
|
-
def self.
|
45
|
+
def self.openapi_types
|
42
46
|
{
|
43
47
|
:'description' => :'String',
|
44
48
|
:'icon_class_name' => :'String',
|
@@ -48,47 +52,59 @@ module SwaggyJenkinsClient
|
|
48
52
|
}
|
49
53
|
end
|
50
54
|
|
55
|
+
# List of attributes with nullable: true
|
56
|
+
def self.openapi_nullable
|
57
|
+
Set.new([
|
58
|
+
])
|
59
|
+
end
|
60
|
+
|
51
61
|
# Initializes the object
|
52
62
|
# @param [Hash] attributes Model attributes in the form of hash
|
53
63
|
def initialize(attributes = {})
|
54
|
-
|
64
|
+
if (!attributes.is_a?(Hash))
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggyJenkinsClient::FreeStyleProjecthealthReport` initialize method"
|
66
|
+
end
|
55
67
|
|
56
|
-
# convert string to symbol for hash key
|
57
|
-
attributes = attributes.each_with_object({}){|(k,v), h|
|
68
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
69
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
70
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
71
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::FreeStyleProjecthealthReport`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
72
|
+
end
|
73
|
+
h[k.to_sym] = v
|
74
|
+
}
|
58
75
|
|
59
|
-
if attributes.
|
76
|
+
if attributes.key?(:'description')
|
60
77
|
self.description = attributes[:'description']
|
61
78
|
end
|
62
79
|
|
63
|
-
if attributes.
|
64
|
-
self.icon_class_name = attributes[:'
|
80
|
+
if attributes.key?(:'icon_class_name')
|
81
|
+
self.icon_class_name = attributes[:'icon_class_name']
|
65
82
|
end
|
66
83
|
|
67
|
-
if attributes.
|
68
|
-
self.icon_url = attributes[:'
|
84
|
+
if attributes.key?(:'icon_url')
|
85
|
+
self.icon_url = attributes[:'icon_url']
|
69
86
|
end
|
70
87
|
|
71
|
-
if attributes.
|
88
|
+
if attributes.key?(:'score')
|
72
89
|
self.score = attributes[:'score']
|
73
90
|
end
|
74
91
|
|
75
|
-
if attributes.
|
92
|
+
if attributes.key?(:'_class')
|
76
93
|
self._class = attributes[:'_class']
|
77
94
|
end
|
78
|
-
|
79
95
|
end
|
80
96
|
|
81
97
|
# Show invalid properties with the reasons. Usually used together with valid?
|
82
|
-
# @return Array for valid
|
98
|
+
# @return Array for valid properties with the reasons
|
83
99
|
def list_invalid_properties
|
84
100
|
invalid_properties = Array.new
|
85
|
-
|
101
|
+
invalid_properties
|
86
102
|
end
|
87
103
|
|
88
104
|
# Check to see if the all the properties in the model are valid
|
89
105
|
# @return true if the model is valid
|
90
106
|
def valid?
|
91
|
-
|
107
|
+
true
|
92
108
|
end
|
93
109
|
|
94
110
|
# Checks equality by comparing each attribute.
|
@@ -110,26 +126,36 @@ module SwaggyJenkinsClient
|
|
110
126
|
end
|
111
127
|
|
112
128
|
# Calculates hash code according to all attributes.
|
113
|
-
# @return [
|
129
|
+
# @return [Integer] Hash code
|
114
130
|
def hash
|
115
131
|
[description, icon_class_name, icon_url, score, _class].hash
|
116
132
|
end
|
117
133
|
|
134
|
+
# Builds the object from hash
|
135
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
136
|
+
# @return [Object] Returns the model itself
|
137
|
+
def self.build_from_hash(attributes)
|
138
|
+
new.build_from_hash(attributes)
|
139
|
+
end
|
140
|
+
|
118
141
|
# Builds the object from hash
|
119
142
|
# @param [Hash] attributes Model attributes in the form of hash
|
120
143
|
# @return [Object] Returns the model itself
|
121
144
|
def build_from_hash(attributes)
|
122
145
|
return nil unless attributes.is_a?(Hash)
|
123
|
-
|
124
|
-
|
125
|
-
|
146
|
+
attributes = attributes.transform_keys(&:to_sym)
|
147
|
+
self.class.openapi_types.each_pair do |key, type|
|
148
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
149
|
+
self.send("#{key}=", nil)
|
150
|
+
elsif type =~ /\AArray<(.*)>/i
|
151
|
+
# check to ensure the input is an array given that the attribute
|
126
152
|
# is documented as an array but the input is not
|
127
153
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
128
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
154
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
129
155
|
end
|
130
156
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
131
157
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
132
|
-
end
|
158
|
+
end
|
133
159
|
end
|
134
160
|
|
135
161
|
self
|
@@ -141,8 +167,8 @@ module SwaggyJenkinsClient
|
|
141
167
|
# @return [Object] Deserialized data
|
142
168
|
def _deserialize(type, value)
|
143
169
|
case type.to_sym
|
144
|
-
when :
|
145
|
-
|
170
|
+
when :Time
|
171
|
+
Time.parse(value)
|
146
172
|
when :Date
|
147
173
|
Date.parse(value)
|
148
174
|
when :String
|
@@ -151,7 +177,7 @@ module SwaggyJenkinsClient
|
|
151
177
|
value.to_i
|
152
178
|
when :Float
|
153
179
|
value.to_f
|
154
|
-
when :
|
180
|
+
when :Boolean
|
155
181
|
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
156
182
|
true
|
157
183
|
else
|
@@ -172,8 +198,9 @@ module SwaggyJenkinsClient
|
|
172
198
|
end
|
173
199
|
end
|
174
200
|
else # model
|
175
|
-
|
176
|
-
|
201
|
+
# models (e.g. Pet) or oneOf
|
202
|
+
klass = SwaggyJenkinsClient.const_get(type)
|
203
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
177
204
|
end
|
178
205
|
end
|
179
206
|
|
@@ -195,7 +222,11 @@ module SwaggyJenkinsClient
|
|
195
222
|
hash = {}
|
196
223
|
self.class.attribute_map.each_pair do |attr, param|
|
197
224
|
value = self.send(attr)
|
198
|
-
|
225
|
+
if value.nil?
|
226
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
227
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
228
|
+
end
|
229
|
+
|
199
230
|
hash[param] = _to_hash(value)
|
200
231
|
end
|
201
232
|
hash
|
@@ -207,7 +238,7 @@ module SwaggyJenkinsClient
|
|
207
238
|
# @return [Hash] Returns the value in the form of hash
|
208
239
|
def _to_hash(value)
|
209
240
|
if value.is_a?(Array)
|
210
|
-
value.compact.map{ |v| _to_hash(v) }
|
241
|
+
value.compact.map { |v| _to_hash(v) }
|
211
242
|
elsif value.is_a?(Hash)
|
212
243
|
{}.tap do |hash|
|
213
244
|
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: 2.0.0
|
7
7
|
Contact: blah@cliffano.com
|
8
|
-
Generated by: https://
|
9
|
-
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module SwaggyJenkinsClient
|
16
|
-
|
17
17
|
class GenericResource
|
18
18
|
attr_accessor :_class
|
19
19
|
|
@@ -27,7 +27,6 @@ module SwaggyJenkinsClient
|
|
27
27
|
|
28
28
|
attr_accessor :start_time
|
29
29
|
|
30
|
-
|
31
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
32
31
|
def self.attribute_map
|
33
32
|
{
|
@@ -40,8 +39,13 @@ module SwaggyJenkinsClient
|
|
40
39
|
}
|
41
40
|
end
|
42
41
|
|
42
|
+
# Returns all the JSON keys this model knows about
|
43
|
+
def self.acceptable_attributes
|
44
|
+
attribute_map.values
|
45
|
+
end
|
46
|
+
|
43
47
|
# Attribute type mapping.
|
44
|
-
def self.
|
48
|
+
def self.openapi_types
|
45
49
|
{
|
46
50
|
:'_class' => :'String',
|
47
51
|
:'display_name' => :'String',
|
@@ -52,51 +56,63 @@ module SwaggyJenkinsClient
|
|
52
56
|
}
|
53
57
|
end
|
54
58
|
|
59
|
+
# List of attributes with nullable: true
|
60
|
+
def self.openapi_nullable
|
61
|
+
Set.new([
|
62
|
+
])
|
63
|
+
end
|
64
|
+
|
55
65
|
# Initializes the object
|
56
66
|
# @param [Hash] attributes Model attributes in the form of hash
|
57
67
|
def initialize(attributes = {})
|
58
|
-
|
68
|
+
if (!attributes.is_a?(Hash))
|
69
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggyJenkinsClient::GenericResource` initialize method"
|
70
|
+
end
|
59
71
|
|
60
|
-
# convert string to symbol for hash key
|
61
|
-
attributes = attributes.each_with_object({}){|(k,v), h|
|
72
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
73
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
74
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
75
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::GenericResource`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
76
|
+
end
|
77
|
+
h[k.to_sym] = v
|
78
|
+
}
|
62
79
|
|
63
|
-
if attributes.
|
80
|
+
if attributes.key?(:'_class')
|
64
81
|
self._class = attributes[:'_class']
|
65
82
|
end
|
66
83
|
|
67
|
-
if attributes.
|
68
|
-
self.display_name = attributes[:'
|
84
|
+
if attributes.key?(:'display_name')
|
85
|
+
self.display_name = attributes[:'display_name']
|
69
86
|
end
|
70
87
|
|
71
|
-
if attributes.
|
72
|
-
self.duration_in_millis = attributes[:'
|
88
|
+
if attributes.key?(:'duration_in_millis')
|
89
|
+
self.duration_in_millis = attributes[:'duration_in_millis']
|
73
90
|
end
|
74
91
|
|
75
|
-
if attributes.
|
92
|
+
if attributes.key?(:'id')
|
76
93
|
self.id = attributes[:'id']
|
77
94
|
end
|
78
95
|
|
79
|
-
if attributes.
|
96
|
+
if attributes.key?(:'result')
|
80
97
|
self.result = attributes[:'result']
|
81
98
|
end
|
82
99
|
|
83
|
-
if attributes.
|
84
|
-
self.start_time = attributes[:'
|
100
|
+
if attributes.key?(:'start_time')
|
101
|
+
self.start_time = attributes[:'start_time']
|
85
102
|
end
|
86
|
-
|
87
103
|
end
|
88
104
|
|
89
105
|
# Show invalid properties with the reasons. Usually used together with valid?
|
90
|
-
# @return Array for valid
|
106
|
+
# @return Array for valid properties with the reasons
|
91
107
|
def list_invalid_properties
|
92
108
|
invalid_properties = Array.new
|
93
|
-
|
109
|
+
invalid_properties
|
94
110
|
end
|
95
111
|
|
96
112
|
# Check to see if the all the properties in the model are valid
|
97
113
|
# @return true if the model is valid
|
98
114
|
def valid?
|
99
|
-
|
115
|
+
true
|
100
116
|
end
|
101
117
|
|
102
118
|
# Checks equality by comparing each attribute.
|
@@ -119,26 +135,36 @@ module SwaggyJenkinsClient
|
|
119
135
|
end
|
120
136
|
|
121
137
|
# Calculates hash code according to all attributes.
|
122
|
-
# @return [
|
138
|
+
# @return [Integer] Hash code
|
123
139
|
def hash
|
124
140
|
[_class, display_name, duration_in_millis, id, result, start_time].hash
|
125
141
|
end
|
126
142
|
|
143
|
+
# Builds the object from hash
|
144
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
145
|
+
# @return [Object] Returns the model itself
|
146
|
+
def self.build_from_hash(attributes)
|
147
|
+
new.build_from_hash(attributes)
|
148
|
+
end
|
149
|
+
|
127
150
|
# Builds the object from hash
|
128
151
|
# @param [Hash] attributes Model attributes in the form of hash
|
129
152
|
# @return [Object] Returns the model itself
|
130
153
|
def build_from_hash(attributes)
|
131
154
|
return nil unless attributes.is_a?(Hash)
|
132
|
-
|
133
|
-
|
134
|
-
|
155
|
+
attributes = attributes.transform_keys(&:to_sym)
|
156
|
+
self.class.openapi_types.each_pair do |key, type|
|
157
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
158
|
+
self.send("#{key}=", nil)
|
159
|
+
elsif type =~ /\AArray<(.*)>/i
|
160
|
+
# check to ensure the input is an array given that the attribute
|
135
161
|
# is documented as an array but the input is not
|
136
162
|
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) }
|
163
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
138
164
|
end
|
139
165
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
140
166
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
141
|
-
end
|
167
|
+
end
|
142
168
|
end
|
143
169
|
|
144
170
|
self
|
@@ -150,8 +176,8 @@ module SwaggyJenkinsClient
|
|
150
176
|
# @return [Object] Deserialized data
|
151
177
|
def _deserialize(type, value)
|
152
178
|
case type.to_sym
|
153
|
-
when :
|
154
|
-
|
179
|
+
when :Time
|
180
|
+
Time.parse(value)
|
155
181
|
when :Date
|
156
182
|
Date.parse(value)
|
157
183
|
when :String
|
@@ -160,7 +186,7 @@ module SwaggyJenkinsClient
|
|
160
186
|
value.to_i
|
161
187
|
when :Float
|
162
188
|
value.to_f
|
163
|
-
when :
|
189
|
+
when :Boolean
|
164
190
|
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
165
191
|
true
|
166
192
|
else
|
@@ -181,8 +207,9 @@ module SwaggyJenkinsClient
|
|
181
207
|
end
|
182
208
|
end
|
183
209
|
else # model
|
184
|
-
|
185
|
-
|
210
|
+
# models (e.g. Pet) or oneOf
|
211
|
+
klass = SwaggyJenkinsClient.const_get(type)
|
212
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
186
213
|
end
|
187
214
|
end
|
188
215
|
|
@@ -204,7 +231,11 @@ module SwaggyJenkinsClient
|
|
204
231
|
hash = {}
|
205
232
|
self.class.attribute_map.each_pair do |attr, param|
|
206
233
|
value = self.send(attr)
|
207
|
-
|
234
|
+
if value.nil?
|
235
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
236
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
237
|
+
end
|
238
|
+
|
208
239
|
hash[param] = _to_hash(value)
|
209
240
|
end
|
210
241
|
hash
|
@@ -216,7 +247,7 @@ module SwaggyJenkinsClient
|
|
216
247
|
# @return [Hash] Returns the value in the form of hash
|
217
248
|
def _to_hash(value)
|
218
249
|
if value.is_a?(Array)
|
219
|
-
value.compact.map{ |v| _to_hash(v) }
|
250
|
+
value.compact.map { |v| _to_hash(v) }
|
220
251
|
elsif value.is_a?(Hash)
|
221
252
|
{}.tap do |hash|
|
222
253
|
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: 2.0.0
|
7
7
|
Contact: blah@cliffano.com
|
8
|
-
Generated by: https://
|
9
|
-
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module SwaggyJenkinsClient
|
16
|
-
|
17
17
|
class GithubContent
|
18
18
|
attr_accessor :name
|
19
19
|
|
@@ -31,7 +31,6 @@ module SwaggyJenkinsClient
|
|
31
31
|
|
32
32
|
attr_accessor :base64_data
|
33
33
|
|
34
|
-
|
35
34
|
# Attribute mapping from ruby-style variable name to JSON key.
|
36
35
|
def self.attribute_map
|
37
36
|
{
|
@@ -46,8 +45,13 @@ module SwaggyJenkinsClient
|
|
46
45
|
}
|
47
46
|
end
|
48
47
|
|
48
|
+
# Returns all the JSON keys this model knows about
|
49
|
+
def self.acceptable_attributes
|
50
|
+
attribute_map.values
|
51
|
+
end
|
52
|
+
|
49
53
|
# Attribute type mapping.
|
50
|
-
def self.
|
54
|
+
def self.openapi_types
|
51
55
|
{
|
52
56
|
:'name' => :'String',
|
53
57
|
:'sha' => :'String',
|
@@ -60,59 +64,71 @@ module SwaggyJenkinsClient
|
|
60
64
|
}
|
61
65
|
end
|
62
66
|
|
67
|
+
# List of attributes with nullable: true
|
68
|
+
def self.openapi_nullable
|
69
|
+
Set.new([
|
70
|
+
])
|
71
|
+
end
|
72
|
+
|
63
73
|
# Initializes the object
|
64
74
|
# @param [Hash] attributes Model attributes in the form of hash
|
65
75
|
def initialize(attributes = {})
|
66
|
-
|
76
|
+
if (!attributes.is_a?(Hash))
|
77
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggyJenkinsClient::GithubContent` initialize method"
|
78
|
+
end
|
67
79
|
|
68
|
-
# convert string to symbol for hash key
|
69
|
-
attributes = attributes.each_with_object({}){|(k,v), h|
|
80
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
81
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
82
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
83
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::GithubContent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
84
|
+
end
|
85
|
+
h[k.to_sym] = v
|
86
|
+
}
|
70
87
|
|
71
|
-
if attributes.
|
88
|
+
if attributes.key?(:'name')
|
72
89
|
self.name = attributes[:'name']
|
73
90
|
end
|
74
91
|
|
75
|
-
if attributes.
|
92
|
+
if attributes.key?(:'sha')
|
76
93
|
self.sha = attributes[:'sha']
|
77
94
|
end
|
78
95
|
|
79
|
-
if attributes.
|
96
|
+
if attributes.key?(:'_class')
|
80
97
|
self._class = attributes[:'_class']
|
81
98
|
end
|
82
99
|
|
83
|
-
if attributes.
|
100
|
+
if attributes.key?(:'repo')
|
84
101
|
self.repo = attributes[:'repo']
|
85
102
|
end
|
86
103
|
|
87
|
-
if attributes.
|
104
|
+
if attributes.key?(:'size')
|
88
105
|
self.size = attributes[:'size']
|
89
106
|
end
|
90
107
|
|
91
|
-
if attributes.
|
108
|
+
if attributes.key?(:'owner')
|
92
109
|
self.owner = attributes[:'owner']
|
93
110
|
end
|
94
111
|
|
95
|
-
if attributes.
|
112
|
+
if attributes.key?(:'path')
|
96
113
|
self.path = attributes[:'path']
|
97
114
|
end
|
98
115
|
|
99
|
-
if attributes.
|
100
|
-
self.base64_data = attributes[:'
|
116
|
+
if attributes.key?(:'base64_data')
|
117
|
+
self.base64_data = attributes[:'base64_data']
|
101
118
|
end
|
102
|
-
|
103
119
|
end
|
104
120
|
|
105
121
|
# Show invalid properties with the reasons. Usually used together with valid?
|
106
|
-
# @return Array for valid
|
122
|
+
# @return Array for valid properties with the reasons
|
107
123
|
def list_invalid_properties
|
108
124
|
invalid_properties = Array.new
|
109
|
-
|
125
|
+
invalid_properties
|
110
126
|
end
|
111
127
|
|
112
128
|
# Check to see if the all the properties in the model are valid
|
113
129
|
# @return true if the model is valid
|
114
130
|
def valid?
|
115
|
-
|
131
|
+
true
|
116
132
|
end
|
117
133
|
|
118
134
|
# Checks equality by comparing each attribute.
|
@@ -137,26 +153,36 @@ module SwaggyJenkinsClient
|
|
137
153
|
end
|
138
154
|
|
139
155
|
# Calculates hash code according to all attributes.
|
140
|
-
# @return [
|
156
|
+
# @return [Integer] Hash code
|
141
157
|
def hash
|
142
158
|
[name, sha, _class, repo, size, owner, path, base64_data].hash
|
143
159
|
end
|
144
160
|
|
161
|
+
# Builds the object from hash
|
162
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
163
|
+
# @return [Object] Returns the model itself
|
164
|
+
def self.build_from_hash(attributes)
|
165
|
+
new.build_from_hash(attributes)
|
166
|
+
end
|
167
|
+
|
145
168
|
# Builds the object from hash
|
146
169
|
# @param [Hash] attributes Model attributes in the form of hash
|
147
170
|
# @return [Object] Returns the model itself
|
148
171
|
def build_from_hash(attributes)
|
149
172
|
return nil unless attributes.is_a?(Hash)
|
150
|
-
|
151
|
-
|
152
|
-
|
173
|
+
attributes = attributes.transform_keys(&:to_sym)
|
174
|
+
self.class.openapi_types.each_pair do |key, type|
|
175
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
176
|
+
self.send("#{key}=", nil)
|
177
|
+
elsif type =~ /\AArray<(.*)>/i
|
178
|
+
# check to ensure the input is an array given that the attribute
|
153
179
|
# is documented as an array but the input is not
|
154
180
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
155
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
181
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
156
182
|
end
|
157
183
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
158
184
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
159
|
-
end
|
185
|
+
end
|
160
186
|
end
|
161
187
|
|
162
188
|
self
|
@@ -168,8 +194,8 @@ module SwaggyJenkinsClient
|
|
168
194
|
# @return [Object] Deserialized data
|
169
195
|
def _deserialize(type, value)
|
170
196
|
case type.to_sym
|
171
|
-
when :
|
172
|
-
|
197
|
+
when :Time
|
198
|
+
Time.parse(value)
|
173
199
|
when :Date
|
174
200
|
Date.parse(value)
|
175
201
|
when :String
|
@@ -178,7 +204,7 @@ module SwaggyJenkinsClient
|
|
178
204
|
value.to_i
|
179
205
|
when :Float
|
180
206
|
value.to_f
|
181
|
-
when :
|
207
|
+
when :Boolean
|
182
208
|
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
183
209
|
true
|
184
210
|
else
|
@@ -199,8 +225,9 @@ module SwaggyJenkinsClient
|
|
199
225
|
end
|
200
226
|
end
|
201
227
|
else # model
|
202
|
-
|
203
|
-
|
228
|
+
# models (e.g. Pet) or oneOf
|
229
|
+
klass = SwaggyJenkinsClient.const_get(type)
|
230
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
204
231
|
end
|
205
232
|
end
|
206
233
|
|
@@ -222,7 +249,11 @@ module SwaggyJenkinsClient
|
|
222
249
|
hash = {}
|
223
250
|
self.class.attribute_map.each_pair do |attr, param|
|
224
251
|
value = self.send(attr)
|
225
|
-
|
252
|
+
if value.nil?
|
253
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
254
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
255
|
+
end
|
256
|
+
|
226
257
|
hash[param] = _to_hash(value)
|
227
258
|
end
|
228
259
|
hash
|
@@ -234,7 +265,7 @@ module SwaggyJenkinsClient
|
|
234
265
|
# @return [Hash] Returns the value in the form of hash
|
235
266
|
def _to_hash(value)
|
236
267
|
if value.is_a?(Array)
|
237
|
-
value.compact.map{ |v| _to_hash(v) }
|
268
|
+
value.compact.map { |v| _to_hash(v) }
|
238
269
|
elsif value.is_a?(Hash)
|
239
270
|
{}.tap do |hash|
|
240
271
|
value.each { |k, v| hash[k] = _to_hash(v) }
|