Class: OCI::Database::Models::RecommendedScheduledActionSummary
- Inherits:
-
Object
- Object
- OCI::Database::Models::RecommendedScheduledActionSummary
- Defined in:
- lib/oci/database/models/recommended_scheduled_action_summary.rb
Overview
Details of the scheduled action that is used in getRecommendedScheduledActions.
Constant Summary collapse
- ACTION_TYPE_ENUM =
[ ACTION_TYPE_DB_SERVER_FULL_SOFTWARE_UPDATE = 'DB_SERVER_FULL_SOFTWARE_UPDATE'.freeze, ACTION_TYPE_STORAGE_SERVER_FULL_SOFTWARE_UPDATE = 'STORAGE_SERVER_FULL_SOFTWARE_UPDATE'.freeze, ACTION_TYPE_NETWORK_SWITCH_FULL_SOFTWARE_UPDATE = 'NETWORK_SWITCH_FULL_SOFTWARE_UPDATE'.freeze, ACTION_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#action_members ⇒ Array<OCI::Database::Models::ActionMember>
The list of action members in a scheduled action.
-
#action_order ⇒ Integer
[Required] The order of the scheduled action.
-
#action_params ⇒ Hash<String, String>
Map<ParamName, ParamValue> where a key value pair describes the specific action parameter.
-
#action_type ⇒ String
[Required] The type of the scheduled action being performed.
-
#display_name ⇒ String
Description of the scheduled action being performed, i.e.
-
#estimated_time_in_mins ⇒ Integer
The estimated patching time in minutes for the entire scheduled action.
-
#scheduling_window_id ⇒ String
[Required] The id of the scheduling window this scheduled action belongs to.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ RecommendedScheduledActionSummary
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ RecommendedScheduledActionSummary
Initializes the object
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'lib/oci/database/models/recommended_scheduled_action_summary.rb', line 93 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.action_order = attributes[:'actionOrder'] if attributes[:'actionOrder'] raise 'You cannot provide both :actionOrder and :action_order' if attributes.key?(:'actionOrder') && attributes.key?(:'action_order') self.action_order = attributes[:'action_order'] if attributes[:'action_order'] self.action_type = attributes[:'actionType'] if attributes[:'actionType'] self.action_type = "DB_SERVER_FULL_SOFTWARE_UPDATE" if action_type.nil? && !attributes.key?(:'actionType') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :actionType and :action_type' if attributes.key?(:'actionType') && attributes.key?(:'action_type') self.action_type = attributes[:'action_type'] if attributes[:'action_type'] self.action_type = "DB_SERVER_FULL_SOFTWARE_UPDATE" if action_type.nil? && !attributes.key?(:'actionType') && !attributes.key?(:'action_type') # rubocop:disable Style/StringLiterals self.display_name = attributes[:'displayName'] if attributes[:'displayName'] raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name') self.display_name = attributes[:'display_name'] if attributes[:'display_name'] self.scheduling_window_id = attributes[:'schedulingWindowId'] if attributes[:'schedulingWindowId'] raise 'You cannot provide both :schedulingWindowId and :scheduling_window_id' if attributes.key?(:'schedulingWindowId') && attributes.key?(:'scheduling_window_id') self.scheduling_window_id = attributes[:'scheduling_window_id'] if attributes[:'scheduling_window_id'] self.estimated_time_in_mins = attributes[:'estimatedTimeInMins'] if attributes[:'estimatedTimeInMins'] raise 'You cannot provide both :estimatedTimeInMins and :estimated_time_in_mins' if attributes.key?(:'estimatedTimeInMins') && attributes.key?(:'estimated_time_in_mins') self.estimated_time_in_mins = attributes[:'estimated_time_in_mins'] if attributes[:'estimated_time_in_mins'] self.action_members = attributes[:'actionMembers'] if attributes[:'actionMembers'] raise 'You cannot provide both :actionMembers and :action_members' if attributes.key?(:'actionMembers') && attributes.key?(:'action_members') self.action_members = attributes[:'action_members'] if attributes[:'action_members'] self.action_params = attributes[:'actionParams'] if attributes[:'actionParams'] raise 'You cannot provide both :actionParams and :action_params' if attributes.key?(:'actionParams') && attributes.key?(:'action_params') self.action_params = attributes[:'action_params'] if attributes[:'action_params'] end |
Instance Attribute Details
#action_members ⇒ Array<OCI::Database::Models::ActionMember>
The list of action members in a scheduled action.
42 43 44 |
# File 'lib/oci/database/models/recommended_scheduled_action_summary.rb', line 42 def action_members @action_members end |
#action_order ⇒ Integer
[Required] The order of the scheduled action.
22 23 24 |
# File 'lib/oci/database/models/recommended_scheduled_action_summary.rb', line 22 def action_order @action_order end |
#action_params ⇒ Hash<String, String>
Map<ParamName, ParamValue> where a key value pair describes the specific action parameter. Example: {\"count\": \"3\"}
48 49 50 |
# File 'lib/oci/database/models/recommended_scheduled_action_summary.rb', line 48 def action_params @action_params end |
#action_type ⇒ String
[Required] The type of the scheduled action being performed
26 27 28 |
# File 'lib/oci/database/models/recommended_scheduled_action_summary.rb', line 26 def action_type @action_type end |
#display_name ⇒ String
Description of the scheduled action being performed, i.e. apply full update to DB Servers 1,2,3,4.
30 31 32 |
# File 'lib/oci/database/models/recommended_scheduled_action_summary.rb', line 30 def display_name @display_name end |
#estimated_time_in_mins ⇒ Integer
The estimated patching time in minutes for the entire scheduled action.
38 39 40 |
# File 'lib/oci/database/models/recommended_scheduled_action_summary.rb', line 38 def estimated_time_in_mins @estimated_time_in_mins end |
#scheduling_window_id ⇒ String
[Required] The id of the scheduling window this scheduled action belongs to.
34 35 36 |
# File 'lib/oci/database/models/recommended_scheduled_action_summary.rb', line 34 def scheduling_window_id @scheduling_window_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/oci/database/models/recommended_scheduled_action_summary.rb', line 51 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'action_order': :'actionOrder', 'action_type': :'actionType', 'display_name': :'displayName', 'scheduling_window_id': :'schedulingWindowId', 'estimated_time_in_mins': :'estimatedTimeInMins', 'action_members': :'actionMembers', 'action_params': :'actionParams' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/oci/database/models/recommended_scheduled_action_summary.rb', line 66 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'action_order': :'Integer', 'action_type': :'String', 'display_name': :'String', 'scheduling_window_id': :'String', 'estimated_time_in_mins': :'Integer', 'action_members': :'Array<OCI::Database::Models::ActionMember>', 'action_params': :'Hash<String, String>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'lib/oci/database/models/recommended_scheduled_action_summary.rb', line 164 def ==(other) return true if equal?(other) self.class == other.class && action_order == other.action_order && action_type == other.action_type && display_name == other.display_name && scheduling_window_id == other.scheduling_window_id && estimated_time_in_mins == other.estimated_time_in_mins && action_members == other.action_members && action_params == other.action_params end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 |
# File 'lib/oci/database/models/recommended_scheduled_action_summary.rb', line 200 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
180 181 182 |
# File 'lib/oci/database/models/recommended_scheduled_action_summary.rb', line 180 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
189 190 191 |
# File 'lib/oci/database/models/recommended_scheduled_action_summary.rb', line 189 def hash [action_order, action_type, display_name, scheduling_window_id, estimated_time_in_mins, action_members, action_params].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
233 234 235 236 237 238 239 240 241 242 |
# File 'lib/oci/database/models/recommended_scheduled_action_summary.rb', line 233 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
227 228 229 |
# File 'lib/oci/database/models/recommended_scheduled_action_summary.rb', line 227 def to_s to_hash.to_s end |