Class: OCI::DataCatalog::Models::CustomPropertyGetUsage

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/data_catalog/models/custom_property_get_usage.rb

Overview

Details of a single custom property

Constant Summary collapse

DATA_TYPE_ENUM =
[
  DATA_TYPE_TEXT = 'TEXT'.freeze,
  DATA_TYPE_RICH_TEXT = 'RICH_TEXT'.freeze,
  DATA_TYPE_BOOLEAN = 'BOOLEAN'.freeze,
  DATA_TYPE_NUMBER = 'NUMBER'.freeze,
  DATA_TYPE_DATE = 'DATE'.freeze,
  DATA_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ CustomPropertyGetUsage

Initializes the object

Parameters:

  • (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):

  • :key (String)

    The value to assign to the #key property

  • :display_name (String)

    The value to assign to the #display_name property

  • :description (String)

    The value to assign to the #description property

  • :value (String)

    The value to assign to the #value property

  • :data_type (String)

    The value to assign to the #data_type property

  • :namespace_name (String)

    The value to assign to the #namespace_name property

  • :namespace_key (String)

    The value to assign to the #namespace_key property

  • :is_multi_valued (BOOLEAN)

    The value to assign to the #is_multi_valued property

  • :is_hidden (BOOLEAN)

    The value to assign to the #is_hidden property

  • :is_editable (BOOLEAN)

    The value to assign to the #is_editable property

  • :is_shown_in_list (BOOLEAN)

    The value to assign to the #is_shown_in_list property

  • :is_list_type (BOOLEAN)

    The value to assign to the #is_list_type property

  • :allowed_values (Array<String>)

    The value to assign to the #allowed_values property



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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
# File 'lib/oci/data_catalog/models/custom_property_get_usage.rb', line 133

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

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

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

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

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

  self.data_type = attributes[:'dataType'] if attributes[:'dataType']

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

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

  self.namespace_name = attributes[:'namespaceName'] if attributes[:'namespaceName']

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

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

  self.namespace_key = attributes[:'namespaceKey'] if attributes[:'namespaceKey']

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

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

  self.is_multi_valued = attributes[:'isMultiValued'] unless attributes[:'isMultiValued'].nil?
  self.is_multi_valued = false if is_multi_valued.nil? && !attributes.key?(:'isMultiValued') # rubocop:disable Style/StringLiterals

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

  self.is_multi_valued = attributes[:'is_multi_valued'] unless attributes[:'is_multi_valued'].nil?
  self.is_multi_valued = false if is_multi_valued.nil? && !attributes.key?(:'isMultiValued') && !attributes.key?(:'is_multi_valued') # rubocop:disable Style/StringLiterals

  self.is_hidden = attributes[:'isHidden'] unless attributes[:'isHidden'].nil?
  self.is_hidden = true if is_hidden.nil? && !attributes.key?(:'isHidden') # rubocop:disable Style/StringLiterals

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

  self.is_hidden = attributes[:'is_hidden'] unless attributes[:'is_hidden'].nil?
  self.is_hidden = true if is_hidden.nil? && !attributes.key?(:'isHidden') && !attributes.key?(:'is_hidden') # rubocop:disable Style/StringLiterals

  self.is_editable = attributes[:'isEditable'] unless attributes[:'isEditable'].nil?
  self.is_editable = true if is_editable.nil? && !attributes.key?(:'isEditable') # rubocop:disable Style/StringLiterals

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

  self.is_editable = attributes[:'is_editable'] unless attributes[:'is_editable'].nil?
  self.is_editable = true if is_editable.nil? && !attributes.key?(:'isEditable') && !attributes.key?(:'is_editable') # rubocop:disable Style/StringLiterals

  self.is_shown_in_list = attributes[:'isShownInList'] unless attributes[:'isShownInList'].nil?
  self.is_shown_in_list = false if is_shown_in_list.nil? && !attributes.key?(:'isShownInList') # rubocop:disable Style/StringLiterals

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

  self.is_shown_in_list = attributes[:'is_shown_in_list'] unless attributes[:'is_shown_in_list'].nil?
  self.is_shown_in_list = false if is_shown_in_list.nil? && !attributes.key?(:'isShownInList') && !attributes.key?(:'is_shown_in_list') # rubocop:disable Style/StringLiterals

  self.is_list_type = attributes[:'isListType'] unless attributes[:'isListType'].nil?
  self.is_list_type = false if is_list_type.nil? && !attributes.key?(:'isListType') # rubocop:disable Style/StringLiterals

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

  self.is_list_type = attributes[:'is_list_type'] unless attributes[:'is_list_type'].nil?
  self.is_list_type = false if is_list_type.nil? && !attributes.key?(:'isListType') && !attributes.key?(:'is_list_type') # rubocop:disable Style/StringLiterals

  self.allowed_values = attributes[:'allowedValues'] if attributes[:'allowedValues']

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

  self.allowed_values = attributes[:'allowed_values'] if attributes[:'allowed_values']
end

Instance Attribute Details

#allowed_valuesArray<String>

Allowed values for the custom property if any

Returns:



70
71
72
# File 'lib/oci/data_catalog/models/custom_property_get_usage.rb', line 70

def allowed_values
  @allowed_values
end

#data_typeString

The data type of the custom property

Returns:



38
39
40
# File 'lib/oci/data_catalog/models/custom_property_get_usage.rb', line 38

def data_type
  @data_type
end

#descriptionString

Description of the custom property

Returns:



30
31
32
# File 'lib/oci/data_catalog/models/custom_property_get_usage.rb', line 30

def description
  @description
end

#display_nameString

Display name of the custom property

Returns:



26
27
28
# File 'lib/oci/data_catalog/models/custom_property_get_usage.rb', line 26

def display_name
  @display_name
end

#is_editableBOOLEAN

If this field is a editable field

Returns:



58
59
60
# File 'lib/oci/data_catalog/models/custom_property_get_usage.rb', line 58

def is_editable
  @is_editable
end

#is_hiddenBOOLEAN

If this field is a hidden field

Returns:



54
55
56
# File 'lib/oci/data_catalog/models/custom_property_get_usage.rb', line 54

def is_hidden
  @is_hidden
end

#is_list_typeBOOLEAN

Is this property allowed to have list of values

Returns:



66
67
68
# File 'lib/oci/data_catalog/models/custom_property_get_usage.rb', line 66

def is_list_type
  @is_list_type
end

#is_multi_valuedBOOLEAN

If this field allows multiple values to be set

Returns:



50
51
52
# File 'lib/oci/data_catalog/models/custom_property_get_usage.rb', line 50

def is_multi_valued
  @is_multi_valued
end

#is_shown_in_listBOOLEAN

If this field is displayed in a list view of applicable objects.

Returns:



62
63
64
# File 'lib/oci/data_catalog/models/custom_property_get_usage.rb', line 62

def is_shown_in_list
  @is_shown_in_list
end

#keyString

Unique Identifier of the attribute which is ID

Returns:



22
23
24
# File 'lib/oci/data_catalog/models/custom_property_get_usage.rb', line 22

def key
  @key
end

#namespace_keyString

Unique namespace key that is immutable

Returns:



46
47
48
# File 'lib/oci/data_catalog/models/custom_property_get_usage.rb', line 46

def namespace_key
  @namespace_key
end

#namespace_nameString

Namespace name of the custom property

Returns:



42
43
44
# File 'lib/oci/data_catalog/models/custom_property_get_usage.rb', line 42

def namespace_name
  @namespace_name
end

#valueString

The custom property value

Returns:



34
35
36
# File 'lib/oci/data_catalog/models/custom_property_get_usage.rb', line 34

def value
  @value
end

Class Method Details

.attribute_mapObject

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



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

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'key': :'key',
    'display_name': :'displayName',
    'description': :'description',
    'value': :'value',
    'data_type': :'dataType',
    'namespace_name': :'namespaceName',
    'namespace_key': :'namespaceKey',
    'is_multi_valued': :'isMultiValued',
    'is_hidden': :'isHidden',
    'is_editable': :'isEditable',
    'is_shown_in_list': :'isShownInList',
    'is_list_type': :'isListType',
    'allowed_values': :'allowedValues'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# File 'lib/oci/data_catalog/models/custom_property_get_usage.rb', line 94

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'key': :'String',
    'display_name': :'String',
    'description': :'String',
    'value': :'String',
    'data_type': :'String',
    'namespace_name': :'String',
    'namespace_key': :'String',
    'is_multi_valued': :'BOOLEAN',
    'is_hidden': :'BOOLEAN',
    'is_editable': :'BOOLEAN',
    'is_shown_in_list': :'BOOLEAN',
    'is_list_type': :'BOOLEAN',
    'allowed_values': :'Array<String>'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • the other object to be compared



236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
# File 'lib/oci/data_catalog/models/custom_property_get_usage.rb', line 236

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

  self.class == other.class &&
    key == other.key &&
    display_name == other.display_name &&
    description == other.description &&
    value == other.value &&
    data_type == other.data_type &&
    namespace_name == other.namespace_name &&
    namespace_key == other.namespace_key &&
    is_multi_valued == other.is_multi_valued &&
    is_hidden == other.is_hidden &&
    is_editable == other.is_editable &&
    is_shown_in_list == other.is_shown_in_list &&
    is_list_type == other.is_list_type &&
    allowed_values == other.allowed_values
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • Model attributes in the form of hash

Returns:

  • Returns the model itself



278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
# File 'lib/oci/data_catalog/models/custom_property_get_usage.rb', line 278

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:

  • the other object to be compared

Returns:

See Also:

  • `==` method


258
259
260
# File 'lib/oci/data_catalog/models/custom_property_get_usage.rb', line 258

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • Hash code



267
268
269
# File 'lib/oci/data_catalog/models/custom_property_get_usage.rb', line 267

def hash
  [key, display_name, description, value, data_type, namespace_name, namespace_key, is_multi_valued, is_hidden, is_editable, is_shown_in_list, is_list_type, allowed_values].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • Returns the object in the form of hash



311
312
313
314
315
316
317
318
319
320
# File 'lib/oci/data_catalog/models/custom_property_get_usage.rb', line 311

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 presentation of the object



305
306
307
# File 'lib/oci/data_catalog/models/custom_property_get_usage.rb', line 305

def to_s
  to_hash.to_s
end