Class: OCI::DataCatalog::Models::Type
- Inherits:
-
Object
- Object
- OCI::DataCatalog::Models::Type
- Defined in:
- lib/oci/data_catalog/models/type.rb
Overview
Full data catalog type definition. Fully defines a type of the data catalog. All types are statically defined in the system and are immutable. It isn't possible to create new types or update existing types via the API.
Constant Summary collapse
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_CREATING = 'CREATING'.freeze, LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze, LIFECYCLE_STATE_INACTIVE = 'INACTIVE'.freeze, LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze, LIFECYCLE_STATE_DELETING = 'DELETING'.freeze, LIFECYCLE_STATE_DELETED = 'DELETED'.freeze, LIFECYCLE_STATE_FAILED = 'FAILED'.freeze, LIFECYCLE_STATE_MOVING = 'MOVING'.freeze, LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#catalog_id ⇒ String
The data catalog's OCID.
-
#custom_properties ⇒ Array<OCI::DataCatalog::Models::CustomPropertySummary>
Custom properties associated with this Type.
-
#description ⇒ String
Detailed description of the type.
-
#external_type_name ⇒ String
Mapping type equivalence in the external system.
-
#is_approved ⇒ BOOLEAN
Indicates whether the type is approved for use as a classifying object.
-
#is_internal ⇒ BOOLEAN
Indicates whether the type is internal, making it unavailable for use by metadata elements.
-
#is_tag ⇒ BOOLEAN
Indicates whether the type can be used for tagging metadata elements.
-
#key ⇒ String
[Required] Unique type key that is immutable.
-
#lifecycle_state ⇒ String
The current state of the type.
-
#name ⇒ String
The immutable name of the type.
-
#parent_type_key ⇒ String
Unique key of the parent type.
-
#parent_type_name ⇒ String
Name of the parent type.
-
#properties ⇒ Hash<String, Array<OCI::DataCatalog::Models::PropertyDefinition>>
A map of arrays which defines the type specific properties, both required and optional.
-
#type_category ⇒ String
Indicates the category this type belongs to.
-
#uri ⇒ String
URI to the type instance in the API.
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 = {}) ⇒ Type
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 = {}) ⇒ Type
Initializes the object
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 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 |
# File 'lib/oci/data_catalog/models/type.rb', line 172 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.key = attributes[:'key'] if attributes[:'key'] self.name = attributes[:'name'] if attributes[:'name'] self.description = attributes[:'description'] if attributes[:'description'] self.catalog_id = attributes[:'catalogId'] if attributes[:'catalogId'] raise 'You cannot provide both :catalogId and :catalog_id' if attributes.key?(:'catalogId') && attributes.key?(:'catalog_id') self.catalog_id = attributes[:'catalog_id'] if attributes[:'catalog_id'] self.properties = attributes[:'properties'] if attributes[:'properties'] 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.is_internal = attributes[:'isInternal'] unless attributes[:'isInternal'].nil? raise 'You cannot provide both :isInternal and :is_internal' if attributes.key?(:'isInternal') && attributes.key?(:'is_internal') self.is_internal = attributes[:'is_internal'] unless attributes[:'is_internal'].nil? self.is_tag = attributes[:'isTag'] unless attributes[:'isTag'].nil? raise 'You cannot provide both :isTag and :is_tag' if attributes.key?(:'isTag') && attributes.key?(:'is_tag') self.is_tag = attributes[:'is_tag'] unless attributes[:'is_tag'].nil? self.is_approved = attributes[:'isApproved'] unless attributes[:'isApproved'].nil? raise 'You cannot provide both :isApproved and :is_approved' if attributes.key?(:'isApproved') && attributes.key?(:'is_approved') self.is_approved = attributes[:'is_approved'] unless attributes[:'is_approved'].nil? self.type_category = attributes[:'typeCategory'] if attributes[:'typeCategory'] raise 'You cannot provide both :typeCategory and :type_category' if attributes.key?(:'typeCategory') && attributes.key?(:'type_category') self.type_category = attributes[:'type_category'] if attributes[:'type_category'] self.external_type_name = attributes[:'externalTypeName'] if attributes[:'externalTypeName'] raise 'You cannot provide both :externalTypeName and :external_type_name' if attributes.key?(:'externalTypeName') && attributes.key?(:'external_type_name') self.external_type_name = attributes[:'external_type_name'] if attributes[:'external_type_name'] self.uri = attributes[:'uri'] if attributes[:'uri'] self.custom_properties = attributes[:'customProperties'] if attributes[:'customProperties'] raise 'You cannot provide both :customProperties and :custom_properties' if attributes.key?(:'customProperties') && attributes.key?(:'custom_properties') self.custom_properties = attributes[:'custom_properties'] if attributes[:'custom_properties'] self.parent_type_key = attributes[:'parentTypeKey'] if attributes[:'parentTypeKey'] raise 'You cannot provide both :parentTypeKey and :parent_type_key' if attributes.key?(:'parentTypeKey') && attributes.key?(:'parent_type_key') self.parent_type_key = attributes[:'parent_type_key'] if attributes[:'parent_type_key'] self.parent_type_name = attributes[:'parentTypeName'] if attributes[:'parentTypeName'] raise 'You cannot provide both :parentTypeName and :parent_type_name' if attributes.key?(:'parentTypeName') && attributes.key?(:'parent_type_name') self.parent_type_name = attributes[:'parent_type_name'] if attributes[:'parent_type_name'] end |
Instance Attribute Details
#catalog_id ⇒ String
The data catalog's OCID.
40 41 42 |
# File 'lib/oci/data_catalog/models/type.rb', line 40 def catalog_id @catalog_id end |
#custom_properties ⇒ Array<OCI::DataCatalog::Models::CustomPropertySummary>
Custom properties associated with this Type.
95 96 97 |
# File 'lib/oci/data_catalog/models/type.rb', line 95 def custom_properties @custom_properties end |
#description ⇒ String
Detailed description of the type.
36 37 38 |
# File 'lib/oci/data_catalog/models/type.rb', line 36 def description @description end |
#external_type_name ⇒ String
Mapping type equivalence in the external system.
87 88 89 |
# File 'lib/oci/data_catalog/models/type.rb', line 87 def external_type_name @external_type_name end |
#is_approved ⇒ BOOLEAN
Indicates whether the type is approved for use as a classifying object.
79 80 81 |
# File 'lib/oci/data_catalog/models/type.rb', line 79 def is_approved @is_approved end |
#is_internal ⇒ BOOLEAN
Indicates whether the type is internal, making it unavailable for use by metadata elements.
71 72 73 |
# File 'lib/oci/data_catalog/models/type.rb', line 71 def is_internal @is_internal end |
#is_tag ⇒ BOOLEAN
Indicates whether the type can be used for tagging metadata elements.
75 76 77 |
# File 'lib/oci/data_catalog/models/type.rb', line 75 def is_tag @is_tag end |
#key ⇒ String
[Required] Unique type key that is immutable.
28 29 30 |
# File 'lib/oci/data_catalog/models/type.rb', line 28 def key @key end |
#lifecycle_state ⇒ String
The current state of the type.
67 68 69 |
# File 'lib/oci/data_catalog/models/type.rb', line 67 def lifecycle_state @lifecycle_state end |
#name ⇒ String
The immutable name of the type.
32 33 34 |
# File 'lib/oci/data_catalog/models/type.rb', line 32 def name @name end |
#parent_type_key ⇒ String
Unique key of the parent type.
99 100 101 |
# File 'lib/oci/data_catalog/models/type.rb', line 99 def parent_type_key @parent_type_key end |
#parent_type_name ⇒ String
Name of the parent type.
103 104 105 |
# File 'lib/oci/data_catalog/models/type.rb', line 103 def parent_type_name @parent_type_name end |
#properties ⇒ Hash<String, Array<OCI::DataCatalog::Models::PropertyDefinition>>
A map of arrays which defines the type specific properties, both required and optional. The map keys are category names and the values are arrays contiaing all property details. Every property is contained inside of a category. Most types have required properties within the "default" category. Example: { \"properties\": { \"default\": { \"attributes:\": [ { \"name\": \"host\", \"type\": \"string\", \"isRequired\": true, \"isUpdatable\": false }, ... ] } } }
63 64 65 |
# File 'lib/oci/data_catalog/models/type.rb', line 63 def properties @properties end |
#type_category ⇒ String
Indicates the category this type belongs to. For instance, data assets, connections.
83 84 85 |
# File 'lib/oci/data_catalog/models/type.rb', line 83 def type_category @type_category end |
#uri ⇒ String
URI to the type instance in the API.
91 92 93 |
# File 'lib/oci/data_catalog/models/type.rb', line 91 def uri @uri end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/oci/data_catalog/models/type.rb', line 106 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'key': :'key', 'name': :'name', 'description': :'description', 'catalog_id': :'catalogId', 'properties': :'properties', 'lifecycle_state': :'lifecycleState', 'is_internal': :'isInternal', 'is_tag': :'isTag', 'is_approved': :'isApproved', 'type_category': :'typeCategory', 'external_type_name': :'externalTypeName', 'uri': :'uri', 'custom_properties': :'customProperties', 'parent_type_key': :'parentTypeKey', 'parent_type_name': :'parentTypeName' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
# File 'lib/oci/data_catalog/models/type.rb', line 129 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'key': :'String', 'name': :'String', 'description': :'String', 'catalog_id': :'String', 'properties': :'Hash<String, Array<OCI::DataCatalog::Models::PropertyDefinition>>', 'lifecycle_state': :'String', 'is_internal': :'BOOLEAN', 'is_tag': :'BOOLEAN', 'is_approved': :'BOOLEAN', 'type_category': :'String', 'external_type_name': :'String', 'uri': :'String', 'custom_properties': :'Array<OCI::DataCatalog::Models::CustomPropertySummary>', 'parent_type_key': :'String', 'parent_type_name': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 |
# File 'lib/oci/data_catalog/models/type.rb', line 269 def ==(other) return true if equal?(other) self.class == other.class && key == other.key && name == other.name && description == other.description && catalog_id == other.catalog_id && properties == other.properties && lifecycle_state == other.lifecycle_state && is_internal == other.is_internal && is_tag == other.is_tag && is_approved == other.is_approved && type_category == other.type_category && external_type_name == other.external_type_name && uri == other.uri && custom_properties == other.custom_properties && parent_type_key == other.parent_type_key && parent_type_name == other.parent_type_name end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 |
# File 'lib/oci/data_catalog/models/type.rb', line 313 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
293 294 295 |
# File 'lib/oci/data_catalog/models/type.rb', line 293 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
302 303 304 |
# File 'lib/oci/data_catalog/models/type.rb', line 302 def hash [key, name, description, catalog_id, properties, lifecycle_state, is_internal, is_tag, is_approved, type_category, external_type_name, uri, custom_properties, parent_type_key, parent_type_name].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
346 347 348 349 350 351 352 353 354 355 |
# File 'lib/oci/data_catalog/models/type.rb', line 346 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
340 341 342 |
# File 'lib/oci/data_catalog/models/type.rb', line 340 def to_s to_hash.to_s end |