Class: OCI::ApmSynthetics::Models::DnsServerMonitorConfiguration
- Inherits:
- 
      MonitorConfiguration
      
        - Object
- MonitorConfiguration
- OCI::ApmSynthetics::Models::DnsServerMonitorConfiguration
 
- Defined in:
- lib/oci/apm_synthetics/models/dns_server_monitor_configuration.rb
Overview
Request configuration details for the DNS Server 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
- 
  
    
      #is_query_recursive  ⇒ BOOLEAN 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    If isQueryRecursive is enabled, then queries will be sent recursively to the target server. 
- 
  
    
      #name_server  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Name of the server that will be used to perform DNS lookup. 
- #network_configuration ⇒ OCI::ApmSynthetics::Models::NetworkConfiguration
- 
  
    
      #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 = {})  ⇒ DnsServerMonitorConfiguration 
    
    
  
  
  
    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 = {}) ⇒ DnsServerMonitorConfiguration
Initializes the object
| 110 111 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 | # File 'lib/oci/apm_synthetics/models/dns_server_monitor_configuration.rb', line 110 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['configType'] = 'DNS_SERVER_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.name_server = attributes[:'nameServer'] if attributes[:'nameServer'] raise 'You cannot provide both :nameServer and :name_server' if attributes.key?(:'nameServer') && attributes.key?(:'name_server') self.name_server = attributes[:'name_server'] if attributes[:'name_server'] self.network_configuration = attributes[:'networkConfiguration'] if attributes[:'networkConfiguration'] raise 'You cannot provide both :networkConfiguration and :network_configuration' if attributes.key?(:'networkConfiguration') && attributes.key?(:'network_configuration') self.network_configuration = attributes[:'network_configuration'] if attributes[:'network_configuration'] 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'] self.is_query_recursive = attributes[:'isQueryRecursive'] unless attributes[:'isQueryRecursive'].nil? self.is_query_recursive = false if is_query_recursive.nil? && !attributes.key?(:'isQueryRecursive') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isQueryRecursive and :is_query_recursive' if attributes.key?(:'isQueryRecursive') && attributes.key?(:'is_query_recursive') self.is_query_recursive = attributes[:'is_query_recursive'] unless attributes[:'is_query_recursive'].nil? self.is_query_recursive = false if is_query_recursive.nil? && !attributes.key?(:'isQueryRecursive') && !attributes.key?(:'is_query_recursive') # rubocop:disable Style/StringLiterals end | 
Instance Attribute Details
#is_query_recursive ⇒ BOOLEAN
If isQueryRecursive is enabled, then queries will be sent recursively to the target server.
| 60 61 62 | # File 'lib/oci/apm_synthetics/models/dns_server_monitor_configuration.rb', line 60 def is_query_recursive @is_query_recursive end | 
#name_server ⇒ String
Name of the server that will be used to perform DNS lookup.
| 43 44 45 | # File 'lib/oci/apm_synthetics/models/dns_server_monitor_configuration.rb', line 43 def name_server @name_server end | 
#network_configuration ⇒ OCI::ApmSynthetics::Models::NetworkConfiguration
| 46 47 48 | # File 'lib/oci/apm_synthetics/models/dns_server_monitor_configuration.rb', line 46 def network_configuration @network_configuration end | 
#protocol ⇒ String
Type of protocol.
| 50 51 52 | # File 'lib/oci/apm_synthetics/models/dns_server_monitor_configuration.rb', line 50 def protocol @protocol end | 
#record_type ⇒ String
DNS record type.
| 39 40 41 | # File 'lib/oci/apm_synthetics/models/dns_server_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.
| 56 57 58 | # File 'lib/oci/apm_synthetics/models/dns_server_monitor_configuration.rb', line 56 def verify_response_content @verify_response_content end | 
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
| 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | # File 'lib/oci/apm_synthetics/models/dns_server_monitor_configuration.rb', line 63 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'config_type': :'configType', 'is_failure_retried': :'isFailureRetried', 'dns_configuration': :'dnsConfiguration', 'record_type': :'recordType', 'name_server': :'nameServer', 'network_configuration': :'networkConfiguration', 'protocol': :'protocol', 'verify_response_content': :'verifyResponseContent', 'is_query_recursive': :'isQueryRecursive' # 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 | # File 'lib/oci/apm_synthetics/models/dns_server_monitor_configuration.rb', line 80 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'config_type': :'String', 'is_failure_retried': :'BOOLEAN', 'dns_configuration': :'OCI::ApmSynthetics::Models::DnsConfiguration', 'record_type': :'String', 'name_server': :'String', 'network_configuration': :'OCI::ApmSynthetics::Models::NetworkConfiguration', 'protocol': :'String', 'verify_response_content': :'String', 'is_query_recursive': :'BOOLEAN' # rubocop:enable Style/SymbolLiteral } end | 
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
| 189 190 191 192 193 194 195 196 197 198 199 200 201 202 | # File 'lib/oci/apm_synthetics/models/dns_server_monitor_configuration.rb', line 189 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 && name_server == other.name_server && network_configuration == other.network_configuration && protocol == other.protocol && verify_response_content == other.verify_response_content && is_query_recursive == other.is_query_recursive end | 
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
| 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | # File 'lib/oci/apm_synthetics/models/dns_server_monitor_configuration.rb', line 227 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
| 207 208 209 | # File 'lib/oci/apm_synthetics/models/dns_server_monitor_configuration.rb', line 207 def eql?(other) self == other end | 
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
| 216 217 218 | # File 'lib/oci/apm_synthetics/models/dns_server_monitor_configuration.rb', line 216 def hash [config_type, is_failure_retried, dns_configuration, record_type, name_server, network_configuration, protocol, verify_response_content, is_query_recursive].hash end | 
#to_hash ⇒ Hash
Returns the object in the form of hash
| 260 261 262 263 264 265 266 267 268 269 | # File 'lib/oci/apm_synthetics/models/dns_server_monitor_configuration.rb', line 260 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
| 254 255 256 | # File 'lib/oci/apm_synthetics/models/dns_server_monitor_configuration.rb', line 254 def to_s to_hash.to_s end |