Class: OCI::DataCatalog::Models::UpdateCustomPropertyDetails

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

Overview

Properties used in custom atrribute update operations.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ UpdateCustomPropertyDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :display_name (String)

    The value to assign to the #display_name property

  • :description (String)

    The value to assign to the #description property

  • :is_sortable (BOOLEAN)

    The value to assign to the #is_sortable property

  • :is_filterable (BOOLEAN)

    The value to assign to the #is_filterable 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_hidden_in_search (BOOLEAN)

    The value to assign to the #is_hidden_in_search property

  • :is_event_enabled (BOOLEAN)

    The value to assign to the #is_event_enabled property

  • :allowed_values (Array<String>)

    The value to assign to the #allowed_values property

  • :properties (Hash<String, Hash<String, String>>)

    The value to assign to the #properties property



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
200
201
202
203
204
205
206
207
208
209
# File 'lib/oci/data_catalog/models/update_custom_property_details.rb', line 124

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.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.is_sortable = attributes[:'isSortable'] unless attributes[:'isSortable'].nil?
  self.is_sortable = false if is_sortable.nil? && !attributes.key?(:'isSortable') # rubocop:disable Style/StringLiterals

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

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

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

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

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

  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_hidden_in_search = attributes[:'isHiddenInSearch'] unless attributes[:'isHiddenInSearch'].nil?
  self.is_hidden_in_search = false if is_hidden_in_search.nil? && !attributes.key?(:'isHiddenInSearch') # rubocop:disable Style/StringLiterals

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

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

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

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

  self.is_event_enabled = attributes[:'is_event_enabled'] unless attributes[:'is_event_enabled'].nil?
  self.is_event_enabled = false if is_event_enabled.nil? && !attributes.key?(:'isEventEnabled') && !attributes.key?(:'is_event_enabled') # 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']

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

Instance Attribute Details

#allowed_valuesArray<String>

Allowed values for the custom property if any

Returns:

  • (Array<String>)


55
56
57
# File 'lib/oci/data_catalog/models/update_custom_property_details.rb', line 55

def allowed_values
  @allowed_values
end

#descriptionString

Detailed description of the data asset.

Returns:

  • (String)


19
20
21
# File 'lib/oci/data_catalog/models/update_custom_property_details.rb', line 19

def description
  @description
end

#display_nameString

A user-friendly display name. Does not have to be unique, and it's changeable. Avoid entering confidential information.

Returns:

  • (String)


15
16
17
# File 'lib/oci/data_catalog/models/update_custom_property_details.rb', line 15

def display_name
  @display_name
end

#is_editableBOOLEAN

If this field is a editable field

Returns:

  • (BOOLEAN)


39
40
41
# File 'lib/oci/data_catalog/models/update_custom_property_details.rb', line 39

def is_editable
  @is_editable
end

#is_event_enabledBOOLEAN

If an OCI Event will be emitted when the custom property is modified.

Returns:

  • (BOOLEAN)


51
52
53
# File 'lib/oci/data_catalog/models/update_custom_property_details.rb', line 51

def is_event_enabled
  @is_event_enabled
end

#is_filterableBOOLEAN

If this field allows to filter or create facets from UI

Returns:

  • (BOOLEAN)


27
28
29
# File 'lib/oci/data_catalog/models/update_custom_property_details.rb', line 27

def is_filterable
  @is_filterable
end

#is_hiddenBOOLEAN

If this field is a hidden field

Returns:

  • (BOOLEAN)


35
36
37
# File 'lib/oci/data_catalog/models/update_custom_property_details.rb', line 35

def is_hidden
  @is_hidden
end

#is_hidden_in_searchBOOLEAN

If this field is allowed to pop in search results

Returns:

  • (BOOLEAN)


47
48
49
# File 'lib/oci/data_catalog/models/update_custom_property_details.rb', line 47

def is_hidden_in_search
  @is_hidden_in_search
end

#is_multi_valuedBOOLEAN

If this field allows multiple values to be set

Returns:

  • (BOOLEAN)


31
32
33
# File 'lib/oci/data_catalog/models/update_custom_property_details.rb', line 31

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:

  • (BOOLEAN)


43
44
45
# File 'lib/oci/data_catalog/models/update_custom_property_details.rb', line 43

def is_shown_in_list
  @is_shown_in_list
end

#is_sortableBOOLEAN

If this field allows to sort from UI

Returns:

  • (BOOLEAN)


23
24
25
# File 'lib/oci/data_catalog/models/update_custom_property_details.rb', line 23

def is_sortable
  @is_sortable
end

#propertiesHash<String, Hash<String, String>>

A map of maps that contains the properties which are specific to the asset type. Each data asset type definition defines it's set of required and optional properties. The map keys are category names and the values are maps of property name to property value. Every property is contained inside of a category. Most data assets have required properties within the "default" category. Example: {\"properties\": { \"default\": { \"host\": \"host1\", \"port\": \"1521\", \"database\": \"orcl\"}}}

Returns:

  • (Hash<String, Hash<String, String>>)


64
65
66
# File 'lib/oci/data_catalog/models/update_custom_property_details.rb', line 64

def properties
  @properties
end

Class Method Details

.attribute_mapObject

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



67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/oci/data_catalog/models/update_custom_property_details.rb', line 67

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'display_name': :'displayName',
    'description': :'description',
    'is_sortable': :'isSortable',
    'is_filterable': :'isFilterable',
    'is_multi_valued': :'isMultiValued',
    'is_hidden': :'isHidden',
    'is_editable': :'isEditable',
    'is_shown_in_list': :'isShownInList',
    'is_hidden_in_search': :'isHiddenInSearch',
    'is_event_enabled': :'isEventEnabled',
    'allowed_values': :'allowedValues',
    'properties': :'properties'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/oci/data_catalog/models/update_custom_property_details.rb', line 87

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'display_name': :'String',
    'description': :'String',
    'is_sortable': :'BOOLEAN',
    'is_filterable': :'BOOLEAN',
    'is_multi_valued': :'BOOLEAN',
    'is_hidden': :'BOOLEAN',
    'is_editable': :'BOOLEAN',
    'is_shown_in_list': :'BOOLEAN',
    'is_hidden_in_search': :'BOOLEAN',
    'is_event_enabled': :'BOOLEAN',
    'allowed_values': :'Array<String>',
    'properties': :'Hash<String, Hash<String, String>>'
    # 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



218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/oci/data_catalog/models/update_custom_property_details.rb', line 218

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

  self.class == other.class &&
    display_name == other.display_name &&
    description == other.description &&
    is_sortable == other.is_sortable &&
    is_filterable == other.is_filterable &&
    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_hidden_in_search == other.is_hidden_in_search &&
    is_event_enabled == other.is_event_enabled &&
    allowed_values == other.allowed_values &&
    properties == other.properties
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



259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
# File 'lib/oci/data_catalog/models/update_custom_property_details.rb', line 259

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


239
240
241
# File 'lib/oci/data_catalog/models/update_custom_property_details.rb', line 239

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



248
249
250
# File 'lib/oci/data_catalog/models/update_custom_property_details.rb', line 248

def hash
  [display_name, description, is_sortable, is_filterable, is_multi_valued, is_hidden, is_editable, is_shown_in_list, is_hidden_in_search, is_event_enabled, allowed_values, properties].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



292
293
294
295
296
297
298
299
300
301
# File 'lib/oci/data_catalog/models/update_custom_property_details.rb', line 292

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



286
287
288
# File 'lib/oci/data_catalog/models/update_custom_property_details.rb', line 286

def to_s
  to_hash.to_s
end