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.
8387 8388 8389 8390 8391 8392 8393 8394 8395 8396 8397 8398 8399 |
# File 'lib/models/porcelain.rb', line 8387 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 @tags = == nil ? SDM::() : end |
Instance Attribute Details
#description ⇒ Object
Description of the Group.
8377 8378 8379 |
# File 'lib/models/porcelain.rb', line 8377 def description @description end |
#id ⇒ Object
Unique identifier of the Group.
8379 8380 8381 |
# File 'lib/models/porcelain.rb', line 8379 def id @id end |
#name ⇒ Object
Unique human-readable name of the Group.
8381 8382 8383 |
# File 'lib/models/porcelain.rb', line 8381 def name @name end |
#source ⇒ Object
Source is a read only field for what service manages this group, e.g. StrongDM, Okta, Azure.
8383 8384 8385 |
# File 'lib/models/porcelain.rb', line 8383 def source @source end |
#tags ⇒ Object
Tags is a map of key/value pairs that can be attached to a Group.
8385 8386 8387 |
# File 'lib/models/porcelain.rb', line 8385 def @tags end |
Instance Method Details
#to_json(options = {}) ⇒ Object
8401 8402 8403 8404 8405 8406 8407 |
# File 'lib/models/porcelain.rb', line 8401 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 |