pulp_maven_client 0.19.0 → 0.20.0
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.
- checksums.yaml +4 -4
- data/README.md +11 -4
- data/docs/MavenMavenDistribution.md +3 -1
- data/docs/MavenMavenDistributionResponse.md +3 -1
- data/docs/MavenMavenPublication.md +20 -0
- data/docs/MavenMavenPublicationResponse.md +28 -0
- data/docs/MavenMavenRepository.md +3 -1
- data/docs/MavenMavenRepositoryResponse.md +3 -1
- data/docs/PaginatedmavenMavenPublicationResponseList.md +24 -0
- data/docs/PatchedmavenMavenDistribution.md +3 -1
- data/docs/PatchedmavenMavenRepository.md +3 -1
- data/docs/PublicationsMavenApi.md +350 -0
- data/lib/pulp_maven_client/api/publications_maven_api.rb +356 -0
- data/lib/pulp_maven_client/models/maven_maven_distribution.rb +16 -5
- data/lib/pulp_maven_client/models/maven_maven_distribution_response.rb +16 -5
- data/lib/pulp_maven_client/models/maven_maven_publication.rb +225 -0
- data/lib/pulp_maven_client/models/maven_maven_publication_response.rb +264 -0
- data/lib/pulp_maven_client/models/maven_maven_repository.rb +17 -5
- data/lib/pulp_maven_client/models/maven_maven_repository_response.rb +17 -5
- data/lib/pulp_maven_client/models/paginatedmaven_maven_publication_response_list.rb +257 -0
- data/lib/pulp_maven_client/models/patchedmaven_maven_distribution.rb +16 -5
- data/lib/pulp_maven_client/models/patchedmaven_maven_repository.rb +17 -5
- data/lib/pulp_maven_client/version.rb +1 -1
- data/lib/pulp_maven_client.rb +4 -0
- data/spec/api/publications_maven_api_spec.rb +109 -0
- data/spec/models/maven_maven_distribution_response_spec.rb +6 -0
- data/spec/models/maven_maven_distribution_spec.rb +6 -0
- data/spec/models/maven_maven_publication_response_spec.rb +66 -0
- data/spec/models/maven_maven_publication_spec.rb +42 -0
- data/spec/models/maven_maven_repository_response_spec.rb +6 -0
- data/spec/models/maven_maven_repository_spec.rb +6 -0
- data/spec/models/paginatedmaven_maven_publication_response_list_spec.rb +54 -0
- data/spec/models/patchedmaven_maven_distribution_spec.rb +6 -0
- data/spec/models/patchedmaven_maven_repository_spec.rb +6 -0
- metadata +18 -2
|
@@ -0,0 +1,225 @@
|
|
|
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
|
+
Generator version: 7.10.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module PulpMavenClient
|
|
17
|
+
# Serializer for Maven Publications.
|
|
18
|
+
class MavenMavenPublication
|
|
19
|
+
attr_accessor :repository_version
|
|
20
|
+
|
|
21
|
+
# A URI of the repository to be published.
|
|
22
|
+
attr_accessor :repository
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'repository_version' => :'repository_version',
|
|
28
|
+
:'repository' => :'repository'
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns all the JSON keys this model knows about
|
|
33
|
+
def self.acceptable_attributes
|
|
34
|
+
attribute_map.values
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Attribute type mapping.
|
|
38
|
+
def self.openapi_types
|
|
39
|
+
{
|
|
40
|
+
:'repository_version' => :'String',
|
|
41
|
+
:'repository' => :'String'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# List of attributes with nullable: true
|
|
46
|
+
def self.openapi_nullable
|
|
47
|
+
Set.new([
|
|
48
|
+
])
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Initializes the object
|
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
if (!attributes.is_a?(Hash))
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpMavenClient::MavenMavenPublication` initialize method"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
60
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpMavenClient::MavenMavenPublication`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
62
|
+
end
|
|
63
|
+
h[k.to_sym] = v
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if attributes.key?(:'repository_version')
|
|
67
|
+
self.repository_version = attributes[:'repository_version']
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
if attributes.key?(:'repository')
|
|
71
|
+
self.repository = attributes[:'repository']
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
76
|
+
# @return Array for valid properties with the reasons
|
|
77
|
+
def list_invalid_properties
|
|
78
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
79
|
+
invalid_properties = Array.new
|
|
80
|
+
invalid_properties
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Check to see if the all the properties in the model are valid
|
|
84
|
+
# @return true if the model is valid
|
|
85
|
+
def valid?
|
|
86
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
87
|
+
true
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Checks equality by comparing each attribute.
|
|
91
|
+
# @param [Object] Object to be compared
|
|
92
|
+
def ==(o)
|
|
93
|
+
return true if self.equal?(o)
|
|
94
|
+
self.class == o.class &&
|
|
95
|
+
repository_version == o.repository_version &&
|
|
96
|
+
repository == o.repository
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# @see the `==` method
|
|
100
|
+
# @param [Object] Object to be compared
|
|
101
|
+
def eql?(o)
|
|
102
|
+
self == o
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Calculates hash code according to all attributes.
|
|
106
|
+
# @return [Integer] Hash code
|
|
107
|
+
def hash
|
|
108
|
+
[repository_version, repository].hash
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Builds the object from hash
|
|
112
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
113
|
+
# @return [Object] Returns the model itself
|
|
114
|
+
def self.build_from_hash(attributes)
|
|
115
|
+
return nil unless attributes.is_a?(Hash)
|
|
116
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
117
|
+
transformed_hash = {}
|
|
118
|
+
openapi_types.each_pair do |key, type|
|
|
119
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
120
|
+
transformed_hash["#{key}"] = nil
|
|
121
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
122
|
+
# check to ensure the input is an array given that the attribute
|
|
123
|
+
# is documented as an array but the input is not
|
|
124
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
125
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
126
|
+
end
|
|
127
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
128
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
new(transformed_hash)
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Deserializes the data based on type
|
|
135
|
+
# @param string type Data type
|
|
136
|
+
# @param string value Value to be deserialized
|
|
137
|
+
# @return [Object] Deserialized data
|
|
138
|
+
def self._deserialize(type, value)
|
|
139
|
+
case type.to_sym
|
|
140
|
+
when :Time
|
|
141
|
+
Time.parse(value)
|
|
142
|
+
when :Date
|
|
143
|
+
Date.parse(value)
|
|
144
|
+
when :String
|
|
145
|
+
value.to_s
|
|
146
|
+
when :Integer
|
|
147
|
+
value.to_i
|
|
148
|
+
when :Float
|
|
149
|
+
value.to_f
|
|
150
|
+
when :Boolean
|
|
151
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
152
|
+
true
|
|
153
|
+
else
|
|
154
|
+
false
|
|
155
|
+
end
|
|
156
|
+
when :Object
|
|
157
|
+
# generic object (usually a Hash), return directly
|
|
158
|
+
value
|
|
159
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
160
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
161
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
162
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
163
|
+
k_type = Regexp.last_match[:k_type]
|
|
164
|
+
v_type = Regexp.last_match[:v_type]
|
|
165
|
+
{}.tap do |hash|
|
|
166
|
+
value.each do |k, v|
|
|
167
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
168
|
+
end
|
|
169
|
+
end
|
|
170
|
+
else # model
|
|
171
|
+
# models (e.g. Pet) or oneOf
|
|
172
|
+
klass = PulpMavenClient.const_get(type)
|
|
173
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
174
|
+
end
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Returns the string representation of the object
|
|
178
|
+
# @return [String] String presentation of the object
|
|
179
|
+
def to_s
|
|
180
|
+
to_hash.to_s
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
184
|
+
# @return [Hash] Returns the object in the form of hash
|
|
185
|
+
def to_body
|
|
186
|
+
to_hash
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Returns the object in the form of hash
|
|
190
|
+
# @return [Hash] Returns the object in the form of hash
|
|
191
|
+
def to_hash
|
|
192
|
+
hash = {}
|
|
193
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
194
|
+
value = self.send(attr)
|
|
195
|
+
if value.nil?
|
|
196
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
197
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
hash[param] = _to_hash(value)
|
|
201
|
+
end
|
|
202
|
+
hash
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# Outputs non-array value in the form of hash
|
|
206
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
207
|
+
# @param [Object] value Any valid value
|
|
208
|
+
# @return [Hash] Returns the value in the form of hash
|
|
209
|
+
def _to_hash(value)
|
|
210
|
+
if value.is_a?(Array)
|
|
211
|
+
value.compact.map { |v| _to_hash(v) }
|
|
212
|
+
elsif value.is_a?(Hash)
|
|
213
|
+
{}.tap do |hash|
|
|
214
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
215
|
+
end
|
|
216
|
+
elsif value.respond_to? :to_hash
|
|
217
|
+
value.to_hash
|
|
218
|
+
else
|
|
219
|
+
value
|
|
220
|
+
end
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
end
|
|
@@ -0,0 +1,264 @@
|
|
|
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
|
+
Generator version: 7.10.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module PulpMavenClient
|
|
17
|
+
# Serializer for Maven Publications.
|
|
18
|
+
class MavenMavenPublicationResponse
|
|
19
|
+
attr_accessor :pulp_href
|
|
20
|
+
|
|
21
|
+
# The Pulp Resource Name (PRN).
|
|
22
|
+
attr_accessor :prn
|
|
23
|
+
|
|
24
|
+
# Timestamp of creation.
|
|
25
|
+
attr_accessor :pulp_created
|
|
26
|
+
|
|
27
|
+
# Timestamp of the last time this resource was updated. Note: for immutable resources - like content, repository versions, and publication - pulp_created and pulp_last_updated dates will be the same.
|
|
28
|
+
attr_accessor :pulp_last_updated
|
|
29
|
+
|
|
30
|
+
attr_accessor :repository_version
|
|
31
|
+
|
|
32
|
+
# A URI of the repository to be published.
|
|
33
|
+
attr_accessor :repository
|
|
34
|
+
|
|
35
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
36
|
+
def self.attribute_map
|
|
37
|
+
{
|
|
38
|
+
:'pulp_href' => :'pulp_href',
|
|
39
|
+
:'prn' => :'prn',
|
|
40
|
+
:'pulp_created' => :'pulp_created',
|
|
41
|
+
:'pulp_last_updated' => :'pulp_last_updated',
|
|
42
|
+
:'repository_version' => :'repository_version',
|
|
43
|
+
:'repository' => :'repository'
|
|
44
|
+
}
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Returns all the JSON keys this model knows about
|
|
48
|
+
def self.acceptable_attributes
|
|
49
|
+
attribute_map.values
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Attribute type mapping.
|
|
53
|
+
def self.openapi_types
|
|
54
|
+
{
|
|
55
|
+
:'pulp_href' => :'String',
|
|
56
|
+
:'prn' => :'String',
|
|
57
|
+
:'pulp_created' => :'Time',
|
|
58
|
+
:'pulp_last_updated' => :'Time',
|
|
59
|
+
:'repository_version' => :'String',
|
|
60
|
+
:'repository' => :'String'
|
|
61
|
+
}
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# List of attributes with nullable: true
|
|
65
|
+
def self.openapi_nullable
|
|
66
|
+
Set.new([
|
|
67
|
+
])
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Initializes the object
|
|
71
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
72
|
+
def initialize(attributes = {})
|
|
73
|
+
if (!attributes.is_a?(Hash))
|
|
74
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpMavenClient::MavenMavenPublicationResponse` initialize method"
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
78
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
79
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
80
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpMavenClient::MavenMavenPublicationResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
81
|
+
end
|
|
82
|
+
h[k.to_sym] = v
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if attributes.key?(:'pulp_href')
|
|
86
|
+
self.pulp_href = attributes[:'pulp_href']
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
if attributes.key?(:'prn')
|
|
90
|
+
self.prn = attributes[:'prn']
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
if attributes.key?(:'pulp_created')
|
|
94
|
+
self.pulp_created = attributes[:'pulp_created']
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
if attributes.key?(:'pulp_last_updated')
|
|
98
|
+
self.pulp_last_updated = attributes[:'pulp_last_updated']
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
if attributes.key?(:'repository_version')
|
|
102
|
+
self.repository_version = attributes[:'repository_version']
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
if attributes.key?(:'repository')
|
|
106
|
+
self.repository = attributes[:'repository']
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
111
|
+
# @return Array for valid properties with the reasons
|
|
112
|
+
def list_invalid_properties
|
|
113
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
114
|
+
invalid_properties = Array.new
|
|
115
|
+
invalid_properties
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Check to see if the all the properties in the model are valid
|
|
119
|
+
# @return true if the model is valid
|
|
120
|
+
def valid?
|
|
121
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
122
|
+
true
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Checks equality by comparing each attribute.
|
|
126
|
+
# @param [Object] Object to be compared
|
|
127
|
+
def ==(o)
|
|
128
|
+
return true if self.equal?(o)
|
|
129
|
+
self.class == o.class &&
|
|
130
|
+
pulp_href == o.pulp_href &&
|
|
131
|
+
prn == o.prn &&
|
|
132
|
+
pulp_created == o.pulp_created &&
|
|
133
|
+
pulp_last_updated == o.pulp_last_updated &&
|
|
134
|
+
repository_version == o.repository_version &&
|
|
135
|
+
repository == o.repository
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# @see the `==` method
|
|
139
|
+
# @param [Object] Object to be compared
|
|
140
|
+
def eql?(o)
|
|
141
|
+
self == o
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Calculates hash code according to all attributes.
|
|
145
|
+
# @return [Integer] Hash code
|
|
146
|
+
def hash
|
|
147
|
+
[pulp_href, prn, pulp_created, pulp_last_updated, repository_version, repository].hash
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Builds the object from hash
|
|
151
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
152
|
+
# @return [Object] Returns the model itself
|
|
153
|
+
def self.build_from_hash(attributes)
|
|
154
|
+
return nil unless attributes.is_a?(Hash)
|
|
155
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
156
|
+
transformed_hash = {}
|
|
157
|
+
openapi_types.each_pair do |key, type|
|
|
158
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
159
|
+
transformed_hash["#{key}"] = nil
|
|
160
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
161
|
+
# check to ensure the input is an array given that the attribute
|
|
162
|
+
# is documented as an array but the input is not
|
|
163
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
164
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
165
|
+
end
|
|
166
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
167
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
168
|
+
end
|
|
169
|
+
end
|
|
170
|
+
new(transformed_hash)
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Deserializes the data based on type
|
|
174
|
+
# @param string type Data type
|
|
175
|
+
# @param string value Value to be deserialized
|
|
176
|
+
# @return [Object] Deserialized data
|
|
177
|
+
def self._deserialize(type, value)
|
|
178
|
+
case type.to_sym
|
|
179
|
+
when :Time
|
|
180
|
+
Time.parse(value)
|
|
181
|
+
when :Date
|
|
182
|
+
Date.parse(value)
|
|
183
|
+
when :String
|
|
184
|
+
value.to_s
|
|
185
|
+
when :Integer
|
|
186
|
+
value.to_i
|
|
187
|
+
when :Float
|
|
188
|
+
value.to_f
|
|
189
|
+
when :Boolean
|
|
190
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
191
|
+
true
|
|
192
|
+
else
|
|
193
|
+
false
|
|
194
|
+
end
|
|
195
|
+
when :Object
|
|
196
|
+
# generic object (usually a Hash), return directly
|
|
197
|
+
value
|
|
198
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
199
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
200
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
201
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
202
|
+
k_type = Regexp.last_match[:k_type]
|
|
203
|
+
v_type = Regexp.last_match[:v_type]
|
|
204
|
+
{}.tap do |hash|
|
|
205
|
+
value.each do |k, v|
|
|
206
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
207
|
+
end
|
|
208
|
+
end
|
|
209
|
+
else # model
|
|
210
|
+
# models (e.g. Pet) or oneOf
|
|
211
|
+
klass = PulpMavenClient.const_get(type)
|
|
212
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
213
|
+
end
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# Returns the string representation of the object
|
|
217
|
+
# @return [String] String presentation of the object
|
|
218
|
+
def to_s
|
|
219
|
+
to_hash.to_s
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
223
|
+
# @return [Hash] Returns the object in the form of hash
|
|
224
|
+
def to_body
|
|
225
|
+
to_hash
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# Returns the object in the form of hash
|
|
229
|
+
# @return [Hash] Returns the object in the form of hash
|
|
230
|
+
def to_hash
|
|
231
|
+
hash = {}
|
|
232
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
233
|
+
value = self.send(attr)
|
|
234
|
+
if value.nil?
|
|
235
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
236
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
hash[param] = _to_hash(value)
|
|
240
|
+
end
|
|
241
|
+
hash
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# Outputs non-array value in the form of hash
|
|
245
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
246
|
+
# @param [Object] value Any valid value
|
|
247
|
+
# @return [Hash] Returns the value in the form of hash
|
|
248
|
+
def _to_hash(value)
|
|
249
|
+
if value.is_a?(Array)
|
|
250
|
+
value.compact.map { |v| _to_hash(v) }
|
|
251
|
+
elsif value.is_a?(Hash)
|
|
252
|
+
{}.tap do |hash|
|
|
253
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
254
|
+
end
|
|
255
|
+
elsif value.respond_to? :to_hash
|
|
256
|
+
value.to_hash
|
|
257
|
+
else
|
|
258
|
+
value
|
|
259
|
+
end
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
end
|
|
@@ -33,6 +33,9 @@ module PulpMavenClient
|
|
|
33
33
|
# An optional remote to use by default when syncing.
|
|
34
34
|
attr_accessor :remote
|
|
35
35
|
|
|
36
|
+
# Whether to automatically create publications for new repository versions, and update any distributions pointing to this repository.
|
|
37
|
+
attr_accessor :autopublish
|
|
38
|
+
|
|
36
39
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
37
40
|
def self.attribute_map
|
|
38
41
|
{
|
|
@@ -41,7 +44,8 @@ module PulpMavenClient
|
|
|
41
44
|
:'description' => :'description',
|
|
42
45
|
:'retain_repo_versions' => :'retain_repo_versions',
|
|
43
46
|
:'retain_checkpoints' => :'retain_checkpoints',
|
|
44
|
-
:'remote' => :'remote'
|
|
47
|
+
:'remote' => :'remote',
|
|
48
|
+
:'autopublish' => :'autopublish'
|
|
45
49
|
}
|
|
46
50
|
end
|
|
47
51
|
|
|
@@ -58,7 +62,8 @@ module PulpMavenClient
|
|
|
58
62
|
:'description' => :'String',
|
|
59
63
|
:'retain_repo_versions' => :'Integer',
|
|
60
64
|
:'retain_checkpoints' => :'Integer',
|
|
61
|
-
:'remote' => :'String'
|
|
65
|
+
:'remote' => :'String',
|
|
66
|
+
:'autopublish' => :'Boolean'
|
|
62
67
|
}
|
|
63
68
|
end
|
|
64
69
|
|
|
@@ -68,7 +73,7 @@ module PulpMavenClient
|
|
|
68
73
|
:'description',
|
|
69
74
|
:'retain_repo_versions',
|
|
70
75
|
:'retain_checkpoints',
|
|
71
|
-
:'remote'
|
|
76
|
+
:'remote',
|
|
72
77
|
])
|
|
73
78
|
end
|
|
74
79
|
|
|
@@ -114,6 +119,12 @@ module PulpMavenClient
|
|
|
114
119
|
if attributes.key?(:'remote')
|
|
115
120
|
self.remote = attributes[:'remote']
|
|
116
121
|
end
|
|
122
|
+
|
|
123
|
+
if attributes.key?(:'autopublish')
|
|
124
|
+
self.autopublish = attributes[:'autopublish']
|
|
125
|
+
else
|
|
126
|
+
self.autopublish = false
|
|
127
|
+
end
|
|
117
128
|
end
|
|
118
129
|
|
|
119
130
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -210,7 +221,8 @@ module PulpMavenClient
|
|
|
210
221
|
description == o.description &&
|
|
211
222
|
retain_repo_versions == o.retain_repo_versions &&
|
|
212
223
|
retain_checkpoints == o.retain_checkpoints &&
|
|
213
|
-
remote == o.remote
|
|
224
|
+
remote == o.remote &&
|
|
225
|
+
autopublish == o.autopublish
|
|
214
226
|
end
|
|
215
227
|
|
|
216
228
|
# @see the `==` method
|
|
@@ -222,7 +234,7 @@ module PulpMavenClient
|
|
|
222
234
|
# Calculates hash code according to all attributes.
|
|
223
235
|
# @return [Integer] Hash code
|
|
224
236
|
def hash
|
|
225
|
-
[pulp_labels, name, description, retain_repo_versions, retain_checkpoints, remote].hash
|
|
237
|
+
[pulp_labels, name, description, retain_repo_versions, retain_checkpoints, remote, autopublish].hash
|
|
226
238
|
end
|
|
227
239
|
|
|
228
240
|
# Builds the object from hash
|
|
@@ -48,6 +48,9 @@ module PulpMavenClient
|
|
|
48
48
|
# An optional remote to use by default when syncing.
|
|
49
49
|
attr_accessor :remote
|
|
50
50
|
|
|
51
|
+
# Whether to automatically create publications for new repository versions, and update any distributions pointing to this repository.
|
|
52
|
+
attr_accessor :autopublish
|
|
53
|
+
|
|
51
54
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
52
55
|
def self.attribute_map
|
|
53
56
|
{
|
|
@@ -62,7 +65,8 @@ module PulpMavenClient
|
|
|
62
65
|
:'description' => :'description',
|
|
63
66
|
:'retain_repo_versions' => :'retain_repo_versions',
|
|
64
67
|
:'retain_checkpoints' => :'retain_checkpoints',
|
|
65
|
-
:'remote' => :'remote'
|
|
68
|
+
:'remote' => :'remote',
|
|
69
|
+
:'autopublish' => :'autopublish'
|
|
66
70
|
}
|
|
67
71
|
end
|
|
68
72
|
|
|
@@ -85,7 +89,8 @@ module PulpMavenClient
|
|
|
85
89
|
:'description' => :'String',
|
|
86
90
|
:'retain_repo_versions' => :'Integer',
|
|
87
91
|
:'retain_checkpoints' => :'Integer',
|
|
88
|
-
:'remote' => :'String'
|
|
92
|
+
:'remote' => :'String',
|
|
93
|
+
:'autopublish' => :'Boolean'
|
|
89
94
|
}
|
|
90
95
|
end
|
|
91
96
|
|
|
@@ -95,7 +100,7 @@ module PulpMavenClient
|
|
|
95
100
|
:'description',
|
|
96
101
|
:'retain_repo_versions',
|
|
97
102
|
:'retain_checkpoints',
|
|
98
|
-
:'remote'
|
|
103
|
+
:'remote',
|
|
99
104
|
])
|
|
100
105
|
end
|
|
101
106
|
|
|
@@ -165,6 +170,12 @@ module PulpMavenClient
|
|
|
165
170
|
if attributes.key?(:'remote')
|
|
166
171
|
self.remote = attributes[:'remote']
|
|
167
172
|
end
|
|
173
|
+
|
|
174
|
+
if attributes.key?(:'autopublish')
|
|
175
|
+
self.autopublish = attributes[:'autopublish']
|
|
176
|
+
else
|
|
177
|
+
self.autopublish = false
|
|
178
|
+
end
|
|
168
179
|
end
|
|
169
180
|
|
|
170
181
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -233,7 +244,8 @@ module PulpMavenClient
|
|
|
233
244
|
description == o.description &&
|
|
234
245
|
retain_repo_versions == o.retain_repo_versions &&
|
|
235
246
|
retain_checkpoints == o.retain_checkpoints &&
|
|
236
|
-
remote == o.remote
|
|
247
|
+
remote == o.remote &&
|
|
248
|
+
autopublish == o.autopublish
|
|
237
249
|
end
|
|
238
250
|
|
|
239
251
|
# @see the `==` method
|
|
@@ -245,7 +257,7 @@ module PulpMavenClient
|
|
|
245
257
|
# Calculates hash code according to all attributes.
|
|
246
258
|
# @return [Integer] Hash code
|
|
247
259
|
def hash
|
|
248
|
-
[pulp_href, prn, pulp_created, pulp_last_updated, versions_href, pulp_labels, latest_version_href, name, description, retain_repo_versions, retain_checkpoints, remote].hash
|
|
260
|
+
[pulp_href, prn, pulp_created, pulp_last_updated, versions_href, pulp_labels, latest_version_href, name, description, retain_repo_versions, retain_checkpoints, remote, autopublish].hash
|
|
249
261
|
end
|
|
250
262
|
|
|
251
263
|
# Builds the object from hash
|