class SDM::Service

A Service is a service account that can connect to resources they are granted directly, or granted via roles. Services are typically automated jobs.

Attributes

id[RW]

Unique identifier of the Service.

name[RW]

Unique human-readable name of the Service.

suspended[RW]

The Service's suspended state.

tags[RW]

Tags is a map of key, value pairs.

Public Class Methods

new( id: nil, name: nil, suspended: nil, tags: nil ) click to toggle source
# File lib/models/porcelain.rb, line 621
def initialize(
  id: nil,
  name: nil,
  suspended: nil,
  tags: nil
)
  if id != nil
    @id = id
  end
  if name != nil
    @name = name
  end
  if suspended != nil
    @suspended = suspended
  end
  if tags != nil
    @tags = tags
  end
end

Public Instance Methods

to_json(options = {}) click to toggle source
# File lib/models/porcelain.rb, line 641
def to_json(options = {})
  hash = {}
  self.instance_variables.each do |var|
    hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
  end
  hash.to_json
end