Class: SDM::Service
- Inherits:
-
Object
- Object
- SDM::Service
- Defined in:
- lib/models/porcelain.rb
Overview
A Service is a service account that can connect to resources they are granted directly, or granted via roles. Services are typically automated jobs.
Instance Attribute Summary collapse
-
#created_at ⇒ Object
CreatedAt is the timestamp when the service was created.
-
#id ⇒ Object
Unique identifier of the Service.
-
#name ⇒ Object
Unique human-readable name of the Service.
-
#suspended ⇒ Object
The Service's suspended state.
-
#tags ⇒ Object
Tags is a map of key, value pairs.
Instance Method Summary collapse
-
#initialize(created_at: nil, id: nil, name: nil, suspended: nil, tags: nil) ⇒ Service
constructor
A new instance of Service.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(created_at: nil, id: nil, name: nil, suspended: nil, tags: nil) ⇒ Service
Returns a new instance of Service.
15855 15856 15857 15858 15859 15860 15861 15862 15863 15864 15865 15866 15867 |
# File 'lib/models/porcelain.rb', line 15855 def initialize( created_at: nil, id: nil, name: nil, suspended: nil, tags: nil ) @created_at = created_at == nil ? nil : created_at @id = id == nil ? "" : id @name = name == nil ? "" : name @suspended = suspended == nil ? false : suspended = == nil ? SDM::() : end |
Instance Attribute Details
#created_at ⇒ Object
CreatedAt is the timestamp when the service was created
15845 15846 15847 |
# File 'lib/models/porcelain.rb', line 15845 def created_at @created_at end |
#id ⇒ Object
Unique identifier of the Service.
15847 15848 15849 |
# File 'lib/models/porcelain.rb', line 15847 def id @id end |
#name ⇒ Object
Unique human-readable name of the Service.
15849 15850 15851 |
# File 'lib/models/porcelain.rb', line 15849 def name @name end |
#suspended ⇒ Object
The Service's suspended state.
15851 15852 15853 |
# File 'lib/models/porcelain.rb', line 15851 def suspended @suspended end |
#tags ⇒ Object
Tags is a map of key, value pairs.
15853 15854 15855 |
# File 'lib/models/porcelain.rb', line 15853 def end |
Instance Method Details
#to_json(options = {}) ⇒ Object
15869 15870 15871 15872 15873 15874 15875 |
# File 'lib/models/porcelain.rb', line 15869 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 |