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.



10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
# File 'lib/models/porcelain.rb', line 10094

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.



10080
10081
10082
# File 'lib/models/porcelain.rb', line 10080

def categories
  @categories
end

#local_encoderObject

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



10082
10083
10084
# File 'lib/models/porcelain.rb', line 10082

def local_encoder
  @local_encoder
end

#local_formatObject

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



10084
10085
10086
# File 'lib/models/porcelain.rb', line 10084

def local_format
  @local_format
end

#local_socket_pathObject

The Organization's local log socket path.



10086
10087
10088
# File 'lib/models/porcelain.rb', line 10086

def local_socket_path
  @local_socket_path
end

#local_storageObject

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



10088
10089
10090
# File 'lib/models/porcelain.rb', line 10088

def local_storage
  @local_storage
end

#local_tcp_addressObject

The Organization's local log TCP address.



10090
10091
10092
# File 'lib/models/porcelain.rb', line 10090

def local_tcp_address
  @local_tcp_address
end

#public_keyObject

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



10092
10093
10094
# File 'lib/models/porcelain.rb', line 10092

def public_key
  @public_key
end

Instance Method Details

#to_json(options = {}) ⇒ Object



10112
10113
10114
10115
10116
10117
10118
# File 'lib/models/porcelain.rb', line 10112

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