Class: OCI::LogAnalytics::Models::EstimateRecallDataSizeDetails

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

Overview

This is the input used to estimate the size of data to be recalled

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ EstimateRecallDataSizeDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :time_data_started (DateTime)

    The value to assign to the #time_data_started property

  • :time_data_ended (DateTime)

    The value to assign to the #time_data_ended property

  • :log_sets (String)

    The value to assign to the #log_sets property

  • :is_recall_new_data_only (BOOLEAN)

    The value to assign to the #is_recall_new_data_only property



62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# File 'lib/oci/log_analytics/models/estimate_recall_data_size_details.rb', line 62

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

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

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

  self.time_data_ended = attributes[:'timeDataEnded'] if attributes[:'timeDataEnded']

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

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

  self.log_sets = attributes[:'logSets'] if attributes[:'logSets']

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

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

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

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

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

Instance Attribute Details

#is_recall_new_data_onlyBOOLEAN

This indicates if only new data has to be recalled in the timeframe

Returns:

  • (BOOLEAN)


26
27
28
# File 'lib/oci/log_analytics/models/estimate_recall_data_size_details.rb', line 26

def is_recall_new_data_only
  @is_recall_new_data_only
end

#log_setsString

This is the list of logsets to be accounted for in the recalled data

Returns:

  • (String)


22
23
24
# File 'lib/oci/log_analytics/models/estimate_recall_data_size_details.rb', line 22

def log_sets
  @log_sets
end

#time_data_endedDateTime

[Required] This is the end of the time range for the data to be recalled

Returns:

  • (DateTime)


18
19
20
# File 'lib/oci/log_analytics/models/estimate_recall_data_size_details.rb', line 18

def time_data_ended
  @time_data_ended
end

#time_data_startedDateTime

[Required] This is the start of the time range for the data to be recalled

Returns:

  • (DateTime)


14
15
16
# File 'lib/oci/log_analytics/models/estimate_recall_data_size_details.rb', line 14

def time_data_started
  @time_data_started
end

Class Method Details

.attribute_mapObject

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



29
30
31
32
33
34
35
36
37
38
# File 'lib/oci/log_analytics/models/estimate_recall_data_size_details.rb', line 29

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'time_data_started': :'timeDataStarted',
    'time_data_ended': :'timeDataEnded',
    'log_sets': :'logSets',
    'is_recall_new_data_only': :'isRecallNewDataOnly'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



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

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'time_data_started': :'DateTime',
    'time_data_ended': :'DateTime',
    'log_sets': :'String',
    'is_recall_new_data_only': :'BOOLEAN'
    # 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



102
103
104
105
106
107
108
109
110
# File 'lib/oci/log_analytics/models/estimate_recall_data_size_details.rb', line 102

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

  self.class == other.class &&
    time_data_started == other.time_data_started &&
    time_data_ended == other.time_data_ended &&
    log_sets == other.log_sets &&
    is_recall_new_data_only == other.is_recall_new_data_only
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



135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
# File 'lib/oci/log_analytics/models/estimate_recall_data_size_details.rb', line 135

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


115
116
117
# File 'lib/oci/log_analytics/models/estimate_recall_data_size_details.rb', line 115

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



124
125
126
# File 'lib/oci/log_analytics/models/estimate_recall_data_size_details.rb', line 124

def hash
  [time_data_started, time_data_ended, log_sets, is_recall_new_data_only].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



168
169
170
171
172
173
174
175
176
177
# File 'lib/oci/log_analytics/models/estimate_recall_data_size_details.rb', line 168

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



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

def to_s
  to_hash.to_s
end