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 ServiceOfferingServiceCredentialAllOf
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
+ # 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::ServiceOfferingServiceCredentialAllOf` 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::ServiceOfferingServiceCredentialAllOf`. 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')
63
+ self.service_offering = attributes[:'service_offering']
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.nil?
76
+ invalid_properties.push('invalid value for "service_offering", service_offering 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.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 == o.service_offering
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].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
@@ -11,5 +11,5 @@ OpenAPI Generator version: 4.2.1
11
11
  =end
12
12
 
13
13
  module TopologicalInventoryIngressApiClient
14
- VERSION = '1.0.0'
14
+ VERSION = '1.0.1'
15
15
  end
@@ -0,0 +1,53 @@
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 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for TopologicalInventoryIngressApiClient::InventoryCollectionServiceCredentialType
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'InventoryCollectionServiceCredentialType' do
21
+ before do
22
+ # run before each test
23
+ @instance = TopologicalInventoryIngressApiClient::InventoryCollectionServiceCredentialType.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of InventoryCollectionServiceCredentialType' do
31
+ it 'should create an instance of InventoryCollectionServiceCredentialType' do
32
+ expect(@instance).to be_instance_of(TopologicalInventoryIngressApiClient::InventoryCollectionServiceCredentialType)
33
+ end
34
+ end
35
+ describe 'test attribute "name"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "data"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "partial_data"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
53
+ end
@@ -0,0 +1,53 @@
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 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for TopologicalInventoryIngressApiClient::InventoryCollectionServiceInstanceNodeServiceCredential
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'InventoryCollectionServiceInstanceNodeServiceCredential' do
21
+ before do
22
+ # run before each test
23
+ @instance = TopologicalInventoryIngressApiClient::InventoryCollectionServiceInstanceNodeServiceCredential.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of InventoryCollectionServiceInstanceNodeServiceCredential' do
31
+ it 'should create an instance of InventoryCollectionServiceInstanceNodeServiceCredential' do
32
+ expect(@instance).to be_instance_of(TopologicalInventoryIngressApiClient::InventoryCollectionServiceInstanceNodeServiceCredential)
33
+ end
34
+ end
35
+ describe 'test attribute "name"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "data"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "partial_data"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
53
+ end
@@ -0,0 +1,53 @@
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 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for TopologicalInventoryIngressApiClient::InventoryCollectionServiceInstanceServiceCredential
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'InventoryCollectionServiceInstanceServiceCredential' do
21
+ before do
22
+ # run before each test
23
+ @instance = TopologicalInventoryIngressApiClient::InventoryCollectionServiceInstanceServiceCredential.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of InventoryCollectionServiceInstanceServiceCredential' do
31
+ it 'should create an instance of InventoryCollectionServiceInstanceServiceCredential' do
32
+ expect(@instance).to be_instance_of(TopologicalInventoryIngressApiClient::InventoryCollectionServiceInstanceServiceCredential)
33
+ end
34
+ end
35
+ describe 'test attribute "name"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "data"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "partial_data"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
53
+ end
@@ -0,0 +1,53 @@
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 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for TopologicalInventoryIngressApiClient::InventoryCollectionServiceOfferingNodeServiceCredential
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'InventoryCollectionServiceOfferingNodeServiceCredential' do
21
+ before do
22
+ # run before each test
23
+ @instance = TopologicalInventoryIngressApiClient::InventoryCollectionServiceOfferingNodeServiceCredential.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of InventoryCollectionServiceOfferingNodeServiceCredential' do
31
+ it 'should create an instance of InventoryCollectionServiceOfferingNodeServiceCredential' do
32
+ expect(@instance).to be_instance_of(TopologicalInventoryIngressApiClient::InventoryCollectionServiceOfferingNodeServiceCredential)
33
+ end
34
+ end
35
+ describe 'test attribute "name"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "data"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "partial_data"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
53
+ end