Class: LaunchDarkly::Impl::DataSystem::ProtocolV2::DeleteObject Private
- Inherits:
-
Object
- Object
- LaunchDarkly::Impl::DataSystem::ProtocolV2::DeleteObject
- Defined in:
- lib/ldclient-rb/impl/data_system/protocolv2.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
DeleteObject specifies the deletion of a particular object.
This type is not stable, and not subject to any backwards compatibility guarantees or semantic versioning. It is not suitable for production usage.
Instance Attribute Summary collapse
-
#key ⇒ Symbol
readonly
private
The key.
-
#kind ⇒ String
readonly
private
The object kind (LaunchDarkly::Interfaces::DataSystem::ObjectKind).
-
#version ⇒ Integer
readonly
private
The version.
Class Method Summary collapse
-
.from_h(data) ⇒ DeleteObject
private
Deserializes a DeleteObject from a JSON-compatible hash.
Instance Method Summary collapse
-
#initialize(version:, kind:, key:) ⇒ DeleteObject
constructor
private
A new instance of DeleteObject.
-
#name ⇒ Symbol
private
Returns the event name.
-
#to_h ⇒ Hash
private
Serializes the DeleteObject to a JSON-compatible hash.
Constructor Details
#initialize(version:, kind:, key:) ⇒ DeleteObject
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of DeleteObject.
33 34 35 36 37 |
# File 'lib/ldclient-rb/impl/data_system/protocolv2.rb', line 33 def initialize(version:, kind:, key:) @version = version @kind = kind @key = key end |
Instance Attribute Details
#key ⇒ Symbol (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns The key.
26 27 28 |
# File 'lib/ldclient-rb/impl/data_system/protocolv2.rb', line 26 def key @key end |
#kind ⇒ String (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns The object kind (LaunchDarkly::Interfaces::DataSystem::ObjectKind).
23 24 25 |
# File 'lib/ldclient-rb/impl/data_system/protocolv2.rb', line 23 def kind @kind end |
#version ⇒ Integer (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns The version.
20 21 22 |
# File 'lib/ldclient-rb/impl/data_system/protocolv2.rb', line 20 def version @version end |
Class Method Details
.from_h(data) ⇒ DeleteObject
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Deserializes a DeleteObject from a JSON-compatible hash.
68 69 70 71 72 73 74 75 76 |
# File 'lib/ldclient-rb/impl/data_system/protocolv2.rb', line 68 def self.from_h(data) version = data[:version] kind = data[:kind] key = data[:key] raise ArgumentError, "Missing required fields in DeleteObject" if version.nil? || kind.nil? || key.nil? new(version: version, kind: kind, key: key.to_sym) end |
Instance Method Details
#name ⇒ Symbol
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the event name.
44 45 46 |
# File 'lib/ldclient-rb/impl/data_system/protocolv2.rb', line 44 def name LaunchDarkly::Interfaces::DataSystem::EventName::DELETE_OBJECT end |
#to_h ⇒ Hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Serializes the DeleteObject to a JSON-compatible hash.
53 54 55 56 57 58 59 |
# File 'lib/ldclient-rb/impl/data_system/protocolv2.rb', line 53 def to_h { version: @version, kind: @kind, key: @key, } end |