ionoscloud-dbaas-postgres 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +70 -0
- data/LICENSE +201 -0
- data/README.md +65 -0
- data/Rakefile +10 -0
- data/docs/README.md +163 -0
- data/docs/api/BackupsApi.md +232 -0
- data/docs/api/ClustersApi.md +540 -0
- data/docs/api/LogsApi.md +91 -0
- data/docs/api/MetadataApi.md +153 -0
- data/docs/api/RestoresApi.md +84 -0
- data/docs/models/APIVersion.md +20 -0
- data/docs/models/BackupLocation.md +15 -0
- data/docs/models/BackupMetadata.md +20 -0
- data/docs/models/BackupResponse.md +24 -0
- data/docs/models/ClusterBackup.md +26 -0
- data/docs/models/ClusterBackupList.md +28 -0
- data/docs/models/ClusterBackupListAllOf.md +22 -0
- data/docs/models/ClusterList.md +28 -0
- data/docs/models/ClusterListAllOf.md +22 -0
- data/docs/models/ClusterLogs.md +18 -0
- data/docs/models/ClusterLogsInstances.md +20 -0
- data/docs/models/ClusterLogsMessages.md +20 -0
- data/docs/models/ClusterProperties.md +40 -0
- data/docs/models/ClusterResponse.md +24 -0
- data/docs/models/Connection.md +22 -0
- data/docs/models/CreateClusterProperties.md +42 -0
- data/docs/models/CreateClusterRequest.md +20 -0
- data/docs/models/CreateRestoreRequest.md +20 -0
- data/docs/models/DBUser.md +20 -0
- data/docs/models/DayOfTheWeek.md +15 -0
- data/docs/models/ErrorMessage.md +20 -0
- data/docs/models/ErrorResponse.md +20 -0
- data/docs/models/Location.md +15 -0
- data/docs/models/MaintenanceWindow.md +20 -0
- data/docs/models/Metadata.md +30 -0
- data/docs/models/Pagination.md +22 -0
- data/docs/models/PaginationLinks.md +22 -0
- data/docs/models/PatchClusterProperties.md +32 -0
- data/docs/models/PatchClusterRequest.md +20 -0
- data/docs/models/PostgresVersionList.md +18 -0
- data/docs/models/PostgresVersionListData.md +18 -0
- data/docs/models/ResourceType.md +15 -0
- data/docs/models/State.md +15 -0
- data/docs/models/StorageType.md +15 -0
- data/docs/models/SynchronizationMode.md +15 -0
- data/docs/summary.md +50 -0
- data/git_push.sh +58 -0
- data/ionoscloud-dbaas-postgres.gemspec +38 -0
- data/lib/ionoscloud-dbaas-postgres/api/backups_api.rb +205 -0
- data/lib/ionoscloud-dbaas-postgres/api/clusters_api.rb +464 -0
- data/lib/ionoscloud-dbaas-postgres/api/logs_api.rb +102 -0
- data/lib/ionoscloud-dbaas-postgres/api/metadata_api.rb +136 -0
- data/lib/ionoscloud-dbaas-postgres/api/restores_api.rb +93 -0
- data/lib/ionoscloud-dbaas-postgres/api_client.rb +471 -0
- data/lib/ionoscloud-dbaas-postgres/api_error.rb +57 -0
- data/lib/ionoscloud-dbaas-postgres/configuration.rb +291 -0
- data/lib/ionoscloud-dbaas-postgres/models/api_version.rb +227 -0
- data/lib/ionoscloud-dbaas-postgres/models/backup_location.rb +36 -0
- data/lib/ionoscloud-dbaas-postgres/models/backup_metadata.rb +229 -0
- data/lib/ionoscloud-dbaas-postgres/models/backup_response.rb +247 -0
- data/lib/ionoscloud-dbaas-postgres/models/cluster_backup.rb +260 -0
- data/lib/ionoscloud-dbaas-postgres/models/cluster_backup_list.rb +305 -0
- data/lib/ionoscloud-dbaas-postgres/models/cluster_backup_list_all_of.rb +237 -0
- data/lib/ionoscloud-dbaas-postgres/models/cluster_list.rb +305 -0
- data/lib/ionoscloud-dbaas-postgres/models/cluster_list_all_of.rb +237 -0
- data/lib/ionoscloud-dbaas-postgres/models/cluster_logs.rb +219 -0
- data/lib/ionoscloud-dbaas-postgres/models/cluster_logs_instances.rb +228 -0
- data/lib/ionoscloud-dbaas-postgres/models/cluster_logs_messages.rb +227 -0
- data/lib/ionoscloud-dbaas-postgres/models/cluster_properties.rb +417 -0
- data/lib/ionoscloud-dbaas-postgres/models/cluster_response.rb +247 -0
- data/lib/ionoscloud-dbaas-postgres/models/connection.rb +255 -0
- data/lib/ionoscloud-dbaas-postgres/models/create_cluster_properties.rb +501 -0
- data/lib/ionoscloud-dbaas-postgres/models/create_cluster_request.rb +228 -0
- data/lib/ionoscloud-dbaas-postgres/models/create_restore_request.rb +235 -0
- data/lib/ionoscloud-dbaas-postgres/models/day_of_the_week.rb +42 -0
- data/lib/ionoscloud-dbaas-postgres/models/db_user.rb +239 -0
- data/lib/ionoscloud-dbaas-postgres/models/error_message.rb +229 -0
- data/lib/ionoscloud-dbaas-postgres/models/error_response.rb +228 -0
- data/lib/ionoscloud-dbaas-postgres/models/location.rb +41 -0
- data/lib/ionoscloud-dbaas-postgres/models/maintenance_window.rb +238 -0
- data/lib/ionoscloud-dbaas-postgres/models/metadata.rb +275 -0
- data/lib/ionoscloud-dbaas-postgres/models/pagination.rb +268 -0
- data/lib/ionoscloud-dbaas-postgres/models/pagination_links.rb +240 -0
- data/lib/ionoscloud-dbaas-postgres/models/patch_cluster_properties.rb +381 -0
- data/lib/ionoscloud-dbaas-postgres/models/patch_cluster_request.rb +228 -0
- data/lib/ionoscloud-dbaas-postgres/models/postgres_version_list.rb +219 -0
- data/lib/ionoscloud-dbaas-postgres/models/postgres_version_list_data.rb +218 -0
- data/lib/ionoscloud-dbaas-postgres/models/resource_type.rb +38 -0
- data/lib/ionoscloud-dbaas-postgres/models/state.rb +40 -0
- data/lib/ionoscloud-dbaas-postgres/models/storage_type.rb +37 -0
- data/lib/ionoscloud-dbaas-postgres/models/synchronization_mode.rb +38 -0
- data/lib/ionoscloud-dbaas-postgres/version.rb +15 -0
- data/lib/ionoscloud-dbaas-postgres.rb +79 -0
- data/lib/test_driver.rb +119 -0
- data/sonar-project.properties +12 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/spec_helper.rb +111 -0
- metadata +190 -0
@@ -0,0 +1,219 @@
|
|
1
|
+
=begin
|
2
|
+
#IONOS DBaaS REST API
|
3
|
+
|
4
|
+
#An enterprise-grade Database is provided as a Service (DBaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API. The API allows you to create additional database clusters or modify existing ones. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.0.1
|
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 IonoscloudDbaasPostgres
|
17
|
+
# list of PostgreSQL versions
|
18
|
+
class PostgresVersionList
|
19
|
+
attr_accessor :data
|
20
|
+
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
22
|
+
def self.attribute_map
|
23
|
+
{
|
24
|
+
:'data' => :'data'
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
# Returns all the JSON keys this model knows about
|
29
|
+
def self.acceptable_attributes
|
30
|
+
attribute_map.values
|
31
|
+
end
|
32
|
+
|
33
|
+
# Attribute type mapping.
|
34
|
+
def self.openapi_types
|
35
|
+
{
|
36
|
+
:'data' => :'Array<PostgresVersionListData>'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# List of attributes with nullable: true
|
41
|
+
def self.openapi_nullable
|
42
|
+
Set.new([
|
43
|
+
])
|
44
|
+
end
|
45
|
+
|
46
|
+
# Initializes the object
|
47
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
48
|
+
def initialize(attributes = {})
|
49
|
+
if (!attributes.is_a?(Hash))
|
50
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `IonoscloudDbaasPostgres::PostgresVersionList` initialize method"
|
51
|
+
end
|
52
|
+
|
53
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
54
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
55
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
56
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `IonoscloudDbaasPostgres::PostgresVersionList`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
57
|
+
end
|
58
|
+
h[k.to_sym] = v
|
59
|
+
}
|
60
|
+
|
61
|
+
if attributes.key?(:'data') && (value = attributes[:'data']).is_a?(Array)
|
62
|
+
self.data = value
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
67
|
+
# @return Array for valid properties with the reasons
|
68
|
+
def list_invalid_properties
|
69
|
+
invalid_properties = Array.new
|
70
|
+
invalid_properties
|
71
|
+
end
|
72
|
+
|
73
|
+
# Check to see if the all the properties in the model are valid
|
74
|
+
# @return true if the model is valid
|
75
|
+
def valid?
|
76
|
+
true
|
77
|
+
end
|
78
|
+
|
79
|
+
# Checks equality by comparing each attribute.
|
80
|
+
# @param [Object] Object to be compared
|
81
|
+
def ==(o)
|
82
|
+
return true if self.equal?(o)
|
83
|
+
self.class == o.class &&
|
84
|
+
data == o.data
|
85
|
+
end
|
86
|
+
|
87
|
+
# @see the `==` method
|
88
|
+
# @param [Object] Object to be compared
|
89
|
+
def eql?(o)
|
90
|
+
self == o
|
91
|
+
end
|
92
|
+
|
93
|
+
# Calculates hash code according to all attributes.
|
94
|
+
# @return [Integer] Hash code
|
95
|
+
def hash
|
96
|
+
[data].hash
|
97
|
+
end
|
98
|
+
|
99
|
+
# Builds the object from hash
|
100
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
101
|
+
# @return [Object] Returns the model itself
|
102
|
+
def self.build_from_hash(attributes)
|
103
|
+
new.build_from_hash(attributes)
|
104
|
+
end
|
105
|
+
|
106
|
+
# Builds the object from hash
|
107
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
108
|
+
# @return [Object] Returns the model itself
|
109
|
+
def build_from_hash(attributes)
|
110
|
+
return nil unless attributes.is_a?(Hash)
|
111
|
+
self.class.openapi_types.each_pair do |key, type|
|
112
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
113
|
+
self.send("#{key}=", nil)
|
114
|
+
elsif type =~ /\AArray<(.*)>/i
|
115
|
+
# check to ensure the input is an array given that the attribute
|
116
|
+
# is documented as an array but the input is not
|
117
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
118
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
119
|
+
end
|
120
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
121
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
self
|
126
|
+
end
|
127
|
+
|
128
|
+
# Deserializes the data based on type
|
129
|
+
# @param string type Data type
|
130
|
+
# @param string value Value to be deserialized
|
131
|
+
# @return [Object] Deserialized data
|
132
|
+
def _deserialize(type, value)
|
133
|
+
case type.to_sym
|
134
|
+
when :Time
|
135
|
+
Time.parse(value)
|
136
|
+
when :Date
|
137
|
+
Date.parse(value)
|
138
|
+
when :String
|
139
|
+
value.to_s
|
140
|
+
when :Integer
|
141
|
+
value.to_i
|
142
|
+
when :Float
|
143
|
+
value.to_f
|
144
|
+
when :Boolean
|
145
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
146
|
+
true
|
147
|
+
else
|
148
|
+
false
|
149
|
+
end
|
150
|
+
when :Object
|
151
|
+
# generic object (usually a Hash), return directly
|
152
|
+
value
|
153
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
154
|
+
inner_type = Regexp.last_match[:inner_type]
|
155
|
+
value.map { |v| _deserialize(inner_type, v) }
|
156
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
157
|
+
k_type = Regexp.last_match[:k_type]
|
158
|
+
v_type = Regexp.last_match[:v_type]
|
159
|
+
{}.tap do |hash|
|
160
|
+
value.each do |k, v|
|
161
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
162
|
+
end
|
163
|
+
end
|
164
|
+
else # model
|
165
|
+
# models (e.g. Pet) or oneOf
|
166
|
+
klass = IonoscloudDbaasPostgres.const_get(type)
|
167
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
171
|
+
# Returns the string representation of the object
|
172
|
+
# @return [String] String presentation of the object
|
173
|
+
def to_s
|
174
|
+
to_hash.to_s
|
175
|
+
end
|
176
|
+
|
177
|
+
# to_body is an alias to to_hash (backward compatibility)
|
178
|
+
# @return [Hash] Returns the object in the form of hash
|
179
|
+
def to_body
|
180
|
+
to_hash
|
181
|
+
end
|
182
|
+
|
183
|
+
# Returns the object in the form of hash
|
184
|
+
# @return [Hash] Returns the object in the form of hash
|
185
|
+
def to_hash
|
186
|
+
hash = {}
|
187
|
+
self.class.attribute_map.each_pair do |attr, param|
|
188
|
+
value = self.send(attr)
|
189
|
+
if value.nil?
|
190
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
191
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
192
|
+
end
|
193
|
+
|
194
|
+
hash[param] = _to_hash(value)
|
195
|
+
end
|
196
|
+
hash
|
197
|
+
end
|
198
|
+
|
199
|
+
# Outputs non-array value in the form of hash
|
200
|
+
# For object, use to_hash. Otherwise, just return the value
|
201
|
+
# @param [Object] value Any valid value
|
202
|
+
# @return [Hash] Returns the value in the form of hash
|
203
|
+
def _to_hash(value)
|
204
|
+
if value.is_a?(Array)
|
205
|
+
value.compact.map { |v| _to_hash(v) }
|
206
|
+
elsif value.is_a?(Hash)
|
207
|
+
{}.tap do |hash|
|
208
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
209
|
+
end
|
210
|
+
elsif value.respond_to? :to_hash
|
211
|
+
value.to_hash
|
212
|
+
else
|
213
|
+
value
|
214
|
+
end
|
215
|
+
end
|
216
|
+
|
217
|
+
end
|
218
|
+
|
219
|
+
end
|
@@ -0,0 +1,218 @@
|
|
1
|
+
=begin
|
2
|
+
#IONOS DBaaS REST API
|
3
|
+
|
4
|
+
#An enterprise-grade Database is provided as a Service (DBaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API. The API allows you to create additional database clusters or modify existing ones. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.0.1
|
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 IonoscloudDbaasPostgres
|
17
|
+
class PostgresVersionListData
|
18
|
+
attr_accessor :name
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'name' => :'name'
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
# Returns all the JSON keys this model knows about
|
28
|
+
def self.acceptable_attributes
|
29
|
+
attribute_map.values
|
30
|
+
end
|
31
|
+
|
32
|
+
# Attribute type mapping.
|
33
|
+
def self.openapi_types
|
34
|
+
{
|
35
|
+
:'name' => :'String'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# List of attributes with nullable: true
|
40
|
+
def self.openapi_nullable
|
41
|
+
Set.new([
|
42
|
+
])
|
43
|
+
end
|
44
|
+
|
45
|
+
# Initializes the object
|
46
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
47
|
+
def initialize(attributes = {})
|
48
|
+
if (!attributes.is_a?(Hash))
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `IonoscloudDbaasPostgres::PostgresVersionListData` initialize method"
|
50
|
+
end
|
51
|
+
|
52
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
53
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
54
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
55
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `IonoscloudDbaasPostgres::PostgresVersionListData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
56
|
+
end
|
57
|
+
h[k.to_sym] = v
|
58
|
+
}
|
59
|
+
|
60
|
+
if attributes.key?(:'name')
|
61
|
+
self.name = attributes[:'name']
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
66
|
+
# @return Array for valid properties with the reasons
|
67
|
+
def list_invalid_properties
|
68
|
+
invalid_properties = Array.new
|
69
|
+
invalid_properties
|
70
|
+
end
|
71
|
+
|
72
|
+
# Check to see if the all the properties in the model are valid
|
73
|
+
# @return true if the model is valid
|
74
|
+
def valid?
|
75
|
+
true
|
76
|
+
end
|
77
|
+
|
78
|
+
# Checks equality by comparing each attribute.
|
79
|
+
# @param [Object] Object to be compared
|
80
|
+
def ==(o)
|
81
|
+
return true if self.equal?(o)
|
82
|
+
self.class == o.class &&
|
83
|
+
name == o.name
|
84
|
+
end
|
85
|
+
|
86
|
+
# @see the `==` method
|
87
|
+
# @param [Object] Object to be compared
|
88
|
+
def eql?(o)
|
89
|
+
self == o
|
90
|
+
end
|
91
|
+
|
92
|
+
# Calculates hash code according to all attributes.
|
93
|
+
# @return [Integer] Hash code
|
94
|
+
def hash
|
95
|
+
[name].hash
|
96
|
+
end
|
97
|
+
|
98
|
+
# Builds the object from hash
|
99
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
100
|
+
# @return [Object] Returns the model itself
|
101
|
+
def self.build_from_hash(attributes)
|
102
|
+
new.build_from_hash(attributes)
|
103
|
+
end
|
104
|
+
|
105
|
+
# Builds the object from hash
|
106
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
107
|
+
# @return [Object] Returns the model itself
|
108
|
+
def build_from_hash(attributes)
|
109
|
+
return nil unless attributes.is_a?(Hash)
|
110
|
+
self.class.openapi_types.each_pair do |key, type|
|
111
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
112
|
+
self.send("#{key}=", nil)
|
113
|
+
elsif type =~ /\AArray<(.*)>/i
|
114
|
+
# check to ensure the input is an array given that the attribute
|
115
|
+
# is documented as an array but the input is not
|
116
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
117
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
118
|
+
end
|
119
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
120
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
self
|
125
|
+
end
|
126
|
+
|
127
|
+
# Deserializes the data based on type
|
128
|
+
# @param string type Data type
|
129
|
+
# @param string value Value to be deserialized
|
130
|
+
# @return [Object] Deserialized data
|
131
|
+
def _deserialize(type, value)
|
132
|
+
case type.to_sym
|
133
|
+
when :Time
|
134
|
+
Time.parse(value)
|
135
|
+
when :Date
|
136
|
+
Date.parse(value)
|
137
|
+
when :String
|
138
|
+
value.to_s
|
139
|
+
when :Integer
|
140
|
+
value.to_i
|
141
|
+
when :Float
|
142
|
+
value.to_f
|
143
|
+
when :Boolean
|
144
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
145
|
+
true
|
146
|
+
else
|
147
|
+
false
|
148
|
+
end
|
149
|
+
when :Object
|
150
|
+
# generic object (usually a Hash), return directly
|
151
|
+
value
|
152
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
153
|
+
inner_type = Regexp.last_match[:inner_type]
|
154
|
+
value.map { |v| _deserialize(inner_type, v) }
|
155
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
156
|
+
k_type = Regexp.last_match[:k_type]
|
157
|
+
v_type = Regexp.last_match[:v_type]
|
158
|
+
{}.tap do |hash|
|
159
|
+
value.each do |k, v|
|
160
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
161
|
+
end
|
162
|
+
end
|
163
|
+
else # model
|
164
|
+
# models (e.g. Pet) or oneOf
|
165
|
+
klass = IonoscloudDbaasPostgres.const_get(type)
|
166
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
170
|
+
# Returns the string representation of the object
|
171
|
+
# @return [String] String presentation of the object
|
172
|
+
def to_s
|
173
|
+
to_hash.to_s
|
174
|
+
end
|
175
|
+
|
176
|
+
# to_body is an alias to to_hash (backward compatibility)
|
177
|
+
# @return [Hash] Returns the object in the form of hash
|
178
|
+
def to_body
|
179
|
+
to_hash
|
180
|
+
end
|
181
|
+
|
182
|
+
# Returns the object in the form of hash
|
183
|
+
# @return [Hash] Returns the object in the form of hash
|
184
|
+
def to_hash
|
185
|
+
hash = {}
|
186
|
+
self.class.attribute_map.each_pair do |attr, param|
|
187
|
+
value = self.send(attr)
|
188
|
+
if value.nil?
|
189
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
190
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
191
|
+
end
|
192
|
+
|
193
|
+
hash[param] = _to_hash(value)
|
194
|
+
end
|
195
|
+
hash
|
196
|
+
end
|
197
|
+
|
198
|
+
# Outputs non-array value in the form of hash
|
199
|
+
# For object, use to_hash. Otherwise, just return the value
|
200
|
+
# @param [Object] value Any valid value
|
201
|
+
# @return [Hash] Returns the value in the form of hash
|
202
|
+
def _to_hash(value)
|
203
|
+
if value.is_a?(Array)
|
204
|
+
value.compact.map { |v| _to_hash(v) }
|
205
|
+
elsif value.is_a?(Hash)
|
206
|
+
{}.tap do |hash|
|
207
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
208
|
+
end
|
209
|
+
elsif value.respond_to? :to_hash
|
210
|
+
value.to_hash
|
211
|
+
else
|
212
|
+
value
|
213
|
+
end
|
214
|
+
end
|
215
|
+
|
216
|
+
end
|
217
|
+
|
218
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
=begin
|
2
|
+
#IONOS DBaaS REST API
|
3
|
+
|
4
|
+
#An enterprise-grade Database is provided as a Service (DBaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API. The API allows you to create additional database clusters or modify existing ones. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.0.1
|
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 IonoscloudDbaasPostgres
|
17
|
+
class ResourceType
|
18
|
+
COLLECTION = "collection".freeze
|
19
|
+
CLUSTER = "cluster".freeze
|
20
|
+
BACKUP = "backup".freeze
|
21
|
+
|
22
|
+
# Builds the enum from string
|
23
|
+
# @param [String] The enum value in the form of the string
|
24
|
+
# @return [String] The enum value
|
25
|
+
def self.build_from_hash(value)
|
26
|
+
new.build_from_hash(value)
|
27
|
+
end
|
28
|
+
|
29
|
+
# Builds the enum from string
|
30
|
+
# @param [String] The enum value in the form of the string
|
31
|
+
# @return [String] The enum value
|
32
|
+
def build_from_hash(value)
|
33
|
+
constantValues = ResourceType.constants.select { |c| ResourceType::const_get(c) == value }
|
34
|
+
raise "Invalid ENUM value #{value} for class #ResourceType" if constantValues.empty?
|
35
|
+
value
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
=begin
|
2
|
+
#IONOS DBaaS REST API
|
3
|
+
|
4
|
+
#An enterprise-grade Database is provided as a Service (DBaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API. The API allows you to create additional database clusters or modify existing ones. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.0.1
|
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 IonoscloudDbaasPostgres
|
17
|
+
class State
|
18
|
+
AVAILABLE = "AVAILABLE".freeze
|
19
|
+
BUSY = "BUSY".freeze
|
20
|
+
DESTROYING = "DESTROYING".freeze
|
21
|
+
FAILED = "FAILED".freeze
|
22
|
+
UNKNOWN = "UNKNOWN".freeze
|
23
|
+
|
24
|
+
# Builds the enum from string
|
25
|
+
# @param [String] The enum value in the form of the string
|
26
|
+
# @return [String] The enum value
|
27
|
+
def self.build_from_hash(value)
|
28
|
+
new.build_from_hash(value)
|
29
|
+
end
|
30
|
+
|
31
|
+
# Builds the enum from string
|
32
|
+
# @param [String] The enum value in the form of the string
|
33
|
+
# @return [String] The enum value
|
34
|
+
def build_from_hash(value)
|
35
|
+
constantValues = State.constants.select { |c| State::const_get(c) == value }
|
36
|
+
raise "Invalid ENUM value #{value} for class #State" if constantValues.empty?
|
37
|
+
value
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
=begin
|
2
|
+
#IONOS DBaaS REST API
|
3
|
+
|
4
|
+
#An enterprise-grade Database is provided as a Service (DBaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API. The API allows you to create additional database clusters or modify existing ones. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.0.1
|
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 IonoscloudDbaasPostgres
|
17
|
+
class StorageType
|
18
|
+
HDD = "HDD".freeze
|
19
|
+
SSD = "SSD".freeze
|
20
|
+
|
21
|
+
# Builds the enum from string
|
22
|
+
# @param [String] The enum value in the form of the string
|
23
|
+
# @return [String] The enum value
|
24
|
+
def self.build_from_hash(value)
|
25
|
+
new.build_from_hash(value)
|
26
|
+
end
|
27
|
+
|
28
|
+
# Builds the enum from string
|
29
|
+
# @param [String] The enum value in the form of the string
|
30
|
+
# @return [String] The enum value
|
31
|
+
def build_from_hash(value)
|
32
|
+
constantValues = StorageType.constants.select { |c| StorageType::const_get(c) == value }
|
33
|
+
raise "Invalid ENUM value #{value} for class #StorageType" if constantValues.empty?
|
34
|
+
value
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
=begin
|
2
|
+
#IONOS DBaaS REST API
|
3
|
+
|
4
|
+
#An enterprise-grade Database is provided as a Service (DBaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API. The API allows you to create additional database clusters or modify existing ones. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.0.1
|
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 IonoscloudDbaasPostgres
|
17
|
+
class SynchronizationMode
|
18
|
+
ASYNCHRONOUS = "ASYNCHRONOUS".freeze
|
19
|
+
SYNCHRONOUS = "SYNCHRONOUS".freeze
|
20
|
+
STRICTLY_SYNCHRONOUS = "STRICTLY_SYNCHRONOUS".freeze
|
21
|
+
|
22
|
+
# Builds the enum from string
|
23
|
+
# @param [String] The enum value in the form of the string
|
24
|
+
# @return [String] The enum value
|
25
|
+
def self.build_from_hash(value)
|
26
|
+
new.build_from_hash(value)
|
27
|
+
end
|
28
|
+
|
29
|
+
# Builds the enum from string
|
30
|
+
# @param [String] The enum value in the form of the string
|
31
|
+
# @return [String] The enum value
|
32
|
+
def build_from_hash(value)
|
33
|
+
constantValues = SynchronizationMode.constants.select { |c| SynchronizationMode::const_get(c) == value }
|
34
|
+
raise "Invalid ENUM value #{value} for class #SynchronizationMode" if constantValues.empty?
|
35
|
+
value
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
=begin
|
2
|
+
#IONOS DBaaS REST API
|
3
|
+
|
4
|
+
#An enterprise-grade Database is provided as a Service (DBaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API. The API allows you to create additional database clusters or modify existing ones. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.0.1
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.2.1-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
module IonoscloudDbaasPostgres
|
14
|
+
VERSION = '1.0.0'
|
15
|
+
end
|
@@ -0,0 +1,79 @@
|
|
1
|
+
=begin
|
2
|
+
#IONOS DBaaS REST API
|
3
|
+
|
4
|
+
#An enterprise-grade Database is provided as a Service (DBaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API. The API allows you to create additional database clusters or modify existing ones. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.0.1
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.2.1-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
# Common files
|
14
|
+
require 'ionoscloud-dbaas-postgres/api_client'
|
15
|
+
require 'ionoscloud-dbaas-postgres/api_error'
|
16
|
+
require 'ionoscloud-dbaas-postgres/version'
|
17
|
+
require 'ionoscloud-dbaas-postgres/configuration'
|
18
|
+
|
19
|
+
# Models
|
20
|
+
require 'ionoscloud-dbaas-postgres/models/api_version'
|
21
|
+
require 'ionoscloud-dbaas-postgres/models/backup_location'
|
22
|
+
require 'ionoscloud-dbaas-postgres/models/backup_metadata'
|
23
|
+
require 'ionoscloud-dbaas-postgres/models/backup_response'
|
24
|
+
require 'ionoscloud-dbaas-postgres/models/cluster_backup'
|
25
|
+
require 'ionoscloud-dbaas-postgres/models/cluster_backup_list'
|
26
|
+
require 'ionoscloud-dbaas-postgres/models/cluster_backup_list_all_of'
|
27
|
+
require 'ionoscloud-dbaas-postgres/models/cluster_list'
|
28
|
+
require 'ionoscloud-dbaas-postgres/models/cluster_list_all_of'
|
29
|
+
require 'ionoscloud-dbaas-postgres/models/cluster_logs'
|
30
|
+
require 'ionoscloud-dbaas-postgres/models/cluster_logs_instances'
|
31
|
+
require 'ionoscloud-dbaas-postgres/models/cluster_logs_messages'
|
32
|
+
require 'ionoscloud-dbaas-postgres/models/cluster_properties'
|
33
|
+
require 'ionoscloud-dbaas-postgres/models/cluster_response'
|
34
|
+
require 'ionoscloud-dbaas-postgres/models/connection'
|
35
|
+
require 'ionoscloud-dbaas-postgres/models/create_cluster_properties'
|
36
|
+
require 'ionoscloud-dbaas-postgres/models/create_cluster_request'
|
37
|
+
require 'ionoscloud-dbaas-postgres/models/create_restore_request'
|
38
|
+
require 'ionoscloud-dbaas-postgres/models/db_user'
|
39
|
+
require 'ionoscloud-dbaas-postgres/models/day_of_the_week'
|
40
|
+
require 'ionoscloud-dbaas-postgres/models/error_message'
|
41
|
+
require 'ionoscloud-dbaas-postgres/models/error_response'
|
42
|
+
require 'ionoscloud-dbaas-postgres/models/location'
|
43
|
+
require 'ionoscloud-dbaas-postgres/models/maintenance_window'
|
44
|
+
require 'ionoscloud-dbaas-postgres/models/metadata'
|
45
|
+
require 'ionoscloud-dbaas-postgres/models/pagination'
|
46
|
+
require 'ionoscloud-dbaas-postgres/models/pagination_links'
|
47
|
+
require 'ionoscloud-dbaas-postgres/models/patch_cluster_properties'
|
48
|
+
require 'ionoscloud-dbaas-postgres/models/patch_cluster_request'
|
49
|
+
require 'ionoscloud-dbaas-postgres/models/postgres_version_list'
|
50
|
+
require 'ionoscloud-dbaas-postgres/models/postgres_version_list_data'
|
51
|
+
require 'ionoscloud-dbaas-postgres/models/resource_type'
|
52
|
+
require 'ionoscloud-dbaas-postgres/models/state'
|
53
|
+
require 'ionoscloud-dbaas-postgres/models/storage_type'
|
54
|
+
require 'ionoscloud-dbaas-postgres/models/synchronization_mode'
|
55
|
+
|
56
|
+
# APIs
|
57
|
+
require 'ionoscloud-dbaas-postgres/api/backups_api'
|
58
|
+
require 'ionoscloud-dbaas-postgres/api/clusters_api'
|
59
|
+
require 'ionoscloud-dbaas-postgres/api/logs_api'
|
60
|
+
require 'ionoscloud-dbaas-postgres/api/metadata_api'
|
61
|
+
require 'ionoscloud-dbaas-postgres/api/restores_api'
|
62
|
+
|
63
|
+
module IonoscloudDbaasPostgres
|
64
|
+
class << self
|
65
|
+
# Customize default settings for the SDK using block.
|
66
|
+
# IonoscloudDbaasPostgres.configure do |config|
|
67
|
+
# config.username = "xxx"
|
68
|
+
# config.password = "xxx"
|
69
|
+
# end
|
70
|
+
# If no block given, return the default Configuration object.
|
71
|
+
def configure
|
72
|
+
if block_given?
|
73
|
+
yield(Configuration.default)
|
74
|
+
else
|
75
|
+
Configuration.default
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|