swaggy_jenkins 2.0.1.pre.pre.0 → 3.1.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.
Files changed (191) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +35 -31
  3. data/README.md +8 -6
  4. data/bin/bundle +6 -11
  5. data/bin/byebug +2 -2
  6. data/bin/coderay +2 -2
  7. data/bin/htmldiff +2 -2
  8. data/bin/ldiff +2 -2
  9. data/bin/pry +2 -2
  10. data/bin/racc +27 -0
  11. data/bin/rake +2 -2
  12. data/bin/rspec +2 -2
  13. data/bin/rubocop +2 -2
  14. data/bin/ruby-parse +2 -2
  15. data/bin/ruby-rewrite +2 -2
  16. data/lib/swaggy_jenkins/api/base_api.rb +4 -4
  17. data/lib/swaggy_jenkins/api/blue_ocean_api.rb +39 -39
  18. data/lib/swaggy_jenkins/api/remote_access_api.rb +16 -16
  19. data/lib/swaggy_jenkins/api_client.rb +25 -24
  20. data/lib/swaggy_jenkins/api_error.rb +4 -3
  21. data/lib/swaggy_jenkins/configuration.rb +40 -11
  22. data/lib/swaggy_jenkins/models/all_view.rb +25 -24
  23. data/lib/swaggy_jenkins/models/branch_impl.rb +25 -24
  24. data/lib/swaggy_jenkins/models/branch_impllinks.rb +25 -24
  25. data/lib/swaggy_jenkins/models/branch_implpermissions.rb +25 -24
  26. data/lib/swaggy_jenkins/models/cause_action.rb +25 -24
  27. data/lib/swaggy_jenkins/models/cause_user_id_cause.rb +25 -24
  28. data/lib/swaggy_jenkins/models/classes_by_class.rb +25 -24
  29. data/lib/swaggy_jenkins/models/clock_difference.rb +25 -24
  30. data/lib/swaggy_jenkins/models/computer_set.rb +25 -24
  31. data/lib/swaggy_jenkins/models/default_crumb_issuer.rb +25 -24
  32. data/lib/swaggy_jenkins/models/disk_space_monitor_descriptor_disk_space.rb +25 -24
  33. data/lib/swaggy_jenkins/models/empty_change_log_set.rb +25 -24
  34. data/lib/swaggy_jenkins/models/extension_class_container_impl1.rb +25 -24
  35. data/lib/swaggy_jenkins/models/extension_class_container_impl1links.rb +25 -24
  36. data/lib/swaggy_jenkins/models/extension_class_container_impl1map.rb +25 -24
  37. data/lib/swaggy_jenkins/models/extension_class_impl.rb +25 -24
  38. data/lib/swaggy_jenkins/models/extension_class_impllinks.rb +25 -24
  39. data/lib/swaggy_jenkins/models/favorite_impl.rb +25 -24
  40. data/lib/swaggy_jenkins/models/favorite_impllinks.rb +25 -24
  41. data/lib/swaggy_jenkins/models/free_style_build.rb +25 -24
  42. data/lib/swaggy_jenkins/models/free_style_project.rb +25 -24
  43. data/lib/swaggy_jenkins/models/free_style_projectactions.rb +25 -24
  44. data/lib/swaggy_jenkins/models/free_style_projecthealth_report.rb +25 -24
  45. data/lib/swaggy_jenkins/models/generic_resource.rb +25 -24
  46. data/lib/swaggy_jenkins/models/github_content.rb +25 -24
  47. data/lib/swaggy_jenkins/models/github_file.rb +25 -24
  48. data/lib/swaggy_jenkins/models/github_organization.rb +25 -24
  49. data/lib/swaggy_jenkins/models/github_organizationlinks.rb +25 -24
  50. data/lib/swaggy_jenkins/models/github_repositories.rb +25 -24
  51. data/lib/swaggy_jenkins/models/github_repositorieslinks.rb +25 -24
  52. data/lib/swaggy_jenkins/models/github_repository.rb +25 -24
  53. data/lib/swaggy_jenkins/models/github_repositorylinks.rb +25 -24
  54. data/lib/swaggy_jenkins/models/github_repositorypermissions.rb +25 -24
  55. data/lib/swaggy_jenkins/models/github_respository_container.rb +25 -24
  56. data/lib/swaggy_jenkins/models/github_respository_containerlinks.rb +25 -24
  57. data/lib/swaggy_jenkins/models/github_scm.rb +25 -24
  58. data/lib/swaggy_jenkins/models/github_scmlinks.rb +25 -24
  59. data/lib/swaggy_jenkins/models/hudson.rb +25 -24
  60. data/lib/swaggy_jenkins/models/hudson_master_computer.rb +25 -24
  61. data/lib/swaggy_jenkins/models/hudson_master_computerexecutors.rb +25 -24
  62. data/lib/swaggy_jenkins/models/hudson_master_computermonitor_data.rb +25 -24
  63. data/lib/swaggy_jenkins/models/hudsonassigned_labels.rb +25 -24
  64. data/lib/swaggy_jenkins/models/input_step_impl.rb +25 -24
  65. data/lib/swaggy_jenkins/models/input_step_impllinks.rb +25 -24
  66. data/lib/swaggy_jenkins/models/label1.rb +25 -24
  67. data/lib/swaggy_jenkins/models/link.rb +25 -24
  68. data/lib/swaggy_jenkins/models/list_view.rb +25 -24
  69. data/lib/swaggy_jenkins/models/multibranch_pipeline.rb +25 -24
  70. data/lib/swaggy_jenkins/models/null_scm.rb +25 -24
  71. data/lib/swaggy_jenkins/models/organisation.rb +25 -24
  72. data/lib/swaggy_jenkins/models/pipeline.rb +25 -24
  73. data/lib/swaggy_jenkins/models/pipeline_activity.rb +25 -24
  74. data/lib/swaggy_jenkins/models/pipeline_activityartifacts.rb +25 -24
  75. data/lib/swaggy_jenkins/models/pipeline_branchesitem.rb +25 -24
  76. data/lib/swaggy_jenkins/models/pipeline_branchesitemlatest_run.rb +25 -24
  77. data/lib/swaggy_jenkins/models/pipeline_branchesitempull_request.rb +25 -24
  78. data/lib/swaggy_jenkins/models/pipeline_branchesitempull_requestlinks.rb +25 -24
  79. data/lib/swaggy_jenkins/models/pipeline_folder_impl.rb +25 -24
  80. data/lib/swaggy_jenkins/models/pipeline_impl.rb +25 -24
  81. data/lib/swaggy_jenkins/models/pipeline_impllinks.rb +25 -24
  82. data/lib/swaggy_jenkins/models/pipeline_run.rb +25 -24
  83. data/lib/swaggy_jenkins/models/pipeline_run_impl.rb +25 -24
  84. data/lib/swaggy_jenkins/models/pipeline_run_impllinks.rb +25 -24
  85. data/lib/swaggy_jenkins/models/pipeline_run_node.rb +25 -24
  86. data/lib/swaggy_jenkins/models/pipeline_run_nodeedges.rb +25 -24
  87. data/lib/swaggy_jenkins/models/pipeline_runartifacts.rb +25 -24
  88. data/lib/swaggy_jenkins/models/pipeline_step_impl.rb +25 -24
  89. data/lib/swaggy_jenkins/models/pipeline_step_impllinks.rb +25 -24
  90. data/lib/swaggy_jenkins/models/pipelinelatest_run.rb +25 -24
  91. data/lib/swaggy_jenkins/models/pipelinelatest_runartifacts.rb +25 -24
  92. data/lib/swaggy_jenkins/models/queue.rb +25 -24
  93. data/lib/swaggy_jenkins/models/queue_blocked_item.rb +25 -24
  94. data/lib/swaggy_jenkins/models/queue_item_impl.rb +25 -24
  95. data/lib/swaggy_jenkins/models/queue_left_item.rb +25 -24
  96. data/lib/swaggy_jenkins/models/response_time_monitor_data.rb +25 -24
  97. data/lib/swaggy_jenkins/models/string_parameter_definition.rb +25 -24
  98. data/lib/swaggy_jenkins/models/string_parameter_value.rb +25 -24
  99. data/lib/swaggy_jenkins/models/swap_space_monitor_memory_usage2.rb +25 -24
  100. data/lib/swaggy_jenkins/models/unlabeled_load_statistics.rb +25 -24
  101. data/lib/swaggy_jenkins/models/user.rb +25 -24
  102. data/lib/swaggy_jenkins/version.rb +4 -4
  103. data/lib/swaggy_jenkins.rb +3 -3
  104. data/spec/api/base_api_spec.rb +4 -4
  105. data/spec/api/blue_ocean_api_spec.rb +40 -40
  106. data/spec/api/remote_access_api_spec.rb +23 -23
  107. data/spec/models/all_view_spec.rb +9 -7
  108. data/spec/models/branch_impl_spec.rb +19 -17
  109. data/spec/models/branch_impllinks_spec.rb +11 -9
  110. data/spec/models/branch_implpermissions_spec.rb +11 -9
  111. data/spec/models/cause_action_spec.rb +8 -6
  112. data/spec/models/cause_user_id_cause_spec.rb +10 -8
  113. data/spec/models/classes_by_class_spec.rb +8 -6
  114. data/spec/models/clock_difference_spec.rb +8 -6
  115. data/spec/models/computer_set_spec.rb +11 -9
  116. data/spec/models/default_crumb_issuer_spec.rb +9 -7
  117. data/spec/models/disk_space_monitor_descriptor_disk_space_spec.rb +10 -8
  118. data/spec/models/empty_change_log_set_spec.rb +8 -6
  119. data/spec/models/extension_class_container_impl1_spec.rb +9 -7
  120. data/spec/models/extension_class_container_impl1links_spec.rb +8 -6
  121. data/spec/models/extension_class_container_impl1map_spec.rb +9 -7
  122. data/spec/models/extension_class_impl_spec.rb +9 -7
  123. data/spec/models/extension_class_impllinks_spec.rb +8 -6
  124. data/spec/models/favorite_impl_spec.rb +9 -7
  125. data/spec/models/favorite_impllinks_spec.rb +8 -6
  126. data/spec/models/free_style_build_spec.rb +24 -22
  127. data/spec/models/free_style_project_spec.rb +33 -31
  128. data/spec/models/free_style_projectactions_spec.rb +7 -5
  129. data/spec/models/free_style_projecthealth_report_spec.rb +11 -9
  130. data/spec/models/generic_resource_spec.rb +12 -10
  131. data/spec/models/github_content_spec.rb +14 -12
  132. data/spec/models/github_file_spec.rb +8 -6
  133. data/spec/models/github_organization_spec.rb +10 -8
  134. data/spec/models/github_organizationlinks_spec.rb +9 -7
  135. data/spec/models/github_repositories_spec.rb +12 -10
  136. data/spec/models/github_repositorieslinks_spec.rb +8 -6
  137. data/spec/models/github_repository_spec.rb +14 -12
  138. data/spec/models/github_repositorylinks_spec.rb +8 -6
  139. data/spec/models/github_repositorypermissions_spec.rb +10 -8
  140. data/spec/models/github_respository_container_spec.rb +9 -7
  141. data/spec/models/github_respository_containerlinks_spec.rb +8 -6
  142. data/spec/models/github_scm_spec.rb +11 -9
  143. data/spec/models/github_scmlinks_spec.rb +8 -6
  144. data/spec/models/hudson_master_computer_spec.rb +22 -20
  145. data/spec/models/hudson_master_computerexecutors_spec.rb +12 -10
  146. data/spec/models/hudson_master_computermonitor_data_spec.rb +13 -11
  147. data/spec/models/hudson_spec.rb +21 -19
  148. data/spec/models/hudsonassigned_labels_spec.rb +7 -5
  149. data/spec/models/input_step_impl_spec.rb +13 -11
  150. data/spec/models/input_step_impllinks_spec.rb +8 -6
  151. data/spec/models/label1_spec.rb +7 -5
  152. data/spec/models/link_spec.rb +8 -6
  153. data/spec/models/list_view_spec.rb +11 -9
  154. data/spec/models/multibranch_pipeline_spec.rb +20 -18
  155. data/spec/models/null_scm_spec.rb +7 -5
  156. data/spec/models/organisation_spec.rb +8 -6
  157. data/spec/models/pipeline_activity_spec.rb +21 -19
  158. data/spec/models/pipeline_activityartifacts_spec.rb +10 -8
  159. data/spec/models/pipeline_branchesitem_spec.rb +15 -13
  160. data/spec/models/pipeline_branchesitemlatest_run_spec.rb +20 -18
  161. data/spec/models/pipeline_branchesitempull_request_spec.rb +12 -10
  162. data/spec/models/pipeline_branchesitempull_requestlinks_spec.rb +8 -6
  163. data/spec/models/pipeline_folder_impl_spec.rb +13 -11
  164. data/spec/models/pipeline_impl_spec.rb +15 -13
  165. data/spec/models/pipeline_impllinks_spec.rb +11 -9
  166. data/spec/models/pipeline_run_impl_spec.rb +21 -19
  167. data/spec/models/pipeline_run_impllinks_spec.rb +12 -10
  168. data/spec/models/pipeline_run_node_spec.rb +14 -12
  169. data/spec/models/pipeline_run_nodeedges_spec.rb +8 -6
  170. data/spec/models/pipeline_run_spec.rb +21 -19
  171. data/spec/models/pipeline_runartifacts_spec.rb +10 -8
  172. data/spec/models/pipeline_spec.rb +14 -12
  173. data/spec/models/pipeline_step_impl_spec.rb +15 -13
  174. data/spec/models/pipeline_step_impllinks_spec.rb +9 -7
  175. data/spec/models/pipelinelatest_run_spec.rb +21 -19
  176. data/spec/models/pipelinelatest_runartifacts_spec.rb +10 -8
  177. data/spec/models/queue_blocked_item_spec.rb +18 -16
  178. data/spec/models/queue_item_impl_spec.rb +11 -9
  179. data/spec/models/queue_left_item_spec.rb +19 -17
  180. data/spec/models/queue_spec.rb +8 -6
  181. data/spec/models/response_time_monitor_data_spec.rb +9 -7
  182. data/spec/models/string_parameter_definition_spec.rb +11 -9
  183. data/spec/models/string_parameter_value_spec.rb +9 -7
  184. data/spec/models/swap_space_monitor_memory_usage2_spec.rb +11 -9
  185. data/spec/models/unlabeled_load_statistics_spec.rb +7 -5
  186. data/spec/models/user_spec.rb +11 -9
  187. data/spec/spec_helper.rb +3 -3
  188. data/swaggy_jenkins.gemspec +7 -6
  189. metadata +77 -80
  190. data/spec/api_client_spec.rb +0 -226
  191. data/spec/configuration_spec.rb +0 -42
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Jenkins API clients generated from Swagger / Open API specification
5
5
 
6
- The version of the OpenAPI document: 2.0.1-pre.0
7
- Contact: blah@cliffano.com
6
+ The version of the OpenAPI document: 3.1.0
7
+ Contact: blah+oapicf@cliffano.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.0.0
9
+ Generator version: 7.12.0
10
10
 
11
11
  =end
12
12
 
@@ -30,9 +30,14 @@ module SwaggyJenkinsClient
30
30
  }
31
31
  end
32
32
 
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
33
38
  # Returns all the JSON keys this model knows about
34
39
  def self.acceptable_attributes
35
- attribute_map.values
40
+ acceptable_attribute_map.values
36
41
  end
37
42
 
38
43
  # Attribute type mapping.
@@ -58,9 +63,10 @@ module SwaggyJenkinsClient
58
63
  end
59
64
 
60
65
  # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
61
67
  attributes = attributes.each_with_object({}) { |(k, v), h|
62
- if (!self.class.attribute_map.key?(k.to_sym))
63
- fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::ExtensionClassContainerImpl1map`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::ExtensionClassContainerImpl1map`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
64
70
  end
65
71
  h[k.to_sym] = v
66
72
  }
@@ -81,6 +87,7 @@ module SwaggyJenkinsClient
81
87
  # Show invalid properties with the reasons. Usually used together with valid?
82
88
  # @return Array for valid properties with the reasons
83
89
  def list_invalid_properties
90
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
84
91
  invalid_properties = Array.new
85
92
  invalid_properties
86
93
  end
@@ -88,6 +95,7 @@ module SwaggyJenkinsClient
88
95
  # Check to see if the all the properties in the model are valid
89
96
  # @return true if the model is valid
90
97
  def valid?
98
+ warn '[DEPRECATED] the `valid?` method is obsolete'
91
99
  true
92
100
  end
93
101
 
@@ -117,37 +125,30 @@ module SwaggyJenkinsClient
117
125
  # @param [Hash] attributes Model attributes in the form of hash
118
126
  # @return [Object] Returns the model itself
119
127
  def self.build_from_hash(attributes)
120
- new.build_from_hash(attributes)
121
- end
122
-
123
- # Builds the object from hash
124
- # @param [Hash] attributes Model attributes in the form of hash
125
- # @return [Object] Returns the model itself
126
- def build_from_hash(attributes)
127
128
  return nil unless attributes.is_a?(Hash)
128
129
  attributes = attributes.transform_keys(&:to_sym)
129
- self.class.openapi_types.each_pair do |key, type|
130
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
131
- self.send("#{key}=", nil)
130
+ transformed_hash = {}
131
+ openapi_types.each_pair do |key, type|
132
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
133
+ transformed_hash["#{key}"] = nil
132
134
  elsif type =~ /\AArray<(.*)>/i
133
135
  # check to ensure the input is an array given that the attribute
134
136
  # is documented as an array but the input is not
135
- if attributes[self.class.attribute_map[key]].is_a?(Array)
136
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
137
+ if attributes[attribute_map[key]].is_a?(Array)
138
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
137
139
  end
138
- elsif !attributes[self.class.attribute_map[key]].nil?
139
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
140
+ elsif !attributes[attribute_map[key]].nil?
141
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
140
142
  end
141
143
  end
142
-
143
- self
144
+ new(transformed_hash)
144
145
  end
145
146
 
146
147
  # Deserializes the data based on type
147
148
  # @param string type Data type
148
149
  # @param string value Value to be deserialized
149
150
  # @return [Object] Deserialized data
150
- def _deserialize(type, value)
151
+ def self._deserialize(type, value)
151
152
  case type.to_sym
152
153
  when :Time
153
154
  Time.parse(value)
@@ -182,7 +183,7 @@ module SwaggyJenkinsClient
182
183
  else # model
183
184
  # models (e.g. Pet) or oneOf
184
185
  klass = SwaggyJenkinsClient.const_get(type)
185
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
186
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
186
187
  end
187
188
  end
188
189
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Jenkins API clients generated from Swagger / Open API specification
5
5
 
6
- The version of the OpenAPI document: 2.0.1-pre.0
7
- Contact: blah@cliffano.com
6
+ The version of the OpenAPI document: 3.1.0
7
+ Contact: blah+oapicf@cliffano.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.0.0
9
+ Generator version: 7.12.0
10
10
 
11
11
  =end
12
12
 
@@ -30,9 +30,14 @@ module SwaggyJenkinsClient
30
30
  }
31
31
  end
32
32
 
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
33
38
  # Returns all the JSON keys this model knows about
34
39
  def self.acceptable_attributes
35
- attribute_map.values
40
+ acceptable_attribute_map.values
36
41
  end
37
42
 
38
43
  # Attribute type mapping.
@@ -58,9 +63,10 @@ module SwaggyJenkinsClient
58
63
  end
59
64
 
60
65
  # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
61
67
  attributes = attributes.each_with_object({}) { |(k, v), h|
62
- if (!self.class.attribute_map.key?(k.to_sym))
63
- fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::ExtensionClassImpl`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::ExtensionClassImpl`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
64
70
  end
65
71
  h[k.to_sym] = v
66
72
  }
@@ -83,6 +89,7 @@ module SwaggyJenkinsClient
83
89
  # Show invalid properties with the reasons. Usually used together with valid?
84
90
  # @return Array for valid properties with the reasons
85
91
  def list_invalid_properties
92
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
86
93
  invalid_properties = Array.new
87
94
  invalid_properties
88
95
  end
@@ -90,6 +97,7 @@ module SwaggyJenkinsClient
90
97
  # Check to see if the all the properties in the model are valid
91
98
  # @return true if the model is valid
92
99
  def valid?
100
+ warn '[DEPRECATED] the `valid?` method is obsolete'
93
101
  true
94
102
  end
95
103
 
@@ -119,37 +127,30 @@ module SwaggyJenkinsClient
119
127
  # @param [Hash] attributes Model attributes in the form of hash
120
128
  # @return [Object] Returns the model itself
121
129
  def self.build_from_hash(attributes)
122
- new.build_from_hash(attributes)
123
- end
124
-
125
- # Builds the object from hash
126
- # @param [Hash] attributes Model attributes in the form of hash
127
- # @return [Object] Returns the model itself
128
- def build_from_hash(attributes)
129
130
  return nil unless attributes.is_a?(Hash)
130
131
  attributes = attributes.transform_keys(&:to_sym)
131
- self.class.openapi_types.each_pair do |key, type|
132
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
133
- self.send("#{key}=", nil)
132
+ transformed_hash = {}
133
+ openapi_types.each_pair do |key, type|
134
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
135
+ transformed_hash["#{key}"] = nil
134
136
  elsif type =~ /\AArray<(.*)>/i
135
137
  # check to ensure the input is an array given that the attribute
136
138
  # is documented as an array but the input is not
137
- if attributes[self.class.attribute_map[key]].is_a?(Array)
138
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
139
+ if attributes[attribute_map[key]].is_a?(Array)
140
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
139
141
  end
140
- elsif !attributes[self.class.attribute_map[key]].nil?
141
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
142
+ elsif !attributes[attribute_map[key]].nil?
143
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
142
144
  end
143
145
  end
144
-
145
- self
146
+ new(transformed_hash)
146
147
  end
147
148
 
148
149
  # Deserializes the data based on type
149
150
  # @param string type Data type
150
151
  # @param string value Value to be deserialized
151
152
  # @return [Object] Deserialized data
152
- def _deserialize(type, value)
153
+ def self._deserialize(type, value)
153
154
  case type.to_sym
154
155
  when :Time
155
156
  Time.parse(value)
@@ -184,7 +185,7 @@ module SwaggyJenkinsClient
184
185
  else # model
185
186
  # models (e.g. Pet) or oneOf
186
187
  klass = SwaggyJenkinsClient.const_get(type)
187
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
188
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
188
189
  end
189
190
  end
190
191
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Jenkins API clients generated from Swagger / Open API specification
5
5
 
6
- The version of the OpenAPI document: 2.0.1-pre.0
7
- Contact: blah@cliffano.com
6
+ The version of the OpenAPI document: 3.1.0
7
+ Contact: blah+oapicf@cliffano.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.0.0
9
+ Generator version: 7.12.0
10
10
 
11
11
  =end
12
12
 
@@ -27,9 +27,14 @@ module SwaggyJenkinsClient
27
27
  }
28
28
  end
29
29
 
30
+ # Returns attribute mapping this model knows about
31
+ def self.acceptable_attribute_map
32
+ attribute_map
33
+ end
34
+
30
35
  # Returns all the JSON keys this model knows about
31
36
  def self.acceptable_attributes
32
- attribute_map.values
37
+ acceptable_attribute_map.values
33
38
  end
34
39
 
35
40
  # Attribute type mapping.
@@ -54,9 +59,10 @@ module SwaggyJenkinsClient
54
59
  end
55
60
 
56
61
  # check to see if the attribute exists and convert string to symbol for hash key
62
+ acceptable_attribute_map = self.class.acceptable_attribute_map
57
63
  attributes = attributes.each_with_object({}) { |(k, v), h|
58
- if (!self.class.attribute_map.key?(k.to_sym))
59
- fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::ExtensionClassImpllinks`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ if (!acceptable_attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::ExtensionClassImpllinks`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
60
66
  end
61
67
  h[k.to_sym] = v
62
68
  }
@@ -73,6 +79,7 @@ module SwaggyJenkinsClient
73
79
  # Show invalid properties with the reasons. Usually used together with valid?
74
80
  # @return Array for valid properties with the reasons
75
81
  def list_invalid_properties
82
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
76
83
  invalid_properties = Array.new
77
84
  invalid_properties
78
85
  end
@@ -80,6 +87,7 @@ module SwaggyJenkinsClient
80
87
  # Check to see if the all the properties in the model are valid
81
88
  # @return true if the model is valid
82
89
  def valid?
90
+ warn '[DEPRECATED] the `valid?` method is obsolete'
83
91
  true
84
92
  end
85
93
 
@@ -108,37 +116,30 @@ module SwaggyJenkinsClient
108
116
  # @param [Hash] attributes Model attributes in the form of hash
109
117
  # @return [Object] Returns the model itself
110
118
  def self.build_from_hash(attributes)
111
- new.build_from_hash(attributes)
112
- end
113
-
114
- # Builds the object from hash
115
- # @param [Hash] attributes Model attributes in the form of hash
116
- # @return [Object] Returns the model itself
117
- def build_from_hash(attributes)
118
119
  return nil unless attributes.is_a?(Hash)
119
120
  attributes = attributes.transform_keys(&:to_sym)
120
- self.class.openapi_types.each_pair do |key, type|
121
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
122
- self.send("#{key}=", nil)
121
+ transformed_hash = {}
122
+ openapi_types.each_pair do |key, type|
123
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
124
+ transformed_hash["#{key}"] = nil
123
125
  elsif type =~ /\AArray<(.*)>/i
124
126
  # check to ensure the input is an array given that the attribute
125
127
  # is documented as an array but the input is not
126
- if attributes[self.class.attribute_map[key]].is_a?(Array)
127
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
128
+ if attributes[attribute_map[key]].is_a?(Array)
129
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
128
130
  end
129
- elsif !attributes[self.class.attribute_map[key]].nil?
130
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
131
+ elsif !attributes[attribute_map[key]].nil?
132
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
131
133
  end
132
134
  end
133
-
134
- self
135
+ new(transformed_hash)
135
136
  end
136
137
 
137
138
  # Deserializes the data based on type
138
139
  # @param string type Data type
139
140
  # @param string value Value to be deserialized
140
141
  # @return [Object] Deserialized data
141
- def _deserialize(type, value)
142
+ def self._deserialize(type, value)
142
143
  case type.to_sym
143
144
  when :Time
144
145
  Time.parse(value)
@@ -173,7 +174,7 @@ module SwaggyJenkinsClient
173
174
  else # model
174
175
  # models (e.g. Pet) or oneOf
175
176
  klass = SwaggyJenkinsClient.const_get(type)
176
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
177
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
177
178
  end
178
179
  end
179
180
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Jenkins API clients generated from Swagger / Open API specification
5
5
 
6
- The version of the OpenAPI document: 2.0.1-pre.0
7
- Contact: blah@cliffano.com
6
+ The version of the OpenAPI document: 3.1.0
7
+ Contact: blah+oapicf@cliffano.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.0.0
9
+ Generator version: 7.12.0
10
10
 
11
11
  =end
12
12
 
@@ -30,9 +30,14 @@ module SwaggyJenkinsClient
30
30
  }
31
31
  end
32
32
 
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
33
38
  # Returns all the JSON keys this model knows about
34
39
  def self.acceptable_attributes
35
- attribute_map.values
40
+ acceptable_attribute_map.values
36
41
  end
37
42
 
38
43
  # Attribute type mapping.
@@ -58,9 +63,10 @@ module SwaggyJenkinsClient
58
63
  end
59
64
 
60
65
  # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
61
67
  attributes = attributes.each_with_object({}) { |(k, v), h|
62
- if (!self.class.attribute_map.key?(k.to_sym))
63
- fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::FavoriteImpl`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::FavoriteImpl`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
64
70
  end
65
71
  h[k.to_sym] = v
66
72
  }
@@ -81,6 +87,7 @@ module SwaggyJenkinsClient
81
87
  # Show invalid properties with the reasons. Usually used together with valid?
82
88
  # @return Array for valid properties with the reasons
83
89
  def list_invalid_properties
90
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
84
91
  invalid_properties = Array.new
85
92
  invalid_properties
86
93
  end
@@ -88,6 +95,7 @@ module SwaggyJenkinsClient
88
95
  # Check to see if the all the properties in the model are valid
89
96
  # @return true if the model is valid
90
97
  def valid?
98
+ warn '[DEPRECATED] the `valid?` method is obsolete'
91
99
  true
92
100
  end
93
101
 
@@ -117,37 +125,30 @@ module SwaggyJenkinsClient
117
125
  # @param [Hash] attributes Model attributes in the form of hash
118
126
  # @return [Object] Returns the model itself
119
127
  def self.build_from_hash(attributes)
120
- new.build_from_hash(attributes)
121
- end
122
-
123
- # Builds the object from hash
124
- # @param [Hash] attributes Model attributes in the form of hash
125
- # @return [Object] Returns the model itself
126
- def build_from_hash(attributes)
127
128
  return nil unless attributes.is_a?(Hash)
128
129
  attributes = attributes.transform_keys(&:to_sym)
129
- self.class.openapi_types.each_pair do |key, type|
130
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
131
- self.send("#{key}=", nil)
130
+ transformed_hash = {}
131
+ openapi_types.each_pair do |key, type|
132
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
133
+ transformed_hash["#{key}"] = nil
132
134
  elsif type =~ /\AArray<(.*)>/i
133
135
  # check to ensure the input is an array given that the attribute
134
136
  # is documented as an array but the input is not
135
- if attributes[self.class.attribute_map[key]].is_a?(Array)
136
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
137
+ if attributes[attribute_map[key]].is_a?(Array)
138
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
137
139
  end
138
- elsif !attributes[self.class.attribute_map[key]].nil?
139
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
140
+ elsif !attributes[attribute_map[key]].nil?
141
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
140
142
  end
141
143
  end
142
-
143
- self
144
+ new(transformed_hash)
144
145
  end
145
146
 
146
147
  # Deserializes the data based on type
147
148
  # @param string type Data type
148
149
  # @param string value Value to be deserialized
149
150
  # @return [Object] Deserialized data
150
- def _deserialize(type, value)
151
+ def self._deserialize(type, value)
151
152
  case type.to_sym
152
153
  when :Time
153
154
  Time.parse(value)
@@ -182,7 +183,7 @@ module SwaggyJenkinsClient
182
183
  else # model
183
184
  # models (e.g. Pet) or oneOf
184
185
  klass = SwaggyJenkinsClient.const_get(type)
185
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
186
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
186
187
  end
187
188
  end
188
189
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Jenkins API clients generated from Swagger / Open API specification
5
5
 
6
- The version of the OpenAPI document: 2.0.1-pre.0
7
- Contact: blah@cliffano.com
6
+ The version of the OpenAPI document: 3.1.0
7
+ Contact: blah+oapicf@cliffano.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.0.0
9
+ Generator version: 7.12.0
10
10
 
11
11
  =end
12
12
 
@@ -27,9 +27,14 @@ module SwaggyJenkinsClient
27
27
  }
28
28
  end
29
29
 
30
+ # Returns attribute mapping this model knows about
31
+ def self.acceptable_attribute_map
32
+ attribute_map
33
+ end
34
+
30
35
  # Returns all the JSON keys this model knows about
31
36
  def self.acceptable_attributes
32
- attribute_map.values
37
+ acceptable_attribute_map.values
33
38
  end
34
39
 
35
40
  # Attribute type mapping.
@@ -54,9 +59,10 @@ module SwaggyJenkinsClient
54
59
  end
55
60
 
56
61
  # check to see if the attribute exists and convert string to symbol for hash key
62
+ acceptable_attribute_map = self.class.acceptable_attribute_map
57
63
  attributes = attributes.each_with_object({}) { |(k, v), h|
58
- if (!self.class.attribute_map.key?(k.to_sym))
59
- fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::FavoriteImpllinks`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ if (!acceptable_attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggyJenkinsClient::FavoriteImpllinks`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
60
66
  end
61
67
  h[k.to_sym] = v
62
68
  }
@@ -73,6 +79,7 @@ module SwaggyJenkinsClient
73
79
  # Show invalid properties with the reasons. Usually used together with valid?
74
80
  # @return Array for valid properties with the reasons
75
81
  def list_invalid_properties
82
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
76
83
  invalid_properties = Array.new
77
84
  invalid_properties
78
85
  end
@@ -80,6 +87,7 @@ module SwaggyJenkinsClient
80
87
  # Check to see if the all the properties in the model are valid
81
88
  # @return true if the model is valid
82
89
  def valid?
90
+ warn '[DEPRECATED] the `valid?` method is obsolete'
83
91
  true
84
92
  end
85
93
 
@@ -108,37 +116,30 @@ module SwaggyJenkinsClient
108
116
  # @param [Hash] attributes Model attributes in the form of hash
109
117
  # @return [Object] Returns the model itself
110
118
  def self.build_from_hash(attributes)
111
- new.build_from_hash(attributes)
112
- end
113
-
114
- # Builds the object from hash
115
- # @param [Hash] attributes Model attributes in the form of hash
116
- # @return [Object] Returns the model itself
117
- def build_from_hash(attributes)
118
119
  return nil unless attributes.is_a?(Hash)
119
120
  attributes = attributes.transform_keys(&:to_sym)
120
- self.class.openapi_types.each_pair do |key, type|
121
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
122
- self.send("#{key}=", nil)
121
+ transformed_hash = {}
122
+ openapi_types.each_pair do |key, type|
123
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
124
+ transformed_hash["#{key}"] = nil
123
125
  elsif type =~ /\AArray<(.*)>/i
124
126
  # check to ensure the input is an array given that the attribute
125
127
  # is documented as an array but the input is not
126
- if attributes[self.class.attribute_map[key]].is_a?(Array)
127
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
128
+ if attributes[attribute_map[key]].is_a?(Array)
129
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
128
130
  end
129
- elsif !attributes[self.class.attribute_map[key]].nil?
130
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
131
+ elsif !attributes[attribute_map[key]].nil?
132
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
131
133
  end
132
134
  end
133
-
134
- self
135
+ new(transformed_hash)
135
136
  end
136
137
 
137
138
  # Deserializes the data based on type
138
139
  # @param string type Data type
139
140
  # @param string value Value to be deserialized
140
141
  # @return [Object] Deserialized data
141
- def _deserialize(type, value)
142
+ def self._deserialize(type, value)
142
143
  case type.to_sym
143
144
  when :Time
144
145
  Time.parse(value)
@@ -173,7 +174,7 @@ module SwaggyJenkinsClient
173
174
  else # model
174
175
  # models (e.g. Pet) or oneOf
175
176
  klass = SwaggyJenkinsClient.const_get(type)
176
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
177
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
177
178
  end
178
179
  end
179
180