Class: OCI::DataIntegration::Models::ObjectMetadata
- Inherits:
-
Object
- Object
- OCI::DataIntegration::Models::ObjectMetadata
- Defined in:
- lib/oci/data_integration/models/object_metadata.rb
Overview
A summary type containing information about the object including its key, name and when/who created/updated it.
Instance Attribute Summary collapse
- #aggregator ⇒ OCI::DataIntegration::Models::AggregatorSummary
-
#aggregator_key ⇒ String
The owning object key for this object.
-
#created_by ⇒ String
The user that created the object.
-
#created_by_name ⇒ String
The user that created the object.
-
#identifier_path ⇒ String
The full path to identify this object.
-
#info_fields ⇒ Hash<String, String>
Information property fields.
-
#is_favorite ⇒ BOOLEAN
Specifies whether this object is a favorite or not.
-
#labels ⇒ Array<String>
Labels are keywords or tags that you can add to data assets, dataflows and so on.
-
#registry_version ⇒ Integer
The registry version of the object.
-
#time_created ⇒ DateTime
The date and time that the object was created.
-
#time_updated ⇒ DateTime
The date and time that the object was updated.
-
#updated_by ⇒ String
The user that updated the object.
-
#updated_by_name ⇒ String
The user that updated the object.
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 = {}) ⇒ ObjectMetadata
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 = {}) ⇒ ObjectMetadata
Initializes the object
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 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
# File 'lib/oci/data_integration/models/object_metadata.rb', line 122 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.created_by = attributes[:'createdBy'] if attributes[:'createdBy'] raise 'You cannot provide both :createdBy and :created_by' if attributes.key?(:'createdBy') && attributes.key?(:'created_by') self.created_by = attributes[:'created_by'] if attributes[:'created_by'] self.created_by_name = attributes[:'createdByName'] if attributes[:'createdByName'] raise 'You cannot provide both :createdByName and :created_by_name' if attributes.key?(:'createdByName') && attributes.key?(:'created_by_name') self.created_by_name = attributes[:'created_by_name'] if attributes[:'created_by_name'] self.updated_by = attributes[:'updatedBy'] if attributes[:'updatedBy'] raise 'You cannot provide both :updatedBy and :updated_by' if attributes.key?(:'updatedBy') && attributes.key?(:'updated_by') self.updated_by = attributes[:'updated_by'] if attributes[:'updated_by'] self.updated_by_name = attributes[:'updatedByName'] if attributes[:'updatedByName'] raise 'You cannot provide both :updatedByName and :updated_by_name' if attributes.key?(:'updatedByName') && attributes.key?(:'updated_by_name') self.updated_by_name = attributes[:'updated_by_name'] if attributes[:'updated_by_name'] 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.aggregator_key = attributes[:'aggregatorKey'] if attributes[:'aggregatorKey'] raise 'You cannot provide both :aggregatorKey and :aggregator_key' if attributes.key?(:'aggregatorKey') && attributes.key?(:'aggregator_key') self.aggregator_key = attributes[:'aggregator_key'] if attributes[:'aggregator_key'] self.aggregator = attributes[:'aggregator'] if attributes[:'aggregator'] self.identifier_path = attributes[:'identifierPath'] if attributes[:'identifierPath'] raise 'You cannot provide both :identifierPath and :identifier_path' if attributes.key?(:'identifierPath') && attributes.key?(:'identifier_path') self.identifier_path = attributes[:'identifier_path'] if attributes[:'identifier_path'] self.info_fields = attributes[:'infoFields'] if attributes[:'infoFields'] raise 'You cannot provide both :infoFields and :info_fields' if attributes.key?(:'infoFields') && attributes.key?(:'info_fields') self.info_fields = attributes[:'info_fields'] if attributes[:'info_fields'] self.registry_version = attributes[:'registryVersion'] if attributes[:'registryVersion'] raise 'You cannot provide both :registryVersion and :registry_version' if attributes.key?(:'registryVersion') && attributes.key?(:'registry_version') self.registry_version = attributes[:'registry_version'] if attributes[:'registry_version'] self.labels = attributes[:'labels'] if attributes[:'labels'] self.is_favorite = attributes[:'isFavorite'] unless attributes[:'isFavorite'].nil? self.is_favorite = false if is_favorite.nil? && !attributes.key?(:'isFavorite') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isFavorite and :is_favorite' if attributes.key?(:'isFavorite') && attributes.key?(:'is_favorite') self.is_favorite = attributes[:'is_favorite'] unless attributes[:'is_favorite'].nil? self.is_favorite = false if is_favorite.nil? && !attributes.key?(:'isFavorite') && !attributes.key?(:'is_favorite') # rubocop:disable Style/StringLiterals end |
Instance Attribute Details
#aggregator ⇒ OCI::DataIntegration::Models::AggregatorSummary
39 40 41 |
# File 'lib/oci/data_integration/models/object_metadata.rb', line 39 def aggregator @aggregator end |
#aggregator_key ⇒ String
The owning object key for this object.
36 37 38 |
# File 'lib/oci/data_integration/models/object_metadata.rb', line 36 def aggregator_key @aggregator_key end |
#created_by ⇒ String
The user that created the object.
12 13 14 |
# File 'lib/oci/data_integration/models/object_metadata.rb', line 12 def created_by @created_by end |
#created_by_name ⇒ String
The user that created the object.
16 17 18 |
# File 'lib/oci/data_integration/models/object_metadata.rb', line 16 def created_by_name @created_by_name end |
#identifier_path ⇒ String
The full path to identify this object.
43 44 45 |
# File 'lib/oci/data_integration/models/object_metadata.rb', line 43 def identifier_path @identifier_path end |
#info_fields ⇒ Hash<String, String>
Information property fields.
47 48 49 |
# File 'lib/oci/data_integration/models/object_metadata.rb', line 47 def info_fields @info_fields end |
#is_favorite ⇒ BOOLEAN
Specifies whether this object is a favorite or not.
59 60 61 |
# File 'lib/oci/data_integration/models/object_metadata.rb', line 59 def is_favorite @is_favorite end |
#labels ⇒ Array<String>
Labels are keywords or tags that you can add to data assets, dataflows and so on. You can define your own labels and use them to categorize content.
55 56 57 |
# File 'lib/oci/data_integration/models/object_metadata.rb', line 55 def labels @labels end |
#registry_version ⇒ Integer
The registry version of the object.
51 52 53 |
# File 'lib/oci/data_integration/models/object_metadata.rb', line 51 def registry_version @registry_version end |
#time_created ⇒ DateTime
The date and time that the object was created.
28 29 30 |
# File 'lib/oci/data_integration/models/object_metadata.rb', line 28 def time_created @time_created end |
#time_updated ⇒ DateTime
The date and time that the object was updated.
32 33 34 |
# File 'lib/oci/data_integration/models/object_metadata.rb', line 32 def time_updated @time_updated end |
#updated_by ⇒ String
The user that updated the object.
20 21 22 |
# File 'lib/oci/data_integration/models/object_metadata.rb', line 20 def updated_by @updated_by end |
#updated_by_name ⇒ String
The user that updated the object.
24 25 26 |
# File 'lib/oci/data_integration/models/object_metadata.rb', line 24 def updated_by_name @updated_by_name end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/oci/data_integration/models/object_metadata.rb', line 62 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'created_by': :'createdBy', 'created_by_name': :'createdByName', 'updated_by': :'updatedBy', 'updated_by_name': :'updatedByName', 'time_created': :'timeCreated', 'time_updated': :'timeUpdated', 'aggregator_key': :'aggregatorKey', 'aggregator': :'aggregator', 'identifier_path': :'identifierPath', 'info_fields': :'infoFields', 'registry_version': :'registryVersion', 'labels': :'labels', 'is_favorite': :'isFavorite' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/oci/data_integration/models/object_metadata.rb', line 83 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'created_by': :'String', 'created_by_name': :'String', 'updated_by': :'String', 'updated_by_name': :'String', 'time_created': :'DateTime', 'time_updated': :'DateTime', 'aggregator_key': :'String', 'aggregator': :'OCI::DataIntegration::Models::AggregatorSummary', 'identifier_path': :'String', 'info_fields': :'Hash<String, String>', 'registry_version': :'Integer', 'labels': :'Array<String>', 'is_favorite': :'BOOLEAN' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 |
# File 'lib/oci/data_integration/models/object_metadata.rb', line 208 def ==(other) return true if equal?(other) self.class == other.class && created_by == other.created_by && created_by_name == other.created_by_name && updated_by == other.updated_by && updated_by_name == other.updated_by_name && time_created == other.time_created && time_updated == other.time_updated && aggregator_key == other.aggregator_key && aggregator == other.aggregator && identifier_path == other.identifier_path && info_fields == other.info_fields && registry_version == other.registry_version && labels == other.labels && is_favorite == other.is_favorite end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 |
# File 'lib/oci/data_integration/models/object_metadata.rb', line 250 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
230 231 232 |
# File 'lib/oci/data_integration/models/object_metadata.rb', line 230 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
239 240 241 |
# File 'lib/oci/data_integration/models/object_metadata.rb', line 239 def hash [created_by, created_by_name, updated_by, updated_by_name, time_created, time_updated, aggregator_key, aggregator, identifier_path, info_fields, registry_version, labels, is_favorite].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
283 284 285 286 287 288 289 290 291 292 |
# File 'lib/oci/data_integration/models/object_metadata.rb', line 283 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
277 278 279 |
# File 'lib/oci/data_integration/models/object_metadata.rb', line 277 def to_s to_hash.to_s end |