pulp_maven_client 0.1.0b31570567113 → 0.1.0b31574369188

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +22 -8
  3. data/docs/ContentArtifactApi.md +6 -6
  4. data/docs/ContentSummary.md +21 -0
  5. data/docs/DistributionsMavenApi.md +8 -8
  6. data/docs/InlineResponse200.md +1 -1
  7. data/docs/InlineResponse2001.md +1 -1
  8. data/docs/InlineResponse2002.md +1 -1
  9. data/docs/InlineResponse2003.md +23 -0
  10. data/docs/InlineResponse2004.md +23 -0
  11. data/docs/{MavenArtifact.md → MavenMavenArtifact.md} +9 -13
  12. data/docs/{MavenDistribution.md → MavenMavenDistribution.md} +6 -6
  13. data/docs/MavenMavenRemote.md +39 -0
  14. data/docs/MavenMavenRepository.md +27 -0
  15. data/docs/RemotesMavenApi.md +22 -22
  16. data/docs/RepositoriesMavenApi.md +354 -0
  17. data/docs/RepositoriesMavenVersionsApi.md +214 -0
  18. data/docs/RepositoryVersion.md +25 -0
  19. data/lib/pulp_maven_client.rb +11 -4
  20. data/lib/pulp_maven_client/api/content_artifact_api.rb +9 -9
  21. data/lib/pulp_maven_client/api/distributions_maven_api.rb +10 -10
  22. data/lib/pulp_maven_client/api/remotes_maven_api.rb +31 -31
  23. data/lib/pulp_maven_client/api/repositories_maven_api.rb +430 -0
  24. data/lib/pulp_maven_client/api/repositories_maven_versions_api.rb +268 -0
  25. data/lib/pulp_maven_client/api_client.rb +1 -1
  26. data/lib/pulp_maven_client/api_error.rb +1 -1
  27. data/lib/pulp_maven_client/configuration.rb +1 -1
  28. data/lib/pulp_maven_client/models/async_operation_response.rb +12 -2
  29. data/lib/pulp_maven_client/models/content_summary.rb +246 -0
  30. data/lib/pulp_maven_client/models/inline_response200.rb +15 -3
  31. data/lib/pulp_maven_client/models/inline_response2001.rb +15 -3
  32. data/lib/pulp_maven_client/models/inline_response2002.rb +15 -3
  33. data/lib/pulp_maven_client/models/inline_response2003.rb +247 -0
  34. data/lib/pulp_maven_client/models/inline_response2004.rb +247 -0
  35. data/lib/pulp_maven_client/models/{maven_artifact.rb → maven_maven_artifact.rb} +28 -76
  36. data/lib/pulp_maven_client/models/{maven_distribution.rb → maven_maven_distribution.rb} +30 -36
  37. data/lib/pulp_maven_client/models/{maven_remote.rb → maven_maven_remote.rb} +87 -147
  38. data/lib/pulp_maven_client/models/maven_maven_repository.rb +294 -0
  39. data/lib/pulp_maven_client/models/repository_version.rb +244 -0
  40. data/lib/pulp_maven_client/version.rb +2 -2
  41. data/pulp_maven_client.gemspec +1 -1
  42. data/spec/api/content_artifact_api_spec.rb +3 -3
  43. data/spec/api/distributions_maven_api_spec.rb +2 -2
  44. data/spec/api/remotes_maven_api_spec.rb +9 -9
  45. data/spec/api/repositories_maven_api_spec.rb +116 -0
  46. data/spec/api/repositories_maven_versions_api_spec.rb +91 -0
  47. data/spec/api_client_spec.rb +1 -1
  48. data/spec/configuration_spec.rb +1 -1
  49. data/spec/models/async_operation_response_spec.rb +1 -1
  50. data/spec/models/content_summary_spec.rb +53 -0
  51. data/spec/models/inline_response2001_spec.rb +1 -1
  52. data/spec/models/inline_response2002_spec.rb +1 -1
  53. data/spec/models/inline_response2003_spec.rb +59 -0
  54. data/spec/models/inline_response2004_spec.rb +59 -0
  55. data/spec/models/inline_response200_spec.rb +1 -1
  56. data/spec/models/{maven_artifact_spec.rb → maven_maven_artifact_spec.rb} +9 -21
  57. data/spec/models/{maven_distribution_spec.rb → maven_maven_distribution_spec.rb} +9 -9
  58. data/spec/models/{maven_remote_spec.rb → maven_maven_remote_spec.rb} +14 -32
  59. data/spec/models/maven_maven_repository_spec.rb +71 -0
  60. data/spec/models/repository_version_spec.rb +65 -0
  61. data/spec/spec_helper.rb +1 -1
  62. metadata +42 -14
  63. data/docs/MavenRemote.md +0 -45
@@ -6,27 +6,22 @@
6
6
  The version of the OpenAPI document: v3
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.0-SNAPSHOT
9
+ OpenAPI Generator version: 4.2.2-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
14
 
15
15
  module PulpMavenClient
16
- class MavenArtifact
17
- attr_accessor :_href
16
+ class MavenMavenArtifact
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
26
24
 
27
- # Path where the artifact is located relative to distributions base_path
28
- attr_accessor :relative_path
29
-
30
25
  # Group Id of the artifact's package.
31
26
  attr_accessor :group_id
32
27
 
@@ -42,11 +37,9 @@ module PulpMavenClient
42
37
  # Attribute mapping from ruby-style variable name to JSON key.
43
38
  def self.attribute_map
44
39
  {
45
- :'_href' => :'_href',
46
- :'_created' => :'_created',
47
- :'_type' => :'_type',
40
+ :'pulp_href' => :'pulp_href',
41
+ :'pulp_created' => :'pulp_created',
48
42
  :'artifact' => :'artifact',
49
- :'relative_path' => :'relative_path',
50
43
  :'group_id' => :'group_id',
51
44
  :'artifact_id' => :'artifact_id',
52
45
  :'version' => :'version',
@@ -57,11 +50,9 @@ module PulpMavenClient
57
50
  # Attribute type mapping.
58
51
  def self.openapi_types
59
52
  {
60
- :'_href' => :'String',
61
- :'_created' => :'DateTime',
62
- :'_type' => :'String',
53
+ :'pulp_href' => :'String',
54
+ :'pulp_created' => :'DateTime',
63
55
  :'artifact' => :'String',
64
- :'relative_path' => :'String',
65
56
  :'group_id' => :'String',
66
57
  :'artifact_id' => :'String',
67
58
  :'version' => :'String',
@@ -69,41 +60,39 @@ module PulpMavenClient
69
60
  }
70
61
  end
71
62
 
63
+ # List of attributes with nullable: true
64
+ def self.openapi_nullable
65
+ Set.new([
66
+ ])
67
+ end
68
+
72
69
  # Initializes the object
73
70
  # @param [Hash] attributes Model attributes in the form of hash
74
71
  def initialize(attributes = {})
75
72
  if (!attributes.is_a?(Hash))
76
- fail ArgumentError, "The input argument (attributes) must be a hash in `PulpMavenClient::MavenArtifact` initialize method"
73
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpMavenClient::MavenMavenArtifact` initialize method"
77
74
  end
78
75
 
79
76
  # check to see if the attribute exists and convert string to symbol for hash key
80
77
  attributes = attributes.each_with_object({}) { |(k, v), h|
81
78
  if (!self.class.attribute_map.key?(k.to_sym))
82
- fail ArgumentError, "`#{k}` is not a valid attribute in `PulpMavenClient::MavenArtifact`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
79
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpMavenClient::MavenMavenArtifact`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
83
80
  end
84
81
  h[k.to_sym] = v
85
82
  }
86
83
 
87
- if attributes.key?(:'_href')
88
- self._href = attributes[:'_href']
84
+ if attributes.key?(:'pulp_href')
85
+ self.pulp_href = attributes[:'pulp_href']
89
86
  end
90
87
 
91
- if attributes.key?(:'_created')
92
- self._created = attributes[:'_created']
93
- end
94
-
95
- if attributes.key?(:'_type')
96
- self._type = attributes[:'_type']
88
+ if attributes.key?(:'pulp_created')
89
+ self.pulp_created = attributes[:'pulp_created']
97
90
  end
98
91
 
99
92
  if attributes.key?(:'artifact')
100
93
  self.artifact = attributes[:'artifact']
101
94
  end
102
95
 
103
- if attributes.key?(:'relative_path')
104
- self.relative_path = attributes[:'relative_path']
105
- end
106
-
107
96
  if attributes.key?(:'group_id')
108
97
  self.group_id = attributes[:'group_id']
109
98
  end
@@ -125,22 +114,10 @@ module PulpMavenClient
125
114
  # @return Array for valid properties with the reasons
126
115
  def list_invalid_properties
127
116
  invalid_properties = Array.new
128
- if !@_type.nil? && @_type.to_s.length < 1
129
- invalid_properties.push('invalid value for "_type", the character length must be great than or equal to 1.')
130
- end
131
-
132
117
  if @artifact.nil?
133
118
  invalid_properties.push('invalid value for "artifact", artifact cannot be nil.')
134
119
  end
135
120
 
136
- if @relative_path.nil?
137
- invalid_properties.push('invalid value for "relative_path", relative_path cannot be nil.')
138
- end
139
-
140
- if @relative_path.to_s.length < 1
141
- invalid_properties.push('invalid value for "relative_path", the character length must be great than or equal to 1.')
142
- end
143
-
144
121
  if !@group_id.nil? && @group_id.to_s.length < 1
145
122
  invalid_properties.push('invalid value for "group_id", the character length must be great than or equal to 1.')
146
123
  end
@@ -163,10 +140,7 @@ module PulpMavenClient
163
140
  # Check to see if the all the properties in the model are valid
164
141
  # @return true if the model is valid
165
142
  def valid?
166
- return false if !@_type.nil? && @_type.to_s.length < 1
167
143
  return false if @artifact.nil?
168
- return false if @relative_path.nil?
169
- return false if @relative_path.to_s.length < 1
170
144
  return false if !@group_id.nil? && @group_id.to_s.length < 1
171
145
  return false if !@artifact_id.nil? && @artifact_id.to_s.length < 1
172
146
  return false if !@version.nil? && @version.to_s.length < 1
@@ -174,30 +148,6 @@ module PulpMavenClient
174
148
  true
175
149
  end
176
150
 
177
- # Custom attribute writer method with validation
178
- # @param [Object] _type Value to be assigned
179
- def _type=(_type)
180
- if !_type.nil? && _type.to_s.length < 1
181
- fail ArgumentError, 'invalid value for "_type", the character length must be great than or equal to 1.'
182
- end
183
-
184
- @_type = _type
185
- end
186
-
187
- # Custom attribute writer method with validation
188
- # @param [Object] relative_path Value to be assigned
189
- def relative_path=(relative_path)
190
- if relative_path.nil?
191
- fail ArgumentError, 'relative_path cannot be nil'
192
- end
193
-
194
- if relative_path.to_s.length < 1
195
- fail ArgumentError, 'invalid value for "relative_path", the character length must be great than or equal to 1.'
196
- end
197
-
198
- @relative_path = relative_path
199
- end
200
-
201
151
  # Custom attribute writer method with validation
202
152
  # @param [Object] group_id Value to be assigned
203
153
  def group_id=(group_id)
@@ -243,11 +193,9 @@ module PulpMavenClient
243
193
  def ==(o)
244
194
  return true if self.equal?(o)
245
195
  self.class == o.class &&
246
- _href == o._href &&
247
- _created == o._created &&
248
- _type == o._type &&
196
+ pulp_href == o.pulp_href &&
197
+ pulp_created == o.pulp_created &&
249
198
  artifact == o.artifact &&
250
- relative_path == o.relative_path &&
251
199
  group_id == o.group_id &&
252
200
  artifact_id == o.artifact_id &&
253
201
  version == o.version &&
@@ -263,7 +211,7 @@ module PulpMavenClient
263
211
  # Calculates hash code according to all attributes.
264
212
  # @return [Integer] Hash code
265
213
  def hash
266
- [_href, _created, _type, artifact, relative_path, group_id, artifact_id, version, filename].hash
214
+ [pulp_href, pulp_created, artifact, group_id, artifact_id, version, filename].hash
267
215
  end
268
216
 
269
217
  # Builds the object from hash
@@ -352,7 +300,11 @@ module PulpMavenClient
352
300
  hash = {}
353
301
  self.class.attribute_map.each_pair do |attr, param|
354
302
  value = self.send(attr)
355
- 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
+
356
308
  hash[param] = _to_hash(value)
357
309
  end
358
310
  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.2.0-SNAPSHOT
9
+ OpenAPI Generator version: 4.2.2-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
14
 
15
15
  module PulpMavenClient
16
- class MavenDistribution
17
- attr_accessor :_href
16
+ class MavenMavenDistribution
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 PulpMavenClient
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 PulpMavenClient
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 PulpMavenClient
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
+ :'remote'
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 `PulpMavenClient::MavenDistribution` initialize method"
75
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpMavenClient::MavenMavenDistribution` 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 `PulpMavenClient::MavenDistribution`. 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 `PulpMavenClient::MavenMavenDistribution`. 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 PulpMavenClient
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 PulpMavenClient
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 PulpMavenClient
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 PulpMavenClient
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 PulpMavenClient
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 PulpMavenClient
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 PulpMavenClient
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, remote].hash
214
+ [pulp_href, pulp_created, base_path, base_url, content_guard, name, remote].hash
225
215
  end
226
216
 
227
217
  # Builds the object from hash
@@ -310,7 +300,11 @@ module PulpMavenClient
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.2.0-SNAPSHOT
9
+ OpenAPI Generator version: 4.2.2-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
14
 
15
15
  module PulpMavenClient
16
- class MavenRemote
17
- attr_accessor :_href
16
+ class MavenMavenRemote
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
  # A unique name for this remote.
25
23
  attr_accessor :name
@@ -28,28 +26,22 @@ module PulpMavenClient
28
26
  attr_accessor :url
29
27
 
30
28
  # A string containing the PEM encoded CA certificate used to validate the server certificate presented by the remote server. All new line characters must be escaped. Returns SHA256 sum on GET.
31
- attr_accessor :ssl_ca_certificate
29
+ attr_accessor :ca_cert
32
30
 
33
31
  # A string containing the PEM encoded client certificate used for authentication. All new line characters must be escaped. Returns SHA256 sum on GET.
34
- attr_accessor :ssl_client_certificate
32
+ attr_accessor :client_cert
35
33
 
36
34
  # A PEM encoded private key used for authentication. Returns SHA256 sum on GET.
37
- attr_accessor :ssl_client_key
35
+ attr_accessor :client_key
38
36
 
39
- # If True, SSL peer validation must be performed.
40
- attr_accessor :ssl_validation
37
+ # If True, TLS peer validation must be performed.
38
+ attr_accessor :tls_validation
41
39
 
42
40
  # The proxy URL. Format: scheme://user:password@host:port
43
41
  attr_accessor :proxy_url
44
42
 
45
- # The username to be used for authentication when syncing.
46
- attr_accessor :username
47
-
48
- # The password to be used for authentication when syncing.
49
- attr_accessor :password
50
-
51
43
  # Timestamp of the most recent update of the remote.
52
- attr_accessor :_last_updated
44
+ attr_accessor :pulp_last_updated
53
45
 
54
46
  # Total number of simultaneous connections.
55
47
  attr_accessor :download_concurrency
@@ -82,19 +74,16 @@ module PulpMavenClient
82
74
  # Attribute mapping from ruby-style variable name to JSON key.
83
75
  def self.attribute_map
84
76
  {
85
- :'_href' => :'_href',
86
- :'_created' => :'_created',
87
- :'_type' => :'_type',
77
+ :'pulp_href' => :'pulp_href',
78
+ :'pulp_created' => :'pulp_created',
88
79
  :'name' => :'name',
89
80
  :'url' => :'url',
90
- :'ssl_ca_certificate' => :'ssl_ca_certificate',
91
- :'ssl_client_certificate' => :'ssl_client_certificate',
92
- :'ssl_client_key' => :'ssl_client_key',
93
- :'ssl_validation' => :'ssl_validation',
81
+ :'ca_cert' => :'ca_cert',
82
+ :'client_cert' => :'client_cert',
83
+ :'client_key' => :'client_key',
84
+ :'tls_validation' => :'tls_validation',
94
85
  :'proxy_url' => :'proxy_url',
95
- :'username' => :'username',
96
- :'password' => :'password',
97
- :'_last_updated' => :'_last_updated',
86
+ :'pulp_last_updated' => :'pulp_last_updated',
98
87
  :'download_concurrency' => :'download_concurrency',
99
88
  :'policy' => :'policy'
100
89
  }
@@ -103,49 +92,52 @@ module PulpMavenClient
103
92
  # Attribute type mapping.
104
93
  def self.openapi_types
105
94
  {
106
- :'_href' => :'String',
107
- :'_created' => :'DateTime',
108
- :'_type' => :'String',
95
+ :'pulp_href' => :'String',
96
+ :'pulp_created' => :'DateTime',
109
97
  :'name' => :'String',
110
98
  :'url' => :'String',
111
- :'ssl_ca_certificate' => :'String',
112
- :'ssl_client_certificate' => :'String',
113
- :'ssl_client_key' => :'String',
114
- :'ssl_validation' => :'Boolean',
99
+ :'ca_cert' => :'String',
100
+ :'client_cert' => :'String',
101
+ :'client_key' => :'String',
102
+ :'tls_validation' => :'Boolean',
115
103
  :'proxy_url' => :'String',
116
- :'username' => :'String',
117
- :'password' => :'String',
118
- :'_last_updated' => :'DateTime',
104
+ :'pulp_last_updated' => :'DateTime',
119
105
  :'download_concurrency' => :'Integer',
120
106
  :'policy' => :'String'
121
107
  }
122
108
  end
123
109
 
110
+ # List of attributes with nullable: true
111
+ def self.openapi_nullable
112
+ Set.new([
113
+ :'ca_cert',
114
+ :'client_cert',
115
+ :'client_key',
116
+ :'proxy_url',
117
+ ])
118
+ end
119
+
124
120
  # Initializes the object
125
121
  # @param [Hash] attributes Model attributes in the form of hash
126
122
  def initialize(attributes = {})
127
123
  if (!attributes.is_a?(Hash))
128
- fail ArgumentError, "The input argument (attributes) must be a hash in `PulpMavenClient::MavenRemote` initialize method"
124
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpMavenClient::MavenMavenRemote` initialize method"
129
125
  end
130
126
 
131
127
  # check to see if the attribute exists and convert string to symbol for hash key
132
128
  attributes = attributes.each_with_object({}) { |(k, v), h|
133
129
  if (!self.class.attribute_map.key?(k.to_sym))
134
- fail ArgumentError, "`#{k}` is not a valid attribute in `PulpMavenClient::MavenRemote`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
130
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpMavenClient::MavenMavenRemote`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
135
131
  end
136
132
  h[k.to_sym] = v
137
133
  }
138
134
 
139
- if attributes.key?(:'_href')
140
- self._href = attributes[:'_href']
135
+ if attributes.key?(:'pulp_href')
136
+ self.pulp_href = attributes[:'pulp_href']
141
137
  end
142
138
 
143
- if attributes.key?(:'_created')
144
- self._created = attributes[:'_created']
145
- end
146
-
147
- if attributes.key?(:'_type')
148
- self._type = attributes[:'_type']
139
+ if attributes.key?(:'pulp_created')
140
+ self.pulp_created = attributes[:'pulp_created']
149
141
  end
150
142
 
151
143
  if attributes.key?(:'name')
@@ -156,36 +148,28 @@ module PulpMavenClient
156
148
  self.url = attributes[:'url']
157
149
  end
158
150
 
159
- if attributes.key?(:'ssl_ca_certificate')
160
- self.ssl_ca_certificate = attributes[:'ssl_ca_certificate']
151
+ if attributes.key?(:'ca_cert')
152
+ self.ca_cert = attributes[:'ca_cert']
161
153
  end
162
154
 
163
- if attributes.key?(:'ssl_client_certificate')
164
- self.ssl_client_certificate = attributes[:'ssl_client_certificate']
155
+ if attributes.key?(:'client_cert')
156
+ self.client_cert = attributes[:'client_cert']
165
157
  end
166
158
 
167
- if attributes.key?(:'ssl_client_key')
168
- self.ssl_client_key = attributes[:'ssl_client_key']
159
+ if attributes.key?(:'client_key')
160
+ self.client_key = attributes[:'client_key']
169
161
  end
170
162
 
171
- if attributes.key?(:'ssl_validation')
172
- self.ssl_validation = attributes[:'ssl_validation']
163
+ if attributes.key?(:'tls_validation')
164
+ self.tls_validation = attributes[:'tls_validation']
173
165
  end
174
166
 
175
167
  if attributes.key?(:'proxy_url')
176
168
  self.proxy_url = attributes[:'proxy_url']
177
169
  end
178
170
 
179
- if attributes.key?(:'username')
180
- self.username = attributes[:'username']
181
- end
182
-
183
- if attributes.key?(:'password')
184
- self.password = attributes[:'password']
185
- end
186
-
187
- if attributes.key?(:'_last_updated')
188
- self._last_updated = attributes[:'_last_updated']
171
+ if attributes.key?(:'pulp_last_updated')
172
+ self.pulp_last_updated = attributes[:'pulp_last_updated']
189
173
  end
190
174
 
191
175
  if attributes.key?(:'download_concurrency')
@@ -203,10 +187,6 @@ module PulpMavenClient
203
187
  # @return Array for valid properties with the reasons
204
188
  def list_invalid_properties
205
189
  invalid_properties = Array.new
206
- if !@_type.nil? && @_type.to_s.length < 1
207
- invalid_properties.push('invalid value for "_type", the character length must be great than or equal to 1.')
208
- end
209
-
210
190
  if @name.nil?
211
191
  invalid_properties.push('invalid value for "name", name cannot be nil.')
212
192
  end
@@ -223,30 +203,22 @@ module PulpMavenClient
223
203
  invalid_properties.push('invalid value for "url", the character length must be great than or equal to 1.')
224
204
  end
225
205
 
226
- if !@ssl_ca_certificate.nil? && @ssl_ca_certificate.to_s.length < 1
227
- invalid_properties.push('invalid value for "ssl_ca_certificate", the character length must be great than or equal to 1.')
206
+ if !@ca_cert.nil? && @ca_cert.to_s.length < 1
207
+ invalid_properties.push('invalid value for "ca_cert", the character length must be great than or equal to 1.')
228
208
  end
229
209
 
230
- if !@ssl_client_certificate.nil? && @ssl_client_certificate.to_s.length < 1
231
- invalid_properties.push('invalid value for "ssl_client_certificate", the character length must be great than or equal to 1.')
210
+ if !@client_cert.nil? && @client_cert.to_s.length < 1
211
+ invalid_properties.push('invalid value for "client_cert", the character length must be great than or equal to 1.')
232
212
  end
233
213
 
234
- if !@ssl_client_key.nil? && @ssl_client_key.to_s.length < 1
235
- invalid_properties.push('invalid value for "ssl_client_key", the character length must be great than or equal to 1.')
214
+ if !@client_key.nil? && @client_key.to_s.length < 1
215
+ invalid_properties.push('invalid value for "client_key", the character length must be great than or equal to 1.')
236
216
  end
237
217
 
238
218
  if !@proxy_url.nil? && @proxy_url.to_s.length < 1
239
219
  invalid_properties.push('invalid value for "proxy_url", the character length must be great than or equal to 1.')
240
220
  end
241
221
 
242
- if !@username.nil? && @username.to_s.length < 1
243
- invalid_properties.push('invalid value for "username", the character length must be great than or equal to 1.')
244
- end
245
-
246
- if !@password.nil? && @password.to_s.length < 1
247
- invalid_properties.push('invalid value for "password", the character length must be great than or equal to 1.')
248
- end
249
-
250
222
  if !@download_concurrency.nil? && @download_concurrency < 1
251
223
  invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
252
224
  end
@@ -257,33 +229,20 @@ module PulpMavenClient
257
229
  # Check to see if the all the properties in the model are valid
258
230
  # @return true if the model is valid
259
231
  def valid?
260
- return false if !@_type.nil? && @_type.to_s.length < 1
261
232
  return false if @name.nil?
262
233
  return false if @name.to_s.length < 1
263
234
  return false if @url.nil?
264
235
  return false if @url.to_s.length < 1
265
- return false if !@ssl_ca_certificate.nil? && @ssl_ca_certificate.to_s.length < 1
266
- return false if !@ssl_client_certificate.nil? && @ssl_client_certificate.to_s.length < 1
267
- return false if !@ssl_client_key.nil? && @ssl_client_key.to_s.length < 1
236
+ return false if !@ca_cert.nil? && @ca_cert.to_s.length < 1
237
+ return false if !@client_cert.nil? && @client_cert.to_s.length < 1
238
+ return false if !@client_key.nil? && @client_key.to_s.length < 1
268
239
  return false if !@proxy_url.nil? && @proxy_url.to_s.length < 1
269
- return false if !@username.nil? && @username.to_s.length < 1
270
- return false if !@password.nil? && @password.to_s.length < 1
271
240
  return false if !@download_concurrency.nil? && @download_concurrency < 1
272
241
  policy_validator = EnumAttributeValidator.new('String', ["immediate", "When syncing, download all metadata and content now."])
273
242
  return false unless policy_validator.valid?(@policy)
274
243
  true
275
244
  end
276
245
 
277
- # Custom attribute writer method with validation
278
- # @param [Object] _type Value to be assigned
279
- def _type=(_type)
280
- if !_type.nil? && _type.to_s.length < 1
281
- fail ArgumentError, 'invalid value for "_type", the character length must be great than or equal to 1.'
282
- end
283
-
284
- @_type = _type
285
- end
286
-
287
246
  # Custom attribute writer method with validation
288
247
  # @param [Object] name Value to be assigned
289
248
  def name=(name)
@@ -313,33 +272,33 @@ module PulpMavenClient
313
272
  end
314
273
 
315
274
  # Custom attribute writer method with validation
316
- # @param [Object] ssl_ca_certificate Value to be assigned
317
- def ssl_ca_certificate=(ssl_ca_certificate)
318
- if !ssl_ca_certificate.nil? && ssl_ca_certificate.to_s.length < 1
319
- fail ArgumentError, 'invalid value for "ssl_ca_certificate", the character length must be great than or equal to 1.'
275
+ # @param [Object] ca_cert Value to be assigned
276
+ def ca_cert=(ca_cert)
277
+ if !ca_cert.nil? && ca_cert.to_s.length < 1
278
+ fail ArgumentError, 'invalid value for "ca_cert", the character length must be great than or equal to 1.'
320
279
  end
321
280
 
322
- @ssl_ca_certificate = ssl_ca_certificate
281
+ @ca_cert = ca_cert
323
282
  end
324
283
 
325
284
  # Custom attribute writer method with validation
326
- # @param [Object] ssl_client_certificate Value to be assigned
327
- def ssl_client_certificate=(ssl_client_certificate)
328
- if !ssl_client_certificate.nil? && ssl_client_certificate.to_s.length < 1
329
- fail ArgumentError, 'invalid value for "ssl_client_certificate", the character length must be great than or equal to 1.'
285
+ # @param [Object] client_cert Value to be assigned
286
+ def client_cert=(client_cert)
287
+ if !client_cert.nil? && client_cert.to_s.length < 1
288
+ fail ArgumentError, 'invalid value for "client_cert", the character length must be great than or equal to 1.'
330
289
  end
331
290
 
332
- @ssl_client_certificate = ssl_client_certificate
291
+ @client_cert = client_cert
333
292
  end
334
293
 
335
294
  # Custom attribute writer method with validation
336
- # @param [Object] ssl_client_key Value to be assigned
337
- def ssl_client_key=(ssl_client_key)
338
- if !ssl_client_key.nil? && ssl_client_key.to_s.length < 1
339
- fail ArgumentError, 'invalid value for "ssl_client_key", the character length must be great than or equal to 1.'
295
+ # @param [Object] client_key Value to be assigned
296
+ def client_key=(client_key)
297
+ if !client_key.nil? && client_key.to_s.length < 1
298
+ fail ArgumentError, 'invalid value for "client_key", the character length must be great than or equal to 1.'
340
299
  end
341
300
 
342
- @ssl_client_key = ssl_client_key
301
+ @client_key = client_key
343
302
  end
344
303
 
345
304
  # Custom attribute writer method with validation
@@ -352,26 +311,6 @@ module PulpMavenClient
352
311
  @proxy_url = proxy_url
353
312
  end
354
313
 
355
- # Custom attribute writer method with validation
356
- # @param [Object] username Value to be assigned
357
- def username=(username)
358
- if !username.nil? && username.to_s.length < 1
359
- fail ArgumentError, 'invalid value for "username", the character length must be great than or equal to 1.'
360
- end
361
-
362
- @username = username
363
- end
364
-
365
- # Custom attribute writer method with validation
366
- # @param [Object] password Value to be assigned
367
- def password=(password)
368
- if !password.nil? && password.to_s.length < 1
369
- fail ArgumentError, 'invalid value for "password", the character length must be great than or equal to 1.'
370
- end
371
-
372
- @password = password
373
- end
374
-
375
314
  # Custom attribute writer method with validation
376
315
  # @param [Object] download_concurrency Value to be assigned
377
316
  def download_concurrency=(download_concurrency)
@@ -397,19 +336,16 @@ module PulpMavenClient
397
336
  def ==(o)
398
337
  return true if self.equal?(o)
399
338
  self.class == o.class &&
400
- _href == o._href &&
401
- _created == o._created &&
402
- _type == o._type &&
339
+ pulp_href == o.pulp_href &&
340
+ pulp_created == o.pulp_created &&
403
341
  name == o.name &&
404
342
  url == o.url &&
405
- ssl_ca_certificate == o.ssl_ca_certificate &&
406
- ssl_client_certificate == o.ssl_client_certificate &&
407
- ssl_client_key == o.ssl_client_key &&
408
- ssl_validation == o.ssl_validation &&
343
+ ca_cert == o.ca_cert &&
344
+ client_cert == o.client_cert &&
345
+ client_key == o.client_key &&
346
+ tls_validation == o.tls_validation &&
409
347
  proxy_url == o.proxy_url &&
410
- username == o.username &&
411
- password == o.password &&
412
- _last_updated == o._last_updated &&
348
+ pulp_last_updated == o.pulp_last_updated &&
413
349
  download_concurrency == o.download_concurrency &&
414
350
  policy == o.policy
415
351
  end
@@ -423,7 +359,7 @@ module PulpMavenClient
423
359
  # Calculates hash code according to all attributes.
424
360
  # @return [Integer] Hash code
425
361
  def hash
426
- [_href, _created, _type, name, url, ssl_ca_certificate, ssl_client_certificate, ssl_client_key, ssl_validation, proxy_url, username, password, _last_updated, download_concurrency, policy].hash
362
+ [pulp_href, pulp_created, name, url, ca_cert, client_cert, client_key, tls_validation, proxy_url, pulp_last_updated, download_concurrency, policy].hash
427
363
  end
428
364
 
429
365
  # Builds the object from hash
@@ -512,7 +448,11 @@ module PulpMavenClient
512
448
  hash = {}
513
449
  self.class.attribute_map.each_pair do |attr, param|
514
450
  value = self.send(attr)
515
- next if value.nil?
451
+ if value.nil?
452
+ is_nullable = self.class.openapi_nullable.include?(attr)
453
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
454
+ end
455
+
516
456
  hash[param] = _to_hash(value)
517
457
  end
518
458
  hash