123456789_123456789_123456789_123456789_123456789_

Class: Mongo::Crypt::KMS::KMIP::MasterKeyDocument Private

Do not use. This class is for internal use only.
Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Instance Chain:
Inherits: Object
Defined in: lib/mongo/crypt/kms/kmip/master_document.rb

Overview

::Mongo::Crypt::KMS::KMIP KMS master key document object contains ::Mongo::Crypt::KMS master key parameters.

Constant Summary

Class Method Summary

Instance Attribute Summary

Instance Method Summary

::Mongo::Crypt::KMS::Validations - Included

#validate_param

Validate if a ::Mongo::Crypt::KMS parameter is valid.

#validate_tls_options

Validate KMS TLS options.

Instance Attribute Details

#endpointString | nil (readonly)

Returns:

[ GitHub ]

  
# File 'lib/mongo/crypt/kms/kmip/master_document.rb', line 33

attr_reader :endpoint

#key_idString | nil (readonly)

Returns:

[ GitHub ]

  
# File 'lib/mongo/crypt/kms/kmip/master_document.rb', line 30

attr_reader :key_id

Instance Method Details

#to_documentBSON::Document

Convert master key document object to a BSON document in libmongocrypt format.

Returns:

[ GitHub ]

  
# File 'lib/mongo/crypt/kms/kmip/master_document.rb', line 61

def to_document
  BSON::Document.new({
    provider: 'kmip',
  }).tap do |bson|
    bson.update({ endpoint: endpoint }) unless endpoint.nil?
    bson.update({ keyId: key_id }) unless key_id.nil?
  end
end