Class: SDM::Group
- Inherits:
-
Object
- Object
- SDM::Group
- Defined in:
- lib/models/porcelain.rb
Overview
A Group is a named set of principals.
Instance Attribute Summary collapse
-
#description ⇒ Object
Description of the Group.
-
#id ⇒ Object
Unique identifier of the Group.
-
#name ⇒ Object
Unique human-readable name of the Group.
-
#source ⇒ Object
Source is a read only field for what service manages this group, e.g.
-
#tags ⇒ Object
Tags is a map of key/value pairs that can be attached to a Group.
Instance Method Summary collapse
-
#initialize(description: nil, id: nil, name: nil, source: nil, tags: nil) ⇒ Group
constructor
A new instance of Group.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(description: nil, id: nil, name: nil, source: nil, tags: nil) ⇒ Group
Returns a new instance of Group.
8249 8250 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261 |
# File 'lib/models/porcelain.rb', line 8249 def initialize( description: nil, id: nil, name: nil, source: nil, tags: nil ) @description = description == nil ? "" : description @id = id == nil ? "" : id @name = name == nil ? "" : name @source = source == nil ? "" : source = == nil ? SDM::() : end |
Instance Attribute Details
#description ⇒ Object
Description of the Group.
8239 8240 8241 |
# File 'lib/models/porcelain.rb', line 8239 def description @description end |
#id ⇒ Object
Unique identifier of the Group.
8241 8242 8243 |
# File 'lib/models/porcelain.rb', line 8241 def id @id end |
#name ⇒ Object
Unique human-readable name of the Group.
8243 8244 8245 |
# File 'lib/models/porcelain.rb', line 8243 def name @name end |
#source ⇒ Object
Source is a read only field for what service manages this group, e.g. StrongDM, Okta, Azure.
8245 8246 8247 |
# File 'lib/models/porcelain.rb', line 8245 def source @source end |
#tags ⇒ Object
Tags is a map of key/value pairs that can be attached to a Group.
8247 8248 8249 |
# File 'lib/models/porcelain.rb', line 8247 def end |
Instance Method Details
#to_json(options = {}) ⇒ Object
8263 8264 8265 8266 8267 8268 8269 |
# File 'lib/models/porcelain.rb', line 8263 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 |