Class: OCI::LogAnalytics::Models::LogAnalyticsParserFunctionParameter

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

Overview

LogAnalyticsParserFunctionParameter

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ LogAnalyticsParserFunctionParameter

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
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
# File 'lib/oci/log_analytics/models/log_analytics_parser_function_parameter.rb', line 81

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

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

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

  self.parser_function_parameter_name = attributes[:'parserFunctionParameterName'] if attributes[:'parserFunctionParameterName']

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

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

  self.parser_function_parameter_id = attributes[:'parserFunctionParameterId'] if attributes[:'parserFunctionParameterId']

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

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

  self.parser_meta_plugin_parameter_name = attributes[:'parserMetaPluginParameterName'] if attributes[:'parserMetaPluginParameterName']

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

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

  self.parser_meta_plugin_parameter_value = attributes[:'parserMetaPluginParameterValue'] if attributes[:'parserMetaPluginParameterValue']

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

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

  self.parser_name = attributes[:'parserName'] if attributes[:'parserName']

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

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

  self.parser_meta_plugin_parameter = attributes[:'parserMetaPluginParameter'] if attributes[:'parserMetaPluginParameter']

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

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

Instance Attribute Details

#parser_function_idInteger

The parser function unique identifier.

Returns:

  • (Integer)


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

def parser_function_id
  @parser_function_id
end

#parser_function_parameter_idInteger

The parameter unique identifier.

Returns:

  • (Integer)


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

def parser_function_parameter_id
  @parser_function_parameter_id
end

#parser_function_parameter_nameString

The internal name

Returns:

  • (String)


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

def parser_function_parameter_name
  @parser_function_parameter_name
end

#parser_meta_plugin_parameterOCI::LogAnalytics::Models::LogAnalyticsParserMetaPluginParameter



36
37
38
# File 'lib/oci/log_analytics/models/log_analytics_parser_function_parameter.rb', line 36

def parser_meta_plugin_parameter
  @parser_meta_plugin_parameter
end

#parser_meta_plugin_parameter_nameString

The parameter internal name.

Returns:

  • (String)


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

def parser_meta_plugin_parameter_name
  @parser_meta_plugin_parameter_name
end

#parser_meta_plugin_parameter_valueString

The parameter value.

Returns:

  • (String)


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

def parser_meta_plugin_parameter_value
  @parser_meta_plugin_parameter_value
end

#parser_nameString

The parser internal name.

Returns:

  • (String)


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

def parser_name
  @parser_name
end

Class Method Details

.attribute_mapObject

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



39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/oci/log_analytics/models/log_analytics_parser_function_parameter.rb', line 39

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'parser_function_id': :'parserFunctionId',
    'parser_function_parameter_name': :'parserFunctionParameterName',
    'parser_function_parameter_id': :'parserFunctionParameterId',
    'parser_meta_plugin_parameter_name': :'parserMetaPluginParameterName',
    'parser_meta_plugin_parameter_value': :'parserMetaPluginParameterValue',
    'parser_name': :'parserName',
    'parser_meta_plugin_parameter': :'parserMetaPluginParameter'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/oci/log_analytics/models/log_analytics_parser_function_parameter.rb', line 54

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'parser_function_id': :'Integer',
    'parser_function_parameter_name': :'String',
    'parser_function_parameter_id': :'Integer',
    'parser_meta_plugin_parameter_name': :'String',
    'parser_meta_plugin_parameter_value': :'String',
    'parser_name': :'String',
    'parser_meta_plugin_parameter': :'OCI::LogAnalytics::Models::LogAnalyticsParserMetaPluginParameter'
    # 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



137
138
139
140
141
142
143
144
145
146
147
148
# File 'lib/oci/log_analytics/models/log_analytics_parser_function_parameter.rb', line 137

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

  self.class == other.class &&
    parser_function_id == other.parser_function_id &&
    parser_function_parameter_name == other.parser_function_parameter_name &&
    parser_function_parameter_id == other.parser_function_parameter_id &&
    parser_meta_plugin_parameter_name == other.parser_meta_plugin_parameter_name &&
    parser_meta_plugin_parameter_value == other.parser_meta_plugin_parameter_value &&
    parser_name == other.parser_name &&
    parser_meta_plugin_parameter == other.parser_meta_plugin_parameter
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



173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
# File 'lib/oci/log_analytics/models/log_analytics_parser_function_parameter.rb', line 173

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


153
154
155
# File 'lib/oci/log_analytics/models/log_analytics_parser_function_parameter.rb', line 153

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



162
163
164
# File 'lib/oci/log_analytics/models/log_analytics_parser_function_parameter.rb', line 162

def hash
  [parser_function_id, parser_function_parameter_name, parser_function_parameter_id, parser_meta_plugin_parameter_name, parser_meta_plugin_parameter_value, parser_name, parser_meta_plugin_parameter].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



206
207
208
209
210
211
212
213
214
215
# File 'lib/oci/log_analytics/models/log_analytics_parser_function_parameter.rb', line 206

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



200
201
202
# File 'lib/oci/log_analytics/models/log_analytics_parser_function_parameter.rb', line 200

def to_s
  to_hash.to_s
end