Class: OCI::ResourceAnalytics::Models::TenancyAttachmentSummary
- Inherits:
-
Object
- Object
- OCI::ResourceAnalytics::Models::TenancyAttachmentSummary
- Defined in:
- lib/oci/resource_analytics/models/tenancy_attachment_summary.rb
Overview
Summary information about a TenancyAttachment.
Instance Attribute Summary collapse
-
#data_population_status ⇒ String
The overall status of the data population from the tenancy.
-
#description ⇒ String
A description of the tenancy.
-
#id ⇒ String
[Required] The OCID of the TenancyAttachment.
-
#is_reporting_tenancy ⇒ BOOLEAN
[Required] Whether the tenancy is the tenancy used when creating Resource Analytics Instance.
-
#lifecycle_details ⇒ String
A message that describes the current state of the TenancyAttachment in more detail.
-
#lifecycle_state ⇒ String
[Required] The current state of the TenancyAttachment.
-
#resource_analytics_instance_id ⇒ String
[Required] The OCID of the ResourceAnalyticsInstance associated with this TenancyAttachment.
-
#system_tags ⇒ Hash<String, Hash<String, Object>>
System tags for this resource.
-
#tenancy_id ⇒ String
[Required] The OCID of the tenancy associated with this TenancyAttachment.
-
#time_created ⇒ DateTime
[Required] The date and time the TenancyAttachment was created, in the format defined by RFC 3339.
-
#time_data_population_ended ⇒ DateTime
The date and time the data population tasks completed, in the format defined by RFC 3339.
-
#time_data_population_started ⇒ DateTime
The date and time the data population tasks started, in the format defined by RFC 3339.
-
#time_updated ⇒ DateTime
The date and time the TenancyAttachment was updated, in the format defined by RFC 3339.
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 = {}) ⇒ TenancyAttachmentSummary
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 = {}) ⇒ TenancyAttachmentSummary
Initializes the object
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 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 |
# File 'lib/oci/resource_analytics/models/tenancy_attachment_summary.rb', line 141 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.id = attributes[:'id'] if attributes[:'id'] self.description = attributes[:'description'] if attributes[:'description'] self.resource_analytics_instance_id = attributes[:'resourceAnalyticsInstanceId'] if attributes[:'resourceAnalyticsInstanceId'] raise 'You cannot provide both :resourceAnalyticsInstanceId and :resource_analytics_instance_id' if attributes.key?(:'resourceAnalyticsInstanceId') && attributes.key?(:'resource_analytics_instance_id') self.resource_analytics_instance_id = attributes[:'resource_analytics_instance_id'] if attributes[:'resource_analytics_instance_id'] self.tenancy_id = attributes[:'tenancyId'] if attributes[:'tenancyId'] raise 'You cannot provide both :tenancyId and :tenancy_id' if attributes.key?(:'tenancyId') && attributes.key?(:'tenancy_id') self.tenancy_id = attributes[:'tenancy_id'] if attributes[:'tenancy_id'] self.is_reporting_tenancy = attributes[:'isReportingTenancy'] unless attributes[:'isReportingTenancy'].nil? raise 'You cannot provide both :isReportingTenancy and :is_reporting_tenancy' if attributes.key?(:'isReportingTenancy') && attributes.key?(:'is_reporting_tenancy') self.is_reporting_tenancy = attributes[:'is_reporting_tenancy'] unless attributes[:'is_reporting_tenancy'].nil? self.data_population_status = attributes[:'dataPopulationStatus'] if attributes[:'dataPopulationStatus'] raise 'You cannot provide both :dataPopulationStatus and :data_population_status' if attributes.key?(:'dataPopulationStatus') && attributes.key?(:'data_population_status') self.data_population_status = attributes[:'data_population_status'] if attributes[:'data_population_status'] self.time_data_population_started = attributes[:'timeDataPopulationStarted'] if attributes[:'timeDataPopulationStarted'] raise 'You cannot provide both :timeDataPopulationStarted and :time_data_population_started' if attributes.key?(:'timeDataPopulationStarted') && attributes.key?(:'time_data_population_started') self.time_data_population_started = attributes[:'time_data_population_started'] if attributes[:'time_data_population_started'] self.time_data_population_ended = attributes[:'timeDataPopulationEnded'] if attributes[:'timeDataPopulationEnded'] raise 'You cannot provide both :timeDataPopulationEnded and :time_data_population_ended' if attributes.key?(:'timeDataPopulationEnded') && attributes.key?(:'time_data_population_ended') self.time_data_population_ended = attributes[:'time_data_population_ended'] if attributes[:'time_data_population_ended'] self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated'] raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created') self.time_created = attributes[:'time_created'] if attributes[:'time_created'] self.time_updated = attributes[:'timeUpdated'] if attributes[:'timeUpdated'] raise 'You cannot provide both :timeUpdated and :time_updated' if attributes.key?(:'timeUpdated') && attributes.key?(:'time_updated') self.time_updated = attributes[:'time_updated'] if attributes[:'time_updated'] self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState'] raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state') self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state'] self.lifecycle_details = attributes[:'lifecycleDetails'] if attributes[:'lifecycleDetails'] raise 'You cannot provide both :lifecycleDetails and :lifecycle_details' if attributes.key?(:'lifecycleDetails') && attributes.key?(:'lifecycle_details') self.lifecycle_details = attributes[:'lifecycle_details'] if attributes[:'lifecycle_details'] self. = attributes[:'systemTags'] if attributes[:'systemTags'] raise 'You cannot provide both :systemTags and :system_tags' if attributes.key?(:'systemTags') && attributes.key?(:'system_tags') self. = attributes[:'system_tags'] if attributes[:'system_tags'] end |
Instance Attribute Details
#data_population_status ⇒ String
The overall status of the data population from the tenancy.
33 34 35 |
# File 'lib/oci/resource_analytics/models/tenancy_attachment_summary.rb', line 33 def data_population_status @data_population_status end |
#description ⇒ String
A description of the tenancy.
17 18 19 |
# File 'lib/oci/resource_analytics/models/tenancy_attachment_summary.rb', line 17 def description @description end |
#id ⇒ String
[Required] The OCID of the TenancyAttachment.
13 14 15 |
# File 'lib/oci/resource_analytics/models/tenancy_attachment_summary.rb', line 13 def id @id end |
#is_reporting_tenancy ⇒ BOOLEAN
[Required] Whether the tenancy is the tenancy used when creating Resource Analytics Instance.
29 30 31 |
# File 'lib/oci/resource_analytics/models/tenancy_attachment_summary.rb', line 29 def is_reporting_tenancy @is_reporting_tenancy end |
#lifecycle_details ⇒ String
A message that describes the current state of the TenancyAttachment in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
71 72 73 |
# File 'lib/oci/resource_analytics/models/tenancy_attachment_summary.rb', line 71 def lifecycle_details @lifecycle_details end |
#lifecycle_state ⇒ String
[Required] The current state of the TenancyAttachment.
65 66 67 |
# File 'lib/oci/resource_analytics/models/tenancy_attachment_summary.rb', line 65 def lifecycle_state @lifecycle_state end |
#resource_analytics_instance_id ⇒ String
[Required] The OCID of the ResourceAnalyticsInstance associated with this TenancyAttachment.
21 22 23 |
# File 'lib/oci/resource_analytics/models/tenancy_attachment_summary.rb', line 21 def resource_analytics_instance_id @resource_analytics_instance_id end |
#system_tags ⇒ Hash<String, Hash<String, Object>>
System tags for this resource. Each key is predefined and scoped to a namespace.
Example: {\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}
78 79 80 |
# File 'lib/oci/resource_analytics/models/tenancy_attachment_summary.rb', line 78 def @system_tags end |
#tenancy_id ⇒ String
[Required] The OCID of the tenancy associated with this TenancyAttachment.
25 26 27 |
# File 'lib/oci/resource_analytics/models/tenancy_attachment_summary.rb', line 25 def tenancy_id @tenancy_id end |
#time_created ⇒ DateTime
[Required] The date and time the TenancyAttachment was created, in the format defined by RFC 3339.
Example: 2016-08-25T21:10:29.600Z
54 55 56 |
# File 'lib/oci/resource_analytics/models/tenancy_attachment_summary.rb', line 54 def time_created @time_created end |
#time_data_population_ended ⇒ DateTime
The date and time the data population tasks completed, in the format defined by RFC 3339.
Example: 2016-08-25T21:10:29.600Z
47 48 49 |
# File 'lib/oci/resource_analytics/models/tenancy_attachment_summary.rb', line 47 def time_data_population_ended @time_data_population_ended end |
#time_data_population_started ⇒ DateTime
The date and time the data population tasks started, in the format defined by RFC 3339.
Example: 2016-08-25T21:10:29.600Z
40 41 42 |
# File 'lib/oci/resource_analytics/models/tenancy_attachment_summary.rb', line 40 def time_data_population_started @time_data_population_started end |
#time_updated ⇒ DateTime
The date and time the TenancyAttachment was updated, in the format defined by RFC 3339.
Example: 2016-08-25T21:10:29.600Z
61 62 63 |
# File 'lib/oci/resource_analytics/models/tenancy_attachment_summary.rb', line 61 def time_updated @time_updated end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/oci/resource_analytics/models/tenancy_attachment_summary.rb', line 81 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'description': :'description', 'resource_analytics_instance_id': :'resourceAnalyticsInstanceId', 'tenancy_id': :'tenancyId', 'is_reporting_tenancy': :'isReportingTenancy', 'data_population_status': :'dataPopulationStatus', 'time_data_population_started': :'timeDataPopulationStarted', 'time_data_population_ended': :'timeDataPopulationEnded', 'time_created': :'timeCreated', 'time_updated': :'timeUpdated', 'lifecycle_state': :'lifecycleState', 'lifecycle_details': :'lifecycleDetails', 'system_tags': :'systemTags' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/oci/resource_analytics/models/tenancy_attachment_summary.rb', line 102 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'description': :'String', 'resource_analytics_instance_id': :'String', 'tenancy_id': :'String', 'is_reporting_tenancy': :'BOOLEAN', 'data_population_status': :'String', 'time_data_population_started': :'DateTime', 'time_data_population_ended': :'DateTime', 'time_created': :'DateTime', 'time_updated': :'DateTime', 'lifecycle_state': :'String', 'lifecycle_details': :'String', 'system_tags': :'Hash<String, Hash<String, Object>>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'lib/oci/resource_analytics/models/tenancy_attachment_summary.rb', line 225 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && description == other.description && resource_analytics_instance_id == other.resource_analytics_instance_id && tenancy_id == other.tenancy_id && is_reporting_tenancy == other.is_reporting_tenancy && data_population_status == other.data_population_status && time_data_population_started == other.time_data_population_started && time_data_population_ended == other.time_data_population_ended && time_created == other.time_created && time_updated == other.time_updated && lifecycle_state == other.lifecycle_state && lifecycle_details == other.lifecycle_details && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 |
# File 'lib/oci/resource_analytics/models/tenancy_attachment_summary.rb', line 267 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
247 248 249 |
# File 'lib/oci/resource_analytics/models/tenancy_attachment_summary.rb', line 247 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
256 257 258 |
# File 'lib/oci/resource_analytics/models/tenancy_attachment_summary.rb', line 256 def hash [id, description, resource_analytics_instance_id, tenancy_id, is_reporting_tenancy, data_population_status, time_data_population_started, time_data_population_ended, time_created, time_updated, lifecycle_state, lifecycle_details, ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
300 301 302 303 304 305 306 307 308 309 |
# File 'lib/oci/resource_analytics/models/tenancy_attachment_summary.rb', line 300 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
294 295 296 |
# File 'lib/oci/resource_analytics/models/tenancy_attachment_summary.rb', line 294 def to_s to_hash.to_s end |