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
@@ -6,20 +6,18 @@
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
  require 'date'
14
14
 
15
15
  module PulpDebClient
16
- class Package
17
- attr_accessor :_href
16
+ class DebBasePackage
17
+ attr_accessor :pulp_href
18
18
 
19
19
  # Timestamp of creation.
20
- attr_accessor :_created
21
-
22
- attr_accessor :_type
20
+ attr_accessor :pulp_created
23
21
 
24
22
  # Artifact file representing the physical content
25
23
  attr_accessor :artifact
@@ -27,12 +25,6 @@ module PulpDebClient
27
25
  # Path where the artifact is located relative to distributions base_path
28
26
  attr_accessor :relative_path
29
27
 
30
- # An uploaded file that should be turned into the artifact of the content unit.
31
- attr_accessor :file
32
-
33
- # A URI of a repository the new content unit should be associated with.
34
- attr_accessor :repository
35
-
36
28
  # The MD5 checksum if available.
37
29
  attr_accessor :md5
38
30
 
@@ -112,13 +104,10 @@ module PulpDebClient
112
104
  # Attribute mapping from ruby-style variable name to JSON key.
113
105
  def self.attribute_map
114
106
  {
115
- :'_href' => :'_href',
116
- :'_created' => :'_created',
117
- :'_type' => :'_type',
107
+ :'pulp_href' => :'pulp_href',
108
+ :'pulp_created' => :'pulp_created',
118
109
  :'artifact' => :'artifact',
119
110
  :'relative_path' => :'relative_path',
120
- :'file' => :'file',
121
- :'repository' => :'repository',
122
111
  :'md5' => :'md5',
123
112
  :'sha1' => :'sha1',
124
113
  :'sha224' => :'sha224',
@@ -160,13 +149,10 @@ module PulpDebClient
160
149
  # Attribute type mapping.
161
150
  def self.openapi_types
162
151
  {
163
- :'_href' => :'String',
164
- :'_created' => :'DateTime',
165
- :'_type' => :'String',
152
+ :'pulp_href' => :'String',
153
+ :'pulp_created' => :'DateTime',
166
154
  :'artifact' => :'String',
167
155
  :'relative_path' => :'String',
168
- :'file' => :'String',
169
- :'repository' => :'String',
170
156
  :'md5' => :'String',
171
157
  :'sha1' => :'String',
172
158
  :'sha224' => :'String',
@@ -205,31 +191,33 @@ module PulpDebClient
205
191
  }
206
192
  end
207
193
 
194
+ # List of attributes with nullable: true
195
+ def self.openapi_nullable
196
+ Set.new([
197
+ ])
198
+ end
199
+
208
200
  # Initializes the object
209
201
  # @param [Hash] attributes Model attributes in the form of hash
210
202
  def initialize(attributes = {})
211
203
  if (!attributes.is_a?(Hash))
212
- fail ArgumentError, "The input argument (attributes) must be a hash in `PulpDebClient::Package` initialize method"
204
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpDebClient::DebBasePackage` initialize method"
213
205
  end
214
206
 
215
207
  # check to see if the attribute exists and convert string to symbol for hash key
216
208
  attributes = attributes.each_with_object({}) { |(k, v), h|
217
209
  if (!self.class.attribute_map.key?(k.to_sym))
218
- fail ArgumentError, "`#{k}` is not a valid attribute in `PulpDebClient::Package`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
210
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpDebClient::DebBasePackage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
219
211
  end
220
212
  h[k.to_sym] = v
221
213
  }
222
214
 
223
- if attributes.key?(:'_href')
224
- self._href = attributes[:'_href']
215
+ if attributes.key?(:'pulp_href')
216
+ self.pulp_href = attributes[:'pulp_href']
225
217
  end
226
218
 
227
- if attributes.key?(:'_created')
228
- self._created = attributes[:'_created']
229
- end
230
-
231
- if attributes.key?(:'_type')
232
- self._type = attributes[:'_type']
219
+ if attributes.key?(:'pulp_created')
220
+ self.pulp_created = attributes[:'pulp_created']
233
221
  end
234
222
 
235
223
  if attributes.key?(:'artifact')
@@ -240,14 +228,6 @@ module PulpDebClient
240
228
  self.relative_path = attributes[:'relative_path']
241
229
  end
242
230
 
243
- if attributes.key?(:'file')
244
- self.file = attributes[:'file']
245
- end
246
-
247
- if attributes.key?(:'repository')
248
- self.repository = attributes[:'repository']
249
- end
250
-
251
231
  if attributes.key?(:'md5')
252
232
  self.md5 = attributes[:'md5']
253
233
  end
@@ -393,10 +373,6 @@ module PulpDebClient
393
373
  # @return Array for valid properties with the reasons
394
374
  def list_invalid_properties
395
375
  invalid_properties = Array.new
396
- if !@_type.nil? && @_type.to_s.length < 1
397
- invalid_properties.push('invalid value for "_type", the character length must be great than or equal to 1.')
398
- end
399
-
400
376
  if !@relative_path.nil? && @relative_path.to_s.length < 1
401
377
  invalid_properties.push('invalid value for "relative_path", the character length must be great than or equal to 1.')
402
378
  end
@@ -539,7 +515,6 @@ module PulpDebClient
539
515
  # Check to see if the all the properties in the model are valid
540
516
  # @return true if the model is valid
541
517
  def valid?
542
- return false if !@_type.nil? && @_type.to_s.length < 1
543
518
  return false if !@relative_path.nil? && @relative_path.to_s.length < 1
544
519
  return false if !@md5.nil? && @md5.to_s.length < 1
545
520
  return false if !@sha1.nil? && @sha1.to_s.length < 1
@@ -577,16 +552,6 @@ module PulpDebClient
577
552
  true
578
553
  end
579
554
 
580
- # Custom attribute writer method with validation
581
- # @param [Object] _type Value to be assigned
582
- def _type=(_type)
583
- if !_type.nil? && _type.to_s.length < 1
584
- fail ArgumentError, 'invalid value for "_type", the character length must be great than or equal to 1.'
585
- end
586
-
587
- @_type = _type
588
- end
589
-
590
555
  # Custom attribute writer method with validation
591
556
  # @param [Object] relative_path Value to be assigned
592
557
  def relative_path=(relative_path)
@@ -932,13 +897,10 @@ module PulpDebClient
932
897
  def ==(o)
933
898
  return true if self.equal?(o)
934
899
  self.class == o.class &&
935
- _href == o._href &&
936
- _created == o._created &&
937
- _type == o._type &&
900
+ pulp_href == o.pulp_href &&
901
+ pulp_created == o.pulp_created &&
938
902
  artifact == o.artifact &&
939
903
  relative_path == o.relative_path &&
940
- file == o.file &&
941
- repository == o.repository &&
942
904
  md5 == o.md5 &&
943
905
  sha1 == o.sha1 &&
944
906
  sha224 == o.sha224 &&
@@ -985,7 +947,7 @@ module PulpDebClient
985
947
  # Calculates hash code according to all attributes.
986
948
  # @return [Integer] Hash code
987
949
  def hash
988
- [_href, _created, _type, artifact, relative_path, file, repository, md5, sha1, sha224, sha256, sha384, sha512, package, source, version, architecture, section, priority, origin, tag, bugs, essential, build_essential, installed_size, maintainer, original_maintainer, description, description_md5, homepage, built_using, auto_built_package, multi_arch, breaks, conflicts, depends, recommends, suggests, enhances, pre_depends, provides, replaces].hash
950
+ [pulp_href, pulp_created, artifact, relative_path, md5, sha1, sha224, sha256, sha384, sha512, package, source, version, architecture, section, priority, origin, tag, bugs, essential, build_essential, installed_size, maintainer, original_maintainer, description, description_md5, homepage, built_using, auto_built_package, multi_arch, breaks, conflicts, depends, recommends, suggests, enhances, pre_depends, provides, replaces].hash
989
951
  end
990
952
 
991
953
  # Builds the object from hash
@@ -1074,7 +1036,11 @@ module PulpDebClient
1074
1036
  hash = {}
1075
1037
  self.class.attribute_map.each_pair do |attr, param|
1076
1038
  value = self.send(attr)
1077
- next if value.nil?
1039
+ if value.nil?
1040
+ is_nullable = self.class.openapi_nullable.include?(attr)
1041
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
1042
+ end
1043
+
1078
1044
  hash[param] = _to_hash(value)
1079
1045
  end
1080
1046
  hash
@@ -6,18 +6,18 @@
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
  require 'date'
14
14
 
15
15
  module PulpDebClient
16
- class DebDistribution
17
- attr_accessor :_href
16
+ class DebDebDistribution
17
+ attr_accessor :pulp_href
18
18
 
19
19
  # Timestamp of creation.
20
- attr_accessor :_created
20
+ attr_accessor :pulp_created
21
21
 
22
22
  # The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\")
23
23
  attr_accessor :base_path
@@ -37,8 +37,8 @@ module PulpDebClient
37
37
  # Attribute mapping from ruby-style variable name to JSON key.
38
38
  def self.attribute_map
39
39
  {
40
- :'_href' => :'_href',
41
- :'_created' => :'_created',
40
+ :'pulp_href' => :'pulp_href',
41
+ :'pulp_created' => :'pulp_created',
42
42
  :'base_path' => :'base_path',
43
43
  :'base_url' => :'base_url',
44
44
  :'content_guard' => :'content_guard',
@@ -50,8 +50,8 @@ module PulpDebClient
50
50
  # Attribute type mapping.
51
51
  def self.openapi_types
52
52
  {
53
- :'_href' => :'String',
54
- :'_created' => :'DateTime',
53
+ :'pulp_href' => :'String',
54
+ :'pulp_created' => :'DateTime',
55
55
  :'base_path' => :'String',
56
56
  :'base_url' => :'String',
57
57
  :'content_guard' => :'String',
@@ -60,27 +60,35 @@ module PulpDebClient
60
60
  }
61
61
  end
62
62
 
63
+ # List of attributes with nullable: true
64
+ def self.openapi_nullable
65
+ Set.new([
66
+ :'content_guard',
67
+ :'publication'
68
+ ])
69
+ end
70
+
63
71
  # Initializes the object
64
72
  # @param [Hash] attributes Model attributes in the form of hash
65
73
  def initialize(attributes = {})
66
74
  if (!attributes.is_a?(Hash))
67
- fail ArgumentError, "The input argument (attributes) must be a hash in `PulpDebClient::DebDistribution` initialize method"
75
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpDebClient::DebDebDistribution` initialize method"
68
76
  end
69
77
 
70
78
  # check to see if the attribute exists and convert string to symbol for hash key
71
79
  attributes = attributes.each_with_object({}) { |(k, v), h|
72
80
  if (!self.class.attribute_map.key?(k.to_sym))
73
- fail ArgumentError, "`#{k}` is not a valid attribute in `PulpDebClient::DebDistribution`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
81
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpDebClient::DebDebDistribution`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
74
82
  end
75
83
  h[k.to_sym] = v
76
84
  }
77
85
 
78
- if attributes.key?(:'_href')
79
- self._href = attributes[:'_href']
86
+ if attributes.key?(:'pulp_href')
87
+ self.pulp_href = attributes[:'pulp_href']
80
88
  end
81
89
 
82
- if attributes.key?(:'_created')
83
- self._created = attributes[:'_created']
90
+ if attributes.key?(:'pulp_created')
91
+ self.pulp_created = attributes[:'pulp_created']
84
92
  end
85
93
 
86
94
  if attributes.key?(:'base_path')
@@ -112,10 +120,6 @@ module PulpDebClient
112
120
  invalid_properties.push('invalid value for "base_path", base_path cannot be nil.')
113
121
  end
114
122
 
115
- if @base_path.to_s.length > 255
116
- invalid_properties.push('invalid value for "base_path", the character length must be smaller than or equal to 255.')
117
- end
118
-
119
123
  if @base_path.to_s.length < 1
120
124
  invalid_properties.push('invalid value for "base_path", the character length must be great than or equal to 1.')
121
125
  end
@@ -128,10 +132,6 @@ module PulpDebClient
128
132
  invalid_properties.push('invalid value for "name", name cannot be nil.')
129
133
  end
130
134
 
131
- if @name.to_s.length > 255
132
- invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 255.')
133
- end
134
-
135
135
  if @name.to_s.length < 1
136
136
  invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
137
137
  end
@@ -143,11 +143,9 @@ module PulpDebClient
143
143
  # @return true if the model is valid
144
144
  def valid?
145
145
  return false if @base_path.nil?
146
- return false if @base_path.to_s.length > 255
147
146
  return false if @base_path.to_s.length < 1
148
147
  return false if !@base_url.nil? && @base_url.to_s.length < 1
149
148
  return false if @name.nil?
150
- return false if @name.to_s.length > 255
151
149
  return false if @name.to_s.length < 1
152
150
  true
153
151
  end
@@ -159,10 +157,6 @@ module PulpDebClient
159
157
  fail ArgumentError, 'base_path cannot be nil'
160
158
  end
161
159
 
162
- if base_path.to_s.length > 255
163
- fail ArgumentError, 'invalid value for "base_path", the character length must be smaller than or equal to 255.'
164
- end
165
-
166
160
  if base_path.to_s.length < 1
167
161
  fail ArgumentError, 'invalid value for "base_path", the character length must be great than or equal to 1.'
168
162
  end
@@ -187,10 +181,6 @@ module PulpDebClient
187
181
  fail ArgumentError, 'name cannot be nil'
188
182
  end
189
183
 
190
- if name.to_s.length > 255
191
- fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 255.'
192
- end
193
-
194
184
  if name.to_s.length < 1
195
185
  fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
196
186
  end
@@ -203,8 +193,8 @@ module PulpDebClient
203
193
  def ==(o)
204
194
  return true if self.equal?(o)
205
195
  self.class == o.class &&
206
- _href == o._href &&
207
- _created == o._created &&
196
+ pulp_href == o.pulp_href &&
197
+ pulp_created == o.pulp_created &&
208
198
  base_path == o.base_path &&
209
199
  base_url == o.base_url &&
210
200
  content_guard == o.content_guard &&
@@ -221,7 +211,7 @@ module PulpDebClient
221
211
  # Calculates hash code according to all attributes.
222
212
  # @return [Integer] Hash code
223
213
  def hash
224
- [_href, _created, base_path, base_url, content_guard, name, publication].hash
214
+ [pulp_href, pulp_created, base_path, base_url, content_guard, name, publication].hash
225
215
  end
226
216
 
227
217
  # Builds the object from hash
@@ -310,7 +300,11 @@ module PulpDebClient
310
300
  hash = {}
311
301
  self.class.attribute_map.each_pair do |attr, param|
312
302
  value = self.send(attr)
313
- next if value.nil?
303
+ if value.nil?
304
+ is_nullable = self.class.openapi_nullable.include?(attr)
305
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
306
+ end
307
+
314
308
  hash[param] = _to_hash(value)
315
309
  end
316
310
  hash
@@ -6,20 +6,18 @@
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
  require 'date'
14
14
 
15
15
  module PulpDebClient
16
- class DebPublication
17
- attr_accessor :_href
16
+ class DebDebPublication
17
+ attr_accessor :pulp_href
18
18
 
19
19
  # Timestamp of creation.
20
- attr_accessor :_created
21
-
22
- attr_accessor :_type
20
+ attr_accessor :pulp_created
23
21
 
24
22
  attr_accessor :publisher
25
23
 
@@ -37,9 +35,8 @@ module PulpDebClient
37
35
  # Attribute mapping from ruby-style variable name to JSON key.
38
36
  def self.attribute_map
39
37
  {
40
- :'_href' => :'_href',
41
- :'_created' => :'_created',
42
- :'_type' => :'_type',
38
+ :'pulp_href' => :'pulp_href',
39
+ :'pulp_created' => :'pulp_created',
43
40
  :'publisher' => :'publisher',
44
41
  :'repository_version' => :'repository_version',
45
42
  :'repository' => :'repository',
@@ -51,9 +48,8 @@ module PulpDebClient
51
48
  # Attribute type mapping.
52
49
  def self.openapi_types
53
50
  {
54
- :'_href' => :'String',
55
- :'_created' => :'DateTime',
56
- :'_type' => :'String',
51
+ :'pulp_href' => :'String',
52
+ :'pulp_created' => :'DateTime',
57
53
  :'publisher' => :'String',
58
54
  :'repository_version' => :'String',
59
55
  :'repository' => :'String',
@@ -62,31 +58,34 @@ module PulpDebClient
62
58
  }
63
59
  end
64
60
 
61
+ # List of attributes with nullable: true
62
+ def self.openapi_nullable
63
+ Set.new([
64
+ :'publisher',
65
+ ])
66
+ end
67
+
65
68
  # Initializes the object
66
69
  # @param [Hash] attributes Model attributes in the form of hash
67
70
  def initialize(attributes = {})
68
71
  if (!attributes.is_a?(Hash))
69
- fail ArgumentError, "The input argument (attributes) must be a hash in `PulpDebClient::DebPublication` initialize method"
72
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpDebClient::DebDebPublication` initialize method"
70
73
  end
71
74
 
72
75
  # check to see if the attribute exists and convert string to symbol for hash key
73
76
  attributes = attributes.each_with_object({}) { |(k, v), h|
74
77
  if (!self.class.attribute_map.key?(k.to_sym))
75
- fail ArgumentError, "`#{k}` is not a valid attribute in `PulpDebClient::DebPublication`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
78
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpDebClient::DebDebPublication`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
76
79
  end
77
80
  h[k.to_sym] = v
78
81
  }
79
82
 
80
- if attributes.key?(:'_href')
81
- self._href = attributes[:'_href']
83
+ if attributes.key?(:'pulp_href')
84
+ self.pulp_href = attributes[:'pulp_href']
82
85
  end
83
86
 
84
- if attributes.key?(:'_created')
85
- self._created = attributes[:'_created']
86
- end
87
-
88
- if attributes.key?(:'_type')
89
- self._type = attributes[:'_type']
87
+ if attributes.key?(:'pulp_created')
88
+ self.pulp_created = attributes[:'pulp_created']
90
89
  end
91
90
 
92
91
  if attributes.key?(:'publisher')
@@ -118,38 +117,22 @@ module PulpDebClient
118
117
  # @return Array for valid properties with the reasons
119
118
  def list_invalid_properties
120
119
  invalid_properties = Array.new
121
- if !@_type.nil? && @_type.to_s.length < 1
122
- invalid_properties.push('invalid value for "_type", the character length must be great than or equal to 1.')
123
- end
124
-
125
120
  invalid_properties
126
121
  end
127
122
 
128
123
  # Check to see if the all the properties in the model are valid
129
124
  # @return true if the model is valid
130
125
  def valid?
131
- return false if !@_type.nil? && @_type.to_s.length < 1
132
126
  true
133
127
  end
134
128
 
135
- # Custom attribute writer method with validation
136
- # @param [Object] _type Value to be assigned
137
- def _type=(_type)
138
- if !_type.nil? && _type.to_s.length < 1
139
- fail ArgumentError, 'invalid value for "_type", the character length must be great than or equal to 1.'
140
- end
141
-
142
- @_type = _type
143
- end
144
-
145
129
  # Checks equality by comparing each attribute.
146
130
  # @param [Object] Object to be compared
147
131
  def ==(o)
148
132
  return true if self.equal?(o)
149
133
  self.class == o.class &&
150
- _href == o._href &&
151
- _created == o._created &&
152
- _type == o._type &&
134
+ pulp_href == o.pulp_href &&
135
+ pulp_created == o.pulp_created &&
153
136
  publisher == o.publisher &&
154
137
  repository_version == o.repository_version &&
155
138
  repository == o.repository &&
@@ -166,7 +149,7 @@ module PulpDebClient
166
149
  # Calculates hash code according to all attributes.
167
150
  # @return [Integer] Hash code
168
151
  def hash
169
- [_href, _created, _type, publisher, repository_version, repository, simple, structured].hash
152
+ [pulp_href, pulp_created, publisher, repository_version, repository, simple, structured].hash
170
153
  end
171
154
 
172
155
  # Builds the object from hash
@@ -255,7 +238,11 @@ module PulpDebClient
255
238
  hash = {}
256
239
  self.class.attribute_map.each_pair do |attr, param|
257
240
  value = self.send(attr)
258
- next if value.nil?
241
+ if value.nil?
242
+ is_nullable = self.class.openapi_nullable.include?(attr)
243
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
244
+ end
245
+
259
246
  hash[param] = _to_hash(value)
260
247
  end
261
248
  hash