ionoscloud-dbaas-mongo 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e3871043094af505bb616a1f6db7948aab0fe7f3c56903ec3145c0be606c2065
4
- data.tar.gz: 94138a14a2b150fbc6ec933766682c74effdbc4bc75c4c42ba1f567d52b4464f
3
+ metadata.gz: c4a02b5edb7ad683106f6c541ee07159fa6515b04d08c3116228ba8cae9a5b9c
4
+ data.tar.gz: ebc5f8d83e394c17086d3694c4269d42918f5c5af4c578cc5801816f187dc994
5
5
  SHA512:
6
- metadata.gz: e8968325fc1694be369d26ed3d646430914de39cf824854052574863548dd7e21a0f8c8c45a09a24bd1e13071580d2e51f3c74a259e0b1bf9db1a5ae482f7155
7
- data.tar.gz: b07e919e58fe0505b218851b22d070b72183ea6d7b72b5d6142fde73b750b4c36fefab20bc8112f6de82e5100c9c3eb70fbd1deb250234b2efdaa8598258aa6e
6
+ metadata.gz: 490575e7a84a4bb62d085b59e3b03cd61c97689f67428453e0bc9bf1e003d9081357e534fee70f522ef053f003adc9b543f8bb3d353396f2aa8742481c452ddc
7
+ data.tar.gz: 6a6d589232ee6a5cab2c94ca82788ece335f78331709f72a89482bb0d17fbe88208a0bda7b843341778bb571b7d53f2a3cacc06e21dfb29ea7f91942a7b1f8f3
@@ -0,0 +1,26 @@
1
+ # TemplateProperties
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | The name of the template. | [optional] |
8
+ | **edition** | **String** | The edition of the template (e.g. enterprise) | [optional] |
9
+ | **cores** | **Integer** | The number of CPU cores. | [optional] |
10
+ | **ram** | **Integer** | The amount of memory in GB. | [optional] |
11
+ | **storage_size** | **Integer** | The amount of storage size in GB. | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'ionoscloud-dbaas-mongo'
17
+
18
+ instance = IonoscloudDbaasMongo::TemplateProperties.new(
19
+ name: MongoDB Community 4XL,
20
+ edition: enterprise,
21
+ cores: 1,
22
+ ram: 4,
23
+ storage_size: 30
24
+ )
25
+ ```
26
+
@@ -4,12 +4,10 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **id** | **String** | The unique template ID. | [optional] |
8
- | **name** | **String** | The name of the template. | [optional] |
9
- | **edition** | **String** | The edition of the template (e.g. enterprise) | [optional] |
10
- | **cores** | **Integer** | The number of CPU cores. | [optional] |
11
- | **ram** | **Integer** | The amount of memory in GB. | [optional] |
12
- | **storage_size** | **Integer** | The amount of storage size in GB. | [optional] |
7
+ | **type** | [**ResourceType**](ResourceType.md) | | [optional] |
8
+ | **id** | **String** | The unique ID of the resource. | [optional] |
9
+ | **metadata** | [**Metadata**](Metadata.md) | | [optional] |
10
+ | **properties** | [**TemplateProperties**](TemplateProperties.md) | | [optional] |
13
11
 
14
12
  ## Example
15
13
 
@@ -17,12 +15,10 @@
17
15
  require 'ionoscloud-dbaas-mongo'
18
16
 
19
17
  instance = IonoscloudDbaasMongo::TemplateResponse.new(
20
- id: 15c6dd2f-02d2-4987-b439-9a58dd59ecc3,
21
- name: MongoDB Community 4XL,
22
- edition: enterprise,
23
- cores: 1,
24
- ram: 4,
25
- storage_size: 30
18
+ type: template,
19
+ id: 498ae72f-411f-11eb-9d07-046c59cc737e,
20
+ metadata: null,
21
+ properties: null
26
22
  )
27
23
  ```
28
24
 
@@ -38,7 +38,7 @@ module IonoscloudDbaasMongo
38
38
  # @option config [Configuration] Configuration for initializing the object, default to Configuration.default
39
39
  def initialize(config = Configuration.default)
40
40
  @config = config
41
- @user_agent = "sdk-ruby-dbaas-mongo/v1.2.1"
41
+ @user_agent = "sdk-ruby-dbaas-mongo/v1.2.2"
42
42
  @default_headers = {
43
43
  'Content-Type' => 'application/json',
44
44
  'User-Agent' => @user_agent
@@ -19,6 +19,7 @@ module IonoscloudDbaasMongo
19
19
  CLUSTER = "cluster".freeze
20
20
  USER = "user".freeze
21
21
  SNAPSHOT = "snapshot".freeze
22
+ TEMPLATE = "template".freeze
22
23
 
23
24
  # Builds the enum from string
24
25
  # @param [String] The enum value in the form of the string
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module IonoscloudDbaasMongo
17
- # The list of MongoDB templates.
17
+ # List of MongoDB templates.
18
18
  class TemplateList
19
19
 
20
20
  attr_accessor :type
@@ -0,0 +1,300 @@
1
+ =begin
2
+ #IONOS DBaaS MongoDB REST API
3
+
4
+ #With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.2.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module IonoscloudDbaasMongo
17
+ # The properties of a MongoDB template.
18
+ class TemplateProperties
19
+
20
+ # The name of the template.
21
+ attr_accessor :name
22
+
23
+
24
+ # The edition of the template (e.g. enterprise)
25
+ attr_accessor :edition
26
+
27
+
28
+ # The number of CPU cores.
29
+ attr_accessor :cores
30
+
31
+
32
+ # The amount of memory in GB.
33
+ attr_accessor :ram
34
+
35
+
36
+ # The amount of storage size in GB.
37
+ attr_accessor :storage_size
38
+
39
+ # Attribute mapping from ruby-style variable name to JSON key.
40
+ def self.attribute_map
41
+ {
42
+
43
+ :'name' => :'name',
44
+
45
+ :'edition' => :'edition',
46
+
47
+ :'cores' => :'cores',
48
+
49
+ :'ram' => :'ram',
50
+
51
+ :'storage_size' => :'storageSize'
52
+ }
53
+ end
54
+
55
+ # Returns all the JSON keys this model knows about
56
+ def self.acceptable_attributes
57
+ attribute_map.values
58
+ end
59
+
60
+ # Attribute type mapping.
61
+ def self.openapi_types
62
+ {
63
+
64
+ :'name' => :'String',
65
+
66
+ :'edition' => :'String',
67
+
68
+ :'cores' => :'Integer',
69
+
70
+ :'ram' => :'Integer',
71
+
72
+ :'storage_size' => :'Integer'
73
+ }
74
+ end
75
+
76
+ # List of attributes with nullable: true
77
+ def self.openapi_nullable
78
+ Set.new([
79
+
80
+
81
+
82
+
83
+
84
+ ])
85
+ end
86
+
87
+ # Initializes the object
88
+ # @param [Hash] attributes Model attributes in the form of hash
89
+ def initialize(attributes = {})
90
+ if (!attributes.is_a?(Hash))
91
+ fail ArgumentError, "The input argument (attributes) must be a hash in `IonoscloudDbaasMongo::TemplateProperties` initialize method"
92
+ end
93
+
94
+ # check to see if the attribute exists and convert string to symbol for hash key
95
+ attributes = attributes.each_with_object({}) { |(k, v), h|
96
+ if (!self.class.attribute_map.key?(k.to_sym))
97
+ fail ArgumentError, "`#{k}` is not a valid attribute in `IonoscloudDbaasMongo::TemplateProperties`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
98
+ end
99
+ h[k.to_sym] = v
100
+ }
101
+
102
+
103
+ if attributes.key?(:'name')
104
+ self.name = attributes[:'name']
105
+ end
106
+
107
+
108
+ if attributes.key?(:'edition')
109
+ self.edition = attributes[:'edition']
110
+ end
111
+
112
+
113
+ if attributes.key?(:'cores')
114
+ self.cores = attributes[:'cores']
115
+ end
116
+
117
+
118
+ if attributes.key?(:'ram')
119
+ self.ram = attributes[:'ram']
120
+ end
121
+
122
+
123
+ if attributes.key?(:'storage_size')
124
+ self.storage_size = attributes[:'storage_size']
125
+ end
126
+ end
127
+
128
+ # Show invalid properties with the reasons. Usually used together with valid?
129
+ # @return Array for valid properties with the reasons
130
+ def list_invalid_properties
131
+ invalid_properties = Array.new
132
+
133
+
134
+
135
+
136
+
137
+ invalid_properties
138
+ end
139
+
140
+ # Check to see if the all the properties in the model are valid
141
+ # @return true if the model is valid
142
+ def valid?
143
+
144
+
145
+
146
+
147
+
148
+ true
149
+ end
150
+
151
+
152
+
153
+
154
+
155
+
156
+ # Checks equality by comparing each attribute.
157
+ # @param [Object] Object to be compared
158
+ def ==(o)
159
+ return true if self.equal?(o)
160
+ self.class == o.class &&
161
+ name == o.name &&
162
+ edition == o.edition &&
163
+ cores == o.cores &&
164
+ ram == o.ram &&
165
+ storage_size == o.storage_size
166
+ end
167
+
168
+ # @see the `==` method
169
+ # @param [Object] Object to be compared
170
+ def eql?(o)
171
+ self == o
172
+ end
173
+
174
+ # Calculates hash code according to all attributes.
175
+ # @return [Integer] Hash code
176
+ def hash
177
+ [name, edition, cores, ram, storage_size].hash
178
+ end
179
+
180
+ # Builds the object from hash
181
+ # @param [Hash] attributes Model attributes in the form of hash
182
+ # @return [Object] Returns the model itself
183
+ def self.build_from_hash(attributes)
184
+ new.build_from_hash(attributes)
185
+ end
186
+
187
+ # Builds the object from hash
188
+ # @param [Hash] attributes Model attributes in the form of hash
189
+ # @return [Object] Returns the model itself
190
+ def build_from_hash(attributes)
191
+ return nil unless attributes.is_a?(Hash)
192
+ self.class.openapi_types.each_pair do |key, type|
193
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
194
+ self.send("#{key}=", nil)
195
+ elsif type =~ /\AArray<(.*)>/i
196
+ # check to ensure the input is an array given that the attribute
197
+ # is documented as an array but the input is not
198
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
199
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
200
+ end
201
+ elsif !attributes[self.class.attribute_map[key]].nil?
202
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
203
+ end
204
+ end
205
+
206
+ self
207
+ end
208
+
209
+ # Deserializes the data based on type
210
+ # @param string type Data type
211
+ # @param string value Value to be deserialized
212
+ # @return [Object] Deserialized data
213
+ def _deserialize(type, value)
214
+ case type.to_sym
215
+ when :Time
216
+ Time.parse(value)
217
+ when :Date
218
+ Date.parse(value)
219
+ when :String
220
+ value.to_s
221
+ when :Integer
222
+ value.to_i
223
+ when :Float
224
+ value.to_f
225
+ when :Boolean
226
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
227
+ true
228
+ else
229
+ false
230
+ end
231
+ when :Object
232
+ # generic object (usually a Hash), return directly
233
+ value
234
+ when /\AArray<(?<inner_type>.+)>\z/
235
+ inner_type = Regexp.last_match[:inner_type]
236
+ value.map { |v| _deserialize(inner_type, v) }
237
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
238
+ k_type = Regexp.last_match[:k_type]
239
+ v_type = Regexp.last_match[:v_type]
240
+ {}.tap do |hash|
241
+ value.each do |k, v|
242
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
243
+ end
244
+ end
245
+ else # model
246
+ # models (e.g. Pet) or oneOf
247
+ klass = IonoscloudDbaasMongo.const_get(type)
248
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
249
+ end
250
+ end
251
+
252
+ # Returns the string representation of the object
253
+ # @return [String] String presentation of the object
254
+ def to_s
255
+ to_hash.to_s
256
+ end
257
+
258
+ # to_body is an alias to to_hash (backward compatibility)
259
+ # @return [Hash] Returns the object in the form of hash
260
+ def to_body
261
+ to_hash
262
+ end
263
+
264
+ # Returns the object in the form of hash
265
+ # @return [Hash] Returns the object in the form of hash
266
+ def to_hash
267
+ hash = {}
268
+ self.class.attribute_map.each_pair do |attr, param|
269
+ value = self.send(attr)
270
+ if value.nil?
271
+ is_nullable = self.class.openapi_nullable.include?(attr)
272
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
273
+ end
274
+
275
+ hash[param] = _to_hash(value)
276
+ end
277
+ hash
278
+ end
279
+
280
+ # Outputs non-array value in the form of hash
281
+ # For object, use to_hash. Otherwise, just return the value
282
+ # @param [Object] value Any valid value
283
+ # @return [Hash] Returns the value in the form of hash
284
+ def _to_hash(value)
285
+ if value.is_a?(Array)
286
+ value.compact.map { |v| _to_hash(v) }
287
+ elsif value.is_a?(Hash)
288
+ {}.tap do |hash|
289
+ value.each { |k, v| hash[k] = _to_hash(v) }
290
+ end
291
+ elsif value.respond_to? :to_hash
292
+ value.to_hash
293
+ else
294
+ value
295
+ end
296
+ end
297
+
298
+ end
299
+
300
+ end
@@ -14,47 +14,32 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module IonoscloudDbaasMongo
17
- # A MongoDB template item.
17
+ # A MongoDB template.
18
18
  class TemplateResponse
19
19
 
20
- # The unique template ID.
21
- attr_accessor :id
22
-
23
-
24
- # The name of the template.
25
- attr_accessor :name
26
-
20
+ attr_accessor :type
27
21
 
28
- # The edition of the template (e.g. enterprise)
29
- attr_accessor :edition
30
22
 
31
-
32
- # The number of CPU cores.
33
- attr_accessor :cores
23
+ # The unique ID of the resource.
24
+ attr_accessor :id
34
25
 
35
26
 
36
- # The amount of memory in GB.
37
- attr_accessor :ram
27
+ attr_accessor :metadata
38
28
 
39
29
 
40
- # The amount of storage size in GB.
41
- attr_accessor :storage_size
30
+ attr_accessor :properties
42
31
 
43
32
  # Attribute mapping from ruby-style variable name to JSON key.
44
33
  def self.attribute_map
45
34
  {
46
35
 
47
- :'id' => :'id',
48
-
49
- :'name' => :'name',
36
+ :'type' => :'type',
50
37
 
51
- :'edition' => :'edition',
52
-
53
- :'cores' => :'cores',
38
+ :'id' => :'id',
54
39
 
55
- :'ram' => :'ram',
40
+ :'metadata' => :'metadata',
56
41
 
57
- :'storage_size' => :'storageSize'
42
+ :'properties' => :'properties'
58
43
  }
59
44
  end
60
45
 
@@ -67,17 +52,13 @@ module IonoscloudDbaasMongo
67
52
  def self.openapi_types
68
53
  {
69
54
 
70
- :'id' => :'String',
71
-
72
- :'name' => :'String',
55
+ :'type' => :'ResourceType',
73
56
 
74
- :'edition' => :'String',
75
-
76
- :'cores' => :'Integer',
57
+ :'id' => :'String',
77
58
 
78
- :'ram' => :'Integer',
59
+ :'metadata' => :'Metadata',
79
60
 
80
- :'storage_size' => :'Integer'
61
+ :'properties' => :'TemplateProperties'
81
62
  }
82
63
  end
83
64
 
@@ -88,8 +69,6 @@ module IonoscloudDbaasMongo
88
69
 
89
70
 
90
71
 
91
-
92
-
93
72
  ])
94
73
  end
95
74
 
@@ -109,33 +88,23 @@ module IonoscloudDbaasMongo
109
88
  }
110
89
 
111
90
 
112
- if attributes.key?(:'id')
113
- self.id = attributes[:'id']
114
- end
115
-
116
-
117
- if attributes.key?(:'name')
118
- self.name = attributes[:'name']
119
- end
120
-
121
-
122
- if attributes.key?(:'edition')
123
- self.edition = attributes[:'edition']
91
+ if attributes.key?(:'type')
92
+ self.type = attributes[:'type']
124
93
  end
125
94
 
126
95
 
127
- if attributes.key?(:'cores')
128
- self.cores = attributes[:'cores']
96
+ if attributes.key?(:'id')
97
+ self.id = attributes[:'id']
129
98
  end
130
99
 
131
100
 
132
- if attributes.key?(:'ram')
133
- self.ram = attributes[:'ram']
101
+ if attributes.key?(:'metadata')
102
+ self.metadata = attributes[:'metadata']
134
103
  end
135
104
 
136
105
 
137
- if attributes.key?(:'storage_size')
138
- self.storage_size = attributes[:'storage_size']
106
+ if attributes.key?(:'properties')
107
+ self.properties = attributes[:'properties']
139
108
  end
140
109
  end
141
110
 
@@ -147,8 +116,6 @@ module IonoscloudDbaasMongo
147
116
 
148
117
 
149
118
 
150
-
151
-
152
119
  invalid_properties
153
120
  end
154
121
 
@@ -159,8 +126,6 @@ module IonoscloudDbaasMongo
159
126
 
160
127
 
161
128
 
162
-
163
-
164
129
  true
165
130
  end
166
131
 
@@ -168,19 +133,15 @@ module IonoscloudDbaasMongo
168
133
 
169
134
 
170
135
 
171
-
172
-
173
136
  # Checks equality by comparing each attribute.
174
137
  # @param [Object] Object to be compared
175
138
  def ==(o)
176
139
  return true if self.equal?(o)
177
140
  self.class == o.class &&
141
+ type == o.type &&
178
142
  id == o.id &&
179
- name == o.name &&
180
- edition == o.edition &&
181
- cores == o.cores &&
182
- ram == o.ram &&
183
- storage_size == o.storage_size
143
+ metadata == o.metadata &&
144
+ properties == o.properties
184
145
  end
185
146
 
186
147
  # @see the `==` method
@@ -192,7 +153,7 @@ module IonoscloudDbaasMongo
192
153
  # Calculates hash code according to all attributes.
193
154
  # @return [Integer] Hash code
194
155
  def hash
195
- [id, name, edition, cores, ram, storage_size].hash
156
+ [type, id, metadata, properties].hash
196
157
  end
197
158
 
198
159
  # Builds the object from hash
@@ -11,5 +11,5 @@ OpenAPI Generator version: 5.2.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module IonoscloudDbaasMongo
14
- VERSION = '1.2.1'
14
+ VERSION = '1.2.2'
15
15
  end
@@ -49,6 +49,7 @@ require 'ionoscloud-dbaas-mongo/models/snapshot_response'
49
49
  require 'ionoscloud-dbaas-mongo/models/state'
50
50
  require 'ionoscloud-dbaas-mongo/models/template_list'
51
51
  require 'ionoscloud-dbaas-mongo/models/template_list_all_of'
52
+ require 'ionoscloud-dbaas-mongo/models/template_properties'
52
53
  require 'ionoscloud-dbaas-mongo/models/template_response'
53
54
  require 'ionoscloud-dbaas-mongo/models/user'
54
55
  require 'ionoscloud-dbaas-mongo/models/user_metadata'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ionoscloud-dbaas-mongo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenAPI-Generator
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-07 00:00:00.000000000 Z
11
+ date: 2023-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -110,6 +110,7 @@ files:
110
110
  - docs/models/State.md
111
111
  - docs/models/TemplateList.md
112
112
  - docs/models/TemplateListAllOf.md
113
+ - docs/models/TemplateProperties.md
113
114
  - docs/models/TemplateResponse.md
114
115
  - docs/models/User.md
115
116
  - docs/models/UserMetadata.md
@@ -162,6 +163,7 @@ files:
162
163
  - lib/ionoscloud-dbaas-mongo/models/state.rb
163
164
  - lib/ionoscloud-dbaas-mongo/models/template_list.rb
164
165
  - lib/ionoscloud-dbaas-mongo/models/template_list_all_of.rb
166
+ - lib/ionoscloud-dbaas-mongo/models/template_properties.rb
165
167
  - lib/ionoscloud-dbaas-mongo/models/template_response.rb
166
168
  - lib/ionoscloud-dbaas-mongo/models/user.rb
167
169
  - lib/ionoscloud-dbaas-mongo/models/user_metadata.rb