Class: Cadenya::Types::Tenant
- Inherits:
-
Object
- Object
- Cadenya::Types::Tenant
- Defined in:
- lib/cadenya/types.rb
Instance Attribute Summary collapse
-
#info ⇒ Object
readonly
Returns the value of attribute info.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(metadata: nil, info: nil, state: nil) ⇒ Tenant
constructor
A new instance of Tenant.
- #to_h ⇒ Object
Constructor Details
#initialize(metadata: nil, info: nil, state: nil) ⇒ Tenant
Returns a new instance of Tenant.
5504 5505 5506 5507 5508 |
# File 'lib/cadenya/types.rb', line 5504 def initialize(metadata: nil, info: nil, state: nil) @metadata = @info = info @state = state end |
Instance Attribute Details
#info ⇒ Object (readonly)
Returns the value of attribute info.
5502 5503 5504 |
# File 'lib/cadenya/types.rb', line 5502 def info @info end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
5502 5503 5504 |
# File 'lib/cadenya/types.rb', line 5502 def @metadata end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
5502 5503 5504 |
# File 'lib/cadenya/types.rb', line 5502 def state @state end |
Class Method Details
.from_json(data) ⇒ Object
5510 5511 5512 5513 5514 5515 5516 |
# File 'lib/cadenya/types.rb', line 5510 def self.from_json(data) new( metadata: data["metadata"].nil? ? nil : Types::ResourceMetadata.from_json(data["metadata"]), info: data["info"].nil? ? nil : Types::TenantInfo.from_json(data["info"]), state: data["state"], ) end |