Class: OCI::IdentityDomains::Models::AppAttrRenderingMetadata

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/identity_domains/models/app_attr_rendering_metadata.rb

Overview

Label for the attribute to be shown in the UI.

Constant Summary collapse

WIDGET_ENUM =
[
  WIDGET_INPUTTEXT = 'inputtext'.freeze,
  WIDGET_CHECKBOX = 'checkbox'.freeze,
  WIDGET_TEXTAREA = 'textarea'.freeze,
  WIDGET_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
SECTION_ENUM =
[
  SECTION_SAML = 'saml'.freeze,
  SECTION_GENERAL = 'general'.freeze,
  SECTION_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ AppAttrRenderingMetadata

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :name (String)

    The value to assign to the #name property

  • :label (String)

    The value to assign to the #label property

  • :helptext (String)

    The value to assign to the #helptext property

  • :widget (String)

    The value to assign to the #widget property

  • :datatype (String)

    The value to assign to the #datatype property

  • :section (String)

    The value to assign to the #section property

  • :order (Integer)

    The value to assign to the #order property

  • :required (BOOLEAN)

    The value to assign to the #required property

  • :regexp (String)

    The value to assign to the #regexp property

  • :read_only (BOOLEAN)

    The value to assign to the #read_only property

  • :visible (BOOLEAN)

    The value to assign to the #visible property

  • :min_length (Integer)

    The value to assign to the #min_length property

  • :max_length (Integer)

    The value to assign to the #max_length property

  • :min_size (Integer)

    The value to assign to the #min_size property

  • :max_size (Integer)

    The value to assign to the #max_size property



288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
# File 'lib/oci/identity_domains/models/app_attr_rendering_metadata.rb', line 288

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

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

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

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

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

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

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

  self.required = attributes[:'required'] unless attributes[:'required'].nil?

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

  self.read_only = attributes[:'readOnly'] unless attributes[:'readOnly'].nil?

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

  self.read_only = attributes[:'read_only'] unless attributes[:'read_only'].nil?

  self.visible = attributes[:'visible'] unless attributes[:'visible'].nil?

  self.min_length = attributes[:'minLength'] if attributes[:'minLength']

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

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

  self.max_length = attributes[:'maxLength'] if attributes[:'maxLength']

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

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

  self.min_size = attributes[:'minSize'] if attributes[:'minSize']

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

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

  self.max_size = attributes[:'maxSize'] if attributes[:'maxSize']

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

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

Instance Attribute Details

#datatypeString

Data type of the attribute.

SCIM++ Properties: - idcsSearchable: false - multiValued: false - mutability: readWrite - required: false - returned: default - type: string - uniqueness: none

Returns:

  • (String)


89
90
91
# File 'lib/oci/identity_domains/models/app_attr_rendering_metadata.rb', line 89

def datatype
  @datatype
end

#helptextString

Help text for the attribute. It can contain HTML tags.

SCIM++ Properties: - idcsSearchable: false - multiValued: false - mutability: readWrite - required: false - returned: default - type: string - uniqueness: none

Returns:

  • (String)


63
64
65
# File 'lib/oci/identity_domains/models/app_attr_rendering_metadata.rb', line 63

def helptext
  @helptext
end

#labelString

Label for the attribute to be shown in the UI.

SCIM++ Properties: - idcsSearchable: false - multiValued: false - mutability: readWrite - required: false - returned: default - type: string - uniqueness: none

Returns:

  • (String)


50
51
52
# File 'lib/oci/identity_domains/models/app_attr_rendering_metadata.rb', line 50

def label
  @label
end

#max_lengthInteger

Maximum length of the attribute.

SCIM++ Properties: - idcsSearchable: false - multiValued: false - mutability: readWrite - required: false - returned: default - type: integer - uniqueness: none

Returns:

  • (Integer)


193
194
195
# File 'lib/oci/identity_domains/models/app_attr_rendering_metadata.rb', line 193

def max_length
  @max_length
end

#max_sizeInteger

Maximum size of the attribute.

SCIM++ Properties: - idcsSearchable: false - multiValued: false - mutability: readWrite - required: false - returned: default - type: integer - uniqueness: none

Returns:

  • (Integer)


219
220
221
# File 'lib/oci/identity_domains/models/app_attr_rendering_metadata.rb', line 219

def max_size
  @max_size
end

#min_lengthInteger

Minimum length of the attribute.

SCIM++ Properties: - idcsSearchable: false - multiValued: false - mutability: readWrite - required: false - returned: default - type: integer - uniqueness: none

Returns:

  • (Integer)


180
181
182
# File 'lib/oci/identity_domains/models/app_attr_rendering_metadata.rb', line 180

def min_length
  @min_length
end

#min_sizeInteger

Minimum size of the attribute..

SCIM++ Properties: - idcsSearchable: false - multiValued: false - mutability: readWrite - required: false - returned: default - type: integer - uniqueness: none

Returns:

  • (Integer)


206
207
208
# File 'lib/oci/identity_domains/models/app_attr_rendering_metadata.rb', line 206

def min_size
  @min_size
end

#nameString

[Required] Name of the attribute.

SCIM++ Properties: - caseExact: true - idcsSearchable: false - multiValued: false - mutability: readWrite - required: true - returned: default - type: string - uniqueness: none

Returns:

  • (String)


37
38
39
# File 'lib/oci/identity_domains/models/app_attr_rendering_metadata.rb', line 37

def name
  @name
end

#orderInteger

Data type of the attribute.

SCIM++ Properties: - idcsSearchable: false - multiValued: false - mutability: readWrite - required: false - returned: default - type: integer - uniqueness: none

Returns:

  • (Integer)


115
116
117
# File 'lib/oci/identity_domains/models/app_attr_rendering_metadata.rb', line 115

def order
  @order
end

#read_onlyBOOLEAN

Is the attribute readOnly.

SCIM++ Properties: - idcsSearchable: false - multiValued: false - mutability: readWrite - required: false - returned: default - type: boolean - uniqueness: none

Returns:

  • (BOOLEAN)


154
155
156
# File 'lib/oci/identity_domains/models/app_attr_rendering_metadata.rb', line 154

def read_only
  @read_only
end

#regexpString

Regular expression of the attribute for validation.

SCIM++ Properties: - idcsSearchable: false - multiValued: false - mutability: readWrite - required: false - returned: default - type: string - uniqueness: none

Returns:

  • (String)


141
142
143
# File 'lib/oci/identity_domains/models/app_attr_rendering_metadata.rb', line 141

def regexp
  @regexp
end

#requiredBOOLEAN

Attribute is required or optional.

SCIM++ Properties: - idcsSearchable: false - multiValued: false - mutability: readWrite - required: false - returned: default - type: boolean - uniqueness: none

Returns:

  • (BOOLEAN)


128
129
130
# File 'lib/oci/identity_domains/models/app_attr_rendering_metadata.rb', line 128

def required
  @required
end

#sectionString

UI widget to use for the attribute.

SCIM++ Properties: - idcsSearchable: false - multiValued: false - mutability: readWrite - required: false - returned: default - type: string - uniqueness: none

Returns:

  • (String)


102
103
104
# File 'lib/oci/identity_domains/models/app_attr_rendering_metadata.rb', line 102

def section
  @section
end

#visibleBOOLEAN

Indicates whether the attribute is to be shown on the application creation UI.

SCIM++ Properties: - idcsSearchable: false - multiValued: false - mutability: readWrite - required: false - returned: default - type: boolean - uniqueness: none

Returns:

  • (BOOLEAN)


167
168
169
# File 'lib/oci/identity_domains/models/app_attr_rendering_metadata.rb', line 167

def visible
  @visible
end

#widgetString

UI widget to use for the attribute.

SCIM++ Properties: - idcsSearchable: false - multiValued: false - mutability: readWrite - required: false - returned: default - type: string - uniqueness: none

Returns:

  • (String)


76
77
78
# File 'lib/oci/identity_domains/models/app_attr_rendering_metadata.rb', line 76

def widget
  @widget
end

Class Method Details

.attribute_mapObject

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



222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
# File 'lib/oci/identity_domains/models/app_attr_rendering_metadata.rb', line 222

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'name': :'name',
    'label': :'label',
    'helptext': :'helptext',
    'widget': :'widget',
    'datatype': :'datatype',
    'section': :'section',
    'order': :'order',
    'required': :'required',
    'regexp': :'regexp',
    'read_only': :'readOnly',
    'visible': :'visible',
    'min_length': :'minLength',
    'max_length': :'maxLength',
    'min_size': :'minSize',
    'max_size': :'maxSize'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
# File 'lib/oci/identity_domains/models/app_attr_rendering_metadata.rb', line 245

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'name': :'String',
    'label': :'String',
    'helptext': :'String',
    'widget': :'String',
    'datatype': :'String',
    'section': :'String',
    'order': :'Integer',
    'required': :'BOOLEAN',
    'regexp': :'String',
    'read_only': :'BOOLEAN',
    'visible': :'BOOLEAN',
    'min_length': :'Integer',
    'max_length': :'Integer',
    'min_size': :'Integer',
    'max_size': :'Integer'
    # 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



378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
# File 'lib/oci/identity_domains/models/app_attr_rendering_metadata.rb', line 378

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

  self.class == other.class &&
    name == other.name &&
    label == other.label &&
    helptext == other.helptext &&
    widget == other.widget &&
    datatype == other.datatype &&
    section == other.section &&
    order == other.order &&
    required == other.required &&
    regexp == other.regexp &&
    read_only == other.read_only &&
    visible == other.visible &&
    min_length == other.min_length &&
    max_length == other.max_length &&
    min_size == other.min_size &&
    max_size == other.max_size
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



422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
# File 'lib/oci/identity_domains/models/app_attr_rendering_metadata.rb', line 422

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


402
403
404
# File 'lib/oci/identity_domains/models/app_attr_rendering_metadata.rb', line 402

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



411
412
413
# File 'lib/oci/identity_domains/models/app_attr_rendering_metadata.rb', line 411

def hash
  [name, label, helptext, widget, datatype, section, order, required, regexp, read_only, visible, min_length, max_length, min_size, max_size].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



455
456
457
458
459
460
461
462
463
464
# File 'lib/oci/identity_domains/models/app_attr_rendering_metadata.rb', line 455

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



449
450
451
# File 'lib/oci/identity_domains/models/app_attr_rendering_metadata.rb', line 449

def to_s
  to_hash.to_s
end