oci 2.5.9 → 2.5.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/oci/autoscaling/auto_scaling_client.rb +73 -0
- data/lib/oci/autoscaling/autoscaling.rb +1 -0
- data/lib/oci/autoscaling/models/change_auto_scaling_compartment_details.rb +154 -0
- data/lib/oci/autoscaling/models/create_auto_scaling_configuration_details.rb +0 -1
- data/lib/oci/container_engine/models/work_request_error.rb +0 -1
- data/lib/oci/core/blockstorage_client.rb +342 -0
- data/lib/oci/core/compute_client.rb +77 -5
- data/lib/oci/core/compute_client_composite_operations.rb +3 -3
- data/lib/oci/core/compute_management_client.rb +211 -0
- data/lib/oci/core/core.rb +27 -0
- data/lib/oci/core/models/add_network_security_group_security_rules_details.rb +153 -0
- data/lib/oci/core/models/add_security_rule_details.rb +388 -0
- data/lib/oci/core/models/added_network_security_group_security_rules.rb +153 -0
- data/lib/oci/core/models/change_boot_volume_backup_compartment_details.rb +153 -0
- data/lib/oci/core/models/change_boot_volume_compartment_details.rb +153 -0
- data/lib/oci/core/models/change_image_compartment_details.rb +154 -0
- data/lib/oci/core/models/change_instance_configuration_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_instance_pool_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_nat_gateway_compartment_details.rb +153 -0
- data/lib/oci/core/models/change_route_table_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_security_list_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_service_gateway_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_subnet_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_vcn_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_volume_backup_compartment_details.rb +153 -0
- data/lib/oci/core/models/change_volume_compartment_details.rb +153 -0
- data/lib/oci/core/models/change_volume_group_backup_compartment_details.rb +153 -0
- data/lib/oci/core/models/change_volume_group_compartment_details.rb +153 -0
- data/lib/oci/core/models/create_network_security_group_details.rb +223 -0
- data/lib/oci/core/models/create_vnic_details.rb +18 -1
- data/lib/oci/core/models/image.rb +2 -1
- data/lib/oci/core/models/instance_configuration.rb +3 -1
- data/lib/oci/core/models/instance_configuration_create_vnic_details.rb +18 -1
- data/lib/oci/core/models/instance_configuration_instance_source_via_image_details.rb +15 -1
- data/lib/oci/core/models/instance_configuration_summary.rb +3 -3
- data/lib/oci/core/models/instance_pool.rb +4 -1
- data/lib/oci/core/models/instance_pool_summary.rb +3 -3
- data/lib/oci/core/models/network_security_group.rb +324 -0
- data/lib/oci/core/models/network_security_group_vnic.rb +188 -0
- data/lib/oci/core/models/remove_network_security_group_security_rules_details.rb +154 -0
- data/lib/oci/core/models/security_list.rb +5 -0
- data/lib/oci/core/models/security_rule.rb +455 -0
- data/lib/oci/core/models/update_network_security_group_details.rb +189 -0
- data/lib/oci/core/models/update_network_security_group_security_rules_details.rb +153 -0
- data/lib/oci/core/models/update_security_rule_details.rb +404 -0
- data/lib/oci/core/models/update_vnic_details.rb +20 -1
- data/lib/oci/core/models/updated_network_security_group_security_rules.rb +153 -0
- data/lib/oci/core/models/vnic.rb +18 -1
- data/lib/oci/core/virtual_network_client.rb +1228 -132
- data/lib/oci/core/virtual_network_client_composite_operations.rb +119 -0
- data/lib/oci/database/database.rb +19 -0
- data/lib/oci/database/database_client.rb +1066 -46
- data/lib/oci/database/database_client_composite_operations.rb +317 -0
- data/lib/oci/database/models/autonomous_container_database.rb +416 -0
- data/lib/oci/database/models/autonomous_container_database_backup_config.rb +157 -0
- data/lib/oci/database/models/autonomous_container_database_summary.rb +420 -0
- data/lib/oci/database/models/autonomous_database.rb +58 -1
- data/lib/oci/database/models/autonomous_database_backup.rb +16 -1
- data/lib/oci/database/models/autonomous_database_backup_summary.rb +16 -1
- data/lib/oci/database/models/autonomous_database_connection_strings.rb +11 -1
- data/lib/oci/database/models/autonomous_database_connection_urls.rb +170 -0
- data/lib/oci/database/models/autonomous_database_summary.rb +58 -1
- data/lib/oci/database/models/autonomous_db_preview_version_summary.rb +224 -0
- data/lib/oci/database/models/autonomous_exadata_infrastructure.rb +419 -0
- data/lib/oci/database/models/autonomous_exadata_infrastructure_maintenance_window.rb +186 -0
- data/lib/oci/database/models/autonomous_exadata_infrastructure_shape_summary.rb +224 -0
- data/lib/oci/database/models/autonomous_exadata_infrastructure_summary.rb +436 -0
- data/lib/oci/database/models/backup.rb +1 -0
- data/lib/oci/database/models/backup_summary.rb +1 -0
- data/lib/oci/database/models/create_autonomous_container_database_details.rb +284 -0
- data/lib/oci/database/models/create_autonomous_database_base.rb +46 -1
- data/lib/oci/database/models/create_autonomous_database_clone_details.rb +13 -1
- data/lib/oci/database/models/create_autonomous_database_details.rb +13 -1
- data/lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb +34 -1
- data/lib/oci/database/models/create_db_home_with_db_system_id_base.rb +1 -1
- data/lib/oci/database/models/day_of_week.rb +174 -0
- data/lib/oci/database/models/db_system.rb +34 -1
- data/lib/oci/database/models/db_system_summary.rb +34 -1
- data/lib/oci/database/models/launch_autonomous_exadata_infrastructure_details.rb +304 -0
- data/lib/oci/database/models/launch_db_system_base.rb +35 -2
- data/lib/oci/database/models/launch_db_system_details.rb +11 -2
- data/lib/oci/database/models/launch_db_system_from_backup_details.rb +11 -2
- data/lib/oci/database/models/maintenance_run.rb +392 -0
- data/lib/oci/database/models/maintenance_run_summary.rb +395 -0
- data/lib/oci/database/models/maintenance_window.rb +226 -0
- data/lib/oci/database/models/month.rb +179 -0
- data/lib/oci/database/models/restore_autonomous_database_details.rb +30 -4
- data/lib/oci/database/models/update_autonomous_container_database_details.rb +230 -0
- data/lib/oci/database/models/update_autonomous_database_details.rb +18 -1
- data/lib/oci/database/models/update_autonomous_exadata_infrastructure_details.rb +203 -0
- data/lib/oci/database/models/update_db_system_details.rb +37 -4
- data/lib/oci/database/models/update_maintenance_run_details.rb +154 -0
- data/lib/oci/email/email.rb +1 -0
- data/lib/oci/email/email_client.rb +62 -0
- data/lib/oci/email/models/change_sender_compartment_details.rb +157 -0
- data/lib/oci/key_management/key_management.rb +1 -0
- data/lib/oci/key_management/kms_crypto_client.rb +4 -4
- data/lib/oci/key_management/kms_management_client.rb +161 -10
- data/lib/oci/key_management/kms_management_client_composite_operations.rb +79 -0
- data/lib/oci/key_management/kms_vault_client.rb +16 -11
- data/lib/oci/key_management/models/key.rb +17 -1
- data/lib/oci/key_management/models/schedule_key_deletion_details.rb +156 -0
- data/lib/oci/load_balancer/load_balancer.rb +1 -0
- data/lib/oci/load_balancer/load_balancer_client.rb +64 -0
- data/lib/oci/load_balancer/load_balancer_client_composite_operations.rb +50 -0
- data/lib/oci/load_balancer/models/create_load_balancer_details.rb +16 -1
- data/lib/oci/load_balancer/models/load_balancer.rb +16 -1
- data/lib/oci/load_balancer/models/remove_http_request_header_rule.rb +1 -1
- data/lib/oci/load_balancer/models/remove_http_response_header_rule.rb +1 -1
- data/lib/oci/load_balancer/models/session_persistence_configuration_details.rb +9 -5
- data/lib/oci/load_balancer/models/update_backend_set_details.rb +2 -0
- data/lib/oci/load_balancer/models/update_network_security_groups_details.rb +154 -0
- data/lib/oci/monitoring/models/metric.rb +1 -0
- data/lib/oci/object_storage/models/work_request_error.rb +1 -0
- data/lib/oci/resource_manager/models/change_stack_compartment_details.rb +155 -0
- data/lib/oci/resource_manager/models/work_request.rb +293 -0
- data/lib/oci/resource_manager/models/work_request_error.rb +170 -0
- data/lib/oci/resource_manager/models/work_request_log_entry.rb +159 -0
- data/lib/oci/resource_manager/models/work_request_resource.rb +217 -0
- data/lib/oci/resource_manager/models/work_request_summary.rb +254 -0
- data/lib/oci/resource_manager/resource_manager.rb +6 -0
- data/lib/oci/resource_manager/resource_manager_client.rb +338 -0
- data/lib/oci/resource_manager/resource_manager_client_composite_operations.rb +50 -0
- data/lib/oci/streaming/stream_admin_client.rb +2 -2
- data/lib/oci/streaming/stream_client.rb +1 -1
- data/lib/oci/version.rb +1 -1
- metadata +58 -2
@@ -0,0 +1,226 @@
|
|
1
|
+
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
require 'logger'
|
5
|
+
|
6
|
+
# rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength
|
7
|
+
module OCI
|
8
|
+
# The scheduling details for the quarterly maintenance window. Patching and system updates take place during the maintenance window.
|
9
|
+
#
|
10
|
+
class Database::Models::MaintenanceWindow
|
11
|
+
PREFERENCE_ENUM = [
|
12
|
+
PREFERENCE_NO_PREFERENCE = 'NO_PREFERENCE'.freeze,
|
13
|
+
PREFERENCE_CUSTOM_PREFERENCE = 'CUSTOM_PREFERENCE'.freeze,
|
14
|
+
PREFERENCE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
|
15
|
+
].freeze
|
16
|
+
|
17
|
+
# **[Required]** The maintenance window scheduling preference.
|
18
|
+
# @return [String]
|
19
|
+
attr_reader :preference
|
20
|
+
|
21
|
+
# Months during the year when maintenance should be performed.
|
22
|
+
# @return [Array<OCI::Database::Models::Month>]
|
23
|
+
attr_accessor :months
|
24
|
+
|
25
|
+
# Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week.
|
26
|
+
# For example, to allow maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance cannot be scheduled for the fifth week of months that contain more than 28 days.
|
27
|
+
# Note that this parameter works in conjunction with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance will be performed.
|
28
|
+
#
|
29
|
+
# @return [Array<Integer>]
|
30
|
+
attr_accessor :weeks_of_month
|
31
|
+
|
32
|
+
# Days during the week when maintenance should be performed.
|
33
|
+
# @return [Array<OCI::Database::Models::DayOfWeek>]
|
34
|
+
attr_accessor :days_of_week
|
35
|
+
|
36
|
+
# The window of hours during the day when maintenance should be performed.
|
37
|
+
# @return [Array<Integer>]
|
38
|
+
attr_accessor :hours_of_day
|
39
|
+
|
40
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
41
|
+
def self.attribute_map
|
42
|
+
{
|
43
|
+
# rubocop:disable Style/SymbolLiteral
|
44
|
+
'preference': :'preference',
|
45
|
+
'months': :'months',
|
46
|
+
'weeks_of_month': :'weeksOfMonth',
|
47
|
+
'days_of_week': :'daysOfWeek',
|
48
|
+
'hours_of_day': :'hoursOfDay'
|
49
|
+
# rubocop:enable Style/SymbolLiteral
|
50
|
+
}
|
51
|
+
end
|
52
|
+
|
53
|
+
# Attribute type mapping.
|
54
|
+
def self.swagger_types
|
55
|
+
{
|
56
|
+
# rubocop:disable Style/SymbolLiteral
|
57
|
+
'preference': :'String',
|
58
|
+
'months': :'Array<OCI::Database::Models::Month>',
|
59
|
+
'weeks_of_month': :'Array<Integer>',
|
60
|
+
'days_of_week': :'Array<OCI::Database::Models::DayOfWeek>',
|
61
|
+
'hours_of_day': :'Array<Integer>'
|
62
|
+
# rubocop:enable Style/SymbolLiteral
|
63
|
+
}
|
64
|
+
end
|
65
|
+
|
66
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
67
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
68
|
+
|
69
|
+
|
70
|
+
# Initializes the object
|
71
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
72
|
+
# @option attributes [String] :preference The value to assign to the {#preference} property
|
73
|
+
# @option attributes [Array<OCI::Database::Models::Month>] :months The value to assign to the {#months} property
|
74
|
+
# @option attributes [Array<Integer>] :weeks_of_month The value to assign to the {#weeks_of_month} property
|
75
|
+
# @option attributes [Array<OCI::Database::Models::DayOfWeek>] :days_of_week The value to assign to the {#days_of_week} property
|
76
|
+
# @option attributes [Array<Integer>] :hours_of_day The value to assign to the {#hours_of_day} property
|
77
|
+
def initialize(attributes = {})
|
78
|
+
return unless attributes.is_a?(Hash)
|
79
|
+
|
80
|
+
# convert string to symbol for hash key
|
81
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
82
|
+
|
83
|
+
self.preference = attributes[:'preference'] if attributes[:'preference']
|
84
|
+
self.preference = "NO_PREFERENCE" if preference.nil? && !attributes.key?(:'preference') # rubocop:disable Style/StringLiterals
|
85
|
+
|
86
|
+
self.months = attributes[:'months'] if attributes[:'months']
|
87
|
+
|
88
|
+
self.weeks_of_month = attributes[:'weeksOfMonth'] if attributes[:'weeksOfMonth']
|
89
|
+
|
90
|
+
raise 'You cannot provide both :weeksOfMonth and :weeks_of_month' if attributes.key?(:'weeksOfMonth') && attributes.key?(:'weeks_of_month')
|
91
|
+
|
92
|
+
self.weeks_of_month = attributes[:'weeks_of_month'] if attributes[:'weeks_of_month']
|
93
|
+
|
94
|
+
self.days_of_week = attributes[:'daysOfWeek'] if attributes[:'daysOfWeek']
|
95
|
+
|
96
|
+
raise 'You cannot provide both :daysOfWeek and :days_of_week' if attributes.key?(:'daysOfWeek') && attributes.key?(:'days_of_week')
|
97
|
+
|
98
|
+
self.days_of_week = attributes[:'days_of_week'] if attributes[:'days_of_week']
|
99
|
+
|
100
|
+
self.hours_of_day = attributes[:'hoursOfDay'] if attributes[:'hoursOfDay']
|
101
|
+
|
102
|
+
raise 'You cannot provide both :hoursOfDay and :hours_of_day' if attributes.key?(:'hoursOfDay') && attributes.key?(:'hours_of_day')
|
103
|
+
|
104
|
+
self.hours_of_day = attributes[:'hours_of_day'] if attributes[:'hours_of_day']
|
105
|
+
end
|
106
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
107
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
108
|
+
|
109
|
+
# Custom attribute writer method checking allowed values (enum).
|
110
|
+
# @param [Object] preference Object to be assigned
|
111
|
+
def preference=(preference)
|
112
|
+
# rubocop:disable Style/ConditionalAssignment
|
113
|
+
if preference && !PREFERENCE_ENUM.include?(preference)
|
114
|
+
OCI.logger.debug("Unknown value for 'preference' [" + preference + "]. Mapping to 'PREFERENCE_UNKNOWN_ENUM_VALUE'") if OCI.logger
|
115
|
+
@preference = PREFERENCE_UNKNOWN_ENUM_VALUE
|
116
|
+
else
|
117
|
+
@preference = preference
|
118
|
+
end
|
119
|
+
# rubocop:enable Style/ConditionalAssignment
|
120
|
+
end
|
121
|
+
|
122
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
123
|
+
|
124
|
+
|
125
|
+
# Checks equality by comparing each attribute.
|
126
|
+
# @param [Object] other the other object to be compared
|
127
|
+
def ==(other)
|
128
|
+
return true if equal?(other)
|
129
|
+
|
130
|
+
self.class == other.class &&
|
131
|
+
preference == other.preference &&
|
132
|
+
months == other.months &&
|
133
|
+
weeks_of_month == other.weeks_of_month &&
|
134
|
+
days_of_week == other.days_of_week &&
|
135
|
+
hours_of_day == other.hours_of_day
|
136
|
+
end
|
137
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
138
|
+
|
139
|
+
# @see the `==` method
|
140
|
+
# @param [Object] other the other object to be compared
|
141
|
+
def eql?(other)
|
142
|
+
self == other
|
143
|
+
end
|
144
|
+
|
145
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
146
|
+
|
147
|
+
|
148
|
+
# Calculates hash code according to all attributes.
|
149
|
+
# @return [Fixnum] Hash code
|
150
|
+
def hash
|
151
|
+
[preference, months, weeks_of_month, days_of_week, hours_of_day].hash
|
152
|
+
end
|
153
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
154
|
+
|
155
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
156
|
+
|
157
|
+
|
158
|
+
# Builds the object from hash
|
159
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
160
|
+
# @return [Object] Returns the model itself
|
161
|
+
def build_from_hash(attributes)
|
162
|
+
return nil unless attributes.is_a?(Hash)
|
163
|
+
|
164
|
+
self.class.swagger_types.each_pair do |key, type|
|
165
|
+
if type =~ /^Array<(.*)>/i
|
166
|
+
# check to ensure the input is an array given that the the attribute
|
167
|
+
# is documented as an array but the input is not
|
168
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
169
|
+
public_method("#{key}=").call(
|
170
|
+
attributes[self.class.attribute_map[key]]
|
171
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
172
|
+
)
|
173
|
+
end
|
174
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
175
|
+
public_method("#{key}=").call(
|
176
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
177
|
+
)
|
178
|
+
end
|
179
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
180
|
+
end
|
181
|
+
|
182
|
+
self
|
183
|
+
end
|
184
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
185
|
+
|
186
|
+
# Returns the string representation of the object
|
187
|
+
# @return [String] String presentation of the object
|
188
|
+
def to_s
|
189
|
+
to_hash.to_s
|
190
|
+
end
|
191
|
+
|
192
|
+
# Returns the object in the form of hash
|
193
|
+
# @return [Hash] Returns the object in the form of hash
|
194
|
+
def to_hash
|
195
|
+
hash = {}
|
196
|
+
self.class.attribute_map.each_pair do |attr, param|
|
197
|
+
value = public_method(attr).call
|
198
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
199
|
+
|
200
|
+
hash[param] = _to_hash(value)
|
201
|
+
end
|
202
|
+
hash
|
203
|
+
end
|
204
|
+
|
205
|
+
private
|
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
|
226
|
+
# rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
|
@@ -0,0 +1,179 @@
|
|
1
|
+
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
require 'logger'
|
5
|
+
|
6
|
+
# rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength
|
7
|
+
module OCI
|
8
|
+
# Month of the year.
|
9
|
+
class Database::Models::Month
|
10
|
+
NAME_ENUM = [
|
11
|
+
NAME_JANUARY = 'JANUARY'.freeze,
|
12
|
+
NAME_FEBRUARY = 'FEBRUARY'.freeze,
|
13
|
+
NAME_MARCH = 'MARCH'.freeze,
|
14
|
+
NAME_APRIL = 'APRIL'.freeze,
|
15
|
+
NAME_MAY = 'MAY'.freeze,
|
16
|
+
NAME_JUNE = 'JUNE'.freeze,
|
17
|
+
NAME_JULY = 'JULY'.freeze,
|
18
|
+
NAME_AUGUST = 'AUGUST'.freeze,
|
19
|
+
NAME_SEPTEMBER = 'SEPTEMBER'.freeze,
|
20
|
+
NAME_OCTOBER = 'OCTOBER'.freeze,
|
21
|
+
NAME_NOVEMBER = 'NOVEMBER'.freeze,
|
22
|
+
NAME_DECEMBER = 'DECEMBER'.freeze,
|
23
|
+
NAME_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
|
24
|
+
].freeze
|
25
|
+
|
26
|
+
# **[Required]** Name of the month of the year.
|
27
|
+
# @return [String]
|
28
|
+
attr_reader :name
|
29
|
+
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
31
|
+
def self.attribute_map
|
32
|
+
{
|
33
|
+
# rubocop:disable Style/SymbolLiteral
|
34
|
+
'name': :'name'
|
35
|
+
# rubocop:enable Style/SymbolLiteral
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Attribute type mapping.
|
40
|
+
def self.swagger_types
|
41
|
+
{
|
42
|
+
# rubocop:disable Style/SymbolLiteral
|
43
|
+
'name': :'String'
|
44
|
+
# rubocop:enable Style/SymbolLiteral
|
45
|
+
}
|
46
|
+
end
|
47
|
+
|
48
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
49
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
50
|
+
|
51
|
+
|
52
|
+
# Initializes the object
|
53
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
54
|
+
# @option attributes [String] :name The value to assign to the {#name} property
|
55
|
+
def initialize(attributes = {})
|
56
|
+
return unless attributes.is_a?(Hash)
|
57
|
+
|
58
|
+
# convert string to symbol for hash key
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
60
|
+
|
61
|
+
self.name = attributes[:'name'] if attributes[:'name']
|
62
|
+
end
|
63
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
64
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
65
|
+
|
66
|
+
# Custom attribute writer method checking allowed values (enum).
|
67
|
+
# @param [Object] name Object to be assigned
|
68
|
+
def name=(name)
|
69
|
+
# rubocop:disable Style/ConditionalAssignment
|
70
|
+
if name && !NAME_ENUM.include?(name)
|
71
|
+
OCI.logger.debug("Unknown value for 'name' [" + name + "]. Mapping to 'NAME_UNKNOWN_ENUM_VALUE'") if OCI.logger
|
72
|
+
@name = NAME_UNKNOWN_ENUM_VALUE
|
73
|
+
else
|
74
|
+
@name = name
|
75
|
+
end
|
76
|
+
# rubocop:enable Style/ConditionalAssignment
|
77
|
+
end
|
78
|
+
|
79
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
80
|
+
|
81
|
+
|
82
|
+
# Checks equality by comparing each attribute.
|
83
|
+
# @param [Object] other the other object to be compared
|
84
|
+
def ==(other)
|
85
|
+
return true if equal?(other)
|
86
|
+
|
87
|
+
self.class == other.class &&
|
88
|
+
name == other.name
|
89
|
+
end
|
90
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
91
|
+
|
92
|
+
# @see the `==` method
|
93
|
+
# @param [Object] other the other object to be compared
|
94
|
+
def eql?(other)
|
95
|
+
self == other
|
96
|
+
end
|
97
|
+
|
98
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
99
|
+
|
100
|
+
|
101
|
+
# Calculates hash code according to all attributes.
|
102
|
+
# @return [Fixnum] Hash code
|
103
|
+
def hash
|
104
|
+
[name].hash
|
105
|
+
end
|
106
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
107
|
+
|
108
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
109
|
+
|
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 build_from_hash(attributes)
|
115
|
+
return nil unless attributes.is_a?(Hash)
|
116
|
+
|
117
|
+
self.class.swagger_types.each_pair do |key, type|
|
118
|
+
if type =~ /^Array<(.*)>/i
|
119
|
+
# check to ensure the input is an array given that the the attribute
|
120
|
+
# is documented as an array but the input is not
|
121
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
122
|
+
public_method("#{key}=").call(
|
123
|
+
attributes[self.class.attribute_map[key]]
|
124
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
125
|
+
)
|
126
|
+
end
|
127
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
128
|
+
public_method("#{key}=").call(
|
129
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
130
|
+
)
|
131
|
+
end
|
132
|
+
# 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
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
138
|
+
|
139
|
+
# Returns the string representation of the object
|
140
|
+
# @return [String] String presentation of the object
|
141
|
+
def to_s
|
142
|
+
to_hash.to_s
|
143
|
+
end
|
144
|
+
|
145
|
+
# Returns the object in the form of hash
|
146
|
+
# @return [Hash] Returns the object in the form of hash
|
147
|
+
def to_hash
|
148
|
+
hash = {}
|
149
|
+
self.class.attribute_map.each_pair do |attr, param|
|
150
|
+
value = public_method(attr).call
|
151
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
152
|
+
|
153
|
+
hash[param] = _to_hash(value)
|
154
|
+
end
|
155
|
+
hash
|
156
|
+
end
|
157
|
+
|
158
|
+
private
|
159
|
+
|
160
|
+
# Outputs non-array value in the form of hash
|
161
|
+
# For object, use to_hash. Otherwise, just return the value
|
162
|
+
# @param [Object] value Any valid value
|
163
|
+
# @return [Hash] Returns the value in the form of hash
|
164
|
+
def _to_hash(value)
|
165
|
+
if value.is_a?(Array)
|
166
|
+
value.compact.map { |v| _to_hash(v) }
|
167
|
+
elsif value.is_a?(Hash)
|
168
|
+
{}.tap do |hash|
|
169
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
170
|
+
end
|
171
|
+
elsif value.respond_to? :to_hash
|
172
|
+
value.to_hash
|
173
|
+
else
|
174
|
+
value
|
175
|
+
end
|
176
|
+
end
|
177
|
+
end
|
178
|
+
end
|
179
|
+
# rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
|
@@ -11,11 +11,23 @@ module OCI
|
|
11
11
|
# @return [DateTime]
|
12
12
|
attr_accessor :timestamp
|
13
13
|
|
14
|
+
# Restores using the backup with the System Change Number (SCN) specified.
|
15
|
+
#
|
16
|
+
# @return [String]
|
17
|
+
attr_accessor :database_scn
|
18
|
+
|
19
|
+
# Restores to the last known good state with the least possible data loss.
|
20
|
+
#
|
21
|
+
# @return [BOOLEAN]
|
22
|
+
attr_accessor :latest
|
23
|
+
|
14
24
|
# Attribute mapping from ruby-style variable name to JSON key.
|
15
25
|
def self.attribute_map
|
16
26
|
{
|
17
27
|
# rubocop:disable Style/SymbolLiteral
|
18
|
-
'timestamp': :'timestamp'
|
28
|
+
'timestamp': :'timestamp',
|
29
|
+
'database_scn': :'databaseSCN',
|
30
|
+
'latest': :'latest'
|
19
31
|
# rubocop:enable Style/SymbolLiteral
|
20
32
|
}
|
21
33
|
end
|
@@ -24,7 +36,9 @@ module OCI
|
|
24
36
|
def self.swagger_types
|
25
37
|
{
|
26
38
|
# rubocop:disable Style/SymbolLiteral
|
27
|
-
'timestamp': :'DateTime'
|
39
|
+
'timestamp': :'DateTime',
|
40
|
+
'database_scn': :'String',
|
41
|
+
'latest': :'BOOLEAN'
|
28
42
|
# rubocop:enable Style/SymbolLiteral
|
29
43
|
}
|
30
44
|
end
|
@@ -36,6 +50,8 @@ module OCI
|
|
36
50
|
# Initializes the object
|
37
51
|
# @param [Hash] attributes Model attributes in the form of hash
|
38
52
|
# @option attributes [DateTime] :timestamp The value to assign to the {#timestamp} property
|
53
|
+
# @option attributes [String] :database_scn The value to assign to the {#database_scn} property
|
54
|
+
# @option attributes [BOOLEAN] :latest The value to assign to the {#latest} property
|
39
55
|
def initialize(attributes = {})
|
40
56
|
return unless attributes.is_a?(Hash)
|
41
57
|
|
@@ -43,6 +59,14 @@ module OCI
|
|
43
59
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
44
60
|
|
45
61
|
self.timestamp = attributes[:'timestamp'] if attributes[:'timestamp']
|
62
|
+
|
63
|
+
self.database_scn = attributes[:'databaseSCN'] if attributes[:'databaseSCN']
|
64
|
+
|
65
|
+
raise 'You cannot provide both :databaseSCN and :database_scn' if attributes.key?(:'databaseSCN') && attributes.key?(:'database_scn')
|
66
|
+
|
67
|
+
self.database_scn = attributes[:'database_scn'] if attributes[:'database_scn']
|
68
|
+
|
69
|
+
self.latest = attributes[:'latest'] unless attributes[:'latest'].nil?
|
46
70
|
end
|
47
71
|
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
48
72
|
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
@@ -56,7 +80,9 @@ module OCI
|
|
56
80
|
return true if equal?(other)
|
57
81
|
|
58
82
|
self.class == other.class &&
|
59
|
-
timestamp == other.timestamp
|
83
|
+
timestamp == other.timestamp &&
|
84
|
+
database_scn == other.database_scn &&
|
85
|
+
latest == other.latest
|
60
86
|
end
|
61
87
|
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
62
88
|
|
@@ -72,7 +98,7 @@ module OCI
|
|
72
98
|
# Calculates hash code according to all attributes.
|
73
99
|
# @return [Fixnum] Hash code
|
74
100
|
def hash
|
75
|
-
[timestamp].hash
|
101
|
+
[timestamp, database_scn, latest].hash
|
76
102
|
end
|
77
103
|
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
78
104
|
|