Class: OCI::DataCatalog::Models::TypeSummary
- Inherits:
-
Object
- Object
- OCI::DataCatalog::Models::TypeSummary
- Defined in:
- lib/oci/data_catalog/models/type_summary.rb
Overview
Summary data catalog type information. 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.
-
#description ⇒ String
Detailed description of the type.
-
#key ⇒ String
[Required] Unique type key that is immutable.
-
#lifecycle_state ⇒ String
State of the folder.
-
#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.
-
#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 = {}) ⇒ TypeSummary
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 = {}) ⇒ TypeSummary
Initializes the object
111 112 113 114 115 116 117 118 119 120 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 |
# File 'lib/oci/data_catalog/models/type_summary.rb', line 111 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.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.uri = attributes[:'uri'] if attributes[:'uri'] 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.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_summary.rb', line 40 def catalog_id @catalog_id end |
#description ⇒ String
Detailed description of the type.
36 37 38 |
# File 'lib/oci/data_catalog/models/type_summary.rb', line 36 def description @description end |
#key ⇒ String
[Required] Unique type key that is immutable.
28 29 30 |
# File 'lib/oci/data_catalog/models/type_summary.rb', line 28 def key @key end |
#lifecycle_state ⇒ String
State of the folder.
52 53 54 |
# File 'lib/oci/data_catalog/models/type_summary.rb', line 52 def lifecycle_state @lifecycle_state end |
#name ⇒ String
The immutable name of the type.
32 33 34 |
# File 'lib/oci/data_catalog/models/type_summary.rb', line 32 def name @name end |
#parent_type_key ⇒ String
Unique key of the parent type.
56 57 58 |
# File 'lib/oci/data_catalog/models/type_summary.rb', line 56 def parent_type_key @parent_type_key end |
#parent_type_name ⇒ String
Name of the parent type.
60 61 62 |
# File 'lib/oci/data_catalog/models/type_summary.rb', line 60 def parent_type_name @parent_type_name end |
#type_category ⇒ String
Indicates the category this type belongs to. For instance, data assets, connections.
44 45 46 |
# File 'lib/oci/data_catalog/models/type_summary.rb', line 44 def type_category @type_category end |
#uri ⇒ String
URI to the type instance in the API.
48 49 50 |
# File 'lib/oci/data_catalog/models/type_summary.rb', line 48 def uri @uri end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/oci/data_catalog/models/type_summary.rb', line 63 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'key': :'key', 'name': :'name', 'description': :'description', 'catalog_id': :'catalogId', 'type_category': :'typeCategory', 'uri': :'uri', 'lifecycle_state': :'lifecycleState', 'parent_type_key': :'parentTypeKey', 'parent_type_name': :'parentTypeName' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/oci/data_catalog/models/type_summary.rb', line 80 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'key': :'String', 'name': :'String', 'description': :'String', 'catalog_id': :'String', 'type_category': :'String', 'uri': :'String', 'lifecycle_state': :'String', 'parent_type_key': :'String', 'parent_type_name': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
# File 'lib/oci/data_catalog/models/type_summary.rb', line 176 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 && type_category == other.type_category && uri == other.uri && lifecycle_state == other.lifecycle_state && 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
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 |
# File 'lib/oci/data_catalog/models/type_summary.rb', line 214 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
194 195 196 |
# File 'lib/oci/data_catalog/models/type_summary.rb', line 194 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
203 204 205 |
# File 'lib/oci/data_catalog/models/type_summary.rb', line 203 def hash [key, name, description, catalog_id, type_category, uri, lifecycle_state, parent_type_key, parent_type_name].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
247 248 249 250 251 252 253 254 255 256 |
# File 'lib/oci/data_catalog/models/type_summary.rb', line 247 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
241 242 243 |
# File 'lib/oci/data_catalog/models/type_summary.rb', line 241 def to_s to_hash.to_s end |