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.
10162 10163 10164 10165 10166 10167 10168 10169 10170 10171 10172 10173 10174 10175 10176 10177 10178 |
# File 'lib/models/porcelain.rb', line 10162 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 = == nil ? SDM::() : @type = type == nil ? "" : type end |
Instance Attribute Details
#access ⇒ Object
The current state of the user's access to the resources
10148 10149 10150 |
# File 'lib/models/porcelain.rb', line 10148 def access @access end |
#authentication ⇒ Object
The type of authentication for the resource
10150 10151 10152 |
# File 'lib/models/porcelain.rb', line 10150 def authentication @authentication end |
#healthy ⇒ Object
The health check status of the reasource
10152 10153 10154 |
# File 'lib/models/porcelain.rb', line 10152 def healthy @healthy end |
#id ⇒ Object
The resource id.
10154 10155 10156 |
# File 'lib/models/porcelain.rb', line 10154 def id @id end |
#name ⇒ Object
The resource name.
10156 10157 10158 |
# File 'lib/models/porcelain.rb', line 10156 def name @name end |
#tags ⇒ Object
Any tags attached to this resource
10158 10159 10160 |
# File 'lib/models/porcelain.rb', line 10158 def end |
#type ⇒ Object
The resource type
10160 10161 10162 |
# File 'lib/models/porcelain.rb', line 10160 def type @type end |
Instance Method Details
#to_json(options = {}) ⇒ Object
10180 10181 10182 10183 10184 10185 10186 |
# File 'lib/models/porcelain.rb', line 10180 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 |