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.
17696 17697 17698 17699 17700 17701 17702 17703 17704 17705 17706 17707 17708 |
# File 'lib/models/porcelain.rb', line 17696 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 @tags = == nil ? SDM::() : end |
Instance Attribute Details
#created_at ⇒ Object
CreatedAt is the timestamp when the service was created
17686 17687 17688 |
# File 'lib/models/porcelain.rb', line 17686 def created_at @created_at end |
#id ⇒ Object
Unique identifier of the Service.
17688 17689 17690 |
# File 'lib/models/porcelain.rb', line 17688 def id @id end |
#name ⇒ Object
Unique human-readable name of the Service.
17690 17691 17692 |
# File 'lib/models/porcelain.rb', line 17690 def name @name end |
#suspended ⇒ Object
The Service's suspended state.
17692 17693 17694 |
# File 'lib/models/porcelain.rb', line 17692 def suspended @suspended end |
#tags ⇒ Object
Tags is a map of key, value pairs.
17694 17695 17696 |
# File 'lib/models/porcelain.rb', line 17694 def @tags end |
Instance Method Details
#to_json(options = {}) ⇒ Object
17710 17711 17712 17713 17714 17715 17716 |
# File 'lib/models/porcelain.rb', line 17710 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 |