Class: SDM::RequestableResource
- Inherits:
-
Object
- Object
- SDM::RequestableResource
- Defined in:
- lib/models/porcelain.rb
Overview
RequestableResource is a resource that can be requested via an AccessRequestConfig
Instance Attribute Summary collapse
-
#access ⇒ Object
The current state of the user's access to the resources.
-
#authentication ⇒ Object
The type of authentication for the resource.
-
#healthy ⇒ Object
The health check status of the reasource.
-
#id ⇒ Object
The resource id.
-
#name ⇒ Object
The resource name.
-
#tags ⇒ Object
Any tags attached to this resource.
-
#type ⇒ Object
The resource type.
Instance Method Summary collapse
-
#initialize(access: nil, authentication: nil, healthy: nil, id: nil, name: nil, tags: nil, type: nil) ⇒ RequestableResource
constructor
A new instance of RequestableResource.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(access: nil, authentication: nil, healthy: nil, id: nil, name: nil, tags: nil, type: nil) ⇒ RequestableResource
Returns a new instance of RequestableResource.
14813 14814 14815 14816 14817 14818 14819 14820 14821 14822 14823 14824 14825 14826 14827 14828 14829 |
# File 'lib/models/porcelain.rb', line 14813 def initialize( access: nil, authentication: nil, healthy: nil, id: nil, name: nil, tags: nil, type: nil ) @access = access == nil ? "" : access @authentication = authentication == nil ? "" : authentication @healthy = healthy == nil ? false : healthy @id = id == nil ? "" : id @name = name == nil ? "" : name @tags = == nil ? SDM::() : @type = type == nil ? "" : type end |
Instance Attribute Details
#access ⇒ Object
The current state of the user's access to the resources
14799 14800 14801 |
# File 'lib/models/porcelain.rb', line 14799 def access @access end |
#authentication ⇒ Object
The type of authentication for the resource
14801 14802 14803 |
# File 'lib/models/porcelain.rb', line 14801 def authentication @authentication end |
#healthy ⇒ Object
The health check status of the reasource
14803 14804 14805 |
# File 'lib/models/porcelain.rb', line 14803 def healthy @healthy end |
#id ⇒ Object
The resource id.
14805 14806 14807 |
# File 'lib/models/porcelain.rb', line 14805 def id @id end |
#name ⇒ Object
The resource name.
14807 14808 14809 |
# File 'lib/models/porcelain.rb', line 14807 def name @name end |
#tags ⇒ Object
Any tags attached to this resource
14809 14810 14811 |
# File 'lib/models/porcelain.rb', line 14809 def @tags end |
#type ⇒ Object
The resource type
14811 14812 14813 |
# File 'lib/models/porcelain.rb', line 14811 def type @type end |
Instance Method Details
#to_json(options = {}) ⇒ Object
14831 14832 14833 14834 14835 14836 14837 |
# File 'lib/models/porcelain.rb', line 14831 def to_json( = {}) hash = {} self.instance_variables.each do |var| hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var end hash.to_json end |