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.
7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 |
# File 'lib/models/porcelain.rb', line 7615 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.
7605 7606 7607 |
# File 'lib/models/porcelain.rb', line 7605 def description @description end |
#id ⇒ Object
Unique identifier of the Group.
7607 7608 7609 |
# File 'lib/models/porcelain.rb', line 7607 def id @id end |
#name ⇒ Object
Unique human-readable name of the Group.
7609 7610 7611 |
# File 'lib/models/porcelain.rb', line 7609 def name @name end |
#source ⇒ Object
Source is a read only field for what service manages this group, e.g. StrongDM, Okta, Azure.
7611 7612 7613 |
# File 'lib/models/porcelain.rb', line 7611 def source @source end |
#tags ⇒ Object
Tags is a map of key/value pairs that can be attached to a Group.
7613 7614 7615 |
# File 'lib/models/porcelain.rb', line 7613 def end |
Instance Method Details
#to_json(options = {}) ⇒ Object
7629 7630 7631 7632 7633 7634 7635 |
# File 'lib/models/porcelain.rb', line 7629 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 |