Class: OCI::DataConnectivity::Models::RegistryMetadata

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/data_connectivity/models/registry_metadata.rb

Overview

Information about the object and its parent.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ RegistryMetadata

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):

  • :aggregator_key (String)

    The value to assign to the #aggregator_key property

  • :labels (Array<String>)

    The value to assign to the #labels property

  • :registry_version (Integer)

    The value to assign to the #registry_version property

  • :key (String)

    The value to assign to the #key property

  • :is_favorite (BOOLEAN)

    The value to assign to the #is_favorite property

  • :created_by_user_id (String)

    The value to assign to the #created_by_user_id property

  • :created_by_user_name (String)

    The value to assign to the #created_by_user_name property

  • :updated_by_user_id (String)

    The value to assign to the #updated_by_user_id property

  • :updated_by_user_name (String)

    The value to assign to the #updated_by_user_name property

  • :time_created (DateTime)

    The value to assign to the #time_created property

  • :time_updated (DateTime)

    The value to assign to the #time_updated property



109
110
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# File 'lib/oci/data_connectivity/models/registry_metadata.rb', line 109

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.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.labels = attributes[:'labels'] if attributes[:'labels']

  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.key = attributes[:'key'] if attributes[:'key']

  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

  self.created_by_user_id = attributes[:'createdByUserId'] if attributes[:'createdByUserId']

  raise 'You cannot provide both :createdByUserId and :created_by_user_id' if attributes.key?(:'createdByUserId') && attributes.key?(:'created_by_user_id')

  self.created_by_user_id = attributes[:'created_by_user_id'] if attributes[:'created_by_user_id']

  self.created_by_user_name = attributes[:'createdByUserName'] if attributes[:'createdByUserName']

  raise 'You cannot provide both :createdByUserName and :created_by_user_name' if attributes.key?(:'createdByUserName') && attributes.key?(:'created_by_user_name')

  self.created_by_user_name = attributes[:'created_by_user_name'] if attributes[:'created_by_user_name']

  self.updated_by_user_id = attributes[:'updatedByUserId'] if attributes[:'updatedByUserId']

  raise 'You cannot provide both :updatedByUserId and :updated_by_user_id' if attributes.key?(:'updatedByUserId') && attributes.key?(:'updated_by_user_id')

  self.updated_by_user_id = attributes[:'updated_by_user_id'] if attributes[:'updated_by_user_id']

  self.updated_by_user_name = attributes[:'updatedByUserName'] if attributes[:'updatedByUserName']

  raise 'You cannot provide both :updatedByUserName and :updated_by_user_name' if attributes.key?(:'updatedByUserName') && attributes.key?(:'updated_by_user_name')

  self.updated_by_user_name = attributes[:'updated_by_user_name'] if attributes[:'updated_by_user_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']
end

Instance Attribute Details

#aggregator_keyString

The owning object's key for this object.

Returns:

  • (String)


12
13
14
# File 'lib/oci/data_connectivity/models/registry_metadata.rb', line 12

def aggregator_key
  @aggregator_key
end

#created_by_user_idString

The id of the user who created the object.

Returns:

  • (String)


32
33
34
# File 'lib/oci/data_connectivity/models/registry_metadata.rb', line 32

def created_by_user_id
  @created_by_user_id
end

#created_by_user_nameString

The name of the user who created the object.

Returns:

  • (String)


36
37
38
# File 'lib/oci/data_connectivity/models/registry_metadata.rb', line 36

def created_by_user_name
  @created_by_user_name
end

#is_favoriteBOOLEAN

Specifies whether this object is a favorite or not.

Returns:

  • (BOOLEAN)


28
29
30
# File 'lib/oci/data_connectivity/models/registry_metadata.rb', line 28

def is_favorite
  @is_favorite
end

#keyString

The identifying key for the object.

Returns:

  • (String)


24
25
26
# File 'lib/oci/data_connectivity/models/registry_metadata.rb', line 24

def key
  @key
end

#labelsArray<String>

Labels are keywords or labels that you can add to data assets, dataflows etc. You can define your own labels and use them to categorize content.

Returns:

  • (Array<String>)


16
17
18
# File 'lib/oci/data_connectivity/models/registry_metadata.rb', line 16

def labels
  @labels
end

#registry_versionInteger

The registry version.

Returns:

  • (Integer)


20
21
22
# File 'lib/oci/data_connectivity/models/registry_metadata.rb', line 20

def registry_version
  @registry_version
end

#time_createdDateTime

The date and time that the object was created.

Returns:

  • (DateTime)


48
49
50
# File 'lib/oci/data_connectivity/models/registry_metadata.rb', line 48

def time_created
  @time_created
end

#time_updatedDateTime

The date and time that the object was updated.

Returns:

  • (DateTime)


52
53
54
# File 'lib/oci/data_connectivity/models/registry_metadata.rb', line 52

def time_updated
  @time_updated
end

#updated_by_user_idString

The id of the user who updated the object.

Returns:

  • (String)


40
41
42
# File 'lib/oci/data_connectivity/models/registry_metadata.rb', line 40

def updated_by_user_id
  @updated_by_user_id
end

#updated_by_user_nameString

The name of the user who updated the object.

Returns:

  • (String)


44
45
46
# File 'lib/oci/data_connectivity/models/registry_metadata.rb', line 44

def updated_by_user_name
  @updated_by_user_name
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# File 'lib/oci/data_connectivity/models/registry_metadata.rb', line 55

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'aggregator_key': :'aggregatorKey',
    'labels': :'labels',
    'registry_version': :'registryVersion',
    'key': :'key',
    'is_favorite': :'isFavorite',
    'created_by_user_id': :'createdByUserId',
    'created_by_user_name': :'createdByUserName',
    'updated_by_user_id': :'updatedByUserId',
    'updated_by_user_name': :'updatedByUserName',
    'time_created': :'timeCreated',
    'time_updated': :'timeUpdated'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# File 'lib/oci/data_connectivity/models/registry_metadata.rb', line 74

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'aggregator_key': :'String',
    'labels': :'Array<String>',
    'registry_version': :'Integer',
    'key': :'String',
    'is_favorite': :'BOOLEAN',
    'created_by_user_id': :'String',
    'created_by_user_name': :'String',
    'updated_by_user_id': :'String',
    'updated_by_user_name': :'String',
    'time_created': :'DateTime',
    'time_updated': :'DateTime'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# File 'lib/oci/data_connectivity/models/registry_metadata.rb', line 183

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    aggregator_key == other.aggregator_key &&
    labels == other.labels &&
    registry_version == other.registry_version &&
    key == other.key &&
    is_favorite == other.is_favorite &&
    created_by_user_id == other.created_by_user_id &&
    created_by_user_name == other.created_by_user_name &&
    updated_by_user_id == other.updated_by_user_id &&
    updated_by_user_name == other.updated_by_user_name &&
    time_created == other.time_created &&
    time_updated == other.time_updated
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
# File 'lib/oci/data_connectivity/models/registry_metadata.rb', line 223

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

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


203
204
205
# File 'lib/oci/data_connectivity/models/registry_metadata.rb', line 203

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



212
213
214
# File 'lib/oci/data_connectivity/models/registry_metadata.rb', line 212

def hash
  [aggregator_key, labels, registry_version, key, is_favorite, created_by_user_id, created_by_user_name, updated_by_user_id, updated_by_user_name, time_created, time_updated].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



256
257
258
259
260
261
262
263
264
265
# File 'lib/oci/data_connectivity/models/registry_metadata.rb', line 256

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



250
251
252
# File 'lib/oci/data_connectivity/models/registry_metadata.rb', line 250

def to_s
  to_hash.to_s
end