Class: OCI::LogAnalytics::Models::LogAnalyticsImportCustomChangeList

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/log_analytics/models/log_analytics_import_custom_change_list.rb

Overview

LogAnalyticsImportCustomChangeList

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ LogAnalyticsImportCustomChangeList

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



96
97
98
99
100
101
102
103
104
105
106
107
108
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
# File 'lib/oci/log_analytics/models/log_analytics_import_custom_change_list.rb', line 96

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

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

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

  self.updated_parser_names = attributes[:'updatedParserNames'] if attributes[:'updatedParserNames']

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

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

  self.created_source_names = attributes[:'createdSourceNames'] if attributes[:'createdSourceNames']

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

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

  self.updated_source_names = attributes[:'updatedSourceNames'] if attributes[:'updatedSourceNames']

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

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

  self.created_field_display_names = attributes[:'createdFieldDisplayNames'] if attributes[:'createdFieldDisplayNames']

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

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

  self.updated_field_display_names = attributes[:'updatedFieldDisplayNames'] if attributes[:'updatedFieldDisplayNames']

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

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

  self.conflict_parser_names = attributes[:'conflictParserNames'] if attributes[:'conflictParserNames']

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

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

  self.conflict_source_names = attributes[:'conflictSourceNames'] if attributes[:'conflictSourceNames']

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

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

  self.conflict_field_display_names = attributes[:'conflictFieldDisplayNames'] if attributes[:'conflictFieldDisplayNames']

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

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

Instance Attribute Details

#conflict_field_display_namesArray<String>

A list of field display names with conflicts.

Returns:

  • (Array<String>)


45
46
47
# File 'lib/oci/log_analytics/models/log_analytics_import_custom_change_list.rb', line 45

def conflict_field_display_names
  @conflict_field_display_names
end

#conflict_parser_namesArray<String>

A list of parser names with conflicts.

Returns:

  • (Array<String>)


37
38
39
# File 'lib/oci/log_analytics/models/log_analytics_import_custom_change_list.rb', line 37

def conflict_parser_names
  @conflict_parser_names
end

#conflict_source_namesArray<String>

A list of source names with conflicts.

Returns:

  • (Array<String>)


41
42
43
# File 'lib/oci/log_analytics/models/log_analytics_import_custom_change_list.rb', line 41

def conflict_source_names
  @conflict_source_names
end

#created_field_display_namesArray<String>

An array of created field display names.

Returns:

  • (Array<String>)


29
30
31
# File 'lib/oci/log_analytics/models/log_analytics_import_custom_change_list.rb', line 29

def created_field_display_names
  @created_field_display_names
end

#created_parser_namesArray<String>

An array of created parser names.

Returns:

  • (Array<String>)


13
14
15
# File 'lib/oci/log_analytics/models/log_analytics_import_custom_change_list.rb', line 13

def created_parser_names
  @created_parser_names
end

#created_source_namesArray<String>

An array of created source names.

Returns:

  • (Array<String>)


21
22
23
# File 'lib/oci/log_analytics/models/log_analytics_import_custom_change_list.rb', line 21

def created_source_names
  @created_source_names
end

#updated_field_display_namesArray<String>

An array of updated field display names.

Returns:

  • (Array<String>)


33
34
35
# File 'lib/oci/log_analytics/models/log_analytics_import_custom_change_list.rb', line 33

def updated_field_display_names
  @updated_field_display_names
end

#updated_parser_namesArray<String>

An array of updated parser names.

Returns:

  • (Array<String>)


17
18
19
# File 'lib/oci/log_analytics/models/log_analytics_import_custom_change_list.rb', line 17

def updated_parser_names
  @updated_parser_names
end

#updated_source_namesArray<String>

An array of updated source names.

Returns:

  • (Array<String>)


25
26
27
# File 'lib/oci/log_analytics/models/log_analytics_import_custom_change_list.rb', line 25

def updated_source_names
  @updated_source_names
end

Class Method Details

.attribute_mapObject

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



48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/oci/log_analytics/models/log_analytics_import_custom_change_list.rb', line 48

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'created_parser_names': :'createdParserNames',
    'updated_parser_names': :'updatedParserNames',
    'created_source_names': :'createdSourceNames',
    'updated_source_names': :'updatedSourceNames',
    'created_field_display_names': :'createdFieldDisplayNames',
    'updated_field_display_names': :'updatedFieldDisplayNames',
    'conflict_parser_names': :'conflictParserNames',
    'conflict_source_names': :'conflictSourceNames',
    'conflict_field_display_names': :'conflictFieldDisplayNames'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/oci/log_analytics/models/log_analytics_import_custom_change_list.rb', line 65

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'created_parser_names': :'Array<String>',
    'updated_parser_names': :'Array<String>',
    'created_source_names': :'Array<String>',
    'updated_source_names': :'Array<String>',
    'created_field_display_names': :'Array<String>',
    'updated_field_display_names': :'Array<String>',
    'conflict_parser_names': :'Array<String>',
    'conflict_source_names': :'Array<String>',
    'conflict_field_display_names': :'Array<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



164
165
166
167
168
169
170
171
172
173
174
175
176
177
# File 'lib/oci/log_analytics/models/log_analytics_import_custom_change_list.rb', line 164

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

  self.class == other.class &&
    created_parser_names == other.created_parser_names &&
    updated_parser_names == other.updated_parser_names &&
    created_source_names == other.created_source_names &&
    updated_source_names == other.updated_source_names &&
    created_field_display_names == other.created_field_display_names &&
    updated_field_display_names == other.updated_field_display_names &&
    conflict_parser_names == other.conflict_parser_names &&
    conflict_source_names == other.conflict_source_names &&
    conflict_field_display_names == other.conflict_field_display_names
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



202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
# File 'lib/oci/log_analytics/models/log_analytics_import_custom_change_list.rb', line 202

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


182
183
184
# File 'lib/oci/log_analytics/models/log_analytics_import_custom_change_list.rb', line 182

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



191
192
193
# File 'lib/oci/log_analytics/models/log_analytics_import_custom_change_list.rb', line 191

def hash
  [created_parser_names, updated_parser_names, created_source_names, updated_source_names, created_field_display_names, updated_field_display_names, conflict_parser_names, conflict_source_names, conflict_field_display_names].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



235
236
237
238
239
240
241
242
243
244
# File 'lib/oci/log_analytics/models/log_analytics_import_custom_change_list.rb', line 235

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



229
230
231
# File 'lib/oci/log_analytics/models/log_analytics_import_custom_change_list.rb', line 229

def to_s
  to_hash.to_s
end