Class: ApolloDeploySignalSdkRails::DnsRecordResponse
- Inherits:
-
Object
- Object
- ApolloDeploySignalSdkRails::DnsRecordResponse
- Defined in:
- lib/apollo_deploy_signal_sdk_rails/types.rb
Overview
Schema type: DnsRecordResponse
Instance Attribute Summary collapse
- #name ⇒ String
- #optional ⇒ Boolean?
- #priority ⇒ Integer?
- #status ⇒ String?
- #type ⇒ String
- #value ⇒ String
Class Method Summary collapse
-
.from_json(attributes) ⇒ DnsRecordResponse
Create an instance from a parsed JSON hash.
Instance Method Summary collapse
-
#initialize(name:, type:, value:, priority: nil, optional: nil, status: nil) ⇒ DnsRecordResponse
constructor
A new instance of DnsRecordResponse.
-
#to_h ⇒ Hash
A hash representation of this object.
Constructor Details
#initialize(name:, type:, value:, priority: nil, optional: nil, status: nil) ⇒ DnsRecordResponse
Returns a new instance of DnsRecordResponse.
4459 4460 4461 4462 4463 4464 4465 4466 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4459 def initialize(name: , type: , value: , priority: nil, optional: nil, status: nil) @name = name @type = type @value = value @priority = priority @optional = optional @status = status end |
Instance Attribute Details
#name ⇒ String
4446 4447 4448 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4446 def name @name end |
#optional ⇒ Boolean?
4454 4455 4456 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4454 def optional @optional end |
#priority ⇒ Integer?
4452 4453 4454 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4452 def priority @priority end |
#status ⇒ String?
4456 4457 4458 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4456 def status @status end |
#type ⇒ String
4448 4449 4450 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4448 def type @type end |
#value ⇒ String
4450 4451 4452 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4450 def value @value end |
Class Method Details
.from_json(attributes) ⇒ DnsRecordResponse
Create an instance from a parsed JSON hash.
4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4483 def self.from_json(attributes) return nil unless attributes.is_a?(Hash) new( name: attributes.key?("name") ? attributes["name"] : attributes[:name], type: attributes.key?("type") ? attributes["type"] : attributes[:type], value: attributes.key?("value") ? attributes["value"] : attributes[:value], priority: attributes.key?("priority") ? attributes["priority"] : attributes[:priority], optional: attributes.key?("optional") ? attributes["optional"] : attributes[:optional], status: attributes.key?("status") ? attributes["status"] : attributes[:status], ) end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this object.
4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 4469 def to_h { name: @name, type: @type, value: @value, priority: @priority, optional: @optional, status: @status, }.compact end |