Class: GetMonitorsMonitorIDResponseMonitorOptions

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/schemas.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_dynamic!(d) ⇒ Object



12436
12437
12438
12439
12440
12441
12442
12443
12444
# File 'lib/schemas.rb', line 12436

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    follow_redirects: d["followRedirects"],
    request_delay:    d["requestDelay"],
    request_timeout:  d["requestTimeout"],
    strict_ssl:       d["strictSSL"],
  )
end

.from_json!(json) ⇒ Object



12446
12447
12448
# File 'lib/schemas.rb', line 12446

def self.from_json!(json)
  from_dynamic!(JSON.parse(json))
end

Instance Method Details

#to_dynamicObject



12450
12451
12452
12453
12454
12455
12456
12457
# File 'lib/schemas.rb', line 12450

def to_dynamic
  {
    "followRedirects" => follow_redirects,
    "requestDelay"    => request_delay,
    "requestTimeout"  => request_timeout,
    "strictSSL"       => strict_ssl,
  }
end

#to_json(options = nil) ⇒ Object



12459
12460
12461
# File 'lib/schemas.rb', line 12459

def to_json(options = nil)
  JSON.generate(to_dynamic, options)
end