Class: SDM::LogConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/models/porcelain.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(categories: nil, local_encoder: nil, local_format: nil, local_socket_path: nil, local_storage: nil, local_tcp_address: nil, public_key: nil) ⇒ LogConfig

Returns a new instance of LogConfig.



10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
# File 'lib/models/porcelain.rb', line 10557

def initialize(
  categories: nil,
  local_encoder: nil,
  local_format: nil,
  local_socket_path: nil,
  local_storage: nil,
  local_tcp_address: nil,
  public_key: nil
)
  @categories = categories == nil ? SDM::_porcelain_zero_value_log_category_config_map() : categories
  @local_encoder = local_encoder == nil ? "" : local_encoder
  @local_format = local_format == nil ? "" : local_format
  @local_socket_path = local_socket_path == nil ? "" : local_socket_path
  @local_storage = local_storage == nil ? "" : local_storage
  @local_tcp_address = local_tcp_address == nil ? "" : local_tcp_address
  @public_key = public_key == nil ? "" : public_key
end

Instance Attribute Details

#categories ⇒ Object

The Organization's log category configuration settings.



10543
10544
10545
# File 'lib/models/porcelain.rb', line 10543

def categories
  @categories
end

#local_encoder ⇒ Object

The Organization's local log encryption encoder, one of the LogLocalEncoder constants.



10545
10546
10547
# File 'lib/models/porcelain.rb', line 10545

def local_encoder
  @local_encoder
end

#local_format ⇒ Object

The Organization's local log format, one of the LogLocalFormat constants.



10547
10548
10549
# File 'lib/models/porcelain.rb', line 10547

def local_format
  @local_format
end

#local_socket_path ⇒ Object

The Organization's local log socket path.



10549
10550
10551
# File 'lib/models/porcelain.rb', line 10549

def local_socket_path
  @local_socket_path
end

#local_storage ⇒ Object

The Organization's local log storage, one of the LogLocalStorage constants.



10551
10552
10553
# File 'lib/models/porcelain.rb', line 10551

def local_storage
  @local_storage
end

#local_tcp_address ⇒ Object

The Organization's local log TCP address.



10553
10554
10555
# File 'lib/models/porcelain.rb', line 10553

def local_tcp_address
  @local_tcp_address
end

#public_key ⇒ Object

The Organization's public key in PEM format for encrypting logs.



10555
10556
10557
# File 'lib/models/porcelain.rb', line 10555

def public_key
  @public_key
end

Instance Method Details

#to_json(options = {}) ⇒ Object



10575
10576
10577
10578
10579
10580
10581
# File 'lib/models/porcelain.rb', line 10575

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