Class: OCI::ApmTraces::Models::CreateScheduledQueryDetails
- Inherits:
-
Object
- Object
- OCI::ApmTraces::Models::CreateScheduledQueryDetails
- Defined in:
- lib/oci/apm_traces/models/create_scheduled_query_details.rb
Overview
Object that contains the details about the scheduled query to be created.
Constant Summary collapse
- SCHEDULED_QUERY_PROCESSING_TYPE_ENUM =
[ SCHEDULED_QUERY_PROCESSING_TYPE_EXPORT = 'EXPORT'.freeze, SCHEDULED_QUERY_PROCESSING_TYPE_QUERY = 'QUERY'.freeze, SCHEDULED_QUERY_PROCESSING_TYPE_ALERT = 'ALERT'.freeze ].freeze
- SCHEDULED_QUERY_PROCESSING_SUB_TYPE_ENUM =
[ SCHEDULED_QUERY_PROCESSING_SUB_TYPE_OBJECT_STORAGE = 'OBJECT_STORAGE'.freeze, SCHEDULED_QUERY_PROCESSING_SUB_TYPE_STREAMING = 'STREAMING'.freeze, SCHEDULED_QUERY_PROCESSING_SUB_TYPE_CUSTOM_METRIC = 'CUSTOM_METRIC'.freeze, SCHEDULED_QUERY_PROCESSING_SUB_TYPE_NONE = 'NONE'.freeze ].freeze
- SCHEDULED_QUERY_RETENTION_CRITERIA_ENUM =
[ SCHEDULED_QUERY_RETENTION_CRITERIA_KEEP_DATA_UNTIL_RETENTION_PERIOD = 'KEEP_DATA_UNTIL_RETENTION_PERIOD'.freeze, SCHEDULED_QUERY_RETENTION_CRITERIA_UPDATE = 'UPDATE'.freeze ].freeze
Instance Attribute Summary collapse
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#freeform_tags ⇒ Hash<String, String>
Simple key-value pair that is applied without any predefined name, type or scope.
-
#scheduled_query_description ⇒ String
Description for the scheduled query.
-
#scheduled_query_maximum_runtime_in_seconds ⇒ Integer
Maximum runtime for the scheduled query in seconds.
-
#scheduled_query_name ⇒ String
Name of the scheduled query.
- #scheduled_query_processing_configuration ⇒ OCI::ApmTraces::Models::ScheduledQueryProcessingConfig
-
#scheduled_query_processing_sub_type ⇒ String
Processing sub type of the scheduled query.
-
#scheduled_query_processing_type ⇒ String
Type of the scheduled query.
-
#scheduled_query_retention_criteria ⇒ String
Retention criteria for the scheduled query.
-
#scheduled_query_retention_period_in_ms ⇒ Integer
Retention period for the scheduled query in milliseconds.
-
#scheduled_query_schedule ⇒ String
Schedule for the scheduled query.
-
#scheduled_query_text ⇒ String
Scheduled query to be run.
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 = {}) ⇒ CreateScheduledQueryDetails
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.
Constructor Details
#initialize(attributes = {}) ⇒ CreateScheduledQueryDetails
Initializes the object
148 149 150 151 152 153 154 155 156 157 158 159 160 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 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 |
# File 'lib/oci/apm_traces/models/create_scheduled_query_details.rb', line 148 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.scheduled_query_name = attributes[:'scheduledQueryName'] if attributes[:'scheduledQueryName'] raise 'You cannot provide both :scheduledQueryName and :scheduled_query_name' if attributes.key?(:'scheduledQueryName') && attributes.key?(:'scheduled_query_name') self.scheduled_query_name = attributes[:'scheduled_query_name'] if attributes[:'scheduled_query_name'] self.scheduled_query_processing_type = attributes[:'scheduledQueryProcessingType'] if attributes[:'scheduledQueryProcessingType'] raise 'You cannot provide both :scheduledQueryProcessingType and :scheduled_query_processing_type' if attributes.key?(:'scheduledQueryProcessingType') && attributes.key?(:'scheduled_query_processing_type') self.scheduled_query_processing_type = attributes[:'scheduled_query_processing_type'] if attributes[:'scheduled_query_processing_type'] self.scheduled_query_text = attributes[:'scheduledQueryText'] if attributes[:'scheduledQueryText'] raise 'You cannot provide both :scheduledQueryText and :scheduled_query_text' if attributes.key?(:'scheduledQueryText') && attributes.key?(:'scheduled_query_text') self.scheduled_query_text = attributes[:'scheduled_query_text'] if attributes[:'scheduled_query_text'] self.scheduled_query_schedule = attributes[:'scheduledQuerySchedule'] if attributes[:'scheduledQuerySchedule'] raise 'You cannot provide both :scheduledQuerySchedule and :scheduled_query_schedule' if attributes.key?(:'scheduledQuerySchedule') && attributes.key?(:'scheduled_query_schedule') self.scheduled_query_schedule = attributes[:'scheduled_query_schedule'] if attributes[:'scheduled_query_schedule'] self.scheduled_query_description = attributes[:'scheduledQueryDescription'] if attributes[:'scheduledQueryDescription'] raise 'You cannot provide both :scheduledQueryDescription and :scheduled_query_description' if attributes.key?(:'scheduledQueryDescription') && attributes.key?(:'scheduled_query_description') self.scheduled_query_description = attributes[:'scheduled_query_description'] if attributes[:'scheduled_query_description'] self.scheduled_query_maximum_runtime_in_seconds = attributes[:'scheduledQueryMaximumRuntimeInSeconds'] if attributes[:'scheduledQueryMaximumRuntimeInSeconds'] self.scheduled_query_maximum_runtime_in_seconds = 1800 if scheduled_query_maximum_runtime_in_seconds.nil? && !attributes.key?(:'scheduledQueryMaximumRuntimeInSeconds') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :scheduledQueryMaximumRuntimeInSeconds and :scheduled_query_maximum_runtime_in_seconds' if attributes.key?(:'scheduledQueryMaximumRuntimeInSeconds') && attributes.key?(:'scheduled_query_maximum_runtime_in_seconds') self.scheduled_query_maximum_runtime_in_seconds = attributes[:'scheduled_query_maximum_runtime_in_seconds'] if attributes[:'scheduled_query_maximum_runtime_in_seconds'] self.scheduled_query_maximum_runtime_in_seconds = 1800 if scheduled_query_maximum_runtime_in_seconds.nil? && !attributes.key?(:'scheduledQueryMaximumRuntimeInSeconds') && !attributes.key?(:'scheduled_query_maximum_runtime_in_seconds') # rubocop:disable Style/StringLiterals self.scheduled_query_retention_period_in_ms = attributes[:'scheduledQueryRetentionPeriodInMs'] if attributes[:'scheduledQueryRetentionPeriodInMs'] self.scheduled_query_retention_period_in_ms = 2592000000 if scheduled_query_retention_period_in_ms.nil? && !attributes.key?(:'scheduledQueryRetentionPeriodInMs') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :scheduledQueryRetentionPeriodInMs and :scheduled_query_retention_period_in_ms' if attributes.key?(:'scheduledQueryRetentionPeriodInMs') && attributes.key?(:'scheduled_query_retention_period_in_ms') self.scheduled_query_retention_period_in_ms = attributes[:'scheduled_query_retention_period_in_ms'] if attributes[:'scheduled_query_retention_period_in_ms'] self.scheduled_query_retention_period_in_ms = 2592000000 if scheduled_query_retention_period_in_ms.nil? && !attributes.key?(:'scheduledQueryRetentionPeriodInMs') && !attributes.key?(:'scheduled_query_retention_period_in_ms') # rubocop:disable Style/StringLiterals self.scheduled_query_processing_sub_type = attributes[:'scheduledQueryProcessingSubType'] if attributes[:'scheduledQueryProcessingSubType'] raise 'You cannot provide both :scheduledQueryProcessingSubType and :scheduled_query_processing_sub_type' if attributes.key?(:'scheduledQueryProcessingSubType') && attributes.key?(:'scheduled_query_processing_sub_type') self.scheduled_query_processing_sub_type = attributes[:'scheduled_query_processing_sub_type'] if attributes[:'scheduled_query_processing_sub_type'] self.scheduled_query_processing_configuration = attributes[:'scheduledQueryProcessingConfiguration'] if attributes[:'scheduledQueryProcessingConfiguration'] raise 'You cannot provide both :scheduledQueryProcessingConfiguration and :scheduled_query_processing_configuration' if attributes.key?(:'scheduledQueryProcessingConfiguration') && attributes.key?(:'scheduled_query_processing_configuration') self.scheduled_query_processing_configuration = attributes[:'scheduled_query_processing_configuration'] if attributes[:'scheduled_query_processing_configuration'] self.scheduled_query_retention_criteria = attributes[:'scheduledQueryRetentionCriteria'] if attributes[:'scheduledQueryRetentionCriteria'] raise 'You cannot provide both :scheduledQueryRetentionCriteria and :scheduled_query_retention_criteria' if attributes.key?(:'scheduledQueryRetentionCriteria') && attributes.key?(:'scheduled_query_retention_criteria') self.scheduled_query_retention_criteria = attributes[:'scheduled_query_retention_criteria'] if attributes[:'scheduled_query_retention_criteria'] self. = attributes[:'freeformTags'] if attributes[:'freeformTags'] raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags') self. = attributes[:'freeform_tags'] if attributes[:'freeform_tags'] self. = attributes[:'definedTags'] if attributes[:'definedTags'] raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags') self. = attributes[:'defined_tags'] if attributes[:'defined_tags'] end |
Instance Attribute Details
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {\"foo-namespace\": {\"bar-key\": \"value\"}}
88 89 90 |
# File 'lib/oci/apm_traces/models/create_scheduled_query_details.rb', line 88 def @defined_tags end |
#freeform_tags ⇒ Hash<String, String>
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {\"bar-key\": \"value\"}
82 83 84 |
# File 'lib/oci/apm_traces/models/create_scheduled_query_details.rb', line 82 def @freeform_tags end |
#scheduled_query_description ⇒ String
Description for the scheduled query.
53 54 55 |
# File 'lib/oci/apm_traces/models/create_scheduled_query_details.rb', line 53 def scheduled_query_description @scheduled_query_description end |
#scheduled_query_maximum_runtime_in_seconds ⇒ Integer
Maximum runtime for the scheduled query in seconds.
58 59 60 |
# File 'lib/oci/apm_traces/models/create_scheduled_query_details.rb', line 58 def scheduled_query_maximum_runtime_in_seconds @scheduled_query_maximum_runtime_in_seconds end |
#scheduled_query_name ⇒ String
Name of the scheduled query.
33 34 35 |
# File 'lib/oci/apm_traces/models/create_scheduled_query_details.rb', line 33 def scheduled_query_name @scheduled_query_name end |
#scheduled_query_processing_configuration ⇒ OCI::ApmTraces::Models::ScheduledQueryProcessingConfig
71 72 73 |
# File 'lib/oci/apm_traces/models/create_scheduled_query_details.rb', line 71 def scheduled_query_processing_configuration @scheduled_query_processing_configuration end |
#scheduled_query_processing_sub_type ⇒ String
Processing sub type of the scheduled query.
68 69 70 |
# File 'lib/oci/apm_traces/models/create_scheduled_query_details.rb', line 68 def scheduled_query_processing_sub_type @scheduled_query_processing_sub_type end |
#scheduled_query_processing_type ⇒ String
Type of the scheduled query.
38 39 40 |
# File 'lib/oci/apm_traces/models/create_scheduled_query_details.rb', line 38 def scheduled_query_processing_type @scheduled_query_processing_type end |
#scheduled_query_retention_criteria ⇒ String
Retention criteria for the scheduled query.
76 77 78 |
# File 'lib/oci/apm_traces/models/create_scheduled_query_details.rb', line 76 def scheduled_query_retention_criteria @scheduled_query_retention_criteria end |
#scheduled_query_retention_period_in_ms ⇒ Integer
Retention period for the scheduled query in milliseconds.
63 64 65 |
# File 'lib/oci/apm_traces/models/create_scheduled_query_details.rb', line 63 def scheduled_query_retention_period_in_ms @scheduled_query_retention_period_in_ms end |
#scheduled_query_schedule ⇒ String
Schedule for the scheduled query.
48 49 50 |
# File 'lib/oci/apm_traces/models/create_scheduled_query_details.rb', line 48 def scheduled_query_schedule @scheduled_query_schedule end |
#scheduled_query_text ⇒ String
Scheduled query to be run.
43 44 45 |
# File 'lib/oci/apm_traces/models/create_scheduled_query_details.rb', line 43 def scheduled_query_text @scheduled_query_text end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/oci/apm_traces/models/create_scheduled_query_details.rb', line 91 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'scheduled_query_name': :'scheduledQueryName', 'scheduled_query_processing_type': :'scheduledQueryProcessingType', 'scheduled_query_text': :'scheduledQueryText', 'scheduled_query_schedule': :'scheduledQuerySchedule', 'scheduled_query_description': :'scheduledQueryDescription', 'scheduled_query_maximum_runtime_in_seconds': :'scheduledQueryMaximumRuntimeInSeconds', 'scheduled_query_retention_period_in_ms': :'scheduledQueryRetentionPeriodInMs', 'scheduled_query_processing_sub_type': :'scheduledQueryProcessingSubType', 'scheduled_query_processing_configuration': :'scheduledQueryProcessingConfiguration', 'scheduled_query_retention_criteria': :'scheduledQueryRetentionCriteria', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/oci/apm_traces/models/create_scheduled_query_details.rb', line 111 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'scheduled_query_name': :'String', 'scheduled_query_processing_type': :'String', 'scheduled_query_text': :'String', 'scheduled_query_schedule': :'String', 'scheduled_query_description': :'String', 'scheduled_query_maximum_runtime_in_seconds': :'Integer', 'scheduled_query_retention_period_in_ms': :'Integer', 'scheduled_query_processing_sub_type': :'String', 'scheduled_query_processing_configuration': :'OCI::ApmTraces::Models::ScheduledQueryProcessingConfig', 'scheduled_query_retention_criteria': :'String', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 |
# File 'lib/oci/apm_traces/models/create_scheduled_query_details.rb', line 262 def ==(other) return true if equal?(other) self.class == other.class && scheduled_query_name == other.scheduled_query_name && scheduled_query_processing_type == other.scheduled_query_processing_type && scheduled_query_text == other.scheduled_query_text && scheduled_query_schedule == other.scheduled_query_schedule && scheduled_query_description == other.scheduled_query_description && scheduled_query_maximum_runtime_in_seconds == other.scheduled_query_maximum_runtime_in_seconds && scheduled_query_retention_period_in_ms == other.scheduled_query_retention_period_in_ms && scheduled_query_processing_sub_type == other.scheduled_query_processing_sub_type && scheduled_query_processing_configuration == other.scheduled_query_processing_configuration && scheduled_query_retention_criteria == other.scheduled_query_retention_criteria && == other. && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 |
# File 'lib/oci/apm_traces/models/create_scheduled_query_details.rb', line 303 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
283 284 285 |
# File 'lib/oci/apm_traces/models/create_scheduled_query_details.rb', line 283 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
292 293 294 |
# File 'lib/oci/apm_traces/models/create_scheduled_query_details.rb', line 292 def hash [scheduled_query_name, scheduled_query_processing_type, scheduled_query_text, scheduled_query_schedule, scheduled_query_description, scheduled_query_maximum_runtime_in_seconds, scheduled_query_retention_period_in_ms, scheduled_query_processing_sub_type, scheduled_query_processing_configuration, scheduled_query_retention_criteria, , ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
336 337 338 339 340 341 342 343 344 345 |
# File 'lib/oci/apm_traces/models/create_scheduled_query_details.rb', line 336 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
330 331 332 |
# File 'lib/oci/apm_traces/models/create_scheduled_query_details.rb', line 330 def to_s to_hash.to_s end |