pulp_maven_client 0.1.0b2 → 0.1.0b3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +22 -22
  3. data/docs/{ContentApi.md → ContentArtifactApi.md} +29 -23
  4. data/docs/{DistributionsApi.md → DistributionsMavenApi.md} +47 -41
  5. data/docs/InlineResponse200.md +3 -3
  6. data/docs/InlineResponse2001.md +3 -3
  7. data/docs/InlineResponse2002.md +3 -3
  8. data/docs/MavenRemote.md +3 -5
  9. data/docs/{RemotesApi.md → RemotesMavenApi.md} +47 -41
  10. data/git_push.sh +10 -7
  11. data/lib/pulp_maven_client/api/{content_api.rb → content_artifact_api.rb} +33 -27
  12. data/lib/pulp_maven_client/api/{distributions_api.rb → distributions_maven_api.rb} +56 -50
  13. data/lib/pulp_maven_client/api/{remotes_api.rb → remotes_maven_api.rb} +56 -50
  14. data/lib/pulp_maven_client/api_client.rb +77 -62
  15. data/lib/pulp_maven_client/api_error.rb +1 -1
  16. data/lib/pulp_maven_client/configuration.rb +13 -21
  17. data/lib/pulp_maven_client/models/async_operation_response.rb +1 -1
  18. data/lib/pulp_maven_client/models/inline_response200.rb +11 -11
  19. data/lib/pulp_maven_client/models/inline_response2001.rb +11 -11
  20. data/lib/pulp_maven_client/models/inline_response2002.rb +11 -11
  21. data/lib/pulp_maven_client/models/maven_artifact.rb +1 -1
  22. data/lib/pulp_maven_client/models/maven_distribution.rb +1 -1
  23. data/lib/pulp_maven_client/models/maven_remote.rb +7 -17
  24. data/lib/pulp_maven_client/version.rb +2 -2
  25. data/lib/pulp_maven_client.rb +4 -4
  26. data/pulp_maven_client.gemspec +3 -9
  27. data/spec/api/{content_api_spec.rb → content_artifact_api_spec.rb} +17 -15
  28. data/spec/api/{distributions_api_spec.rb → distributions_maven_api_spec.rb} +23 -21
  29. data/spec/api/{remotes_api_spec.rb → remotes_maven_api_spec.rb} +23 -21
  30. data/spec/api_client_spec.rb +1 -39
  31. data/spec/configuration_spec.rb +1 -1
  32. data/spec/models/async_operation_response_spec.rb +1 -1
  33. data/spec/models/inline_response2001_spec.rb +4 -4
  34. data/spec/models/inline_response2002_spec.rb +4 -4
  35. data/spec/models/inline_response200_spec.rb +4 -4
  36. data/spec/models/maven_artifact_spec.rb +1 -1
  37. data/spec/models/maven_distribution_spec.rb +1 -1
  38. data/spec/models/maven_remote_spec.rb +2 -8
  39. data/spec/spec_helper.rb +1 -1
  40. metadata +18 -145
  41. data/Gemfile.lock +0 -79
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v3
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.1-SNAPSHOT
9
+ OpenAPI Generator version: 4.1.3-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -14,8 +14,7 @@ require 'date'
14
14
  require 'json'
15
15
  require 'logger'
16
16
  require 'tempfile'
17
- require 'typhoeus'
18
- require 'uri'
17
+ require 'faraday'
19
18
 
20
19
  module PulpMavenClient
21
20
  class ApiClient
@@ -47,26 +46,46 @@ module PulpMavenClient
47
46
  # @return [Array<(Object, Integer, Hash)>] an array of 3 elements:
48
47
  # the data deserialized from response body (could be nil), response status code and response headers.
49
48
  def call_api(http_method, path, opts = {})
50
- request = build_request(http_method, path, opts)
51
- response = request.run
49
+ ssl_options = {
50
+ :ca_file => @config.ssl_ca_file,
51
+ :verify => @config.ssl_verify,
52
+ :verify_mode => @config.ssl_verify_mode,
53
+ :client_cert => @config.ssl_client_cert,
54
+ :client_key => @config.ssl_client_key
55
+ }
52
56
 
53
- if @config.debugging
54
- @config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n"
57
+ connection = Faraday.new(:url => config.base_url, :ssl => ssl_options) do |conn|
58
+ conn.basic_auth(config.username, config.password)
59
+ if opts[:header_params]["Content-Type"] == "multipart/form-data"
60
+ conn.request :multipart
61
+ conn.request :url_encoded
62
+ end
63
+ conn.adapter(Faraday.default_adapter)
55
64
  end
56
65
 
57
- unless response.success?
58
- if response.timed_out?
59
- fail ApiError.new('Connection timed out')
60
- elsif response.code == 0
61
- # Errors from libcurl will be made visible here
62
- fail ApiError.new(:code => 0,
63
- :message => response.return_message)
64
- else
65
- fail ApiError.new(:code => response.code,
66
- :response_headers => response.headers,
67
- :response_body => response.body),
68
- response.status_message
66
+ begin
67
+ response = connection.public_send(http_method.to_sym.downcase) do |req|
68
+ build_request(http_method, path, req, opts)
69
+ end
70
+
71
+ if @config.debugging
72
+ @config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n"
73
+ end
74
+
75
+ unless response.success?
76
+ if response.status == 0
77
+ # Errors from libcurl will be made visible here
78
+ fail ApiError.new(:code => 0,
79
+ :message => response.return_message)
80
+ else
81
+ fail ApiError.new(:code => response.status,
82
+ :response_headers => response.headers,
83
+ :response_body => response.body),
84
+ response.reason_phrase
85
+ end
69
86
  end
87
+ rescue Faraday::TimeoutError
88
+ fail ApiError.new('Connection timed out')
70
89
  end
71
90
 
72
91
  if opts[:return_type]
@@ -74,7 +93,7 @@ module PulpMavenClient
74
93
  else
75
94
  data = nil
76
95
  end
77
- return data, response.code, response.headers
96
+ return data, response.status, response.headers
78
97
  end
79
98
 
80
99
  # Builds the HTTP request
@@ -86,7 +105,7 @@ module PulpMavenClient
86
105
  # @option opts [Hash] :form_params Query parameters
87
106
  # @option opts [Object] :body HTTP body (JSON/XML)
88
107
  # @return [Typhoeus::Request] A Typhoeus Request
89
- def build_request(http_method, path, opts = {})
108
+ def build_request(http_method, path, request, opts = {})
90
109
  url = build_request_url(path)
91
110
  http_method = http_method.to_sym.downcase
92
111
 
@@ -96,25 +115,15 @@ module PulpMavenClient
96
115
 
97
116
  update_params_for_auth! header_params, query_params, opts[:auth_names]
98
117
 
99
- # set ssl_verifyhosts option based on @config.verify_ssl_host (true/false)
100
- _verify_ssl_host = @config.verify_ssl_host ? 2 : 0
101
-
102
118
  req_opts = {
103
119
  :method => http_method,
104
120
  :headers => header_params,
105
121
  :params => query_params,
106
122
  :params_encoding => @config.params_encoding,
107
123
  :timeout => @config.timeout,
108
- :ssl_verifypeer => @config.verify_ssl,
109
- :ssl_verifyhost => _verify_ssl_host,
110
- :sslcert => @config.cert_file,
111
- :sslkey => @config.key_file,
112
124
  :verbose => @config.debugging
113
125
  }
114
126
 
115
- # set custom cert, if provided
116
- req_opts[:cainfo] = @config.ssl_ca_cert if @config.ssl_ca_cert
117
-
118
127
  if [:post, :patch, :put, :delete].include?(http_method)
119
128
  req_body = build_request_body(header_params, form_params, opts[:body])
120
129
  req_opts.update :body => req_body
@@ -122,12 +131,46 @@ module PulpMavenClient
122
131
  @config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n"
123
132
  end
124
133
  end
125
-
126
- request = Typhoeus::Request.new(url, req_opts)
134
+ request.headers = header_params
135
+ request.body = req_body
136
+ request.url url
137
+ request.params = query_params
127
138
  download_file(request) if opts[:return_type] == 'File'
128
139
  request
129
140
  end
130
141
 
142
+ # Builds the HTTP request body
143
+ #
144
+ # @param [Hash] header_params Header parameters
145
+ # @param [Hash] form_params Query parameters
146
+ # @param [Object] body HTTP body (JSON/XML)
147
+ # @return [String] HTTP body data in the form of string
148
+ def build_request_body(header_params, form_params, body)
149
+ # http form
150
+ if header_params['Content-Type'] == 'application/x-www-form-urlencoded'
151
+ data = URI.encode_www_form(form_params)
152
+ elsif header_params['Content-Type'] == 'multipart/form-data'
153
+ data = {}
154
+ form_params.each do |key, value|
155
+ case value
156
+ when ::File, ::Tempfile
157
+ # TODO hardcode to application/octet-stream, need better way to detect content type
158
+ data[key] = Faraday::UploadIO.new(value.path, 'application/octet-stream', value.path)
159
+ when ::Array, nil
160
+ # let Faraday handle Array and nil parameters
161
+ data[key] = value
162
+ else
163
+ data[key] = value.to_s
164
+ end
165
+ end
166
+ elsif body
167
+ data = body.is_a?(String) ? body : body.to_json
168
+ else
169
+ data = nil
170
+ end
171
+ data
172
+ end
173
+
131
174
  # Check if the given MIME is a JSON MIME.
132
175
  # JSON MIME examples:
133
176
  # application/json
@@ -262,35 +305,7 @@ module PulpMavenClient
262
305
  def build_request_url(path)
263
306
  # Add leading and trailing slashes to path
264
307
  path = "/#{path}".gsub(/\/+/, '/')
265
- URI.encode(@config.base_url + path)
266
- end
267
-
268
- # Builds the HTTP request body
269
- #
270
- # @param [Hash] header_params Header parameters
271
- # @param [Hash] form_params Query parameters
272
- # @param [Object] body HTTP body (JSON/XML)
273
- # @return [String] HTTP body data in the form of string
274
- def build_request_body(header_params, form_params, body)
275
- # http form
276
- if header_params['Content-Type'] == 'application/x-www-form-urlencoded' ||
277
- header_params['Content-Type'] == 'multipart/form-data'
278
- data = {}
279
- form_params.each do |key, value|
280
- case value
281
- when ::File, ::Array, nil
282
- # let typhoeus handle File, Array and nil parameters
283
- data[key] = value
284
- else
285
- data[key] = value.to_s
286
- end
287
- end
288
- elsif body
289
- data = body.is_a?(String) ? body : body.to_json
290
- else
291
- data = nil
292
- end
293
- data
308
+ @config.base_url + path
294
309
  end
295
310
 
296
311
  # Update hearder and query params based on authentication settings.
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v3
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.1-SNAPSHOT
9
+ OpenAPI Generator version: 4.1.3-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,12 +6,10 @@
6
6
  The version of the OpenAPI document: v3
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.1-SNAPSHOT
9
+ OpenAPI Generator version: 4.1.3-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
13
- require 'uri'
14
-
15
13
  module PulpMavenClient
16
14
  class Configuration
17
15
  # Defines url scheme
@@ -88,33 +86,28 @@ module PulpMavenClient
88
86
  # @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks.
89
87
  #
90
88
  # @return [true, false]
91
- attr_accessor :verify_ssl
89
+ attr_accessor :ssl_verify
92
90
 
93
91
  ### TLS/SSL setting
94
- # Set this to false to skip verifying SSL host name
95
- # Default to true.
92
+ # Any `OpenSSL::SSL::` constant (see https://ruby-doc.org/stdlib-2.5.1/libdoc/openssl/rdoc/OpenSSL/SSL.html)
96
93
  #
97
94
  # @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks.
98
95
  #
99
- # @return [true, false]
100
- attr_accessor :verify_ssl_host
96
+ attr_accessor :ssl_verify_mode
101
97
 
102
98
  ### TLS/SSL setting
103
99
  # Set this to customize the certificate file to verify the peer.
104
100
  #
105
101
  # @return [String] the path to the certificate file
106
- #
107
- # @see The `cainfo` option of Typhoeus, `--cert` option of libcurl. Related source code:
108
- # https://github.com/typhoeus/typhoeus/blob/master/lib/typhoeus/easy_factory.rb#L145
109
- attr_accessor :ssl_ca_cert
102
+ attr_accessor :ssl_ca_file
110
103
 
111
104
  ### TLS/SSL setting
112
105
  # Client certificate file (for client certificate)
113
- attr_accessor :cert_file
106
+ attr_accessor :ssl_client_cert
114
107
 
115
108
  ### TLS/SSL setting
116
109
  # Client private key file (for client certificate)
117
- attr_accessor :key_file
110
+ attr_accessor :ssl_client_key
118
111
 
119
112
  # Set this to customize parameters encoding of array parameter with multi collectionFormat.
120
113
  # Default to nil.
@@ -135,11 +128,11 @@ module PulpMavenClient
135
128
  @api_key_prefix = {}
136
129
  @timeout = 0
137
130
  @client_side_validation = true
138
- @verify_ssl = true
139
- @verify_ssl_host = true
140
- @params_encoding = nil
141
- @cert_file = nil
142
- @key_file = nil
131
+ @ssl_verify = true
132
+ @ssl_verify_mode = nil
133
+ @ssl_ca_file = nil
134
+ @ssl_client_cert = nil
135
+ @ssl_client_key = nil
143
136
  @debugging = false
144
137
  @inject_format = false
145
138
  @force_ending_format = false
@@ -174,8 +167,7 @@ module PulpMavenClient
174
167
  end
175
168
 
176
169
  def base_url
177
- url = "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '')
178
- URI.encode(url)
170
+ "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '')
179
171
  end
180
172
 
181
173
  # Gets API key (with prefix if set).
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v3
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.1-SNAPSHOT
9
+ OpenAPI Generator version: 4.1.3-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v3
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.1-SNAPSHOT
9
+ OpenAPI Generator version: 4.1.3-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -14,20 +14,20 @@ require 'date'
14
14
 
15
15
  module PulpMavenClient
16
16
  class InlineResponse200
17
+ attr_accessor :count
18
+
17
19
  attr_accessor :_next
18
20
 
19
21
  attr_accessor :previous
20
22
 
21
- attr_accessor :count
22
-
23
23
  attr_accessor :results
24
24
 
25
25
  # Attribute mapping from ruby-style variable name to JSON key.
26
26
  def self.attribute_map
27
27
  {
28
+ :'count' => :'count',
28
29
  :'_next' => :'next',
29
30
  :'previous' => :'previous',
30
- :'count' => :'count',
31
31
  :'results' => :'results'
32
32
  }
33
33
  end
@@ -35,9 +35,9 @@ module PulpMavenClient
35
35
  # Attribute type mapping.
36
36
  def self.openapi_types
37
37
  {
38
+ :'count' => :'Integer',
38
39
  :'_next' => :'String',
39
40
  :'previous' => :'String',
40
- :'count' => :'Integer',
41
41
  :'results' => :'Array<MavenArtifact>'
42
42
  }
43
43
  end
@@ -57,6 +57,10 @@ module PulpMavenClient
57
57
  h[k.to_sym] = v
58
58
  }
59
59
 
60
+ if attributes.key?(:'count')
61
+ self.count = attributes[:'count']
62
+ end
63
+
60
64
  if attributes.key?(:'_next')
61
65
  self._next = attributes[:'_next']
62
66
  end
@@ -65,10 +69,6 @@ module PulpMavenClient
65
69
  self.previous = attributes[:'previous']
66
70
  end
67
71
 
68
- if attributes.key?(:'count')
69
- self.count = attributes[:'count']
70
- end
71
-
72
72
  if attributes.key?(:'results')
73
73
  if (value = attributes[:'results']).is_a?(Array)
74
74
  self.results = value
@@ -104,9 +104,9 @@ module PulpMavenClient
104
104
  def ==(o)
105
105
  return true if self.equal?(o)
106
106
  self.class == o.class &&
107
+ count == o.count &&
107
108
  _next == o._next &&
108
109
  previous == o.previous &&
109
- count == o.count &&
110
110
  results == o.results
111
111
  end
112
112
 
@@ -119,7 +119,7 @@ module PulpMavenClient
119
119
  # Calculates hash code according to all attributes.
120
120
  # @return [Integer] Hash code
121
121
  def hash
122
- [_next, previous, count, results].hash
122
+ [count, _next, previous, results].hash
123
123
  end
124
124
 
125
125
  # Builds the object from hash
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v3
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.1-SNAPSHOT
9
+ OpenAPI Generator version: 4.1.3-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -14,20 +14,20 @@ require 'date'
14
14
 
15
15
  module PulpMavenClient
16
16
  class InlineResponse2001
17
+ attr_accessor :count
18
+
17
19
  attr_accessor :_next
18
20
 
19
21
  attr_accessor :previous
20
22
 
21
- attr_accessor :count
22
-
23
23
  attr_accessor :results
24
24
 
25
25
  # Attribute mapping from ruby-style variable name to JSON key.
26
26
  def self.attribute_map
27
27
  {
28
+ :'count' => :'count',
28
29
  :'_next' => :'next',
29
30
  :'previous' => :'previous',
30
- :'count' => :'count',
31
31
  :'results' => :'results'
32
32
  }
33
33
  end
@@ -35,9 +35,9 @@ module PulpMavenClient
35
35
  # Attribute type mapping.
36
36
  def self.openapi_types
37
37
  {
38
+ :'count' => :'Integer',
38
39
  :'_next' => :'String',
39
40
  :'previous' => :'String',
40
- :'count' => :'Integer',
41
41
  :'results' => :'Array<MavenDistribution>'
42
42
  }
43
43
  end
@@ -57,6 +57,10 @@ module PulpMavenClient
57
57
  h[k.to_sym] = v
58
58
  }
59
59
 
60
+ if attributes.key?(:'count')
61
+ self.count = attributes[:'count']
62
+ end
63
+
60
64
  if attributes.key?(:'_next')
61
65
  self._next = attributes[:'_next']
62
66
  end
@@ -65,10 +69,6 @@ module PulpMavenClient
65
69
  self.previous = attributes[:'previous']
66
70
  end
67
71
 
68
- if attributes.key?(:'count')
69
- self.count = attributes[:'count']
70
- end
71
-
72
72
  if attributes.key?(:'results')
73
73
  if (value = attributes[:'results']).is_a?(Array)
74
74
  self.results = value
@@ -104,9 +104,9 @@ module PulpMavenClient
104
104
  def ==(o)
105
105
  return true if self.equal?(o)
106
106
  self.class == o.class &&
107
+ count == o.count &&
107
108
  _next == o._next &&
108
109
  previous == o.previous &&
109
- count == o.count &&
110
110
  results == o.results
111
111
  end
112
112
 
@@ -119,7 +119,7 @@ module PulpMavenClient
119
119
  # Calculates hash code according to all attributes.
120
120
  # @return [Integer] Hash code
121
121
  def hash
122
- [_next, previous, count, results].hash
122
+ [count, _next, previous, results].hash
123
123
  end
124
124
 
125
125
  # Builds the object from hash
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v3
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.1-SNAPSHOT
9
+ OpenAPI Generator version: 4.1.3-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -14,20 +14,20 @@ require 'date'
14
14
 
15
15
  module PulpMavenClient
16
16
  class InlineResponse2002
17
+ attr_accessor :count
18
+
17
19
  attr_accessor :_next
18
20
 
19
21
  attr_accessor :previous
20
22
 
21
- attr_accessor :count
22
-
23
23
  attr_accessor :results
24
24
 
25
25
  # Attribute mapping from ruby-style variable name to JSON key.
26
26
  def self.attribute_map
27
27
  {
28
+ :'count' => :'count',
28
29
  :'_next' => :'next',
29
30
  :'previous' => :'previous',
30
- :'count' => :'count',
31
31
  :'results' => :'results'
32
32
  }
33
33
  end
@@ -35,9 +35,9 @@ module PulpMavenClient
35
35
  # Attribute type mapping.
36
36
  def self.openapi_types
37
37
  {
38
+ :'count' => :'Integer',
38
39
  :'_next' => :'String',
39
40
  :'previous' => :'String',
40
- :'count' => :'Integer',
41
41
  :'results' => :'Array<MavenRemote>'
42
42
  }
43
43
  end
@@ -57,6 +57,10 @@ module PulpMavenClient
57
57
  h[k.to_sym] = v
58
58
  }
59
59
 
60
+ if attributes.key?(:'count')
61
+ self.count = attributes[:'count']
62
+ end
63
+
60
64
  if attributes.key?(:'_next')
61
65
  self._next = attributes[:'_next']
62
66
  end
@@ -65,10 +69,6 @@ module PulpMavenClient
65
69
  self.previous = attributes[:'previous']
66
70
  end
67
71
 
68
- if attributes.key?(:'count')
69
- self.count = attributes[:'count']
70
- end
71
-
72
72
  if attributes.key?(:'results')
73
73
  if (value = attributes[:'results']).is_a?(Array)
74
74
  self.results = value
@@ -104,9 +104,9 @@ module PulpMavenClient
104
104
  def ==(o)
105
105
  return true if self.equal?(o)
106
106
  self.class == o.class &&
107
+ count == o.count &&
107
108
  _next == o._next &&
108
109
  previous == o.previous &&
109
- count == o.count &&
110
110
  results == o.results
111
111
  end
112
112
 
@@ -119,7 +119,7 @@ module PulpMavenClient
119
119
  # Calculates hash code according to all attributes.
120
120
  # @return [Integer] Hash code
121
121
  def hash
122
- [_next, previous, count, results].hash
122
+ [count, _next, previous, results].hash
123
123
  end
124
124
 
125
125
  # Builds the object from hash
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v3
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.1-SNAPSHOT
9
+ OpenAPI Generator version: 4.1.3-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v3
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.1-SNAPSHOT
9
+ OpenAPI Generator version: 4.1.3-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v3
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.1-SNAPSHOT
9
+ OpenAPI Generator version: 4.1.3-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -27,13 +27,10 @@ module PulpMavenClient
27
27
  # The URL of an external content source.
28
28
  attr_accessor :url
29
29
 
30
- # If True, the plugin will validate imported artifacts.
31
- attr_accessor :validate
32
-
33
- # A PEM encoded CA certificate used to validate the server certificate presented by the remote server. Returns SHA256 sum on GET.
30
+ # 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.
34
31
  attr_accessor :ssl_ca_certificate
35
32
 
36
- # A PEM encoded client certificate used for authentication. Returns SHA256 sum on GET.
33
+ # A string containing the PEM encoded client certificate used for authentication. All new line characters must be escaped. Returns SHA256 sum on GET.
37
34
  attr_accessor :ssl_client_certificate
38
35
 
39
36
  # A PEM encoded private key used for authentication. Returns SHA256 sum on GET.
@@ -57,7 +54,7 @@ module PulpMavenClient
57
54
  # Total number of simultaneous connections.
58
55
  attr_accessor :download_concurrency
59
56
 
60
- # The policy to use when downloading content. The possible values include: 'immediate', 'on_demand', and 'cache_only'. 'immediate' is the default.
57
+ # The policy to use when downloading content.
61
58
  attr_accessor :policy
62
59
 
63
60
  class EnumAttributeValidator
@@ -90,7 +87,6 @@ module PulpMavenClient
90
87
  :'_type' => :'_type',
91
88
  :'name' => :'name',
92
89
  :'url' => :'url',
93
- :'validate' => :'validate',
94
90
  :'ssl_ca_certificate' => :'ssl_ca_certificate',
95
91
  :'ssl_client_certificate' => :'ssl_client_certificate',
96
92
  :'ssl_client_key' => :'ssl_client_key',
@@ -112,7 +108,6 @@ module PulpMavenClient
112
108
  :'_type' => :'String',
113
109
  :'name' => :'String',
114
110
  :'url' => :'String',
115
- :'validate' => :'Boolean',
116
111
  :'ssl_ca_certificate' => :'String',
117
112
  :'ssl_client_certificate' => :'String',
118
113
  :'ssl_client_key' => :'String',
@@ -161,10 +156,6 @@ module PulpMavenClient
161
156
  self.url = attributes[:'url']
162
157
  end
163
158
 
164
- if attributes.key?(:'validate')
165
- self.validate = attributes[:'validate']
166
- end
167
-
168
159
  if attributes.key?(:'ssl_ca_certificate')
169
160
  self.ssl_ca_certificate = attributes[:'ssl_ca_certificate']
170
161
  end
@@ -278,7 +269,7 @@ module PulpMavenClient
278
269
  return false if !@username.nil? && @username.to_s.length < 1
279
270
  return false if !@password.nil? && @password.to_s.length < 1
280
271
  return false if !@download_concurrency.nil? && @download_concurrency < 1
281
- policy_validator = EnumAttributeValidator.new('String', ["immediate", "on_demand", "streamed"])
272
+ policy_validator = EnumAttributeValidator.new('String', ["immediate", "When syncing, download all metadata and content now."])
282
273
  return false unless policy_validator.valid?(@policy)
283
274
  true
284
275
  end
@@ -394,7 +385,7 @@ module PulpMavenClient
394
385
  # Custom attribute writer method checking allowed values (enum).
395
386
  # @param [Object] policy Object to be assigned
396
387
  def policy=(policy)
397
- validator = EnumAttributeValidator.new('String', ["immediate", "on_demand", "streamed"])
388
+ validator = EnumAttributeValidator.new('String', ["immediate", "When syncing, download all metadata and content now."])
398
389
  unless validator.valid?(policy)
399
390
  fail ArgumentError, "invalid value for \"policy\", must be one of #{validator.allowable_values}."
400
391
  end
@@ -411,7 +402,6 @@ module PulpMavenClient
411
402
  _type == o._type &&
412
403
  name == o.name &&
413
404
  url == o.url &&
414
- validate == o.validate &&
415
405
  ssl_ca_certificate == o.ssl_ca_certificate &&
416
406
  ssl_client_certificate == o.ssl_client_certificate &&
417
407
  ssl_client_key == o.ssl_client_key &&
@@ -433,7 +423,7 @@ module PulpMavenClient
433
423
  # Calculates hash code according to all attributes.
434
424
  # @return [Integer] Hash code
435
425
  def hash
436
- [_href, _created, _type, name, url, validate, ssl_ca_certificate, ssl_client_certificate, ssl_client_key, ssl_validation, proxy_url, username, password, _last_updated, download_concurrency, policy].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
437
427
  end
438
428
 
439
429
  # Builds the object from hash