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.
9148 9149 9150 9151 9152 9153 9154 9155 9156 9157 9158 9159 9160 9161 9162 9163 9164 |
# File 'lib/models/porcelain.rb', line 9148 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
9134 9135 9136 |
# File 'lib/models/porcelain.rb', line 9134 def access @access end |
#authentication ⇒ Object
The type of authentication for the resource
9136 9137 9138 |
# File 'lib/models/porcelain.rb', line 9136 def authentication @authentication end |
#healthy ⇒ Object
The health check status of the reasource
9138 9139 9140 |
# File 'lib/models/porcelain.rb', line 9138 def healthy @healthy end |
#id ⇒ Object
The resource id.
9140 9141 9142 |
# File 'lib/models/porcelain.rb', line 9140 def id @id end |
#name ⇒ Object
The resource name.
9142 9143 9144 |
# File 'lib/models/porcelain.rb', line 9142 def name @name end |
#tags ⇒ Object
Any tags attached to this resource
9144 9145 9146 |
# File 'lib/models/porcelain.rb', line 9144 def @tags end |
#type ⇒ Object
The resource type
9146 9147 9148 |
# File 'lib/models/porcelain.rb', line 9146 def type @type end |
Instance Method Details
#to_json(options = {}) ⇒ Object
9166 9167 9168 9169 9170 9171 9172 |
# File 'lib/models/porcelain.rb', line 9166 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 |