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.
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.
30 31 32 33 34 |
# File 'lib/ldclient-rb/impl/data_system/protocolv2.rb', line 30 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.
23 24 25 |
# File 'lib/ldclient-rb/impl/data_system/protocolv2.rb', line 23 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).
20 21 22 |
# File 'lib/ldclient-rb/impl/data_system/protocolv2.rb', line 20 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.
17 18 19 |
# File 'lib/ldclient-rb/impl/data_system/protocolv2.rb', line 17 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.
65 66 67 68 69 70 71 72 73 |
# File 'lib/ldclient-rb/impl/data_system/protocolv2.rb', line 65 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.
41 42 43 |
# File 'lib/ldclient-rb/impl/data_system/protocolv2.rb', line 41 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.
50 51 52 53 54 55 56 |
# File 'lib/ldclient-rb/impl/data_system/protocolv2.rb', line 50 def to_h { version: @version, kind: @kind, key: @key, } end |