Class: OCI::ApmSynthetics::Models::DnsTraceMonitorConfiguration
- Inherits:
-
MonitorConfiguration
- Object
- MonitorConfiguration
- OCI::ApmSynthetics::Models::DnsTraceMonitorConfiguration
- Defined in:
- lib/oci/apm_synthetics/models/dns_trace_monitor_configuration.rb
Overview
Request configuration details for the DNS Trace monitor type.
Constant Summary collapse
- RECORD_TYPE_ENUM =
[ RECORD_TYPE_A = 'A'.freeze, RECORD_TYPE_AAAA = 'AAAA'.freeze, RECORD_TYPE_ANY = 'ANY'.freeze, RECORD_TYPE_CNAME = 'CNAME'.freeze, RECORD_TYPE_DNSKEY = 'DNSKEY'.freeze, RECORD_TYPE_DS = 'DS'.freeze, RECORD_TYPE_MX = 'MX'.freeze, RECORD_TYPE_NS = 'NS'.freeze, RECORD_TYPE_NSEC = 'NSEC'.freeze, RECORD_TYPE_NULL_REC = 'NULL_REC'.freeze, RECORD_TYPE_PTR = 'PTR'.freeze, RECORD_TYPE_RRSIG = 'RRSIG'.freeze, RECORD_TYPE_SOA = 'SOA'.freeze, RECORD_TYPE_TXT = 'TXT'.freeze, RECORD_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- PROTOCOL_ENUM =
[ PROTOCOL_TCP = 'TCP'.freeze, PROTOCOL_UDP = 'UDP'.freeze, PROTOCOL_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Constants inherited from MonitorConfiguration
MonitorConfiguration::CONFIG_TYPE_ENUM
Instance Attribute Summary collapse
-
#protocol ⇒ String
Type of protocol.
-
#record_type ⇒ String
DNS record type.
-
#verify_response_content ⇒ String
Verify response content against regular expression based string.
Attributes inherited from MonitorConfiguration
#config_type, #dns_configuration, #is_failure_retried
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 = {}) ⇒ DnsTraceMonitorConfiguration
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 MonitorConfiguration
Constructor Details
#initialize(attributes = {}) ⇒ DnsTraceMonitorConfiguration
Initializes the object
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 |
# File 'lib/oci/apm_synthetics/models/dns_trace_monitor_configuration.rb', line 90 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['configType'] = 'DNS_TRACE_CONFIG' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.record_type = attributes[:'recordType'] if attributes[:'recordType'] raise 'You cannot provide both :recordType and :record_type' if attributes.key?(:'recordType') && attributes.key?(:'record_type') self.record_type = attributes[:'record_type'] if attributes[:'record_type'] self.protocol = attributes[:'protocol'] if attributes[:'protocol'] self.protocol = "UDP" if protocol.nil? && !attributes.key?(:'protocol') # rubocop:disable Style/StringLiterals self.verify_response_content = attributes[:'verifyResponseContent'] if attributes[:'verifyResponseContent'] raise 'You cannot provide both :verifyResponseContent and :verify_response_content' if attributes.key?(:'verifyResponseContent') && attributes.key?(:'verify_response_content') self.verify_response_content = attributes[:'verify_response_content'] if attributes[:'verify_response_content'] end |
Instance Attribute Details
#protocol ⇒ String
Type of protocol.
43 44 45 |
# File 'lib/oci/apm_synthetics/models/dns_trace_monitor_configuration.rb', line 43 def protocol @protocol end |
#record_type ⇒ String
DNS record type.
39 40 41 |
# File 'lib/oci/apm_synthetics/models/dns_trace_monitor_configuration.rb', line 39 def record_type @record_type end |
#verify_response_content ⇒ String
Verify response content against regular expression based string. If response content does not match the verifyResponseContent value, then it will be considered a failure.
49 50 51 |
# File 'lib/oci/apm_synthetics/models/dns_trace_monitor_configuration.rb', line 49 def verify_response_content @verify_response_content end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/oci/apm_synthetics/models/dns_trace_monitor_configuration.rb', line 52 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'config_type': :'configType', 'is_failure_retried': :'isFailureRetried', 'dns_configuration': :'dnsConfiguration', 'record_type': :'recordType', 'protocol': :'protocol', 'verify_response_content': :'verifyResponseContent' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/oci/apm_synthetics/models/dns_trace_monitor_configuration.rb', line 66 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'config_type': :'String', 'is_failure_retried': :'BOOLEAN', 'dns_configuration': :'OCI::ApmSynthetics::Models::DnsConfiguration', 'record_type': :'String', 'protocol': :'String', 'verify_response_content': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
149 150 151 152 153 154 155 156 157 158 159 |
# File 'lib/oci/apm_synthetics/models/dns_trace_monitor_configuration.rb', line 149 def ==(other) return true if equal?(other) self.class == other.class && config_type == other.config_type && is_failure_retried == other.is_failure_retried && dns_configuration == other.dns_configuration && record_type == other.record_type && protocol == other.protocol && verify_response_content == other.verify_response_content end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 |
# File 'lib/oci/apm_synthetics/models/dns_trace_monitor_configuration.rb', line 184 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
164 165 166 |
# File 'lib/oci/apm_synthetics/models/dns_trace_monitor_configuration.rb', line 164 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
173 174 175 |
# File 'lib/oci/apm_synthetics/models/dns_trace_monitor_configuration.rb', line 173 def hash [config_type, is_failure_retried, dns_configuration, record_type, protocol, verify_response_content].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
217 218 219 220 221 222 223 224 225 226 |
# File 'lib/oci/apm_synthetics/models/dns_trace_monitor_configuration.rb', line 217 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
211 212 213 |
# File 'lib/oci/apm_synthetics/models/dns_trace_monitor_configuration.rb', line 211 def to_s to_hash.to_s end |