pulp_deb_client 2.0.0b2 → 2.0.0b3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (128) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +32 -18
  3. data/docs/ContentGenericContentsApi.md +12 -4
  4. data/docs/ContentInstallerFileIndexApi.md +20 -8
  5. data/docs/ContentInstallerPackagesApi.md +42 -4
  6. data/docs/ContentPackageIndexApi.md +20 -8
  7. data/docs/ContentPackagesApi.md +46 -6
  8. data/docs/{ContentReleasesApi.md → ContentReleaseFilesApi.md} +44 -32
  9. data/docs/ContentSummary.md +21 -0
  10. data/docs/{InstallerPackage.md → DebBasePackage.md} +40 -46
  11. data/docs/{DebDistribution.md → DebDebDistribution.md} +6 -6
  12. data/docs/{DebPublication.md → DebDebPublication.md} +5 -7
  13. data/docs/{DebRemote.md → DebDebRemote.md} +15 -21
  14. data/docs/DebDebRepository.md +27 -0
  15. data/docs/{GenericContent.md → DebGenericContent.md} +11 -17
  16. data/docs/{InstallerFileIndex.md → DebInstallerFileIndex.md} +5 -7
  17. data/docs/{PackageIndex.md → DebPackageIndex.md} +5 -7
  18. data/docs/{Release.md → DebReleaseFile.md} +5 -7
  19. data/docs/{VerbatimPublication.md → DebVerbatimPublication.md} +5 -7
  20. data/docs/DistributionsAptApi.md +16 -12
  21. data/docs/InlineResponse200.md +1 -1
  22. data/docs/InlineResponse2001.md +1 -1
  23. data/docs/InlineResponse20010.md +23 -0
  24. data/docs/InlineResponse2002.md +1 -1
  25. data/docs/InlineResponse2003.md +1 -1
  26. data/docs/InlineResponse2004.md +1 -1
  27. data/docs/InlineResponse2005.md +1 -1
  28. data/docs/InlineResponse2006.md +1 -1
  29. data/docs/InlineResponse2007.md +1 -1
  30. data/docs/InlineResponse2008.md +1 -1
  31. data/docs/InlineResponse2009.md +1 -1
  32. data/docs/PublicationsAptApi.md +12 -8
  33. data/docs/PublicationsVerbatimApi.md +12 -8
  34. data/docs/RemotesAptApi.md +30 -81
  35. data/docs/RepositoriesAptApi.md +465 -0
  36. data/docs/RepositoriesDebVersionsApi.md +214 -0
  37. data/docs/RepositoryAddRemoveContent.md +21 -0
  38. data/docs/RepositorySyncURL.md +2 -2
  39. data/docs/RepositoryVersion.md +25 -0
  40. data/lib/pulp_deb_client/api/content_generic_contents_api.rb +16 -4
  41. data/lib/pulp_deb_client/api/content_installer_file_index_api.rb +27 -9
  42. data/lib/pulp_deb_client/api/content_installer_packages_api.rb +61 -4
  43. data/lib/pulp_deb_client/api/content_package_index_api.rb +27 -9
  44. data/lib/pulp_deb_client/api/content_packages_api.rb +67 -7
  45. data/lib/pulp_deb_client/api/{content_releases_api.rb → content_release_files_api.rb} +61 -43
  46. data/lib/pulp_deb_client/api/distributions_apt_api.rb +19 -13
  47. data/lib/pulp_deb_client/api/publications_apt_api.rb +15 -9
  48. data/lib/pulp_deb_client/api/publications_verbatim_api.rb +15 -9
  49. data/lib/pulp_deb_client/api/remotes_apt_api.rb +40 -102
  50. data/lib/pulp_deb_client/api/repositories_apt_api.rb +568 -0
  51. data/lib/pulp_deb_client/api/repositories_deb_versions_api.rb +268 -0
  52. data/lib/pulp_deb_client/api_client.rb +1 -1
  53. data/lib/pulp_deb_client/api_error.rb +1 -1
  54. data/lib/pulp_deb_client/configuration.rb +1 -1
  55. data/lib/pulp_deb_client/models/async_operation_response.rb +12 -2
  56. data/lib/pulp_deb_client/models/content_summary.rb +246 -0
  57. data/lib/pulp_deb_client/models/{package.rb → deb_base_package.rb} +28 -62
  58. data/lib/pulp_deb_client/models/{deb_distribution.rb → deb_deb_distribution.rb} +30 -36
  59. data/lib/pulp_deb_client/models/{deb_publication.rb → deb_deb_publication.rb} +29 -42
  60. data/lib/pulp_deb_client/models/{deb_remote.rb → deb_deb_remote.rb} +87 -147
  61. data/lib/pulp_deb_client/models/deb_deb_repository.rb +294 -0
  62. data/lib/pulp_deb_client/models/{generic_content.rb → deb_generic_content.rb} +28 -62
  63. data/lib/pulp_deb_client/models/{installer_file_index.rb → deb_installer_file_index.rb} +28 -42
  64. data/lib/pulp_deb_client/models/{package_index.rb → deb_package_index.rb} +28 -42
  65. data/lib/pulp_deb_client/models/{release.rb → deb_release_file.rb} +28 -42
  66. data/lib/pulp_deb_client/models/{verbatim_publication.rb → deb_verbatim_publication.rb} +29 -42
  67. data/lib/pulp_deb_client/models/inline_response200.rb +15 -3
  68. data/lib/pulp_deb_client/models/inline_response2001.rb +15 -3
  69. data/lib/pulp_deb_client/models/inline_response20010.rb +247 -0
  70. data/lib/pulp_deb_client/models/inline_response2002.rb +15 -3
  71. data/lib/pulp_deb_client/models/inline_response2003.rb +15 -3
  72. data/lib/pulp_deb_client/models/inline_response2004.rb +15 -3
  73. data/lib/pulp_deb_client/models/inline_response2005.rb +15 -3
  74. data/lib/pulp_deb_client/models/inline_response2006.rb +15 -3
  75. data/lib/pulp_deb_client/models/inline_response2007.rb +15 -3
  76. data/lib/pulp_deb_client/models/inline_response2008.rb +15 -3
  77. data/lib/pulp_deb_client/models/inline_response2009.rb +15 -3
  78. data/lib/pulp_deb_client/models/repository_add_remove_content.rb +231 -0
  79. data/lib/pulp_deb_client/models/repository_sync_url.rb +22 -12
  80. data/lib/pulp_deb_client/models/repository_version.rb +244 -0
  81. data/lib/pulp_deb_client/version.rb +2 -2
  82. data/lib/pulp_deb_client.rb +18 -12
  83. data/pulp_deb_client.gemspec +1 -1
  84. data/spec/api/content_generic_contents_api_spec.rb +6 -2
  85. data/spec/api/content_installer_file_index_api_spec.rb +9 -3
  86. data/spec/api/content_installer_packages_api_spec.rb +21 -2
  87. data/spec/api/content_package_index_api_spec.rb +9 -3
  88. data/spec/api/content_packages_api_spec.rb +23 -3
  89. data/spec/api/{content_releases_api_spec.rb → content_release_files_api_spec.rb} +23 -17
  90. data/spec/api/distributions_apt_api_spec.rb +5 -3
  91. data/spec/api/publications_apt_api_spec.rb +5 -3
  92. data/spec/api/publications_verbatim_api_spec.rb +5 -3
  93. data/spec/api/remotes_apt_api_spec.rb +12 -22
  94. data/spec/api/repositories_apt_api_spec.rb +141 -0
  95. data/spec/api/repositories_deb_versions_api_spec.rb +91 -0
  96. data/spec/api_client_spec.rb +2 -2
  97. data/spec/configuration_spec.rb +1 -1
  98. data/spec/models/async_operation_response_spec.rb +1 -1
  99. data/spec/models/content_summary_spec.rb +53 -0
  100. data/spec/models/{package_spec.rb → deb_base_package_spec.rb} +9 -27
  101. data/spec/models/{deb_distribution_spec.rb → deb_deb_distribution_spec.rb} +9 -9
  102. data/spec/models/{deb_publication_spec.rb → deb_deb_publication_spec.rb} +9 -15
  103. data/spec/models/{deb_remote_spec.rb → deb_deb_remote_spec.rb} +14 -32
  104. data/spec/models/{verbatim_publication_spec.rb → deb_deb_repository_spec.rb} +13 -13
  105. data/spec/models/{generic_content_spec.rb → deb_generic_content_spec.rb} +9 -27
  106. data/spec/models/{package_index_spec.rb → deb_installer_file_index_spec.rb} +9 -15
  107. data/spec/models/{installer_file_index_spec.rb → deb_package_index_spec.rb} +9 -15
  108. data/spec/models/{release_spec.rb → deb_release_file_spec.rb} +9 -15
  109. data/spec/models/deb_verbatim_publication_spec.rb +65 -0
  110. data/spec/models/inline_response20010_spec.rb +59 -0
  111. data/spec/models/inline_response2001_spec.rb +1 -1
  112. data/spec/models/inline_response2002_spec.rb +1 -1
  113. data/spec/models/inline_response2003_spec.rb +1 -1
  114. data/spec/models/inline_response2004_spec.rb +1 -1
  115. data/spec/models/inline_response2005_spec.rb +1 -1
  116. data/spec/models/inline_response2006_spec.rb +1 -1
  117. data/spec/models/inline_response2007_spec.rb +1 -1
  118. data/spec/models/inline_response2008_spec.rb +1 -1
  119. data/spec/models/inline_response2009_spec.rb +1 -1
  120. data/spec/models/inline_response200_spec.rb +1 -1
  121. data/spec/models/repository_add_remove_content_spec.rb +53 -0
  122. data/spec/models/repository_sync_url_spec.rb +2 -2
  123. data/spec/models/repository_version_spec.rb +65 -0
  124. data/spec/spec_helper.rb +1 -1
  125. metadata +70 -46
  126. data/docs/Package.md +0 -99
  127. data/lib/pulp_deb_client/models/installer_package.rb +0 -1101
  128. data/spec/models/installer_package_spec.rb +0 -287
@@ -0,0 +1,231 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: v3
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.2.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module PulpDebClient
16
+ class RepositoryAddRemoveContent
17
+ # A list of content units to add to a new repository version. This content is added after remove_content_units are removed.
18
+ attr_accessor :add_content_units
19
+
20
+ # A list of content units to remove from the latest repository version. You may also specify '*' as an entry to remove all content. This content is removed before add_content_units are added.
21
+ attr_accessor :remove_content_units
22
+
23
+ # A repository version whose content will be used as the initial set of content for the new repository version
24
+ attr_accessor :base_version
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'add_content_units' => :'add_content_units',
30
+ :'remove_content_units' => :'remove_content_units',
31
+ :'base_version' => :'base_version'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.openapi_types
37
+ {
38
+ :'add_content_units' => :'Array<String>',
39
+ :'remove_content_units' => :'Array<String>',
40
+ :'base_version' => :'String'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpDebClient::RepositoryAddRemoveContent` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ attributes = attributes.each_with_object({}) { |(k, v), h|
59
+ if (!self.class.attribute_map.key?(k.to_sym))
60
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpDebClient::RepositoryAddRemoveContent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
61
+ end
62
+ h[k.to_sym] = v
63
+ }
64
+
65
+ if attributes.key?(:'add_content_units')
66
+ if (value = attributes[:'add_content_units']).is_a?(Array)
67
+ self.add_content_units = value
68
+ end
69
+ end
70
+
71
+ if attributes.key?(:'remove_content_units')
72
+ if (value = attributes[:'remove_content_units']).is_a?(Array)
73
+ self.remove_content_units = value
74
+ end
75
+ end
76
+
77
+ if attributes.key?(:'base_version')
78
+ self.base_version = attributes[:'base_version']
79
+ end
80
+ end
81
+
82
+ # Show invalid properties with the reasons. Usually used together with valid?
83
+ # @return Array for valid properties with the reasons
84
+ def list_invalid_properties
85
+ invalid_properties = Array.new
86
+ invalid_properties
87
+ end
88
+
89
+ # Check to see if the all the properties in the model are valid
90
+ # @return true if the model is valid
91
+ def valid?
92
+ true
93
+ end
94
+
95
+ # Checks equality by comparing each attribute.
96
+ # @param [Object] Object to be compared
97
+ def ==(o)
98
+ return true if self.equal?(o)
99
+ self.class == o.class &&
100
+ add_content_units == o.add_content_units &&
101
+ remove_content_units == o.remove_content_units &&
102
+ base_version == o.base_version
103
+ end
104
+
105
+ # @see the `==` method
106
+ # @param [Object] Object to be compared
107
+ def eql?(o)
108
+ self == o
109
+ end
110
+
111
+ # Calculates hash code according to all attributes.
112
+ # @return [Integer] Hash code
113
+ def hash
114
+ [add_content_units, remove_content_units, base_version].hash
115
+ end
116
+
117
+ # Builds the object from hash
118
+ # @param [Hash] attributes Model attributes in the form of hash
119
+ # @return [Object] Returns the model itself
120
+ def self.build_from_hash(attributes)
121
+ new.build_from_hash(attributes)
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def build_from_hash(attributes)
128
+ return nil unless attributes.is_a?(Hash)
129
+ self.class.openapi_types.each_pair do |key, type|
130
+ if type =~ /\AArray<(.*)>/i
131
+ # check to ensure the input is an array given that the attribute
132
+ # is documented as an array but the input is not
133
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
134
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
135
+ end
136
+ elsif !attributes[self.class.attribute_map[key]].nil?
137
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
138
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
139
+ end
140
+
141
+ self
142
+ end
143
+
144
+ # Deserializes the data based on type
145
+ # @param string type Data type
146
+ # @param string value Value to be deserialized
147
+ # @return [Object] Deserialized data
148
+ def _deserialize(type, value)
149
+ case type.to_sym
150
+ when :DateTime
151
+ DateTime.parse(value)
152
+ when :Date
153
+ Date.parse(value)
154
+ when :String
155
+ value.to_s
156
+ when :Integer
157
+ value.to_i
158
+ when :Float
159
+ value.to_f
160
+ when :Boolean
161
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
162
+ true
163
+ else
164
+ false
165
+ end
166
+ when :Object
167
+ # generic object (usually a Hash), return directly
168
+ value
169
+ when /\AArray<(?<inner_type>.+)>\z/
170
+ inner_type = Regexp.last_match[:inner_type]
171
+ value.map { |v| _deserialize(inner_type, v) }
172
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
173
+ k_type = Regexp.last_match[:k_type]
174
+ v_type = Regexp.last_match[:v_type]
175
+ {}.tap do |hash|
176
+ value.each do |k, v|
177
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
178
+ end
179
+ end
180
+ else # model
181
+ PulpDebClient.const_get(type).build_from_hash(value)
182
+ end
183
+ end
184
+
185
+ # Returns the string representation of the object
186
+ # @return [String] String presentation of the object
187
+ def to_s
188
+ to_hash.to_s
189
+ end
190
+
191
+ # to_body is an alias to to_hash (backward compatibility)
192
+ # @return [Hash] Returns the object in the form of hash
193
+ def to_body
194
+ to_hash
195
+ end
196
+
197
+ # Returns the object in the form of hash
198
+ # @return [Hash] Returns the object in the form of hash
199
+ def to_hash
200
+ hash = {}
201
+ self.class.attribute_map.each_pair do |attr, param|
202
+ value = self.send(attr)
203
+ if value.nil?
204
+ is_nullable = self.class.openapi_nullable.include?(attr)
205
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
206
+ end
207
+
208
+ hash[param] = _to_hash(value)
209
+ end
210
+ hash
211
+ end
212
+
213
+ # Outputs non-array value in the form of hash
214
+ # For object, use to_hash. Otherwise, just return the value
215
+ # @param [Object] value Any valid value
216
+ # @return [Hash] Returns the value in the form of hash
217
+ def _to_hash(value)
218
+ if value.is_a?(Array)
219
+ value.compact.map { |v| _to_hash(v) }
220
+ elsif value.is_a?(Hash)
221
+ {}.tap do |hash|
222
+ value.each { |k, v| hash[k] = _to_hash(v) }
223
+ end
224
+ elsif value.respond_to? :to_hash
225
+ value.to_hash
226
+ else
227
+ value
228
+ end
229
+ end
230
+ end
231
+ end
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v3
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.1.3-SNAPSHOT
9
+ OpenAPI Generator version: 4.2.1-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -15,7 +15,7 @@ require 'date'
15
15
  module PulpDebClient
16
16
  class RepositorySyncURL
17
17
  # A URI of the repository to be synchronized.
18
- attr_accessor :repository
18
+ attr_accessor :remote
19
19
 
20
20
  # If ``True``, synchronization will remove all content that is not present in the remote repository. If ``False``, sync will be additive only.
21
21
  attr_accessor :mirror
@@ -23,7 +23,7 @@ module PulpDebClient
23
23
  # Attribute mapping from ruby-style variable name to JSON key.
24
24
  def self.attribute_map
25
25
  {
26
- :'repository' => :'repository',
26
+ :'remote' => :'remote',
27
27
  :'mirror' => :'mirror'
28
28
  }
29
29
  end
@@ -31,11 +31,17 @@ module PulpDebClient
31
31
  # Attribute type mapping.
32
32
  def self.openapi_types
33
33
  {
34
- :'repository' => :'String',
34
+ :'remote' => :'String',
35
35
  :'mirror' => :'Boolean'
36
36
  }
37
37
  end
38
38
 
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ ])
43
+ end
44
+
39
45
  # Initializes the object
40
46
  # @param [Hash] attributes Model attributes in the form of hash
41
47
  def initialize(attributes = {})
@@ -51,8 +57,8 @@ module PulpDebClient
51
57
  h[k.to_sym] = v
52
58
  }
53
59
 
54
- if attributes.key?(:'repository')
55
- self.repository = attributes[:'repository']
60
+ if attributes.key?(:'remote')
61
+ self.remote = attributes[:'remote']
56
62
  end
57
63
 
58
64
  if attributes.key?(:'mirror')
@@ -66,8 +72,8 @@ module PulpDebClient
66
72
  # @return Array for valid properties with the reasons
67
73
  def list_invalid_properties
68
74
  invalid_properties = Array.new
69
- if @repository.nil?
70
- invalid_properties.push('invalid value for "repository", repository cannot be nil.')
75
+ if @remote.nil?
76
+ invalid_properties.push('invalid value for "remote", remote cannot be nil.')
71
77
  end
72
78
 
73
79
  invalid_properties
@@ -76,7 +82,7 @@ module PulpDebClient
76
82
  # Check to see if the all the properties in the model are valid
77
83
  # @return true if the model is valid
78
84
  def valid?
79
- return false if @repository.nil?
85
+ return false if @remote.nil?
80
86
  true
81
87
  end
82
88
 
@@ -85,7 +91,7 @@ module PulpDebClient
85
91
  def ==(o)
86
92
  return true if self.equal?(o)
87
93
  self.class == o.class &&
88
- repository == o.repository &&
94
+ remote == o.remote &&
89
95
  mirror == o.mirror
90
96
  end
91
97
 
@@ -98,7 +104,7 @@ module PulpDebClient
98
104
  # Calculates hash code according to all attributes.
99
105
  # @return [Integer] Hash code
100
106
  def hash
101
- [repository, mirror].hash
107
+ [remote, mirror].hash
102
108
  end
103
109
 
104
110
  # Builds the object from hash
@@ -187,7 +193,11 @@ module PulpDebClient
187
193
  hash = {}
188
194
  self.class.attribute_map.each_pair do |attr, param|
189
195
  value = self.send(attr)
190
- next if value.nil?
196
+ if value.nil?
197
+ is_nullable = self.class.openapi_nullable.include?(attr)
198
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
199
+ end
200
+
191
201
  hash[param] = _to_hash(value)
192
202
  end
193
203
  hash
@@ -0,0 +1,244 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: v3
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.2.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module PulpDebClient
16
+ class RepositoryVersion
17
+ attr_accessor :pulp_href
18
+
19
+ # Timestamp of creation.
20
+ attr_accessor :pulp_created
21
+
22
+ attr_accessor :number
23
+
24
+ # A repository version whose content was used as the initial set of content for this repository version
25
+ attr_accessor :base_version
26
+
27
+ attr_accessor :content_summary
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'pulp_href' => :'pulp_href',
33
+ :'pulp_created' => :'pulp_created',
34
+ :'number' => :'number',
35
+ :'base_version' => :'base_version',
36
+ :'content_summary' => :'content_summary'
37
+ }
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'pulp_href' => :'String',
44
+ :'pulp_created' => :'DateTime',
45
+ :'number' => :'Integer',
46
+ :'base_version' => :'String',
47
+ :'content_summary' => :'ContentSummary'
48
+ }
49
+ end
50
+
51
+ # List of attributes with nullable: true
52
+ def self.openapi_nullable
53
+ Set.new([
54
+ ])
55
+ end
56
+
57
+ # Initializes the object
58
+ # @param [Hash] attributes Model attributes in the form of hash
59
+ def initialize(attributes = {})
60
+ if (!attributes.is_a?(Hash))
61
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpDebClient::RepositoryVersion` initialize method"
62
+ end
63
+
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!self.class.attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpDebClient::RepositoryVersion`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'pulp_href')
73
+ self.pulp_href = attributes[:'pulp_href']
74
+ end
75
+
76
+ if attributes.key?(:'pulp_created')
77
+ self.pulp_created = attributes[:'pulp_created']
78
+ end
79
+
80
+ if attributes.key?(:'number')
81
+ self.number = attributes[:'number']
82
+ end
83
+
84
+ if attributes.key?(:'base_version')
85
+ self.base_version = attributes[:'base_version']
86
+ end
87
+
88
+ if attributes.key?(:'content_summary')
89
+ self.content_summary = attributes[:'content_summary']
90
+ end
91
+ end
92
+
93
+ # Show invalid properties with the reasons. Usually used together with valid?
94
+ # @return Array for valid properties with the reasons
95
+ def list_invalid_properties
96
+ invalid_properties = Array.new
97
+ invalid_properties
98
+ end
99
+
100
+ # Check to see if the all the properties in the model are valid
101
+ # @return true if the model is valid
102
+ def valid?
103
+ true
104
+ end
105
+
106
+ # Checks equality by comparing each attribute.
107
+ # @param [Object] Object to be compared
108
+ def ==(o)
109
+ return true if self.equal?(o)
110
+ self.class == o.class &&
111
+ pulp_href == o.pulp_href &&
112
+ pulp_created == o.pulp_created &&
113
+ number == o.number &&
114
+ base_version == o.base_version &&
115
+ content_summary == o.content_summary
116
+ end
117
+
118
+ # @see the `==` method
119
+ # @param [Object] Object to be compared
120
+ def eql?(o)
121
+ self == o
122
+ end
123
+
124
+ # Calculates hash code according to all attributes.
125
+ # @return [Integer] Hash code
126
+ def hash
127
+ [pulp_href, pulp_created, number, base_version, content_summary].hash
128
+ end
129
+
130
+ # Builds the object from hash
131
+ # @param [Hash] attributes Model attributes in the form of hash
132
+ # @return [Object] Returns the model itself
133
+ def self.build_from_hash(attributes)
134
+ new.build_from_hash(attributes)
135
+ end
136
+
137
+ # Builds the object from hash
138
+ # @param [Hash] attributes Model attributes in the form of hash
139
+ # @return [Object] Returns the model itself
140
+ def build_from_hash(attributes)
141
+ return nil unless attributes.is_a?(Hash)
142
+ self.class.openapi_types.each_pair do |key, type|
143
+ if type =~ /\AArray<(.*)>/i
144
+ # check to ensure the input is an array given that the attribute
145
+ # is documented as an array but the input is not
146
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
147
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
148
+ end
149
+ elsif !attributes[self.class.attribute_map[key]].nil?
150
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
151
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
152
+ end
153
+
154
+ self
155
+ end
156
+
157
+ # Deserializes the data based on type
158
+ # @param string type Data type
159
+ # @param string value Value to be deserialized
160
+ # @return [Object] Deserialized data
161
+ def _deserialize(type, value)
162
+ case type.to_sym
163
+ when :DateTime
164
+ DateTime.parse(value)
165
+ when :Date
166
+ Date.parse(value)
167
+ when :String
168
+ value.to_s
169
+ when :Integer
170
+ value.to_i
171
+ when :Float
172
+ value.to_f
173
+ when :Boolean
174
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
175
+ true
176
+ else
177
+ false
178
+ end
179
+ when :Object
180
+ # generic object (usually a Hash), return directly
181
+ value
182
+ when /\AArray<(?<inner_type>.+)>\z/
183
+ inner_type = Regexp.last_match[:inner_type]
184
+ value.map { |v| _deserialize(inner_type, v) }
185
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
186
+ k_type = Regexp.last_match[:k_type]
187
+ v_type = Regexp.last_match[:v_type]
188
+ {}.tap do |hash|
189
+ value.each do |k, v|
190
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
191
+ end
192
+ end
193
+ else # model
194
+ PulpDebClient.const_get(type).build_from_hash(value)
195
+ end
196
+ end
197
+
198
+ # Returns the string representation of the object
199
+ # @return [String] String presentation of the object
200
+ def to_s
201
+ to_hash.to_s
202
+ end
203
+
204
+ # to_body is an alias to to_hash (backward compatibility)
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_body
207
+ to_hash
208
+ end
209
+
210
+ # Returns the object in the form of hash
211
+ # @return [Hash] Returns the object in the form of hash
212
+ def to_hash
213
+ hash = {}
214
+ self.class.attribute_map.each_pair do |attr, param|
215
+ value = self.send(attr)
216
+ if value.nil?
217
+ is_nullable = self.class.openapi_nullable.include?(attr)
218
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
219
+ end
220
+
221
+ hash[param] = _to_hash(value)
222
+ end
223
+ hash
224
+ end
225
+
226
+ # Outputs non-array value in the form of hash
227
+ # For object, use to_hash. Otherwise, just return the value
228
+ # @param [Object] value Any valid value
229
+ # @return [Hash] Returns the value in the form of hash
230
+ def _to_hash(value)
231
+ if value.is_a?(Array)
232
+ value.compact.map { |v| _to_hash(v) }
233
+ elsif value.is_a?(Hash)
234
+ {}.tap do |hash|
235
+ value.each { |k, v| hash[k] = _to_hash(v) }
236
+ end
237
+ elsif value.respond_to? :to_hash
238
+ value.to_hash
239
+ else
240
+ value
241
+ end
242
+ end
243
+ end
244
+ end
@@ -6,10 +6,10 @@
6
6
  The version of the OpenAPI document: v3
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.1.3-SNAPSHOT
9
+ OpenAPI Generator version: 4.2.1-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
13
13
  module PulpDebClient
14
- VERSION = '2.0.0b2'
14
+ VERSION = '2.0.0b3'
15
15
  end
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v3
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.1.3-SNAPSHOT
9
+ OpenAPI Generator version: 4.2.1-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -18,12 +18,20 @@ require 'pulp_deb_client/configuration'
18
18
 
19
19
  # Models
20
20
  require 'pulp_deb_client/models/async_operation_response'
21
- require 'pulp_deb_client/models/deb_distribution'
22
- require 'pulp_deb_client/models/deb_publication'
23
- require 'pulp_deb_client/models/deb_remote'
24
- require 'pulp_deb_client/models/generic_content'
21
+ require 'pulp_deb_client/models/content_summary'
22
+ require 'pulp_deb_client/models/deb_base_package'
23
+ require 'pulp_deb_client/models/deb_deb_distribution'
24
+ require 'pulp_deb_client/models/deb_deb_publication'
25
+ require 'pulp_deb_client/models/deb_deb_remote'
26
+ require 'pulp_deb_client/models/deb_deb_repository'
27
+ require 'pulp_deb_client/models/deb_generic_content'
28
+ require 'pulp_deb_client/models/deb_installer_file_index'
29
+ require 'pulp_deb_client/models/deb_package_index'
30
+ require 'pulp_deb_client/models/deb_release_file'
31
+ require 'pulp_deb_client/models/deb_verbatim_publication'
25
32
  require 'pulp_deb_client/models/inline_response200'
26
33
  require 'pulp_deb_client/models/inline_response2001'
34
+ require 'pulp_deb_client/models/inline_response20010'
27
35
  require 'pulp_deb_client/models/inline_response2002'
28
36
  require 'pulp_deb_client/models/inline_response2003'
29
37
  require 'pulp_deb_client/models/inline_response2004'
@@ -32,13 +40,9 @@ require 'pulp_deb_client/models/inline_response2006'
32
40
  require 'pulp_deb_client/models/inline_response2007'
33
41
  require 'pulp_deb_client/models/inline_response2008'
34
42
  require 'pulp_deb_client/models/inline_response2009'
35
- require 'pulp_deb_client/models/installer_file_index'
36
- require 'pulp_deb_client/models/installer_package'
37
- require 'pulp_deb_client/models/package'
38
- require 'pulp_deb_client/models/package_index'
39
- require 'pulp_deb_client/models/release'
43
+ require 'pulp_deb_client/models/repository_add_remove_content'
40
44
  require 'pulp_deb_client/models/repository_sync_url'
41
- require 'pulp_deb_client/models/verbatim_publication'
45
+ require 'pulp_deb_client/models/repository_version'
42
46
 
43
47
  # APIs
44
48
  require 'pulp_deb_client/api/content_generic_contents_api'
@@ -46,11 +50,13 @@ require 'pulp_deb_client/api/content_installer_file_index_api'
46
50
  require 'pulp_deb_client/api/content_installer_packages_api'
47
51
  require 'pulp_deb_client/api/content_package_index_api'
48
52
  require 'pulp_deb_client/api/content_packages_api'
49
- require 'pulp_deb_client/api/content_releases_api'
53
+ require 'pulp_deb_client/api/content_release_files_api'
50
54
  require 'pulp_deb_client/api/distributions_apt_api'
51
55
  require 'pulp_deb_client/api/publications_apt_api'
52
56
  require 'pulp_deb_client/api/publications_verbatim_api'
53
57
  require 'pulp_deb_client/api/remotes_apt_api'
58
+ require 'pulp_deb_client/api/repositories_apt_api'
59
+ require 'pulp_deb_client/api/repositories_deb_versions_api'
54
60
 
55
61
  module PulpDebClient
56
62
  class << self
@@ -8,7 +8,7 @@
8
8
  The version of the OpenAPI document: v3
9
9
 
10
10
  Generated by: https://openapi-generator.tech
11
- OpenAPI Generator version: 4.1.3-SNAPSHOT
11
+ OpenAPI Generator version: 4.2.1-SNAPSHOT
12
12
 
13
13
  =end
14
14