Class: OCI::IdentityDomains::Models::SchemaIdcsCsvAttributeNameMappings

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

Overview

Csv meta data for those resource type attributes which can be imported / exported from / to csv.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ SchemaIdcsCsvAttributeNameMappings

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



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/identity_domains/models/schema_idcs_csv_attribute_name_mappings.rb', line 161

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

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

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

  self.deprecated_column_header_name = attributes[:'deprecatedColumnHeaderName'] if attributes[:'deprecatedColumnHeaderName']

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

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

  self.maps_to = attributes[:'mapsTo'] if attributes[:'mapsTo']

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

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

  self.default_value = attributes[:'defaultValue'] if attributes[:'defaultValue']

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

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

  self.multi_value_delimiter = attributes[:'multiValueDelimiter'] if attributes[:'multiValueDelimiter']

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

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

  self.csv_column_for_resolving_resource_type = attributes[:'csvColumnForResolvingResourceType'] if attributes[:'csvColumnForResolvingResourceType']

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

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

  self.resolve_value_using_resource_type = attributes[:'resolveValueUsingResourceType'] if attributes[:'resolveValueUsingResourceType']

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

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

  self.referenced_resource_type_unique_attribute_name_mappings = attributes[:'referencedResourceTypeUniqueAttributeNameMappings'] if attributes[:'referencedResourceTypeUniqueAttributeNameMappings']

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

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

Instance Attribute Details

#column_header_nameString

The CSV column header name that maps to this attribute.

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

Returns:

  • (String)


22
23
24
# File 'lib/oci/identity_domains/models/schema_idcs_csv_attribute_name_mappings.rb', line 22

def column_header_name
  @column_header_name
end

#csv_column_for_resolving_resource_typeString

This specifies the Csv Header for resolving Resource Type for this Column Header

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

Returns:

  • (String)


87
88
89
# File 'lib/oci/identity_domains/models/schema_idcs_csv_attribute_name_mappings.rb', line 87

def csv_column_for_resolving_resource_type
  @csv_column_for_resolving_resource_type
end

#default_valueString

The default value to be used during import processing in case the CSV column header is not present or value is not given in the import CSV.

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

Returns:

  • (String)


61
62
63
# File 'lib/oci/identity_domains/models/schema_idcs_csv_attribute_name_mappings.rb', line 61

def default_value
  @default_value
end

#deprecated_column_header_nameString

The deprecated CSV column header name that maps to this attribute.

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

Returns:

  • (String)


35
36
37
# File 'lib/oci/identity_domains/models/schema_idcs_csv_attribute_name_mappings.rb', line 35

def deprecated_column_header_name
  @deprecated_column_header_name
end

#maps_toString

The attribute path that the CSV column header name maps to for complex multi-valued attributes.

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

Returns:

  • (String)


48
49
50
# File 'lib/oci/identity_domains/models/schema_idcs_csv_attribute_name_mappings.rb', line 48

def maps_to
  @maps_to
end

#multi_value_delimiterString

If values of the CSV column header name can contain multiple values, this attribute specifies the delimiter to be used. For example, Group's \“User Members\” CSV column header is multi-valued and it's delimiter is a semi-colon (\“;\”).

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

Returns:

  • (String)


74
75
76
# File 'lib/oci/identity_domains/models/schema_idcs_csv_attribute_name_mappings.rb', line 74

def multi_value_delimiter
  @multi_value_delimiter
end

#referenced_resource_type_unique_attribute_name_mappingsArray<OCI::IdentityDomains::Models::SchemaReferencedResourceTypeUniqueAttributeNameMappings>

This attribute specifies the mapping of \“uniqueAttributeNameForDisplay\” attributes(s) of the referenced resource with the columnHeaderName(s). This attribute should be given in the idcsCsvAttributeNameMappings when uniqueAttributeNameForDisplay contains more than one attribute.

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



113
114
115
# File 'lib/oci/identity_domains/models/schema_idcs_csv_attribute_name_mappings.rb', line 113

def referenced_resource_type_unique_attribute_name_mappings
  @referenced_resource_type_unique_attribute_name_mappings
end

#resolve_value_using_resource_typeArray<OCI::IdentityDomains::Models::SchemaResolveValueUsingResourceType>

This attribute gives a maps for resolving Resource Type after reading it's value from \“csvColumnForResolvingResourceType\” attribute

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



100
101
102
# File 'lib/oci/identity_domains/models/schema_idcs_csv_attribute_name_mappings.rb', line 100

def resolve_value_using_resource_type
  @resolve_value_using_resource_type
end

Class Method Details

.attribute_mapObject

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



116
117
118
119
120
121
122
123
124
125
126
127
128
129
# File 'lib/oci/identity_domains/models/schema_idcs_csv_attribute_name_mappings.rb', line 116

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'column_header_name': :'columnHeaderName',
    'deprecated_column_header_name': :'deprecatedColumnHeaderName',
    'maps_to': :'mapsTo',
    'default_value': :'defaultValue',
    'multi_value_delimiter': :'multiValueDelimiter',
    'csv_column_for_resolving_resource_type': :'csvColumnForResolvingResourceType',
    'resolve_value_using_resource_type': :'resolveValueUsingResourceType',
    'referenced_resource_type_unique_attribute_name_mappings': :'referencedResourceTypeUniqueAttributeNameMappings'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



132
133
134
135
136
137
138
139
140
141
142
143
144
145
# File 'lib/oci/identity_domains/models/schema_idcs_csv_attribute_name_mappings.rb', line 132

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'column_header_name': :'String',
    'deprecated_column_header_name': :'String',
    'maps_to': :'String',
    'default_value': :'String',
    'multi_value_delimiter': :'String',
    'csv_column_for_resolving_resource_type': :'String',
    'resolve_value_using_resource_type': :'Array<OCI::IdentityDomains::Models::SchemaResolveValueUsingResourceType>',
    'referenced_resource_type_unique_attribute_name_mappings': :'Array<OCI::IdentityDomains::Models::SchemaReferencedResourceTypeUniqueAttributeNameMappings>'
    # 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



223
224
225
226
227
228
229
230
231
232
233
234
235
# File 'lib/oci/identity_domains/models/schema_idcs_csv_attribute_name_mappings.rb', line 223

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

  self.class == other.class &&
    column_header_name == other.column_header_name &&
    deprecated_column_header_name == other.deprecated_column_header_name &&
    maps_to == other.maps_to &&
    default_value == other.default_value &&
    multi_value_delimiter == other.multi_value_delimiter &&
    csv_column_for_resolving_resource_type == other.csv_column_for_resolving_resource_type &&
    resolve_value_using_resource_type == other.resolve_value_using_resource_type &&
    referenced_resource_type_unique_attribute_name_mappings == other.referenced_resource_type_unique_attribute_name_mappings
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



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

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


240
241
242
# File 'lib/oci/identity_domains/models/schema_idcs_csv_attribute_name_mappings.rb', line 240

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



249
250
251
# File 'lib/oci/identity_domains/models/schema_idcs_csv_attribute_name_mappings.rb', line 249

def hash
  [column_header_name, deprecated_column_header_name, maps_to, default_value, multi_value_delimiter, csv_column_for_resolving_resource_type, resolve_value_using_resource_type, referenced_resource_type_unique_attribute_name_mappings].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



293
294
295
296
297
298
299
300
301
302
# File 'lib/oci/identity_domains/models/schema_idcs_csv_attribute_name_mappings.rb', line 293

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



287
288
289
# File 'lib/oci/identity_domains/models/schema_idcs_csv_attribute_name_mappings.rb', line 287

def to_s
  to_hash.to_s
end