Class: Aws::RpcV2::Builder

Inherits:
Object
  • Object
show all
Includes:
Seahorse::Model::Shapes
Defined in:
lib/aws-sdk-core/rpc_v2/builder.rb

Instance Method Summary collapse

Constructor Details

#initialize(rules, _options = {}) ⇒ Builder

Returns a new instance of Builder.



10
11
12
# File 'lib/aws-sdk-core/rpc_v2/builder.rb', line 10

def initialize(rules, _options = {})
  @rules = rules
end

Instance Method Details

#serialize(params) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/aws-sdk-core/rpc_v2/builder.rb', line 14

def serialize(params)
  # If the input shape is empty, do not set a body. This is
  # different than if the input shape is a structure with no members.
  return nil if @rules.shape.struct_class == EmptyStructure

  Cbor.encode(format(@rules, params))
end