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.
12385 12386 12387 12388 12389 12390 12391 12392 12393 12394 12395 12396 12397 12398 12399 12400 12401 |
# File 'lib/models/porcelain.rb', line 12385 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
12371 12372 12373 |
# File 'lib/models/porcelain.rb', line 12371 def access @access end |
#authentication ⇒ Object
The type of authentication for the resource
12373 12374 12375 |
# File 'lib/models/porcelain.rb', line 12373 def authentication @authentication end |
#healthy ⇒ Object
The health check status of the reasource
12375 12376 12377 |
# File 'lib/models/porcelain.rb', line 12375 def healthy @healthy end |
#id ⇒ Object
The resource id.
12377 12378 12379 |
# File 'lib/models/porcelain.rb', line 12377 def id @id end |
#name ⇒ Object
The resource name.
12379 12380 12381 |
# File 'lib/models/porcelain.rb', line 12379 def name @name end |
#tags ⇒ Object
Any tags attached to this resource
12381 12382 12383 |
# File 'lib/models/porcelain.rb', line 12381 def @tags end |
#type ⇒ Object
The resource type
12383 12384 12385 |
# File 'lib/models/porcelain.rb', line 12383 def type @type end |
Instance Method Details
#to_json(options = {}) ⇒ Object
12403 12404 12405 12406 12407 12408 12409 |
# File 'lib/models/porcelain.rb', line 12403 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 |