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.



9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
# File 'lib/models/porcelain.rb', line 9272

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.



9258
9259
9260
# File 'lib/models/porcelain.rb', line 9258

def categories
  @categories
end

#local_encoderObject

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



9260
9261
9262
# File 'lib/models/porcelain.rb', line 9260

def local_encoder
  @local_encoder
end

#local_formatObject

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



9262
9263
9264
# File 'lib/models/porcelain.rb', line 9262

def local_format
  @local_format
end

#local_socket_pathObject

The Organization's local log socket path.



9264
9265
9266
# File 'lib/models/porcelain.rb', line 9264

def local_socket_path
  @local_socket_path
end

#local_storageObject

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



9266
9267
9268
# File 'lib/models/porcelain.rb', line 9266

def local_storage
  @local_storage
end

#local_tcp_addressObject

The Organization's local log TCP address.



9268
9269
9270
# File 'lib/models/porcelain.rb', line 9268

def local_tcp_address
  @local_tcp_address
end

#public_keyObject

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



9270
9271
9272
# File 'lib/models/porcelain.rb', line 9270

def public_key
  @public_key
end

Instance Method Details

#to_json(options = {}) ⇒ Object



9290
9291
9292
9293
9294
9295
9296
# File 'lib/models/porcelain.rb', line 9290

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