Class: Cadenya::Types::WidgetInfo
- Inherits:
-
Object
- Object
- Cadenya::Types::WidgetInfo
- Defined in:
- lib/cadenya/types.rb
Instance Attribute Summary collapse
-
#agent ⇒ Object
readonly
Returns the value of attribute agent.
-
#created_by ⇒ Object
readonly
Returns the value of attribute created_by.
-
#dns_label ⇒ Object
readonly
Returns the value of attribute dns_label.
-
#host ⇒ Object
readonly
Returns the value of attribute host.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(dns_label: nil, host: nil, agent: nil, created_by: nil) ⇒ WidgetInfo
constructor
A new instance of WidgetInfo.
- #to_h ⇒ Object
Constructor Details
#initialize(dns_label: nil, host: nil, agent: nil, created_by: nil) ⇒ WidgetInfo
Returns a new instance of WidgetInfo.
7310 7311 7312 7313 7314 7315 |
# File 'lib/cadenya/types.rb', line 7310 def initialize(dns_label: nil, host: nil, agent: nil, created_by: nil) @dns_label = dns_label @host = host @agent = agent @created_by = created_by end |
Instance Attribute Details
#agent ⇒ Object (readonly)
Returns the value of attribute agent.
7308 7309 7310 |
# File 'lib/cadenya/types.rb', line 7308 def agent @agent end |
#created_by ⇒ Object (readonly)
Returns the value of attribute created_by.
7308 7309 7310 |
# File 'lib/cadenya/types.rb', line 7308 def created_by @created_by end |
#dns_label ⇒ Object (readonly)
Returns the value of attribute dns_label.
7308 7309 7310 |
# File 'lib/cadenya/types.rb', line 7308 def dns_label @dns_label end |
#host ⇒ Object (readonly)
Returns the value of attribute host.
7308 7309 7310 |
# File 'lib/cadenya/types.rb', line 7308 def host @host end |
Class Method Details
.from_json(data) ⇒ Object
7317 7318 7319 7320 7321 7322 7323 7324 |
# File 'lib/cadenya/types.rb', line 7317 def self.from_json(data) new( dns_label: data["dnsLabel"], host: data["host"], agent: data["agent"].nil? ? nil : Types::BareMetadata.from_json(data["agent"]), created_by: data["createdBy"].nil? ? nil : Types::Profile.from_json(data["createdBy"]), ) end |