Class: OCI::FleetAppsManagement::Models::ComponentProperties
- Inherits:
-
Object
- Object
- OCI::FleetAppsManagement::Models::ComponentProperties
- Defined in:
- lib/oci/fleet_apps_management/models/component_properties.rb
Overview
The properties of the component.
Constant Summary collapse
- ACTION_ON_FAILURE_ENUM =
[ ACTION_ON_FAILURE_ABORT = 'ABORT'.freeze, ACTION_ON_FAILURE_CONTINUE = 'CONTINUE'.freeze, ACTION_ON_FAILURE_ROLLBACK = 'ROLLBACK'.freeze, ACTION_ON_FAILURE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#action_on_failure ⇒ String
[Required] The action to be taken in case of a failure.
- #notification_preferences ⇒ OCI::FleetAppsManagement::Models::TaskNotificationPreferences
- #pause_details ⇒ OCI::FleetAppsManagement::Models::PauseDetails
-
#pre_condition ⇒ String
Build control flow conditions that determine the relevance of the task execution.
- #run_on ⇒ OCI::FleetAppsManagement::Models::RunOnDetails
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 = {}) ⇒ ComponentProperties
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 = {}) ⇒ ComponentProperties
Initializes the object
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/oci/fleet_apps_management/models/component_properties.rb', line 74 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.run_on = attributes[:'runOn'] if attributes[:'runOn'] raise 'You cannot provide both :runOn and :run_on' if attributes.key?(:'runOn') && attributes.key?(:'run_on') self.run_on = attributes[:'run_on'] if attributes[:'run_on'] self.pre_condition = attributes[:'preCondition'] if attributes[:'preCondition'] raise 'You cannot provide both :preCondition and :pre_condition' if attributes.key?(:'preCondition') && attributes.key?(:'pre_condition') self.pre_condition = attributes[:'pre_condition'] if attributes[:'pre_condition'] self.action_on_failure = attributes[:'actionOnFailure'] if attributes[:'actionOnFailure'] raise 'You cannot provide both :actionOnFailure and :action_on_failure' if attributes.key?(:'actionOnFailure') && attributes.key?(:'action_on_failure') self.action_on_failure = attributes[:'action_on_failure'] if attributes[:'action_on_failure'] self.pause_details = attributes[:'pauseDetails'] if attributes[:'pauseDetails'] raise 'You cannot provide both :pauseDetails and :pause_details' if attributes.key?(:'pauseDetails') && attributes.key?(:'pause_details') self.pause_details = attributes[:'pause_details'] if attributes[:'pause_details'] self.notification_preferences = attributes[:'notificationPreferences'] if attributes[:'notificationPreferences'] raise 'You cannot provide both :notificationPreferences and :notification_preferences' if attributes.key?(:'notificationPreferences') && attributes.key?(:'notification_preferences') self.notification_preferences = attributes[:'notification_preferences'] if attributes[:'notification_preferences'] end |
Instance Attribute Details
#action_on_failure ⇒ String
[Required] The action to be taken in case of a failure.
29 30 31 |
# File 'lib/oci/fleet_apps_management/models/component_properties.rb', line 29 def action_on_failure @action_on_failure end |
#notification_preferences ⇒ OCI::FleetAppsManagement::Models::TaskNotificationPreferences
35 36 37 |
# File 'lib/oci/fleet_apps_management/models/component_properties.rb', line 35 def notification_preferences @notification_preferences end |
#pause_details ⇒ OCI::FleetAppsManagement::Models::PauseDetails
32 33 34 |
# File 'lib/oci/fleet_apps_management/models/component_properties.rb', line 32 def pause_details @pause_details end |
#pre_condition ⇒ String
Build control flow conditions that determine the relevance of the task execution.
25 26 27 |
# File 'lib/oci/fleet_apps_management/models/component_properties.rb', line 25 def pre_condition @pre_condition end |
#run_on ⇒ OCI::FleetAppsManagement::Models::RunOnDetails
20 21 22 |
# File 'lib/oci/fleet_apps_management/models/component_properties.rb', line 20 def run_on @run_on end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/oci/fleet_apps_management/models/component_properties.rb', line 38 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'run_on': :'runOn', 'pre_condition': :'preCondition', 'action_on_failure': :'actionOnFailure', 'pause_details': :'pauseDetails', 'notification_preferences': :'notificationPreferences' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/oci/fleet_apps_management/models/component_properties.rb', line 51 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'run_on': :'OCI::FleetAppsManagement::Models::RunOnDetails', 'pre_condition': :'String', 'action_on_failure': :'String', 'pause_details': :'OCI::FleetAppsManagement::Models::PauseDetails', 'notification_preferences': :'OCI::FleetAppsManagement::Models::TaskNotificationPreferences' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
131 132 133 134 135 136 137 138 139 140 |
# File 'lib/oci/fleet_apps_management/models/component_properties.rb', line 131 def ==(other) return true if equal?(other) self.class == other.class && run_on == other.run_on && pre_condition == other.pre_condition && action_on_failure == other.action_on_failure && pause_details == other.pause_details && notification_preferences == other.notification_preferences end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
# File 'lib/oci/fleet_apps_management/models/component_properties.rb', line 165 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
145 146 147 |
# File 'lib/oci/fleet_apps_management/models/component_properties.rb', line 145 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
154 155 156 |
# File 'lib/oci/fleet_apps_management/models/component_properties.rb', line 154 def hash [run_on, pre_condition, action_on_failure, pause_details, notification_preferences].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
198 199 200 201 202 203 204 205 206 207 |
# File 'lib/oci/fleet_apps_management/models/component_properties.rb', line 198 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
192 193 194 |
# File 'lib/oci/fleet_apps_management/models/component_properties.rb', line 192 def to_s to_hash.to_s end |