Class: LaunchDarkly::Impl::DataSystem::ProtocolV2::DeleteObject Private

Inherits:
Object
  • Object
show all
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.

Since:

  • 5.5.0

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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.

Parameters:

Since:

  • 5.5.0



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

#keySymbol (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.

Returns:

  • (Symbol)

    The key

Since:

  • 5.5.0



26
27
28
# File 'lib/ldclient-rb/impl/data_system/protocolv2.rb', line 26

def key
  @key
end

#kindString (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).

Returns:

Since:

  • 5.5.0



23
24
25
# File 'lib/ldclient-rb/impl/data_system/protocolv2.rb', line 23

def kind
  @kind
end

#versionInteger (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.

Returns:

  • (Integer)

    The version

Since:

  • 5.5.0



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.

Parameters:

  • data (Hash)

    The hash representation

Returns:

Raises:

  • (ArgumentError)

    if required fields are missing

Since:

  • 5.5.0



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

#nameSymbol

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.

Returns:

  • (Symbol)

Since:

  • 5.5.0



44
45
46
# File 'lib/ldclient-rb/impl/data_system/protocolv2.rb', line 44

def name
  LaunchDarkly::Interfaces::DataSystem::EventName::DELETE_OBJECT
end

#to_hHash

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.

Returns:

  • (Hash)

Since:

  • 5.5.0



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