oci 2.5.0 → 2.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -1
  3. data/lib/oci.rb +4 -0
  4. data/lib/oci/auth/federation_client.rb +4 -4
  5. data/lib/oci/auth/signers/instance_principals_security_token_signer.rb +22 -16
  6. data/lib/oci/autoscaling/auto_scaling_client.rb +774 -0
  7. data/lib/oci/autoscaling/auto_scaling_client_composite_operations.rb +24 -0
  8. data/lib/oci/autoscaling/autoscaling.rb +38 -0
  9. data/lib/oci/autoscaling/models/action.rb +182 -0
  10. data/lib/oci/autoscaling/models/auto_scaling_configuration.rb +282 -0
  11. data/lib/oci/autoscaling/models/auto_scaling_configuration_summary.rb +234 -0
  12. data/lib/oci/autoscaling/models/auto_scaling_policy.rb +222 -0
  13. data/lib/oci/autoscaling/models/auto_scaling_policy_summary.rb +179 -0
  14. data/lib/oci/autoscaling/models/capacity.rb +170 -0
  15. data/lib/oci/autoscaling/models/condition.rb +186 -0
  16. data/lib/oci/autoscaling/models/create_auto_scaling_configuration_details.rb +256 -0
  17. data/lib/oci/autoscaling/models/create_auto_scaling_policy_details.rb +196 -0
  18. data/lib/oci/autoscaling/models/create_condition_details.rb +176 -0
  19. data/lib/oci/autoscaling/models/create_threshold_policy_details.rb +166 -0
  20. data/lib/oci/autoscaling/models/instance_pool_resource.rb +148 -0
  21. data/lib/oci/autoscaling/models/metric.rb +186 -0
  22. data/lib/oci/autoscaling/models/resource.rb +177 -0
  23. data/lib/oci/autoscaling/models/threshold.rb +188 -0
  24. data/lib/oci/autoscaling/models/threshold_policy.rb +173 -0
  25. data/lib/oci/autoscaling/models/update_auto_scaling_configuration_details.rb +219 -0
  26. data/lib/oci/autoscaling/models/update_auto_scaling_policy_details.rb +194 -0
  27. data/lib/oci/autoscaling/models/update_condition_details.rb +176 -0
  28. data/lib/oci/autoscaling/models/update_threshold_policy_details.rb +164 -0
  29. data/lib/oci/autoscaling/util.rb +2 -0
  30. data/lib/oci/core/blockstorage_client.rb +1 -1
  31. data/lib/oci/core/compute_client.rb +1 -1
  32. data/lib/oci/core/compute_management_client.rb +135 -1
  33. data/lib/oci/core/compute_management_client_composite_operations.rb +80 -0
  34. data/lib/oci/core/core.rb +8 -0
  35. data/lib/oci/core/models/attach_load_balancer_details.rb +191 -0
  36. data/lib/oci/core/models/create_instance_pool_details.rb +19 -4
  37. data/lib/oci/core/models/detach_load_balancer_details.rb +167 -0
  38. data/lib/oci/core/models/image.rb +14 -1
  39. data/lib/oci/core/models/instance.rb +18 -2
  40. data/lib/oci/core/models/instance_agent_config.rb +154 -0
  41. data/lib/oci/core/models/instance_agent_features.rb +154 -0
  42. data/lib/oci/core/models/instance_pool.rb +19 -4
  43. data/lib/oci/core/models/instance_pool_instance_load_balancer_backend.rb +219 -0
  44. data/lib/oci/core/models/instance_pool_load_balancer_attachment.rb +253 -0
  45. data/lib/oci/core/models/instance_summary.rb +19 -4
  46. data/lib/oci/core/models/launch_instance_agent_config_details.rb +155 -0
  47. data/lib/oci/core/models/launch_instance_details.rb +14 -1
  48. data/lib/oci/core/models/update_instance_agent_config_details.rb +154 -0
  49. data/lib/oci/core/models/update_instance_details.rb +16 -1
  50. data/lib/oci/core/virtual_network_client.rb +1 -1
  51. data/lib/oci/database/database_client.rb +12 -14
  52. data/lib/oci/database/models/autonomous_data_warehouse_connection_strings.rb +3 -1
  53. data/lib/oci/database/models/autonomous_database_connection_strings.rb +3 -1
  54. data/lib/oci/database/models/create_data_guard_association_details.rb +2 -7
  55. data/lib/oci/database/models/create_data_guard_association_to_existing_db_system_details.rb +5 -1
  56. data/lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb +4 -1
  57. data/lib/oci/database/models/database_summary.rb +1 -1
  58. data/lib/oci/database/models/db_node.rb +15 -1
  59. data/lib/oci/database/models/db_node_summary.rb +15 -1
  60. data/lib/oci/database/models/db_system.rb +15 -1
  61. data/lib/oci/database/models/db_system_summary.rb +15 -1
  62. data/lib/oci/database/models/db_version_summary.rb +1 -1
  63. data/lib/oci/database/models/launch_db_system_base.rb +33 -2
  64. data/lib/oci/database/models/launch_db_system_details.rb +5 -1
  65. data/lib/oci/database/models/launch_db_system_from_backup_details.rb +5 -1
  66. data/lib/oci/database/models/update_db_system_details.rb +1 -1
  67. data/lib/oci/identity/identity.rb +4 -0
  68. data/lib/oci/identity/identity_client.rb +468 -12
  69. data/lib/oci/identity/identity_client_composite_operations.rb +79 -0
  70. data/lib/oci/identity/models/change_tag_namespace_compartment_detail.rb +154 -0
  71. data/lib/oci/identity/models/create_identity_provider_details.rb +2 -1
  72. data/lib/oci/identity/models/mfa_totp_device.rb +279 -0
  73. data/lib/oci/identity/models/mfa_totp_device_summary.rb +267 -0
  74. data/lib/oci/identity/models/mfa_totp_token.rb +155 -0
  75. data/lib/oci/identity/models/tag_namespace_summary.rb +1 -1
  76. data/lib/oci/identity/models/user.rb +18 -4
  77. data/lib/oci/monitoring/models/aggregated_datapoint.rb +166 -0
  78. data/lib/oci/monitoring/models/alarm.rb +538 -0
  79. data/lib/oci/monitoring/models/alarm_history_collection.rb +183 -0
  80. data/lib/oci/monitoring/models/alarm_history_entry.rb +187 -0
  81. data/lib/oci/monitoring/models/alarm_status_summary.rb +277 -0
  82. data/lib/oci/monitoring/models/alarm_summary.rb +386 -0
  83. data/lib/oci/monitoring/models/create_alarm_details.rb +423 -0
  84. data/lib/oci/monitoring/models/datapoint.rb +179 -0
  85. data/lib/oci/monitoring/models/failed_metric_record.rb +166 -0
  86. data/lib/oci/monitoring/models/list_metrics_details.rb +271 -0
  87. data/lib/oci/monitoring/models/metric.rb +197 -0
  88. data/lib/oci/monitoring/models/metric_data.rb +243 -0
  89. data/lib/oci/monitoring/models/metric_data_details.rb +227 -0
  90. data/lib/oci/monitoring/models/post_metric_data_details.rb +194 -0
  91. data/lib/oci/monitoring/models/post_metric_data_response_details.rb +170 -0
  92. data/lib/oci/monitoring/models/summarize_metrics_data_details.rb +229 -0
  93. data/lib/oci/monitoring/models/suppression.rb +196 -0
  94. data/lib/oci/monitoring/models/update_alarm_details.rb +423 -0
  95. data/lib/oci/monitoring/monitoring.rb +37 -0
  96. data/lib/oci/monitoring/monitoring_client.rb +923 -0
  97. data/lib/oci/monitoring/monitoring_client_composite_operations.rb +145 -0
  98. data/lib/oci/monitoring/util.rb +2 -0
  99. data/lib/oci/ons/models/backoff_retry_policy.rb +192 -0
  100. data/lib/oci/ons/models/confirmation_result.rb +221 -0
  101. data/lib/oci/ons/models/create_subscription_details.rb +238 -0
  102. data/lib/oci/ons/models/create_topic_details.rb +209 -0
  103. data/lib/oci/ons/models/delivery_policy.rb +153 -0
  104. data/lib/oci/ons/models/message_details.rb +163 -0
  105. data/lib/oci/ons/models/notification_topic.rb +302 -0
  106. data/lib/oci/ons/models/notification_topic_summary.rb +303 -0
  107. data/lib/oci/ons/models/publish_result.rb +168 -0
  108. data/lib/oci/ons/models/subscription.rb +273 -0
  109. data/lib/oci/ons/models/subscription_summary.rb +300 -0
  110. data/lib/oci/ons/models/topic_attributes_details.rb +184 -0
  111. data/lib/oci/ons/models/update_subscription_details.rb +188 -0
  112. data/lib/oci/ons/notification_control_plane_client.rb +463 -0
  113. data/lib/oci/ons/notification_control_plane_client_composite_operations.rb +24 -0
  114. data/lib/oci/ons/notification_data_plane_client.rb +680 -0
  115. data/lib/oci/ons/notification_data_plane_client_composite_operations.rb +104 -0
  116. data/lib/oci/ons/ons.rb +33 -0
  117. data/lib/oci/ons/util.rb +2 -0
  118. data/lib/oci/regions.rb +5 -0
  119. data/lib/oci/resource_manager/models/apply_job_plan_resolution.rb +189 -0
  120. data/lib/oci/resource_manager/models/config_source.rb +208 -0
  121. data/lib/oci/resource_manager/models/create_config_source_details.rb +187 -0
  122. data/lib/oci/resource_manager/models/create_job_details.rb +225 -0
  123. data/lib/oci/resource_manager/models/create_stack_details.rb +239 -0
  124. data/lib/oci/resource_manager/models/create_zip_upload_config_source_details.rb +166 -0
  125. data/lib/oci/resource_manager/models/failure_details.rb +185 -0
  126. data/lib/oci/resource_manager/models/job.rb +399 -0
  127. data/lib/oci/resource_manager/models/job_summary.rb +311 -0
  128. data/lib/oci/resource_manager/models/log_entry.rb +225 -0
  129. data/lib/oci/resource_manager/models/stack.rb +305 -0
  130. data/lib/oci/resource_manager/models/stack_summary.rb +249 -0
  131. data/lib/oci/resource_manager/models/update_config_source_details.rb +184 -0
  132. data/lib/oci/resource_manager/models/update_job_details.rb +188 -0
  133. data/lib/oci/resource_manager/models/update_stack_details.rb +225 -0
  134. data/lib/oci/resource_manager/models/update_zip_upload_config_source_details.rb +164 -0
  135. data/lib/oci/resource_manager/models/zip_upload_config_source.rb +149 -0
  136. data/lib/oci/resource_manager/resource_manager.rb +36 -0
  137. data/lib/oci/resource_manager/resource_manager_client.rb +1264 -0
  138. data/lib/oci/resource_manager/resource_manager_client_composite_operations.rb +263 -0
  139. data/lib/oci/resource_manager/util.rb +2 -0
  140. data/lib/oci/version.rb +1 -1
  141. metadata +100 -2
@@ -0,0 +1,267 @@
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
7
+ module OCI
8
+ # As the name suggests, a `MfaTotpDeviceSummary` object contains information about a `MfaTotpDevice`.
9
+ #
10
+ class Identity::Models::MfaTotpDeviceSummary # rubocop:disable Metrics/LineLength
11
+ LIFECYCLE_STATE_ENUM = [
12
+ LIFECYCLE_STATE_CREATING = 'CREATING'.freeze,
13
+ LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze,
14
+ LIFECYCLE_STATE_INACTIVE = 'INACTIVE'.freeze,
15
+ LIFECYCLE_STATE_DELETING = 'DELETING'.freeze,
16
+ LIFECYCLE_STATE_DELETED = 'DELETED'.freeze,
17
+ LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
18
+ ].freeze
19
+
20
+ # **[Required]** The OCID of the MFA TOTP Device.
21
+ # @return [String]
22
+ attr_accessor :id
23
+
24
+ # **[Required]** The OCID of the user the MFA TOTP device belongs to.
25
+ # @return [String]
26
+ attr_accessor :user_id
27
+
28
+ # **[Required]** Date and time the `MfaTotpDevice` object was created, in the format defined by RFC3339.
29
+ #
30
+ # Example: `2016-08-25T21:10:29.600Z`
31
+ #
32
+ # @return [DateTime]
33
+ attr_accessor :time_created
34
+
35
+ # Date and time when this MFA TOTP device will expire, in the format defined by RFC3339.
36
+ # Null if it never expires.
37
+ #
38
+ # Example: `2016-08-25T21:10:29.600Z`
39
+ #
40
+ # @return [DateTime]
41
+ attr_accessor :time_expires
42
+
43
+ # **[Required]** The MFA TOTP device's current state.
44
+ #
45
+ # @return [String]
46
+ attr_reader :lifecycle_state
47
+
48
+ # The detailed status of INACTIVE lifecycleState. Possible values are 1(SUSPENDED), 2(DISABLED), 4(BLOCKED) and 8(LOCKED).
49
+ # @return [Integer]
50
+ attr_accessor :inactive_status
51
+
52
+ # **[Required]** Flag to indicate if the MFA TOTP device has been activated
53
+ # @return [BOOLEAN]
54
+ attr_accessor :is_activated
55
+
56
+ # Attribute mapping from ruby-style variable name to JSON key.
57
+ def self.attribute_map
58
+ {
59
+ # rubocop:disable Style/SymbolLiteral
60
+ 'id': :'id',
61
+ 'user_id': :'userId',
62
+ 'time_created': :'timeCreated',
63
+ 'time_expires': :'timeExpires',
64
+ 'lifecycle_state': :'lifecycleState',
65
+ 'inactive_status': :'inactiveStatus',
66
+ 'is_activated': :'isActivated'
67
+ # rubocop:enable Style/SymbolLiteral
68
+ }
69
+ end
70
+
71
+ # Attribute type mapping.
72
+ def self.swagger_types
73
+ {
74
+ # rubocop:disable Style/SymbolLiteral
75
+ 'id': :'String',
76
+ 'user_id': :'String',
77
+ 'time_created': :'DateTime',
78
+ 'time_expires': :'DateTime',
79
+ 'lifecycle_state': :'String',
80
+ 'inactive_status': :'Integer',
81
+ 'is_activated': :'BOOLEAN'
82
+ # rubocop:enable Style/SymbolLiteral
83
+ }
84
+ end
85
+
86
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
87
+ # rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
88
+
89
+
90
+ # Initializes the object
91
+ # @param [Hash] attributes Model attributes in the form of hash
92
+ # @option attributes [String] :id The value to assign to the {#id} property
93
+ # @option attributes [String] :user_id The value to assign to the {#user_id} property
94
+ # @option attributes [DateTime] :time_created The value to assign to the {#time_created} property
95
+ # @option attributes [DateTime] :time_expires The value to assign to the {#time_expires} property
96
+ # @option attributes [String] :lifecycle_state The value to assign to the {#lifecycle_state} property
97
+ # @option attributes [Integer] :inactive_status The value to assign to the {#inactive_status} property
98
+ # @option attributes [BOOLEAN] :is_activated The value to assign to the {#is_activated} property
99
+ def initialize(attributes = {})
100
+ return unless attributes.is_a?(Hash)
101
+
102
+ # convert string to symbol for hash key
103
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
104
+
105
+ self.id = attributes[:'id'] if attributes[:'id']
106
+
107
+ self.user_id = attributes[:'userId'] if attributes[:'userId']
108
+
109
+ raise 'You cannot provide both :userId and :user_id' if attributes.key?(:'userId') && attributes.key?(:'user_id')
110
+
111
+ self.user_id = attributes[:'user_id'] if attributes[:'user_id']
112
+
113
+ self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']
114
+
115
+ raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created')
116
+
117
+ self.time_created = attributes[:'time_created'] if attributes[:'time_created']
118
+
119
+ self.time_expires = attributes[:'timeExpires'] if attributes[:'timeExpires']
120
+
121
+ raise 'You cannot provide both :timeExpires and :time_expires' if attributes.key?(:'timeExpires') && attributes.key?(:'time_expires')
122
+
123
+ self.time_expires = attributes[:'time_expires'] if attributes[:'time_expires']
124
+
125
+ self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']
126
+
127
+ raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state')
128
+
129
+ self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state']
130
+
131
+ self.inactive_status = attributes[:'inactiveStatus'] if attributes[:'inactiveStatus']
132
+
133
+ raise 'You cannot provide both :inactiveStatus and :inactive_status' if attributes.key?(:'inactiveStatus') && attributes.key?(:'inactive_status')
134
+
135
+ self.inactive_status = attributes[:'inactive_status'] if attributes[:'inactive_status']
136
+
137
+ self.is_activated = attributes[:'isActivated'] unless attributes[:'isActivated'].nil?
138
+
139
+ raise 'You cannot provide both :isActivated and :is_activated' if attributes.key?(:'isActivated') && attributes.key?(:'is_activated')
140
+
141
+ self.is_activated = attributes[:'is_activated'] unless attributes[:'is_activated'].nil?
142
+ end
143
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
144
+ # rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
145
+
146
+ # Custom attribute writer method checking allowed values (enum).
147
+ # @param [Object] lifecycle_state Object to be assigned
148
+ def lifecycle_state=(lifecycle_state)
149
+ # rubocop:disable Style/ConditionalAssignment
150
+ if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
151
+ # rubocop: disable Metrics/LineLength
152
+ OCI.logger.debug("Unknown value for 'lifecycle_state' [" + lifecycle_state + "]. Mapping to 'LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE'") if OCI.logger
153
+ # rubocop: enable Metrics/LineLength
154
+ @lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
155
+ else
156
+ @lifecycle_state = lifecycle_state
157
+ end
158
+ # rubocop:enable Style/ConditionalAssignment
159
+ end
160
+
161
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
162
+
163
+
164
+ # Checks equality by comparing each attribute.
165
+ # @param [Object] other the other object to be compared
166
+ def ==(other)
167
+ return true if equal?(other)
168
+
169
+ self.class == other.class &&
170
+ id == other.id &&
171
+ user_id == other.user_id &&
172
+ time_created == other.time_created &&
173
+ time_expires == other.time_expires &&
174
+ lifecycle_state == other.lifecycle_state &&
175
+ inactive_status == other.inactive_status &&
176
+ is_activated == other.is_activated
177
+ end
178
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
179
+
180
+ # @see the `==` method
181
+ # @param [Object] other the other object to be compared
182
+ def eql?(other)
183
+ self == other
184
+ end
185
+
186
+ # rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
187
+
188
+
189
+ # Calculates hash code according to all attributes.
190
+ # @return [Fixnum] Hash code
191
+ def hash
192
+ [id, user_id, time_created, time_expires, lifecycle_state, inactive_status, is_activated].hash
193
+ end
194
+ # rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
195
+
196
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
197
+
198
+
199
+ # Builds the object from hash
200
+ # @param [Hash] attributes Model attributes in the form of hash
201
+ # @return [Object] Returns the model itself
202
+ def build_from_hash(attributes)
203
+ return nil unless attributes.is_a?(Hash)
204
+
205
+ self.class.swagger_types.each_pair do |key, type|
206
+ if type =~ /^Array<(.*)>/i
207
+ # check to ensure the input is an array given that the the attribute
208
+ # is documented as an array but the input is not
209
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
210
+ public_method("#{key}=").call(
211
+ attributes[self.class.attribute_map[key]]
212
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
213
+ )
214
+ end
215
+ elsif !attributes[self.class.attribute_map[key]].nil?
216
+ public_method("#{key}=").call(
217
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
218
+ )
219
+ end
220
+ # or else data not found in attributes(hash), not an issue as the data can be optional
221
+ end
222
+
223
+ self
224
+ end
225
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
226
+
227
+ # Returns the string representation of the object
228
+ # @return [String] String presentation of the object
229
+ def to_s
230
+ to_hash.to_s
231
+ end
232
+
233
+ # Returns the object in the form of hash
234
+ # @return [Hash] Returns the object in the form of hash
235
+ def to_hash
236
+ hash = {}
237
+ self.class.attribute_map.each_pair do |attr, param|
238
+ value = public_method(attr).call
239
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
240
+
241
+ hash[param] = _to_hash(value)
242
+ end
243
+ hash
244
+ end
245
+
246
+ private
247
+
248
+ # Outputs non-array value in the form of hash
249
+ # For object, use to_hash. Otherwise, just return the value
250
+ # @param [Object] value Any valid value
251
+ # @return [Hash] Returns the value in the form of hash
252
+ def _to_hash(value)
253
+ if value.is_a?(Array)
254
+ value.compact.map { |v| _to_hash(v) }
255
+ elsif value.is_a?(Hash)
256
+ {}.tap do |hash|
257
+ value.each { |k, v| hash[k] = _to_hash(v) }
258
+ end
259
+ elsif value.respond_to? :to_hash
260
+ value.to_hash
261
+ else
262
+ value
263
+ end
264
+ end
265
+ end
266
+ end
267
+ # rubocop:enable Lint/UnneededCopDisableDirective
@@ -0,0 +1,155 @@
1
+ # Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+
5
+ # rubocop:disable Lint/UnneededCopDisableDirective
6
+ module OCI
7
+ # Totp token for MFA
8
+ #
9
+ class Identity::Models::MfaTotpToken # rubocop:disable Metrics/LineLength
10
+ # The Totp token for MFA.
11
+ #
12
+ # @return [String]
13
+ attr_accessor :totp_token
14
+
15
+ # Attribute mapping from ruby-style variable name to JSON key.
16
+ def self.attribute_map
17
+ {
18
+ # rubocop:disable Style/SymbolLiteral
19
+ 'totp_token': :'totpToken'
20
+ # rubocop:enable Style/SymbolLiteral
21
+ }
22
+ end
23
+
24
+ # Attribute type mapping.
25
+ def self.swagger_types
26
+ {
27
+ # rubocop:disable Style/SymbolLiteral
28
+ 'totp_token': :'String'
29
+ # rubocop:enable Style/SymbolLiteral
30
+ }
31
+ end
32
+
33
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
34
+ # rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
35
+
36
+
37
+ # Initializes the object
38
+ # @param [Hash] attributes Model attributes in the form of hash
39
+ # @option attributes [String] :totp_token The value to assign to the {#totp_token} property
40
+ def initialize(attributes = {})
41
+ return unless attributes.is_a?(Hash)
42
+
43
+ # convert string to symbol for hash key
44
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
45
+
46
+ self.totp_token = attributes[:'totpToken'] if attributes[:'totpToken']
47
+
48
+ raise 'You cannot provide both :totpToken and :totp_token' if attributes.key?(:'totpToken') && attributes.key?(:'totp_token')
49
+
50
+ self.totp_token = attributes[:'totp_token'] if attributes[:'totp_token']
51
+ end
52
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
53
+ # rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
54
+
55
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
56
+
57
+
58
+ # Checks equality by comparing each attribute.
59
+ # @param [Object] other the other object to be compared
60
+ def ==(other)
61
+ return true if equal?(other)
62
+
63
+ self.class == other.class &&
64
+ totp_token == other.totp_token
65
+ end
66
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
67
+
68
+ # @see the `==` method
69
+ # @param [Object] other the other object to be compared
70
+ def eql?(other)
71
+ self == other
72
+ end
73
+
74
+ # rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
75
+
76
+
77
+ # Calculates hash code according to all attributes.
78
+ # @return [Fixnum] Hash code
79
+ def hash
80
+ [totp_token].hash
81
+ end
82
+ # rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
83
+
84
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
85
+
86
+
87
+ # Builds the object from hash
88
+ # @param [Hash] attributes Model attributes in the form of hash
89
+ # @return [Object] Returns the model itself
90
+ def build_from_hash(attributes)
91
+ return nil unless attributes.is_a?(Hash)
92
+
93
+ self.class.swagger_types.each_pair do |key, type|
94
+ if type =~ /^Array<(.*)>/i
95
+ # check to ensure the input is an array given that the the attribute
96
+ # is documented as an array but the input is not
97
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
98
+ public_method("#{key}=").call(
99
+ attributes[self.class.attribute_map[key]]
100
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
101
+ )
102
+ end
103
+ elsif !attributes[self.class.attribute_map[key]].nil?
104
+ public_method("#{key}=").call(
105
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
106
+ )
107
+ end
108
+ # or else data not found in attributes(hash), not an issue as the data can be optional
109
+ end
110
+
111
+ self
112
+ end
113
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
114
+
115
+ # Returns the string representation of the object
116
+ # @return [String] String presentation of the object
117
+ def to_s
118
+ to_hash.to_s
119
+ end
120
+
121
+ # Returns the object in the form of hash
122
+ # @return [Hash] Returns the object in the form of hash
123
+ def to_hash
124
+ hash = {}
125
+ self.class.attribute_map.each_pair do |attr, param|
126
+ value = public_method(attr).call
127
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
128
+
129
+ hash[param] = _to_hash(value)
130
+ end
131
+ hash
132
+ end
133
+
134
+ private
135
+
136
+ # Outputs non-array value in the form of hash
137
+ # For object, use to_hash. Otherwise, just return the value
138
+ # @param [Object] value Any valid value
139
+ # @return [Hash] Returns the value in the form of hash
140
+ def _to_hash(value)
141
+ if value.is_a?(Array)
142
+ value.compact.map { |v| _to_hash(v) }
143
+ elsif value.is_a?(Hash)
144
+ {}.tap do |hash|
145
+ value.each { |k, v| hash[k] = _to_hash(v) }
146
+ end
147
+ elsif value.respond_to? :to_hash
148
+ value.to_hash
149
+ else
150
+ value
151
+ end
152
+ end
153
+ end
154
+ end
155
+ # rubocop:enable Lint/UnneededCopDisableDirective
@@ -44,7 +44,7 @@ module OCI
44
44
  # @return [BOOLEAN]
45
45
  attr_accessor :is_retired
46
46
 
47
- # Date and time the tagNamespace was created, in the format defined by RFC3339.
47
+ # Date and time the tag namespace was created, in the format defined by RFC3339.
48
48
  # Example: `2016-08-25T21:10:29.600Z`
49
49
  #
50
50
  # @return [DateTime]
@@ -100,6 +100,10 @@ module OCI
100
100
  # @return [OCI::Identity::Models::UserCapabilities]
101
101
  attr_accessor :capabilities
102
102
 
103
+ # **[Required]** Flag indicates if MFA has been activated for the user.
104
+ # @return [BOOLEAN]
105
+ attr_accessor :is_mfa_activated
106
+
103
107
  # Attribute mapping from ruby-style variable name to JSON key.
104
108
  def self.attribute_map
105
109
  {
@@ -115,7 +119,8 @@ module OCI
115
119
  'inactive_status': :'inactiveStatus',
116
120
  'freeform_tags': :'freeformTags',
117
121
  'defined_tags': :'definedTags',
118
- 'capabilities': :'capabilities'
122
+ 'capabilities': :'capabilities',
123
+ 'is_mfa_activated': :'isMfaActivated'
119
124
  # rubocop:enable Style/SymbolLiteral
120
125
  }
121
126
  end
@@ -135,7 +140,8 @@ module OCI
135
140
  'inactive_status': :'Integer',
136
141
  'freeform_tags': :'Hash<String, String>',
137
142
  'defined_tags': :'Hash<String, Hash<String, Object>>',
138
- 'capabilities': :'OCI::Identity::Models::UserCapabilities'
143
+ 'capabilities': :'OCI::Identity::Models::UserCapabilities',
144
+ 'is_mfa_activated': :'BOOLEAN'
139
145
  # rubocop:enable Style/SymbolLiteral
140
146
  }
141
147
  end
@@ -158,6 +164,7 @@ module OCI
158
164
  # @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
159
165
  # @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
160
166
  # @option attributes [OCI::Identity::Models::UserCapabilities] :capabilities The value to assign to the {#capabilities} property
167
+ # @option attributes [BOOLEAN] :is_mfa_activated The value to assign to the {#is_mfa_activated} property
161
168
  def initialize(attributes = {})
162
169
  return unless attributes.is_a?(Hash)
163
170
 
@@ -219,6 +226,12 @@ module OCI
219
226
  self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
220
227
 
221
228
  self.capabilities = attributes[:'capabilities'] if attributes[:'capabilities']
229
+
230
+ self.is_mfa_activated = attributes[:'isMfaActivated'] unless attributes[:'isMfaActivated'].nil?
231
+
232
+ raise 'You cannot provide both :isMfaActivated and :is_mfa_activated' if attributes.key?(:'isMfaActivated') && attributes.key?(:'is_mfa_activated')
233
+
234
+ self.is_mfa_activated = attributes[:'is_mfa_activated'] unless attributes[:'is_mfa_activated'].nil?
222
235
  end
223
236
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
224
237
  # rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
@@ -258,7 +271,8 @@ module OCI
258
271
  inactive_status == other.inactive_status &&
259
272
  freeform_tags == other.freeform_tags &&
260
273
  defined_tags == other.defined_tags &&
261
- capabilities == other.capabilities
274
+ capabilities == other.capabilities &&
275
+ is_mfa_activated == other.is_mfa_activated
262
276
  end
263
277
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
264
278
 
@@ -274,7 +288,7 @@ module OCI
274
288
  # Calculates hash code according to all attributes.
275
289
  # @return [Fixnum] Hash code
276
290
  def hash
277
- [id, compartment_id, name, description, identity_provider_id, external_identifier, time_created, lifecycle_state, inactive_status, freeform_tags, defined_tags, capabilities].hash
291
+ [id, compartment_id, name, description, identity_provider_id, external_identifier, time_created, lifecycle_state, inactive_status, freeform_tags, defined_tags, capabilities, is_mfa_activated].hash
278
292
  end
279
293
  # rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
280
294