pulp_python_client 3.0.0b10 → 3.0.0b11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +46 -33
  3. data/docs/ContentPackagesApi.md +52 -52
  4. data/docs/ContentSummary.md +3 -3
  5. data/docs/ContentSummaryResponse.md +21 -0
  6. data/docs/DistributionsPypiApi.md +108 -60
  7. data/docs/InlineResponse200.md +3 -3
  8. data/docs/InlineResponse2001.md +3 -3
  9. data/docs/InlineResponse2002.md +3 -3
  10. data/docs/InlineResponse2003.md +3 -3
  11. data/docs/InlineResponse2004.md +3 -3
  12. data/docs/InlineResponse2005.md +3 -3
  13. data/docs/PatchedpythonPythonDistribution.md +23 -0
  14. data/docs/PatchedpythonPythonRemote.md +43 -0
  15. data/docs/PatchedpythonPythonRepository.md +21 -0
  16. data/docs/PolicyEnum.md +16 -0
  17. data/docs/PublicationsPypiApi.md +40 -40
  18. data/docs/PythonBanderRemote.md +19 -0
  19. data/docs/PythonPythonDistribution.md +1 -7
  20. data/docs/PythonPythonDistributionResponse.md +29 -0
  21. data/docs/PythonPythonPackageContent.md +7 -15
  22. data/docs/PythonPythonPackageContentResponse.md +69 -0
  23. data/docs/PythonPythonPublication.md +2 -8
  24. data/docs/PythonPythonPublicationResponse.md +25 -0
  25. data/docs/PythonPythonRemote.md +4 -10
  26. data/docs/PythonPythonRemoteResponse.md +49 -0
  27. data/docs/PythonPythonRepository.md +4 -10
  28. data/docs/PythonPythonRepositoryResponse.md +29 -0
  29. data/docs/RemotesPythonApi.md +129 -69
  30. data/docs/RepositoriesPythonApi.md +97 -73
  31. data/docs/RepositoriesPythonVersionsApi.md +94 -62
  32. data/docs/RepositoryAddRemoveContent.md +2 -2
  33. data/docs/RepositorySyncURL.md +1 -1
  34. data/docs/RepositoryVersion.md +1 -9
  35. data/docs/RepositoryVersionResponse.md +25 -0
  36. data/lib/pulp_python_client.rb +14 -2
  37. data/lib/pulp_python_client/api/content_packages_api.rb +70 -70
  38. data/lib/pulp_python_client/api/distributions_pypi_api.rb +153 -90
  39. data/lib/pulp_python_client/api/publications_pypi_api.rb +59 -59
  40. data/lib/pulp_python_client/api/remotes_python_api.rb +185 -108
  41. data/lib/pulp_python_client/api/repositories_python_api.rb +145 -118
  42. data/lib/pulp_python_client/api/repositories_python_versions_api.rb +137 -92
  43. data/lib/pulp_python_client/api_client.rb +2 -2
  44. data/lib/pulp_python_client/api_error.rb +2 -2
  45. data/lib/pulp_python_client/configuration.rb +3 -3
  46. data/lib/pulp_python_client/models/async_operation_response.rb +3 -2
  47. data/lib/pulp_python_client/models/content_summary.rb +9 -15
  48. data/lib/pulp_python_client/models/content_summary_response.rb +240 -0
  49. data/lib/pulp_python_client/models/inline_response200.rb +3 -13
  50. data/lib/pulp_python_client/models/inline_response2001.rb +3 -13
  51. data/lib/pulp_python_client/models/inline_response2002.rb +3 -13
  52. data/lib/pulp_python_client/models/inline_response2003.rb +3 -13
  53. data/lib/pulp_python_client/models/inline_response2004.rb +3 -13
  54. data/lib/pulp_python_client/models/inline_response2005.rb +3 -13
  55. data/lib/pulp_python_client/models/patchedpython_python_distribution.rb +240 -0
  56. data/lib/pulp_python_client/models/patchedpython_python_remote.rb +359 -0
  57. data/lib/pulp_python_client/models/patchedpython_python_repository.rb +229 -0
  58. data/lib/pulp_python_client/models/policy_enum.rb +37 -0
  59. data/lib/pulp_python_client/models/python_bander_remote.rb +228 -0
  60. data/lib/pulp_python_client/models/python_python_distribution.rb +4 -85
  61. data/lib/pulp_python_client/models/python_python_distribution_response.rb +279 -0
  62. data/lib/pulp_python_client/models/python_python_package_content.rb +28 -136
  63. data/lib/pulp_python_client/models/python_python_package_content_response.rb +467 -0
  64. data/lib/pulp_python_client/models/python_python_publication.rb +7 -37
  65. data/lib/pulp_python_client/models/python_python_publication_response.rb +248 -0
  66. data/lib/pulp_python_client/models/python_python_remote.rb +7 -199
  67. data/lib/pulp_python_client/models/python_python_remote_response.rb +398 -0
  68. data/lib/pulp_python_client/models/python_python_repository.rb +18 -78
  69. data/lib/pulp_python_client/models/python_python_repository_response.rb +271 -0
  70. data/lib/pulp_python_client/models/repository_add_remove_content.rb +5 -4
  71. data/lib/pulp_python_client/models/repository_sync_url.rb +3 -8
  72. data/lib/pulp_python_client/models/repository_version.rb +7 -43
  73. data/lib/pulp_python_client/models/repository_version_response.rb +246 -0
  74. data/lib/pulp_python_client/version.rb +3 -3
  75. data/pulp_python_client.gemspec +4 -4
  76. data/spec/api/content_packages_api_spec.rb +24 -24
  77. data/spec/api/distributions_pypi_api_spec.rb +39 -18
  78. data/spec/api/publications_pypi_api_spec.rb +14 -14
  79. data/spec/api/remotes_python_api_spec.rb +49 -22
  80. data/spec/api/repositories_python_api_spec.rb +28 -19
  81. data/spec/api/repositories_python_versions_api_spec.rb +38 -23
  82. data/spec/api_client_spec.rb +2 -2
  83. data/spec/configuration_spec.rb +2 -2
  84. data/spec/models/async_operation_response_spec.rb +2 -2
  85. data/spec/models/content_summary_response_spec.rb +53 -0
  86. data/spec/models/content_summary_spec.rb +2 -2
  87. data/spec/models/inline_response2001_spec.rb +2 -2
  88. data/spec/models/inline_response2002_spec.rb +2 -2
  89. data/spec/models/inline_response2003_spec.rb +2 -2
  90. data/spec/models/inline_response2004_spec.rb +2 -2
  91. data/spec/models/inline_response2005_spec.rb +2 -2
  92. data/spec/models/inline_response200_spec.rb +2 -2
  93. data/spec/models/patchedpython_python_distribution_spec.rb +59 -0
  94. data/spec/models/patchedpython_python_remote_spec.rb +119 -0
  95. data/spec/models/patchedpython_python_repository_spec.rb +53 -0
  96. data/spec/models/policy_enum_spec.rb +35 -0
  97. data/spec/models/python_bander_remote_spec.rb +47 -0
  98. data/spec/models/python_python_distribution_response_spec.rb +77 -0
  99. data/spec/models/python_python_distribution_spec.rb +2 -20
  100. data/spec/models/python_python_package_content_response_spec.rb +197 -0
  101. data/spec/models/python_python_package_content_spec.rb +5 -29
  102. data/spec/models/python_python_publication_response_spec.rb +65 -0
  103. data/spec/models/python_python_publication_spec.rb +2 -20
  104. data/spec/models/python_python_remote_response_spec.rb +137 -0
  105. data/spec/models/python_python_remote_spec.rb +2 -24
  106. data/spec/models/python_python_repository_response_spec.rb +77 -0
  107. data/spec/models/python_python_repository_spec.rb +5 -23
  108. data/spec/models/repository_add_remove_content_spec.rb +2 -2
  109. data/spec/models/repository_sync_url_spec.rb +2 -2
  110. data/spec/models/repository_version_response_spec.rb +65 -0
  111. data/spec/models/repository_version_spec.rb +2 -26
  112. data/spec/spec_helper.rb +2 -2
  113. metadata +52 -4
@@ -1,10 +1,10 @@
1
1
  =begin
2
2
  #Pulp 3 API
3
3
 
4
- #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ #Fetch, Upload, Organize, and Distribute Software Packages
5
5
 
6
6
  The version of the OpenAPI document: v3
7
-
7
+ Contact: pulp-list@redhat.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 4.2.3
10
10
 
@@ -13,39 +13,26 @@ OpenAPI Generator version: 4.2.3
13
13
  require 'date'
14
14
 
15
15
  module PulpPythonClient
16
+ # A Serializer for PythonPublication.
16
17
  class PythonPythonPublication
17
- attr_accessor :pulp_href
18
-
19
- # Timestamp of creation.
20
- attr_accessor :pulp_created
21
-
22
18
  attr_accessor :repository_version
23
19
 
24
20
  # A URI of the repository to be published.
25
21
  attr_accessor :repository
26
22
 
27
- # This publication is currently being hosted as configured by these distributions.
28
- attr_accessor :distributions
29
-
30
23
  # Attribute mapping from ruby-style variable name to JSON key.
31
24
  def self.attribute_map
32
25
  {
33
- :'pulp_href' => :'pulp_href',
34
- :'pulp_created' => :'pulp_created',
35
26
  :'repository_version' => :'repository_version',
36
- :'repository' => :'repository',
37
- :'distributions' => :'distributions'
27
+ :'repository' => :'repository'
38
28
  }
39
29
  end
40
30
 
41
31
  # Attribute type mapping.
42
32
  def self.openapi_types
43
33
  {
44
- :'pulp_href' => :'String',
45
- :'pulp_created' => :'DateTime',
46
34
  :'repository_version' => :'String',
47
- :'repository' => :'String',
48
- :'distributions' => :'Array<String>'
35
+ :'repository' => :'String'
49
36
  }
50
37
  end
51
38
 
@@ -70,14 +57,6 @@ module PulpPythonClient
70
57
  h[k.to_sym] = v
71
58
  }
72
59
 
73
- if attributes.key?(:'pulp_href')
74
- self.pulp_href = attributes[:'pulp_href']
75
- end
76
-
77
- if attributes.key?(:'pulp_created')
78
- self.pulp_created = attributes[:'pulp_created']
79
- end
80
-
81
60
  if attributes.key?(:'repository_version')
82
61
  self.repository_version = attributes[:'repository_version']
83
62
  end
@@ -85,12 +64,6 @@ module PulpPythonClient
85
64
  if attributes.key?(:'repository')
86
65
  self.repository = attributes[:'repository']
87
66
  end
88
-
89
- if attributes.key?(:'distributions')
90
- if (value = attributes[:'distributions']).is_a?(Array)
91
- self.distributions = value
92
- end
93
- end
94
67
  end
95
68
 
96
69
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -111,11 +84,8 @@ module PulpPythonClient
111
84
  def ==(o)
112
85
  return true if self.equal?(o)
113
86
  self.class == o.class &&
114
- pulp_href == o.pulp_href &&
115
- pulp_created == o.pulp_created &&
116
87
  repository_version == o.repository_version &&
117
- repository == o.repository &&
118
- distributions == o.distributions
88
+ repository == o.repository
119
89
  end
120
90
 
121
91
  # @see the `==` method
@@ -127,7 +97,7 @@ module PulpPythonClient
127
97
  # Calculates hash code according to all attributes.
128
98
  # @return [Integer] Hash code
129
99
  def hash
130
- [pulp_href, pulp_created, repository_version, repository, distributions].hash
100
+ [repository_version, repository].hash
131
101
  end
132
102
 
133
103
  # Builds the object from hash
@@ -0,0 +1,248 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #Fetch, Upload, Organize, and Distribute Software Packages
5
+
6
+ The version of the OpenAPI document: v3
7
+ Contact: pulp-list@redhat.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.2.3
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module PulpPythonClient
16
+ # A Serializer for PythonPublication.
17
+ class PythonPythonPublicationResponse
18
+ attr_accessor :pulp_href
19
+
20
+ # Timestamp of creation.
21
+ attr_accessor :pulp_created
22
+
23
+ attr_accessor :repository_version
24
+
25
+ # A URI of the repository to be published.
26
+ attr_accessor :repository
27
+
28
+ # This publication is currently being hosted as configured by these distributions.
29
+ attr_accessor :distributions
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'pulp_href' => :'pulp_href',
35
+ :'pulp_created' => :'pulp_created',
36
+ :'repository_version' => :'repository_version',
37
+ :'repository' => :'repository',
38
+ :'distributions' => :'distributions'
39
+ }
40
+ end
41
+
42
+ # Attribute type mapping.
43
+ def self.openapi_types
44
+ {
45
+ :'pulp_href' => :'String',
46
+ :'pulp_created' => :'DateTime',
47
+ :'repository_version' => :'String',
48
+ :'repository' => :'String',
49
+ :'distributions' => :'Array<String>'
50
+ }
51
+ end
52
+
53
+ # List of attributes with nullable: true
54
+ def self.openapi_nullable
55
+ Set.new([
56
+ ])
57
+ end
58
+
59
+ # Initializes the object
60
+ # @param [Hash] attributes Model attributes in the form of hash
61
+ def initialize(attributes = {})
62
+ if (!attributes.is_a?(Hash))
63
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpPythonClient::PythonPythonPublicationResponse` initialize method"
64
+ end
65
+
66
+ # check to see if the attribute exists and convert string to symbol for hash key
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!self.class.attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpPythonClient::PythonPythonPublicationResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'pulp_href')
75
+ self.pulp_href = attributes[:'pulp_href']
76
+ end
77
+
78
+ if attributes.key?(:'pulp_created')
79
+ self.pulp_created = attributes[:'pulp_created']
80
+ end
81
+
82
+ if attributes.key?(:'repository_version')
83
+ self.repository_version = attributes[:'repository_version']
84
+ end
85
+
86
+ if attributes.key?(:'repository')
87
+ self.repository = attributes[:'repository']
88
+ end
89
+
90
+ if attributes.key?(:'distributions')
91
+ if (value = attributes[:'distributions']).is_a?(Array)
92
+ self.distributions = value
93
+ end
94
+ end
95
+ end
96
+
97
+ # Show invalid properties with the reasons. Usually used together with valid?
98
+ # @return Array for valid properties with the reasons
99
+ def list_invalid_properties
100
+ invalid_properties = Array.new
101
+ invalid_properties
102
+ end
103
+
104
+ # Check to see if the all the properties in the model are valid
105
+ # @return true if the model is valid
106
+ def valid?
107
+ true
108
+ end
109
+
110
+ # Checks equality by comparing each attribute.
111
+ # @param [Object] Object to be compared
112
+ def ==(o)
113
+ return true if self.equal?(o)
114
+ self.class == o.class &&
115
+ pulp_href == o.pulp_href &&
116
+ pulp_created == o.pulp_created &&
117
+ repository_version == o.repository_version &&
118
+ repository == o.repository &&
119
+ distributions == o.distributions
120
+ end
121
+
122
+ # @see the `==` method
123
+ # @param [Object] Object to be compared
124
+ def eql?(o)
125
+ self == o
126
+ end
127
+
128
+ # Calculates hash code according to all attributes.
129
+ # @return [Integer] Hash code
130
+ def hash
131
+ [pulp_href, pulp_created, repository_version, repository, distributions].hash
132
+ end
133
+
134
+ # Builds the object from hash
135
+ # @param [Hash] attributes Model attributes in the form of hash
136
+ # @return [Object] Returns the model itself
137
+ def self.build_from_hash(attributes)
138
+ new.build_from_hash(attributes)
139
+ end
140
+
141
+ # Builds the object from hash
142
+ # @param [Hash] attributes Model attributes in the form of hash
143
+ # @return [Object] Returns the model itself
144
+ def build_from_hash(attributes)
145
+ return nil unless attributes.is_a?(Hash)
146
+ self.class.openapi_types.each_pair do |key, type|
147
+ if type =~ /\AArray<(.*)>/i
148
+ # check to ensure the input is an array given that the attribute
149
+ # is documented as an array but the input is not
150
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
151
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
152
+ end
153
+ elsif !attributes[self.class.attribute_map[key]].nil?
154
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
155
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
156
+ end
157
+
158
+ self
159
+ end
160
+
161
+ # Deserializes the data based on type
162
+ # @param string type Data type
163
+ # @param string value Value to be deserialized
164
+ # @return [Object] Deserialized data
165
+ def _deserialize(type, value)
166
+ case type.to_sym
167
+ when :DateTime
168
+ DateTime.parse(value)
169
+ when :Date
170
+ Date.parse(value)
171
+ when :String
172
+ value.to_s
173
+ when :Integer
174
+ value.to_i
175
+ when :Float
176
+ value.to_f
177
+ when :Boolean
178
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
179
+ true
180
+ else
181
+ false
182
+ end
183
+ when :Object
184
+ # generic object (usually a Hash), return directly
185
+ value
186
+ when /\AArray<(?<inner_type>.+)>\z/
187
+ inner_type = Regexp.last_match[:inner_type]
188
+ value.map { |v| _deserialize(inner_type, v) }
189
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
190
+ k_type = Regexp.last_match[:k_type]
191
+ v_type = Regexp.last_match[:v_type]
192
+ {}.tap do |hash|
193
+ value.each do |k, v|
194
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
195
+ end
196
+ end
197
+ else # model
198
+ PulpPythonClient.const_get(type).build_from_hash(value)
199
+ end
200
+ end
201
+
202
+ # Returns the string representation of the object
203
+ # @return [String] String presentation of the object
204
+ def to_s
205
+ to_hash.to_s
206
+ end
207
+
208
+ # to_body is an alias to to_hash (backward compatibility)
209
+ # @return [Hash] Returns the object in the form of hash
210
+ def to_body
211
+ to_hash
212
+ end
213
+
214
+ # Returns the object in the form of hash
215
+ # @return [Hash] Returns the object in the form of hash
216
+ def to_hash
217
+ hash = {}
218
+ self.class.attribute_map.each_pair do |attr, param|
219
+ value = self.send(attr)
220
+ if value.nil?
221
+ is_nullable = self.class.openapi_nullable.include?(attr)
222
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
223
+ end
224
+
225
+ hash[param] = _to_hash(value)
226
+ end
227
+ hash
228
+ end
229
+
230
+ # Outputs non-array value in the form of hash
231
+ # For object, use to_hash. Otherwise, just return the value
232
+ # @param [Object] value Any valid value
233
+ # @return [Hash] Returns the value in the form of hash
234
+ def _to_hash(value)
235
+ if value.is_a?(Array)
236
+ value.compact.map { |v| _to_hash(v) }
237
+ elsif value.is_a?(Hash)
238
+ {}.tap do |hash|
239
+ value.each { |k, v| hash[k] = _to_hash(v) }
240
+ end
241
+ elsif value.respond_to? :to_hash
242
+ value.to_hash
243
+ else
244
+ value
245
+ end
246
+ end
247
+ end
248
+ end
@@ -1,10 +1,10 @@
1
1
  =begin
2
2
  #Pulp 3 API
3
3
 
4
- #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ #Fetch, Upload, Organize, and Distribute Software Packages
5
5
 
6
6
  The version of the OpenAPI document: v3
7
-
7
+ Contact: pulp-list@redhat.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 4.2.3
10
10
 
@@ -13,22 +13,18 @@ OpenAPI Generator version: 4.2.3
13
13
  require 'date'
14
14
 
15
15
  module PulpPythonClient
16
+ # A Serializer for PythonRemote.
16
17
  class PythonPythonRemote
17
- attr_accessor :pulp_href
18
-
19
- # Timestamp of creation.
20
- attr_accessor :pulp_created
21
-
22
18
  # A unique name for this remote.
23
19
  attr_accessor :name
24
20
 
25
21
  # The URL of an external content source.
26
22
  attr_accessor :url
27
23
 
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.
24
+ # A PEM encoded CA certificate used to validate the server certificate presented by the remote server.
29
25
  attr_accessor :ca_cert
30
26
 
31
- # A string containing the PEM encoded client certificate used for authentication. All new line characters must be escaped.
27
+ # A PEM encoded client certificate used for authentication.
32
28
  attr_accessor :client_cert
33
29
 
34
30
  # A PEM encoded private key used for authentication.
@@ -46,9 +42,6 @@ module PulpPythonClient
46
42
  # The password to be used for authentication when syncing.
47
43
  attr_accessor :password
48
44
 
49
- # Timestamp of the most recent update of the remote.
50
- attr_accessor :pulp_last_updated
51
-
52
45
  # Total number of simultaneous connections.
53
46
  attr_accessor :download_concurrency
54
47
 
@@ -64,33 +57,9 @@ module PulpPythonClient
64
57
  # Whether or not to include pre-release packages in the sync.
65
58
  attr_accessor :prereleases
66
59
 
67
- class EnumAttributeValidator
68
- attr_reader :datatype
69
- attr_reader :allowable_values
70
-
71
- def initialize(datatype, allowable_values)
72
- @allowable_values = allowable_values.map do |value|
73
- case datatype.to_s
74
- when /Integer/i
75
- value.to_i
76
- when /Float/i
77
- value.to_f
78
- else
79
- value
80
- end
81
- end
82
- end
83
-
84
- def valid?(value)
85
- !value || allowable_values.include?(value)
86
- end
87
- end
88
-
89
60
  # Attribute mapping from ruby-style variable name to JSON key.
90
61
  def self.attribute_map
91
62
  {
92
- :'pulp_href' => :'pulp_href',
93
- :'pulp_created' => :'pulp_created',
94
63
  :'name' => :'name',
95
64
  :'url' => :'url',
96
65
  :'ca_cert' => :'ca_cert',
@@ -100,7 +69,6 @@ module PulpPythonClient
100
69
  :'proxy_url' => :'proxy_url',
101
70
  :'username' => :'username',
102
71
  :'password' => :'password',
103
- :'pulp_last_updated' => :'pulp_last_updated',
104
72
  :'download_concurrency' => :'download_concurrency',
105
73
  :'policy' => :'policy',
106
74
  :'includes' => :'includes',
@@ -112,8 +80,6 @@ module PulpPythonClient
112
80
  # Attribute type mapping.
113
81
  def self.openapi_types
114
82
  {
115
- :'pulp_href' => :'String',
116
- :'pulp_created' => :'DateTime',
117
83
  :'name' => :'String',
118
84
  :'url' => :'String',
119
85
  :'ca_cert' => :'String',
@@ -123,9 +89,8 @@ module PulpPythonClient
123
89
  :'proxy_url' => :'String',
124
90
  :'username' => :'String',
125
91
  :'password' => :'String',
126
- :'pulp_last_updated' => :'DateTime',
127
92
  :'download_concurrency' => :'Integer',
128
- :'policy' => :'String',
93
+ :'policy' => :'PolicyEnum',
129
94
  :'includes' => :'Object',
130
95
  :'excludes' => :'Object',
131
96
  :'prereleases' => :'Boolean'
@@ -159,14 +124,6 @@ module PulpPythonClient
159
124
  h[k.to_sym] = v
160
125
  }
161
126
 
162
- if attributes.key?(:'pulp_href')
163
- self.pulp_href = attributes[:'pulp_href']
164
- end
165
-
166
- if attributes.key?(:'pulp_created')
167
- self.pulp_created = attributes[:'pulp_created']
168
- end
169
-
170
127
  if attributes.key?(:'name')
171
128
  self.name = attributes[:'name']
172
129
  end
@@ -203,18 +160,12 @@ module PulpPythonClient
203
160
  self.password = attributes[:'password']
204
161
  end
205
162
 
206
- if attributes.key?(:'pulp_last_updated')
207
- self.pulp_last_updated = attributes[:'pulp_last_updated']
208
- end
209
-
210
163
  if attributes.key?(:'download_concurrency')
211
164
  self.download_concurrency = attributes[:'download_concurrency']
212
165
  end
213
166
 
214
167
  if attributes.key?(:'policy')
215
168
  self.policy = attributes[:'policy']
216
- else
217
- self.policy = 'immediate'
218
169
  end
219
170
 
220
171
  if attributes.key?(:'includes')
@@ -238,42 +189,10 @@ module PulpPythonClient
238
189
  invalid_properties.push('invalid value for "name", name cannot be nil.')
239
190
  end
240
191
 
241
- if @name.to_s.length < 1
242
- invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
243
- end
244
-
245
192
  if @url.nil?
246
193
  invalid_properties.push('invalid value for "url", url cannot be nil.')
247
194
  end
248
195
 
249
- if @url.to_s.length < 1
250
- invalid_properties.push('invalid value for "url", the character length must be great than or equal to 1.')
251
- end
252
-
253
- if !@ca_cert.nil? && @ca_cert.to_s.length < 1
254
- invalid_properties.push('invalid value for "ca_cert", the character length must be great than or equal to 1.')
255
- end
256
-
257
- if !@client_cert.nil? && @client_cert.to_s.length < 1
258
- invalid_properties.push('invalid value for "client_cert", the character length must be great than or equal to 1.')
259
- end
260
-
261
- if !@client_key.nil? && @client_key.to_s.length < 1
262
- invalid_properties.push('invalid value for "client_key", the character length must be great than or equal to 1.')
263
- end
264
-
265
- if !@proxy_url.nil? && @proxy_url.to_s.length < 1
266
- invalid_properties.push('invalid value for "proxy_url", the character length must be great than or equal to 1.')
267
- end
268
-
269
- if !@username.nil? && @username.to_s.length < 1
270
- invalid_properties.push('invalid value for "username", the character length must be great than or equal to 1.')
271
- end
272
-
273
- if !@password.nil? && @password.to_s.length < 1
274
- invalid_properties.push('invalid value for "password", the character length must be great than or equal to 1.')
275
- end
276
-
277
196
  if !@download_concurrency.nil? && @download_concurrency < 1
278
197
  invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
279
198
  end
@@ -285,109 +204,11 @@ module PulpPythonClient
285
204
  # @return true if the model is valid
286
205
  def valid?
287
206
  return false if @name.nil?
288
- return false if @name.to_s.length < 1
289
207
  return false if @url.nil?
290
- return false if @url.to_s.length < 1
291
- return false if !@ca_cert.nil? && @ca_cert.to_s.length < 1
292
- return false if !@client_cert.nil? && @client_cert.to_s.length < 1
293
- return false if !@client_key.nil? && @client_key.to_s.length < 1
294
- return false if !@proxy_url.nil? && @proxy_url.to_s.length < 1
295
- return false if !@username.nil? && @username.to_s.length < 1
296
- return false if !@password.nil? && @password.to_s.length < 1
297
208
  return false if !@download_concurrency.nil? && @download_concurrency < 1
298
- policy_validator = EnumAttributeValidator.new('String', ["immediate", "on_demand", "streamed"])
299
- return false unless policy_validator.valid?(@policy)
300
209
  true
301
210
  end
302
211
 
303
- # Custom attribute writer method with validation
304
- # @param [Object] name Value to be assigned
305
- def name=(name)
306
- if name.nil?
307
- fail ArgumentError, 'name cannot be nil'
308
- end
309
-
310
- if name.to_s.length < 1
311
- fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
312
- end
313
-
314
- @name = name
315
- end
316
-
317
- # Custom attribute writer method with validation
318
- # @param [Object] url Value to be assigned
319
- def url=(url)
320
- if url.nil?
321
- fail ArgumentError, 'url cannot be nil'
322
- end
323
-
324
- if url.to_s.length < 1
325
- fail ArgumentError, 'invalid value for "url", the character length must be great than or equal to 1.'
326
- end
327
-
328
- @url = url
329
- end
330
-
331
- # Custom attribute writer method with validation
332
- # @param [Object] ca_cert Value to be assigned
333
- def ca_cert=(ca_cert)
334
- if !ca_cert.nil? && ca_cert.to_s.length < 1
335
- fail ArgumentError, 'invalid value for "ca_cert", the character length must be great than or equal to 1.'
336
- end
337
-
338
- @ca_cert = ca_cert
339
- end
340
-
341
- # Custom attribute writer method with validation
342
- # @param [Object] client_cert Value to be assigned
343
- def client_cert=(client_cert)
344
- if !client_cert.nil? && client_cert.to_s.length < 1
345
- fail ArgumentError, 'invalid value for "client_cert", the character length must be great than or equal to 1.'
346
- end
347
-
348
- @client_cert = client_cert
349
- end
350
-
351
- # Custom attribute writer method with validation
352
- # @param [Object] client_key Value to be assigned
353
- def client_key=(client_key)
354
- if !client_key.nil? && client_key.to_s.length < 1
355
- fail ArgumentError, 'invalid value for "client_key", the character length must be great than or equal to 1.'
356
- end
357
-
358
- @client_key = client_key
359
- end
360
-
361
- # Custom attribute writer method with validation
362
- # @param [Object] proxy_url Value to be assigned
363
- def proxy_url=(proxy_url)
364
- if !proxy_url.nil? && proxy_url.to_s.length < 1
365
- fail ArgumentError, 'invalid value for "proxy_url", the character length must be great than or equal to 1.'
366
- end
367
-
368
- @proxy_url = proxy_url
369
- end
370
-
371
- # Custom attribute writer method with validation
372
- # @param [Object] username Value to be assigned
373
- def username=(username)
374
- if !username.nil? && username.to_s.length < 1
375
- fail ArgumentError, 'invalid value for "username", the character length must be great than or equal to 1.'
376
- end
377
-
378
- @username = username
379
- end
380
-
381
- # Custom attribute writer method with validation
382
- # @param [Object] password Value to be assigned
383
- def password=(password)
384
- if !password.nil? && password.to_s.length < 1
385
- fail ArgumentError, 'invalid value for "password", the character length must be great than or equal to 1.'
386
- end
387
-
388
- @password = password
389
- end
390
-
391
212
  # Custom attribute writer method with validation
392
213
  # @param [Object] download_concurrency Value to be assigned
393
214
  def download_concurrency=(download_concurrency)
@@ -398,23 +219,11 @@ module PulpPythonClient
398
219
  @download_concurrency = download_concurrency
399
220
  end
400
221
 
401
- # Custom attribute writer method checking allowed values (enum).
402
- # @param [Object] policy Object to be assigned
403
- def policy=(policy)
404
- validator = EnumAttributeValidator.new('String', ["immediate", "on_demand", "streamed"])
405
- unless validator.valid?(policy)
406
- fail ArgumentError, "invalid value for \"policy\", must be one of #{validator.allowable_values}."
407
- end
408
- @policy = policy
409
- end
410
-
411
222
  # Checks equality by comparing each attribute.
412
223
  # @param [Object] Object to be compared
413
224
  def ==(o)
414
225
  return true if self.equal?(o)
415
226
  self.class == o.class &&
416
- pulp_href == o.pulp_href &&
417
- pulp_created == o.pulp_created &&
418
227
  name == o.name &&
419
228
  url == o.url &&
420
229
  ca_cert == o.ca_cert &&
@@ -424,7 +233,6 @@ module PulpPythonClient
424
233
  proxy_url == o.proxy_url &&
425
234
  username == o.username &&
426
235
  password == o.password &&
427
- pulp_last_updated == o.pulp_last_updated &&
428
236
  download_concurrency == o.download_concurrency &&
429
237
  policy == o.policy &&
430
238
  includes == o.includes &&
@@ -441,7 +249,7 @@ module PulpPythonClient
441
249
  # Calculates hash code according to all attributes.
442
250
  # @return [Integer] Hash code
443
251
  def hash
444
- [pulp_href, pulp_created, name, url, ca_cert, client_cert, client_key, tls_validation, proxy_url, username, password, pulp_last_updated, download_concurrency, policy, includes, excludes, prereleases].hash
252
+ [name, url, ca_cert, client_cert, client_key, tls_validation, proxy_url, username, password, download_concurrency, policy, includes, excludes, prereleases].hash
445
253
  end
446
254
 
447
255
  # Builds the object from hash