pulpcore_client 3.86.0 → 3.87.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.
@@ -1,22 +0,0 @@
1
- # PulpcoreClient::ContentAppStatusResponse
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
- | **name** | **String** | The name of the worker. | [optional][readonly] |
8
- | **last_heartbeat** | **Time** | Timestamp of the last time the worker talked to the service. | [optional][readonly] |
9
- | **versions** | **Hash<String, String>** | Versions of the components installed. | [optional][readonly] |
10
-
11
- ## Example
12
-
13
- ```ruby
14
- require 'pulpcore_client'
15
-
16
- instance = PulpcoreClient::ContentAppStatusResponse.new(
17
- name: null,
18
- last_heartbeat: null,
19
- versions: null
20
- )
21
- ```
22
-
@@ -1,238 +0,0 @@
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 PulpcoreClient
17
- # Base serializer for use with [pulpcore.app.models.Model][] This ensures that all Serializers provide values for the 'pulp_href` field. The class provides a default for the ``ref_name`` attribute in the ModelSerializers's ``Meta`` class. This ensures that the OpenAPI definitions of plugins are namespaced properly.
18
- class ContentAppStatusResponse
19
- # The name of the worker.
20
- attr_accessor :name
21
-
22
- # Timestamp of the last time the worker talked to the service.
23
- attr_accessor :last_heartbeat
24
-
25
- # Versions of the components installed.
26
- attr_accessor :versions
27
-
28
- # Attribute mapping from ruby-style variable name to JSON key.
29
- def self.attribute_map
30
- {
31
- :'name' => :'name',
32
- :'last_heartbeat' => :'last_heartbeat',
33
- :'versions' => :'versions'
34
- }
35
- end
36
-
37
- # Returns all the JSON keys this model knows about
38
- def self.acceptable_attributes
39
- attribute_map.values
40
- end
41
-
42
- # Attribute type mapping.
43
- def self.openapi_types
44
- {
45
- :'name' => :'String',
46
- :'last_heartbeat' => :'Time',
47
- :'versions' => :'Hash<String, String>'
48
- }
49
- end
50
-
51
- # List of attributes with nullable: true
52
- def self.openapi_nullable
53
- Set.new([
54
- ])
55
- end
56
-
57
- # Initializes the object
58
- # @param [Hash] attributes Model attributes in the form of hash
59
- def initialize(attributes = {})
60
- if (!attributes.is_a?(Hash))
61
- fail ArgumentError, "The input argument (attributes) must be a hash in `PulpcoreClient::ContentAppStatusResponse` initialize method"
62
- end
63
-
64
- # check to see if the attribute exists and convert string to symbol for hash key
65
- attributes = attributes.each_with_object({}) { |(k, v), h|
66
- if (!self.class.attribute_map.key?(k.to_sym))
67
- fail ArgumentError, "`#{k}` is not a valid attribute in `PulpcoreClient::ContentAppStatusResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
68
- end
69
- h[k.to_sym] = v
70
- }
71
-
72
- if attributes.key?(:'name')
73
- self.name = attributes[:'name']
74
- end
75
-
76
- if attributes.key?(:'last_heartbeat')
77
- self.last_heartbeat = attributes[:'last_heartbeat']
78
- end
79
-
80
- if attributes.key?(:'versions')
81
- if (value = attributes[:'versions']).is_a?(Hash)
82
- self.versions = value
83
- end
84
- end
85
- end
86
-
87
- # Show invalid properties with the reasons. Usually used together with valid?
88
- # @return Array for valid properties with the reasons
89
- def list_invalid_properties
90
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
91
- invalid_properties = Array.new
92
- invalid_properties
93
- end
94
-
95
- # Check to see if the all the properties in the model are valid
96
- # @return true if the model is valid
97
- def valid?
98
- warn '[DEPRECATED] the `valid?` method is obsolete'
99
- true
100
- end
101
-
102
- # Checks equality by comparing each attribute.
103
- # @param [Object] Object to be compared
104
- def ==(o)
105
- return true if self.equal?(o)
106
- self.class == o.class &&
107
- name == o.name &&
108
- last_heartbeat == o.last_heartbeat &&
109
- versions == o.versions
110
- end
111
-
112
- # @see the `==` method
113
- # @param [Object] Object to be compared
114
- def eql?(o)
115
- self == o
116
- end
117
-
118
- # Calculates hash code according to all attributes.
119
- # @return [Integer] Hash code
120
- def hash
121
- [name, last_heartbeat, versions].hash
122
- end
123
-
124
- # Builds the object from hash
125
- # @param [Hash] attributes Model attributes in the form of hash
126
- # @return [Object] Returns the model itself
127
- def self.build_from_hash(attributes)
128
- return nil unless attributes.is_a?(Hash)
129
- attributes = attributes.transform_keys(&:to_sym)
130
- transformed_hash = {}
131
- openapi_types.each_pair do |key, type|
132
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
133
- transformed_hash["#{key}"] = nil
134
- elsif type =~ /\AArray<(.*)>/i
135
- # check to ensure the input is an array given that the attribute
136
- # is documented as an array but the input is not
137
- if attributes[attribute_map[key]].is_a?(Array)
138
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
139
- end
140
- elsif !attributes[attribute_map[key]].nil?
141
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
142
- end
143
- end
144
- new(transformed_hash)
145
- end
146
-
147
- # Deserializes the data based on type
148
- # @param string type Data type
149
- # @param string value Value to be deserialized
150
- # @return [Object] Deserialized data
151
- def self._deserialize(type, value)
152
- case type.to_sym
153
- when :Time
154
- Time.parse(value)
155
- when :Date
156
- Date.parse(value)
157
- when :String
158
- value.to_s
159
- when :Integer
160
- value.to_i
161
- when :Float
162
- value.to_f
163
- when :Boolean
164
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
165
- true
166
- else
167
- false
168
- end
169
- when :Object
170
- # generic object (usually a Hash), return directly
171
- value
172
- when /\AArray<(?<inner_type>.+)>\z/
173
- inner_type = Regexp.last_match[:inner_type]
174
- value.map { |v| _deserialize(inner_type, v) }
175
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
176
- k_type = Regexp.last_match[:k_type]
177
- v_type = Regexp.last_match[:v_type]
178
- {}.tap do |hash|
179
- value.each do |k, v|
180
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
181
- end
182
- end
183
- else # model
184
- # models (e.g. Pet) or oneOf
185
- klass = PulpcoreClient.const_get(type)
186
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
187
- end
188
- end
189
-
190
- # Returns the string representation of the object
191
- # @return [String] String presentation of the object
192
- def to_s
193
- to_hash.to_s
194
- end
195
-
196
- # to_body is an alias to to_hash (backward compatibility)
197
- # @return [Hash] Returns the object in the form of hash
198
- def to_body
199
- to_hash
200
- end
201
-
202
- # Returns the object in the form of hash
203
- # @return [Hash] Returns the object in the form of hash
204
- def to_hash
205
- hash = {}
206
- self.class.attribute_map.each_pair do |attr, param|
207
- value = self.send(attr)
208
- if value.nil?
209
- is_nullable = self.class.openapi_nullable.include?(attr)
210
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
211
- end
212
-
213
- hash[param] = _to_hash(value)
214
- end
215
- hash
216
- end
217
-
218
- # Outputs non-array value in the form of hash
219
- # For object, use to_hash. Otherwise, just return the value
220
- # @param [Object] value Any valid value
221
- # @return [Hash] Returns the value in the form of hash
222
- def _to_hash(value)
223
- if value.is_a?(Array)
224
- value.compact.map { |v| _to_hash(v) }
225
- elsif value.is_a?(Hash)
226
- {}.tap do |hash|
227
- value.each { |k, v| hash[k] = _to_hash(v) }
228
- end
229
- elsif value.respond_to? :to_hash
230
- value.to_hash
231
- else
232
- value
233
- end
234
- end
235
-
236
- end
237
-
238
- end
@@ -1,48 +0,0 @@
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 'spec_helper'
14
- require 'json'
15
- require 'date'
16
-
17
- # Unit tests for PulpcoreClient::ContentAppStatusResponse
18
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
- # Please update as you see appropriate
20
- describe PulpcoreClient::ContentAppStatusResponse do
21
- let(:instance) { PulpcoreClient::ContentAppStatusResponse.new }
22
-
23
- describe 'test an instance of ContentAppStatusResponse' do
24
- it 'should create an instance of ContentAppStatusResponse' do
25
- # uncomment below to test the instance creation
26
- #expect(instance).to be_instance_of(PulpcoreClient::ContentAppStatusResponse)
27
- end
28
- end
29
-
30
- describe 'test attribute "name"' do
31
- it 'should work' do
32
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
- end
34
- end
35
-
36
- describe 'test attribute "last_heartbeat"' do
37
- it 'should work' do
38
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
- end
40
- end
41
-
42
- describe 'test attribute "versions"' do
43
- it 'should work' do
44
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
45
- end
46
- end
47
-
48
- end