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.



9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
# File 'lib/models/porcelain.rb', line 9808

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

#categoriesObject

The Organization's log category configuration settings.



9794
9795
9796
# File 'lib/models/porcelain.rb', line 9794

def categories
  @categories
end

#local_encoderObject

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



9796
9797
9798
# File 'lib/models/porcelain.rb', line 9796

def local_encoder
  @local_encoder
end

#local_formatObject

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



9798
9799
9800
# File 'lib/models/porcelain.rb', line 9798

def local_format
  @local_format
end

#local_socket_pathObject

The Organization's local log socket path.



9800
9801
9802
# File 'lib/models/porcelain.rb', line 9800

def local_socket_path
  @local_socket_path
end

#local_storageObject

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



9802
9803
9804
# File 'lib/models/porcelain.rb', line 9802

def local_storage
  @local_storage
end

#local_tcp_addressObject

The Organization's local log TCP address.



9804
9805
9806
# File 'lib/models/porcelain.rb', line 9804

def local_tcp_address
  @local_tcp_address
end

#public_keyObject

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



9806
9807
9808
# File 'lib/models/porcelain.rb', line 9806

def public_key
  @public_key
end

Instance Method Details

#to_json(options = {}) ⇒ Object



9826
9827
9828
9829
9830
9831
9832
# File 'lib/models/porcelain.rb', line 9826

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