Class: OCI::ResourceManager::Models::StackResourceDriftSummary
- Inherits:
-
Object
- Object
- OCI::ResourceManager::Models::StackResourceDriftSummary
- Defined in:
- lib/oci/resource_manager/models/stack_resource_drift_summary.rb
Overview
Drift status details for the indicated resource and stack. Includes actual and expected (defined) properties.
Constant Summary collapse
- RESOURCE_DRIFT_STATUS_ENUM =
[ RESOURCE_DRIFT_STATUS_NOT_CHECKED = 'NOT_CHECKED'.freeze, RESOURCE_DRIFT_STATUS_IN_SYNC = 'IN_SYNC'.freeze, RESOURCE_DRIFT_STATUS_MODIFIED = 'MODIFIED'.freeze, RESOURCE_DRIFT_STATUS_DELETED = 'DELETED'.freeze, RESOURCE_DRIFT_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#actual_properties ⇒ Hash<String, String>
Actual values of properties that the stack defines for the indicated resource.
-
#compartment_id ⇒ String
The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where the stack is located.
-
#expected_properties ⇒ Hash<String, String>
Expected values of properties that the stack defines for the indicated resource.
-
#resource_drift_status ⇒ String
The drift status of the resource.
-
#resource_id ⇒ String
The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the resource provisioned by Terraform.
-
#resource_name ⇒ String
The name of the resource as defined in the stack.
-
#resource_type ⇒ String
The provider resource type.
-
#stack_id ⇒ String
The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the stack.
-
#time_drift_checked ⇒ DateTime
The date and time when the drift detection was executed.
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 = {}) ⇒ StackResourceDriftSummary
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 = {}) ⇒ StackResourceDriftSummary
Initializes the object
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 |
# File 'lib/oci/resource_manager/models/stack_resource_drift_summary.rb', line 121 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.stack_id = attributes[:'stackId'] if attributes[:'stackId'] raise 'You cannot provide both :stackId and :stack_id' if attributes.key?(:'stackId') && attributes.key?(:'stack_id') self.stack_id = attributes[:'stack_id'] if attributes[:'stack_id'] self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId'] raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id') self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id'] self.resource_name = attributes[:'resourceName'] if attributes[:'resourceName'] raise 'You cannot provide both :resourceName and :resource_name' if attributes.key?(:'resourceName') && attributes.key?(:'resource_name') self.resource_name = attributes[:'resource_name'] if attributes[:'resource_name'] self.resource_id = attributes[:'resourceId'] if attributes[:'resourceId'] raise 'You cannot provide both :resourceId and :resource_id' if attributes.key?(:'resourceId') && attributes.key?(:'resource_id') self.resource_id = attributes[:'resource_id'] if attributes[:'resource_id'] self.resource_type = attributes[:'resourceType'] if attributes[:'resourceType'] raise 'You cannot provide both :resourceType and :resource_type' if attributes.key?(:'resourceType') && attributes.key?(:'resource_type') self.resource_type = attributes[:'resource_type'] if attributes[:'resource_type'] self.resource_drift_status = attributes[:'resourceDriftStatus'] if attributes[:'resourceDriftStatus'] raise 'You cannot provide both :resourceDriftStatus and :resource_drift_status' if attributes.key?(:'resourceDriftStatus') && attributes.key?(:'resource_drift_status') self.resource_drift_status = attributes[:'resource_drift_status'] if attributes[:'resource_drift_status'] self.actual_properties = attributes[:'actualProperties'] if attributes[:'actualProperties'] raise 'You cannot provide both :actualProperties and :actual_properties' if attributes.key?(:'actualProperties') && attributes.key?(:'actual_properties') self.actual_properties = attributes[:'actual_properties'] if attributes[:'actual_properties'] self.expected_properties = attributes[:'expectedProperties'] if attributes[:'expectedProperties'] raise 'You cannot provide both :expectedProperties and :expected_properties' if attributes.key?(:'expectedProperties') && attributes.key?(:'expected_properties') self.expected_properties = attributes[:'expected_properties'] if attributes[:'expected_properties'] self.time_drift_checked = attributes[:'timeDriftChecked'] if attributes[:'timeDriftChecked'] raise 'You cannot provide both :timeDriftChecked and :time_drift_checked' if attributes.key?(:'timeDriftChecked') && attributes.key?(:'time_drift_checked') self.time_drift_checked = attributes[:'time_drift_checked'] if attributes[:'time_drift_checked'] end |
Instance Attribute Details
#actual_properties ⇒ Hash<String, String>
Actual values of properties that the stack defines for the indicated resource. Each property and value is provided as a key-value pair. The following example shows actual values for the resource’s display name and server type: ‘"tf-default-dhcp-options-new", "options.0.server_type": "VcnLocalPlusInternet"`
55 56 57 |
# File 'lib/oci/resource_manager/models/stack_resource_drift_summary.rb', line 55 def actual_properties @actual_properties end |
#compartment_id ⇒ String
The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where the stack is located.
26 27 28 |
# File 'lib/oci/resource_manager/models/stack_resource_drift_summary.rb', line 26 def compartment_id @compartment_id end |
#expected_properties ⇒ Hash<String, String>
Expected values of properties that the stack defines for the indicated resource. Each property and value is provided as a key-value pair. The following example shows expected (defined) values for the resource’s display name and server type: ‘"tf-default-dhcp-options", "options.0.server_type": "VcnLocalPlusInternet"`
63 64 65 |
# File 'lib/oci/resource_manager/models/stack_resource_drift_summary.rb', line 63 def expected_properties @expected_properties end |
#resource_drift_status ⇒ String
The drift status of the resource. A drift status value indicates whether or not the actual state of the resource differs from the expected (defined) state for that resource.
47 48 49 |
# File 'lib/oci/resource_manager/models/stack_resource_drift_summary.rb', line 47 def resource_drift_status @resource_drift_status end |
#resource_id ⇒ String
The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the resource provisioned by Terraform.
34 35 36 |
# File 'lib/oci/resource_manager/models/stack_resource_drift_summary.rb', line 34 def resource_id @resource_id end |
#resource_name ⇒ String
The name of the resource as defined in the stack.
30 31 32 |
# File 'lib/oci/resource_manager/models/stack_resource_drift_summary.rb', line 30 def resource_name @resource_name end |
#resource_type ⇒ String
The provider resource type. Must be supported by the [Oracle Cloud Infrastructure provider](www.terraform.io/docs/providers/oci/index.html). Example: oci_core_instance
41 42 43 |
# File 'lib/oci/resource_manager/models/stack_resource_drift_summary.rb', line 41 def resource_type @resource_type end |
#stack_id ⇒ String
The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the stack.
22 23 24 |
# File 'lib/oci/resource_manager/models/stack_resource_drift_summary.rb', line 22 def stack_id @stack_id end |
#time_drift_checked ⇒ DateTime
The date and time when the drift detection was executed. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
70 71 72 |
# File 'lib/oci/resource_manager/models/stack_resource_drift_summary.rb', line 70 def time_drift_checked @time_drift_checked end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/oci/resource_manager/models/stack_resource_drift_summary.rb', line 73 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'stack_id': :'stackId', 'compartment_id': :'compartmentId', 'resource_name': :'resourceName', 'resource_id': :'resourceId', 'resource_type': :'resourceType', 'resource_drift_status': :'resourceDriftStatus', 'actual_properties': :'actualProperties', 'expected_properties': :'expectedProperties', 'time_drift_checked': :'timeDriftChecked' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/oci/resource_manager/models/stack_resource_drift_summary.rb', line 90 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'stack_id': :'String', 'compartment_id': :'String', 'resource_name': :'String', 'resource_id': :'String', 'resource_type': :'String', 'resource_drift_status': :'String', 'actual_properties': :'Hash<String, String>', 'expected_properties': :'Hash<String, String>', 'time_drift_checked': :'DateTime' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/oci/resource_manager/models/stack_resource_drift_summary.rb', line 202 def ==(other) return true if equal?(other) self.class == other.class && stack_id == other.stack_id && compartment_id == other.compartment_id && resource_name == other.resource_name && resource_id == other.resource_id && resource_type == other.resource_type && resource_drift_status == other.resource_drift_status && actual_properties == other.actual_properties && expected_properties == other.expected_properties && time_drift_checked == other.time_drift_checked end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 |
# File 'lib/oci/resource_manager/models/stack_resource_drift_summary.rb', line 240 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
220 221 222 |
# File 'lib/oci/resource_manager/models/stack_resource_drift_summary.rb', line 220 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
229 230 231 |
# File 'lib/oci/resource_manager/models/stack_resource_drift_summary.rb', line 229 def hash [stack_id, compartment_id, resource_name, resource_id, resource_type, resource_drift_status, actual_properties, expected_properties, time_drift_checked].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
273 274 275 276 277 278 279 280 281 282 |
# File 'lib/oci/resource_manager/models/stack_resource_drift_summary.rb', line 273 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
267 268 269 |
# File 'lib/oci/resource_manager/models/stack_resource_drift_summary.rb', line 267 def to_s to_hash.to_s end |