topological_inventory-ingress_api-client 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -0
  3. data/docs/Inventory.md +11 -1
  4. data/docs/InventoryCollectionServiceCredentialType.md +21 -0
  5. data/docs/InventoryCollectionServiceInstanceNodeServiceCredential.md +21 -0
  6. data/docs/InventoryCollectionServiceInstanceServiceCredential.md +21 -0
  7. data/docs/InventoryCollectionServiceOfferingNodeServiceCredential.md +21 -0
  8. data/docs/InventoryCollectionServiceOfferingServiceCredential.md +21 -0
  9. data/docs/ServiceCredential.md +2 -0
  10. data/docs/ServiceCredentialAllOf.md +2 -0
  11. data/docs/ServiceCredentialType.md +33 -0
  12. data/docs/ServiceCredentialTypeAllOf.md +33 -0
  13. data/docs/ServiceCredentialTypeReference.md +21 -0
  14. data/docs/ServiceInstance.md +0 -2
  15. data/docs/ServiceInstanceAllOf.md +0 -2
  16. data/docs/ServiceInstanceNode.md +0 -2
  17. data/docs/ServiceInstanceNodeAllOf.md +0 -2
  18. data/docs/ServiceInstanceNodeReference.md +21 -0
  19. data/docs/ServiceInstanceNodeServiceCredential.md +19 -0
  20. data/docs/ServiceInstanceNodeServiceCredentialAllOf.md +19 -0
  21. data/docs/ServiceInstanceServiceCredential.md +19 -0
  22. data/docs/ServiceInstanceServiceCredentialAllOf.md +19 -0
  23. data/docs/ServiceOffering.md +0 -2
  24. data/docs/ServiceOfferingAllOf.md +0 -2
  25. data/docs/ServiceOfferingNode.md +0 -2
  26. data/docs/ServiceOfferingNodeAllOf.md +0 -2
  27. data/docs/ServiceOfferingNodeReference.md +21 -0
  28. data/docs/ServiceOfferingNodeServiceCredential.md +19 -0
  29. data/docs/ServiceOfferingNodeServiceCredentialAllOf.md +19 -0
  30. data/docs/ServiceOfferingServiceCredential.md +19 -0
  31. data/docs/ServiceOfferingServiceCredentialAllOf.md +19 -0
  32. data/lib/topological_inventory-ingress_api-client.rb +18 -0
  33. data/lib/topological_inventory-ingress_api-client/models/inventory.rb +66 -20
  34. data/lib/topological_inventory-ingress_api-client/models/inventory_collection_service_credential_type.rb +233 -0
  35. data/lib/topological_inventory-ingress_api-client/models/inventory_collection_service_instance_node_service_credential.rb +233 -0
  36. data/lib/topological_inventory-ingress_api-client/models/inventory_collection_service_instance_service_credential.rb +233 -0
  37. data/lib/topological_inventory-ingress_api-client/models/inventory_collection_service_offering_node_service_credential.rb +233 -0
  38. data/lib/topological_inventory-ingress_api-client/models/inventory_collection_service_offering_service_credential.rb +233 -0
  39. data/lib/topological_inventory-ingress_api-client/models/service_credential.rb +11 -1
  40. data/lib/topological_inventory-ingress_api-client/models/service_credential_all_of.rb +11 -1
  41. data/lib/topological_inventory-ingress_api-client/models/service_credential_type.rb +299 -0
  42. data/lib/topological_inventory-ingress_api-client/models/service_credential_type_all_of.rb +291 -0
  43. data/lib/topological_inventory-ingress_api-client/models/service_credential_type_reference.rb +281 -0
  44. data/lib/topological_inventory-ingress_api-client/models/service_instance.rb +1 -11
  45. data/lib/topological_inventory-ingress_api-client/models/service_instance_all_of.rb +1 -11
  46. data/lib/topological_inventory-ingress_api-client/models/service_instance_node.rb +1 -11
  47. data/lib/topological_inventory-ingress_api-client/models/service_instance_node_all_of.rb +1 -11
  48. data/lib/topological_inventory-ingress_api-client/models/service_instance_node_reference.rb +281 -0
  49. data/lib/topological_inventory-ingress_api-client/models/service_instance_node_service_credential.rb +233 -0
  50. data/lib/topological_inventory-ingress_api-client/models/service_instance_node_service_credential_all_of.rb +225 -0
  51. data/lib/topological_inventory-ingress_api-client/models/service_instance_service_credential.rb +233 -0
  52. data/lib/topological_inventory-ingress_api-client/models/service_instance_service_credential_all_of.rb +225 -0
  53. data/lib/topological_inventory-ingress_api-client/models/service_offering.rb +1 -11
  54. data/lib/topological_inventory-ingress_api-client/models/service_offering_all_of.rb +1 -11
  55. data/lib/topological_inventory-ingress_api-client/models/service_offering_node.rb +1 -11
  56. data/lib/topological_inventory-ingress_api-client/models/service_offering_node_all_of.rb +1 -11
  57. data/lib/topological_inventory-ingress_api-client/models/service_offering_node_reference.rb +281 -0
  58. data/lib/topological_inventory-ingress_api-client/models/service_offering_node_service_credential.rb +233 -0
  59. data/lib/topological_inventory-ingress_api-client/models/service_offering_node_service_credential_all_of.rb +225 -0
  60. data/lib/topological_inventory-ingress_api-client/models/service_offering_service_credential.rb +233 -0
  61. data/lib/topological_inventory-ingress_api-client/models/service_offering_service_credential_all_of.rb +225 -0
  62. data/lib/topological_inventory-ingress_api-client/version.rb +1 -1
  63. data/spec/models/inventory_collection_service_credential_type_spec.rb +53 -0
  64. data/spec/models/inventory_collection_service_instance_node_service_credential_spec.rb +53 -0
  65. data/spec/models/inventory_collection_service_instance_service_credential_spec.rb +53 -0
  66. data/spec/models/inventory_collection_service_offering_node_service_credential_spec.rb +53 -0
  67. data/spec/models/inventory_collection_service_offering_service_credential_spec.rb +53 -0
  68. data/spec/models/service_credential_all_of_spec.rb +6 -0
  69. data/spec/models/service_credential_type_all_of_spec.rb +89 -0
  70. data/spec/models/service_credential_type_reference_spec.rb +53 -0
  71. data/spec/models/service_credential_type_spec.rb +89 -0
  72. data/spec/models/service_instance_all_of_spec.rb +0 -6
  73. data/spec/models/service_instance_node_all_of_spec.rb +0 -6
  74. data/spec/models/service_instance_node_reference_spec.rb +53 -0
  75. data/spec/models/service_instance_node_service_credential_all_of_spec.rb +47 -0
  76. data/spec/models/service_instance_node_service_credential_spec.rb +47 -0
  77. data/spec/models/service_instance_service_credential_all_of_spec.rb +47 -0
  78. data/spec/models/service_instance_service_credential_spec.rb +47 -0
  79. data/spec/models/service_offering_all_of_spec.rb +0 -6
  80. data/spec/models/service_offering_node_all_of_spec.rb +0 -6
  81. data/spec/models/service_offering_node_reference_spec.rb +53 -0
  82. data/spec/models/service_offering_node_service_credential_all_of_spec.rb +47 -0
  83. data/spec/models/service_offering_node_service_credential_spec.rb +47 -0
  84. data/spec/models/service_offering_service_credential_all_of_spec.rb +47 -0
  85. data/spec/models/service_offering_service_credential_spec.rb +47 -0
  86. metadata +246 -174
@@ -0,0 +1,225 @@
1
+ =begin
2
+ #Topological Inventory Ingress API
3
+
4
+ #Topological Inventory Ingress API
5
+
6
+ The version of the OpenAPI document: 0.0.2
7
+ Contact: support@redhat.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.2.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module TopologicalInventoryIngressApiClient
16
+ class ServiceOfferingNodeServiceCredentialAllOf
17
+ attr_accessor :service_credential
18
+
19
+ attr_accessor :service_offering_node
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'service_credential' => :'service_credential',
25
+ :'service_offering_node' => :'service_offering_node'
26
+ }
27
+ end
28
+
29
+ # Attribute type mapping.
30
+ def self.openapi_types
31
+ {
32
+ :'service_credential' => :'ServiceCredentialReference',
33
+ :'service_offering_node' => :'ServiceOfferingNodeReference'
34
+ }
35
+ end
36
+
37
+ # List of attributes with nullable: true
38
+ def self.openapi_nullable
39
+ Set.new([
40
+ ])
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param [Hash] attributes Model attributes in the form of hash
45
+ def initialize(attributes = {})
46
+ if (!attributes.is_a?(Hash))
47
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TopologicalInventoryIngressApiClient::ServiceOfferingNodeServiceCredentialAllOf` initialize method"
48
+ end
49
+
50
+ # check to see if the attribute exists and convert string to symbol for hash key
51
+ attributes = attributes.each_with_object({}) { |(k, v), h|
52
+ if (!self.class.attribute_map.key?(k.to_sym))
53
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TopologicalInventoryIngressApiClient::ServiceOfferingNodeServiceCredentialAllOf`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
54
+ end
55
+ h[k.to_sym] = v
56
+ }
57
+
58
+ if attributes.key?(:'service_credential')
59
+ self.service_credential = attributes[:'service_credential']
60
+ end
61
+
62
+ if attributes.key?(:'service_offering_node')
63
+ self.service_offering_node = attributes[:'service_offering_node']
64
+ end
65
+ end
66
+
67
+ # Show invalid properties with the reasons. Usually used together with valid?
68
+ # @return Array for valid properties with the reasons
69
+ def list_invalid_properties
70
+ invalid_properties = Array.new
71
+ if @service_credential.nil?
72
+ invalid_properties.push('invalid value for "service_credential", service_credential cannot be nil.')
73
+ end
74
+
75
+ if @service_offering_node.nil?
76
+ invalid_properties.push('invalid value for "service_offering_node", service_offering_node cannot be nil.')
77
+ end
78
+
79
+ invalid_properties
80
+ end
81
+
82
+ # Check to see if the all the properties in the model are valid
83
+ # @return true if the model is valid
84
+ def valid?
85
+ return false if @service_credential.nil?
86
+ return false if @service_offering_node.nil?
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
+ service_credential == o.service_credential &&
96
+ service_offering_node == o.service_offering_node
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
+ [service_credential, service_offering_node].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
+ new.build_from_hash(attributes)
116
+ end
117
+
118
+ # Builds the object from hash
119
+ # @param [Hash] attributes Model attributes in the form of hash
120
+ # @return [Object] Returns the model itself
121
+ def build_from_hash(attributes)
122
+ return nil unless attributes.is_a?(Hash)
123
+ self.class.openapi_types.each_pair do |key, type|
124
+ if type =~ /\AArray<(.*)>/i
125
+ # check to ensure the input is an array given that the attribute
126
+ # is documented as an array but the input is not
127
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
128
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
129
+ end
130
+ elsif !attributes[self.class.attribute_map[key]].nil?
131
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
132
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
133
+ end
134
+
135
+ self
136
+ end
137
+
138
+ # Deserializes the data based on type
139
+ # @param string type Data type
140
+ # @param string value Value to be deserialized
141
+ # @return [Object] Deserialized data
142
+ def _deserialize(type, value)
143
+ case type.to_sym
144
+ when :DateTime
145
+ DateTime.parse(value)
146
+ when :Date
147
+ Date.parse(value)
148
+ when :String
149
+ value.to_s
150
+ when :Integer
151
+ value.to_i
152
+ when :Float
153
+ value.to_f
154
+ when :Boolean
155
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
156
+ true
157
+ else
158
+ false
159
+ end
160
+ when :Object
161
+ # generic object (usually a Hash), return directly
162
+ value
163
+ when /\AArray<(?<inner_type>.+)>\z/
164
+ inner_type = Regexp.last_match[:inner_type]
165
+ value.map { |v| _deserialize(inner_type, v) }
166
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
167
+ k_type = Regexp.last_match[:k_type]
168
+ v_type = Regexp.last_match[:v_type]
169
+ {}.tap do |hash|
170
+ value.each do |k, v|
171
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
172
+ end
173
+ end
174
+ else # model
175
+ TopologicalInventoryIngressApiClient.const_get(type).build_from_hash(value)
176
+ end
177
+ end
178
+
179
+ # Returns the string representation of the object
180
+ # @return [String] String presentation of the object
181
+ def to_s
182
+ to_hash.to_s
183
+ end
184
+
185
+ # to_body is an alias to to_hash (backward compatibility)
186
+ # @return [Hash] Returns the object in the form of hash
187
+ def to_body
188
+ to_hash
189
+ end
190
+
191
+ # Returns the object in the form of hash
192
+ # @return [Hash] Returns the object in the form of hash
193
+ def to_hash
194
+ hash = {}
195
+ self.class.attribute_map.each_pair do |attr, param|
196
+ value = self.send(attr)
197
+ if value.nil?
198
+ is_nullable = self.class.openapi_nullable.include?(attr)
199
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
200
+ end
201
+
202
+ hash[param] = _to_hash(value)
203
+ end
204
+ hash
205
+ end
206
+
207
+ # Outputs non-array value in the form of hash
208
+ # For object, use to_hash. Otherwise, just return the value
209
+ # @param [Object] value Any valid value
210
+ # @return [Hash] Returns the value in the form of hash
211
+ def _to_hash(value)
212
+ if value.is_a?(Array)
213
+ value.compact.map { |v| _to_hash(v) }
214
+ elsif value.is_a?(Hash)
215
+ {}.tap do |hash|
216
+ value.each { |k, v| hash[k] = _to_hash(v) }
217
+ end
218
+ elsif value.respond_to? :to_hash
219
+ value.to_hash
220
+ else
221
+ value
222
+ end
223
+ end
224
+ end
225
+ end
@@ -0,0 +1,233 @@
1
+ =begin
2
+ #Topological Inventory Ingress API
3
+
4
+ #Topological Inventory Ingress API
5
+
6
+ The version of the OpenAPI document: 0.0.2
7
+ Contact: support@redhat.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.2.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module TopologicalInventoryIngressApiClient
16
+ class ServiceOfferingServiceCredential
17
+ attr_accessor :service_credential
18
+
19
+ attr_accessor :service_offering
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'service_credential' => :'service_credential',
25
+ :'service_offering' => :'service_offering'
26
+ }
27
+ end
28
+
29
+ # Attribute type mapping.
30
+ def self.openapi_types
31
+ {
32
+ :'service_credential' => :'ServiceCredentialReference',
33
+ :'service_offering' => :'ServiceOfferingReference'
34
+ }
35
+ end
36
+
37
+ # List of attributes with nullable: true
38
+ def self.openapi_nullable
39
+ Set.new([
40
+ ])
41
+ end
42
+
43
+ # List of class defined in allOf (OpenAPI v3)
44
+ def self.openapi_all_of
45
+ [
46
+ :'InventoryObject',
47
+ :'ServiceOfferingServiceCredentialAllOf'
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 `TopologicalInventoryIngressApiClient::ServiceOfferingServiceCredential` 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 `TopologicalInventoryIngressApiClient::ServiceOfferingServiceCredential`. 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?(:'service_credential')
67
+ self.service_credential = attributes[:'service_credential']
68
+ end
69
+
70
+ if attributes.key?(:'service_offering')
71
+ self.service_offering = attributes[:'service_offering']
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
+ invalid_properties = Array.new
79
+ if @service_credential.nil?
80
+ invalid_properties.push('invalid value for "service_credential", service_credential cannot be nil.')
81
+ end
82
+
83
+ if @service_offering.nil?
84
+ invalid_properties.push('invalid value for "service_offering", service_offering cannot be nil.')
85
+ end
86
+
87
+ invalid_properties
88
+ end
89
+
90
+ # Check to see if the all the properties in the model are valid
91
+ # @return true if the model is valid
92
+ def valid?
93
+ return false if @service_credential.nil?
94
+ return false if @service_offering.nil?
95
+ true
96
+ end
97
+
98
+ # Checks equality by comparing each attribute.
99
+ # @param [Object] Object to be compared
100
+ def ==(o)
101
+ return true if self.equal?(o)
102
+ self.class == o.class &&
103
+ service_credential == o.service_credential &&
104
+ service_offering == o.service_offering
105
+ end
106
+
107
+ # @see the `==` method
108
+ # @param [Object] Object to be compared
109
+ def eql?(o)
110
+ self == o
111
+ end
112
+
113
+ # Calculates hash code according to all attributes.
114
+ # @return [Integer] Hash code
115
+ def hash
116
+ [service_credential, service_offering].hash
117
+ end
118
+
119
+ # Builds the object from hash
120
+ # @param [Hash] attributes Model attributes in the form of hash
121
+ # @return [Object] Returns the model itself
122
+ def self.build_from_hash(attributes)
123
+ new.build_from_hash(attributes)
124
+ end
125
+
126
+ # Builds the object from hash
127
+ # @param [Hash] attributes Model attributes in the form of hash
128
+ # @return [Object] Returns the model itself
129
+ def build_from_hash(attributes)
130
+ return nil unless attributes.is_a?(Hash)
131
+ self.class.openapi_types.each_pair do |key, type|
132
+ if type =~ /\AArray<(.*)>/i
133
+ # check to ensure the input is an array given that the attribute
134
+ # is documented as an array but the input is not
135
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
136
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
137
+ end
138
+ elsif !attributes[self.class.attribute_map[key]].nil?
139
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
140
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
141
+ end
142
+
143
+ self
144
+ end
145
+
146
+ # Deserializes the data based on type
147
+ # @param string type Data type
148
+ # @param string value Value to be deserialized
149
+ # @return [Object] Deserialized data
150
+ def _deserialize(type, value)
151
+ case type.to_sym
152
+ when :DateTime
153
+ DateTime.parse(value)
154
+ when :Date
155
+ Date.parse(value)
156
+ when :String
157
+ value.to_s
158
+ when :Integer
159
+ value.to_i
160
+ when :Float
161
+ value.to_f
162
+ when :Boolean
163
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
164
+ true
165
+ else
166
+ false
167
+ end
168
+ when :Object
169
+ # generic object (usually a Hash), return directly
170
+ value
171
+ when /\AArray<(?<inner_type>.+)>\z/
172
+ inner_type = Regexp.last_match[:inner_type]
173
+ value.map { |v| _deserialize(inner_type, v) }
174
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
175
+ k_type = Regexp.last_match[:k_type]
176
+ v_type = Regexp.last_match[:v_type]
177
+ {}.tap do |hash|
178
+ value.each do |k, v|
179
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
180
+ end
181
+ end
182
+ else # model
183
+ TopologicalInventoryIngressApiClient.const_get(type).build_from_hash(value)
184
+ end
185
+ end
186
+
187
+ # Returns the string representation of the object
188
+ # @return [String] String presentation of the object
189
+ def to_s
190
+ to_hash.to_s
191
+ end
192
+
193
+ # to_body is an alias to to_hash (backward compatibility)
194
+ # @return [Hash] Returns the object in the form of hash
195
+ def to_body
196
+ to_hash
197
+ end
198
+
199
+ # Returns the object in the form of hash
200
+ # @return [Hash] Returns the object in the form of hash
201
+ def to_hash
202
+ hash = {}
203
+ self.class.attribute_map.each_pair do |attr, param|
204
+ value = self.send(attr)
205
+ if value.nil?
206
+ is_nullable = self.class.openapi_nullable.include?(attr)
207
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
208
+ end
209
+
210
+ hash[param] = _to_hash(value)
211
+ end
212
+ hash
213
+ end
214
+
215
+ # Outputs non-array value in the form of hash
216
+ # For object, use to_hash. Otherwise, just return the value
217
+ # @param [Object] value Any valid value
218
+ # @return [Hash] Returns the value in the form of hash
219
+ def _to_hash(value)
220
+ if value.is_a?(Array)
221
+ value.compact.map { |v| _to_hash(v) }
222
+ elsif value.is_a?(Hash)
223
+ {}.tap do |hash|
224
+ value.each { |k, v| hash[k] = _to_hash(v) }
225
+ end
226
+ elsif value.respond_to? :to_hash
227
+ value.to_hash
228
+ else
229
+ value
230
+ end
231
+ end
232
+ end
233
+ end