Class: OCI::CloudGuard::Models::LoggingQueryDataSourceDetails
- Inherits:
- 
      DataSourceDetails
      
        - Object
- DataSourceDetails
- OCI::CloudGuard::Models::LoggingQueryDataSourceDetails
 
- Defined in:
- lib/oci/cloud_guard/models/logging_query_data_source_details.rb
Overview
Information for a logging query for a data source.
Constant Summary collapse
- OPERATOR_ENUM =
- [ OPERATOR_EQUAL = 'EQUAL'.freeze, OPERATOR_GREATER = 'GREATER'.freeze, OPERATOR_GREATERTHANEQUALTO = 'GREATERTHANEQUALTO'.freeze, OPERATOR_LESS = 'LESS'.freeze, OPERATOR_LESSTHANEQUALTO = 'LESSTHANEQUALTO'.freeze, OPERATOR_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze 
- LOGGING_QUERY_TYPE_ENUM =
- [ LOGGING_QUERY_TYPE_INSIGHT = 'INSIGHT'.freeze, LOGGING_QUERY_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze 
Constants inherited from DataSourceDetails
DataSourceDetails::DATA_SOURCE_FEED_PROVIDER_ENUM
Instance Attribute Summary collapse
- 
  
    
      #additional_entities_count  ⇒ Integer 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The additional entities count used for data source query. 
- 
  
    
      #interval_in_minutes  ⇒ Integer 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Interval in minutes that query is run periodically. 
- #logging_query_details ⇒ OCI::CloudGuard::Models::LoggingQueryDetails
- 
  
    
      #logging_query_type  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Type of logging query for data source (Sighting/Insight). 
- 
  
    
      #operator  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Operator used in data source. 
- 
  
    
      #query  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The continuous query expression that is run periodicall. 
- #query_start_time ⇒ OCI::CloudGuard::Models::ContinuousQueryStartPolicy
- 
  
    
      #regions  ⇒ Array<String> 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    List of logging query regions. 
- 
  
    
      #threshold  ⇒ Integer 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The integer value that must be exceeded, fall below or equal to (depending on the operator), for the query result to trigger an event. 
Attributes inherited from DataSourceDetails
Class Method Summary collapse
- 
  
    
      .attribute_map  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Attribute mapping from ruby-style variable name to JSON key. 
- 
  
    
      .swagger_types  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Attribute type mapping. 
Instance Method Summary collapse
- 
  
    
      #==(other)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Checks equality by comparing each attribute. 
- 
  
    
      #build_from_hash(attributes)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Builds the object from hash. 
- #eql?(other) ⇒ Boolean
- 
  
    
      #hash  ⇒ Fixnum 
    
    
  
  
  
  
  
  
  
  
  
    Calculates hash code according to all attributes. 
- 
  
    
      #initialize(attributes = {})  ⇒ LoggingQueryDataSourceDetails 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    Initializes the object. 
- 
  
    
      #to_hash  ⇒ Hash 
    
    
  
  
  
  
  
  
  
  
  
    Returns the object in the form of hash. 
- 
  
    
      #to_s  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    Returns the string representation of the object. 
Methods inherited from DataSourceDetails
Constructor Details
#initialize(attributes = {}) ⇒ LoggingQueryDataSourceDetails
Initializes the object
| 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 156 157 158 159 | # File 'lib/oci/cloud_guard/models/logging_query_data_source_details.rb', line 112 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['dataSourceFeedProvider'] = 'LOGGINGQUERY' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.regions = attributes[:'regions'] if attributes[:'regions'] self.query = attributes[:'query'] if attributes[:'query'] self.interval_in_minutes = attributes[:'intervalInMinutes'] if attributes[:'intervalInMinutes'] raise 'You cannot provide both :intervalInMinutes and :interval_in_minutes' if attributes.key?(:'intervalInMinutes') && attributes.key?(:'interval_in_minutes') self.interval_in_minutes = attributes[:'interval_in_minutes'] if attributes[:'interval_in_minutes'] self.threshold = attributes[:'threshold'] if attributes[:'threshold'] self.query_start_time = attributes[:'queryStartTime'] if attributes[:'queryStartTime'] raise 'You cannot provide both :queryStartTime and :query_start_time' if attributes.key?(:'queryStartTime') && attributes.key?(:'query_start_time') self.query_start_time = attributes[:'query_start_time'] if attributes[:'query_start_time'] self.operator = attributes[:'operator'] if attributes[:'operator'] self.logging_query_type = attributes[:'loggingQueryType'] if attributes[:'loggingQueryType'] raise 'You cannot provide both :loggingQueryType and :logging_query_type' if attributes.key?(:'loggingQueryType') && attributes.key?(:'logging_query_type') self.logging_query_type = attributes[:'logging_query_type'] if attributes[:'logging_query_type'] self.additional_entities_count = attributes[:'additionalEntitiesCount'] if attributes[:'additionalEntitiesCount'] raise 'You cannot provide both :additionalEntitiesCount and :additional_entities_count' if attributes.key?(:'additionalEntitiesCount') && attributes.key?(:'additional_entities_count') self.additional_entities_count = attributes[:'additional_entities_count'] if attributes[:'additional_entities_count'] self.logging_query_details = attributes[:'loggingQueryDetails'] if attributes[:'loggingQueryDetails'] raise 'You cannot provide both :loggingQueryDetails and :logging_query_details' if attributes.key?(:'loggingQueryDetails') && attributes.key?(:'logging_query_details') self.logging_query_details = attributes[:'logging_query_details'] if attributes[:'logging_query_details'] end | 
Instance Attribute Details
#additional_entities_count ⇒ Integer
The additional entities count used for data source query
| 56 57 58 | # File 'lib/oci/cloud_guard/models/logging_query_data_source_details.rb', line 56 def additional_entities_count @additional_entities_count end | 
#interval_in_minutes ⇒ Integer
Interval in minutes that query is run periodically.
| 37 38 39 | # File 'lib/oci/cloud_guard/models/logging_query_data_source_details.rb', line 37 def interval_in_minutes @interval_in_minutes end | 
#logging_query_details ⇒ OCI::CloudGuard::Models::LoggingQueryDetails
| 59 60 61 | # File 'lib/oci/cloud_guard/models/logging_query_data_source_details.rb', line 59 def logging_query_details @logging_query_details end | 
#logging_query_type ⇒ String
Type of logging query for data source (Sighting/Insight)
| 52 53 54 | # File 'lib/oci/cloud_guard/models/logging_query_data_source_details.rb', line 52 def logging_query_type @logging_query_type end | 
#operator ⇒ String
Operator used in data source
| 48 49 50 | # File 'lib/oci/cloud_guard/models/logging_query_data_source_details.rb', line 48 def operator @operator end | 
#query ⇒ String
The continuous query expression that is run periodicall
| 33 34 35 | # File 'lib/oci/cloud_guard/models/logging_query_data_source_details.rb', line 33 def query @query end | 
#query_start_time ⇒ OCI::CloudGuard::Models::ContinuousQueryStartPolicy
| 44 45 46 | # File 'lib/oci/cloud_guard/models/logging_query_data_source_details.rb', line 44 def query_start_time @query_start_time end | 
#regions ⇒ Array<String>
List of logging query regions
| 29 30 31 | # File 'lib/oci/cloud_guard/models/logging_query_data_source_details.rb', line 29 def regions @regions end | 
#threshold ⇒ Integer
The integer value that must be exceeded, fall below or equal to (depending on the operator), for the query result to trigger an event
| 41 42 43 | # File 'lib/oci/cloud_guard/models/logging_query_data_source_details.rb', line 41 def threshold @threshold end | 
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
| 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | # File 'lib/oci/cloud_guard/models/logging_query_data_source_details.rb', line 62 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'data_source_feed_provider': :'dataSourceFeedProvider', 'regions': :'regions', 'query': :'query', 'interval_in_minutes': :'intervalInMinutes', 'threshold': :'threshold', 'query_start_time': :'queryStartTime', 'operator': :'operator', 'logging_query_type': :'loggingQueryType', 'additional_entities_count': :'additionalEntitiesCount', 'logging_query_details': :'loggingQueryDetails' # rubocop:enable Style/SymbolLiteral } end | 
.swagger_types ⇒ Object
Attribute type mapping.
| 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | # File 'lib/oci/cloud_guard/models/logging_query_data_source_details.rb', line 80 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'data_source_feed_provider': :'String', 'regions': :'Array<String>', 'query': :'String', 'interval_in_minutes': :'Integer', 'threshold': :'Integer', 'query_start_time': :'OCI::CloudGuard::Models::ContinuousQueryStartPolicy', 'operator': :'String', 'logging_query_type': :'String', 'additional_entities_count': :'Integer', 'logging_query_details': :'OCI::CloudGuard::Models::LoggingQueryDetails' # rubocop:enable Style/SymbolLiteral } end | 
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
| 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | # File 'lib/oci/cloud_guard/models/logging_query_data_source_details.rb', line 194 def ==(other) return true if equal?(other) self.class == other.class && data_source_feed_provider == other.data_source_feed_provider && regions == other.regions && query == other.query && interval_in_minutes == other.interval_in_minutes && threshold == other.threshold && query_start_time == other.query_start_time && operator == other.operator && logging_query_type == other.logging_query_type && additional_entities_count == other.additional_entities_count && logging_query_details == other.logging_query_details end | 
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
| 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 | # File 'lib/oci/cloud_guard/models/logging_query_data_source_details.rb', line 233 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
| 213 214 215 | # File 'lib/oci/cloud_guard/models/logging_query_data_source_details.rb', line 213 def eql?(other) self == other end | 
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
| 222 223 224 | # File 'lib/oci/cloud_guard/models/logging_query_data_source_details.rb', line 222 def hash [data_source_feed_provider, regions, query, interval_in_minutes, threshold, query_start_time, operator, logging_query_type, additional_entities_count, logging_query_details].hash end | 
#to_hash ⇒ Hash
Returns the object in the form of hash
| 266 267 268 269 270 271 272 273 274 275 | # File 'lib/oci/cloud_guard/models/logging_query_data_source_details.rb', line 266 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_s ⇒ String
Returns the string representation of the object
| 260 261 262 | # File 'lib/oci/cloud_guard/models/logging_query_data_source_details.rb', line 260 def to_s to_hash.to_s end |