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.
10854 10855 10856 10857 10858 10859 10860 10861 10862 10863 10864 10865 10866 10867 10868 10869 10870 |
# File 'lib/models/porcelain.rb', line 10854 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
10840 10841 10842 |
# File 'lib/models/porcelain.rb', line 10840 def access @access end |
#authentication ⇒ Object
The type of authentication for the resource
10842 10843 10844 |
# File 'lib/models/porcelain.rb', line 10842 def authentication @authentication end |
#healthy ⇒ Object
The health check status of the reasource
10844 10845 10846 |
# File 'lib/models/porcelain.rb', line 10844 def healthy @healthy end |
#id ⇒ Object
The resource id.
10846 10847 10848 |
# File 'lib/models/porcelain.rb', line 10846 def id @id end |
#name ⇒ Object
The resource name.
10848 10849 10850 |
# File 'lib/models/porcelain.rb', line 10848 def name @name end |
#tags ⇒ Object
Any tags attached to this resource
10850 10851 10852 |
# File 'lib/models/porcelain.rb', line 10850 def @tags end |
#type ⇒ Object
The resource type
10852 10853 10854 |
# File 'lib/models/porcelain.rb', line 10852 def type @type end |
Instance Method Details
#to_json(options = {}) ⇒ Object
10872 10873 10874 10875 10876 10877 10878 |
# File 'lib/models/porcelain.rb', line 10872 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 |