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.
15540 15541 15542 15543 15544 15545 15546 15547 15548 15549 15550 15551 15552 15553 15554 15555 15556 |
# File 'lib/models/porcelain.rb', line 15540 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
15526 15527 15528 |
# File 'lib/models/porcelain.rb', line 15526 def access @access end |
#authentication ⇒ Object
The type of authentication for the resource
15528 15529 15530 |
# File 'lib/models/porcelain.rb', line 15528 def authentication @authentication end |
#healthy ⇒ Object
The health check status of the reasource
15530 15531 15532 |
# File 'lib/models/porcelain.rb', line 15530 def healthy @healthy end |
#id ⇒ Object
The resource id.
15532 15533 15534 |
# File 'lib/models/porcelain.rb', line 15532 def id @id end |
#name ⇒ Object
The resource name.
15534 15535 15536 |
# File 'lib/models/porcelain.rb', line 15534 def name @name end |
#tags ⇒ Object
Any tags attached to this resource
15536 15537 15538 |
# File 'lib/models/porcelain.rb', line 15536 def @tags end |
#type ⇒ Object
The resource type
15538 15539 15540 |
# File 'lib/models/porcelain.rb', line 15538 def type @type end |
Instance Method Details
#to_json(options = {}) ⇒ Object
15558 15559 15560 15561 15562 15563 15564 |
# File 'lib/models/porcelain.rb', line 15558 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 |