Class List Method List File List

# Class: VertxAmqpClient::AmqpMessageBuilder

Inherits:
  Object
  - Object
  - VertxAmqpClient::AmqpMessageBuilder
  show all
Defined in:
  /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb

## Overview

Builder to create a new AmqpMessage.

Reference about the different metadata can be found on AMQP message properties.

Note that the body is set using `withBodyAs*` method depending on the passed type.

## Constant Summary

@@j_api_type =

      Object.new

## Class Method Summary (collapse)

- + (Boolean) accept?(obj)
- + (::VertxAmqpClient::AmqpMessageBuilder) create
  A new instance of AmqpMessageBuilder.
- + (Object) j_api_type
- + (Object) j_class
- + (Object) unwrap(obj)
- + (Object) wrap(obj)

## Instance Method Summary (collapse)

- - (::VertxAmqpClient::AmqpMessageBuilder) address(address = nil)
- - (::VertxAmqpClient::AmqpMessageBuilder) application_properties(props = nil)
- - (::VertxAmqpClient::AmqpMessage) build
  The message.
- - (::VertxAmqpClient::AmqpMessageBuilder) content_encoding(ct = nil)
- - (::VertxAmqpClient::AmqpMessageBuilder) content_type(ct = nil)
- - (::VertxAmqpClient::AmqpMessageBuilder) correlation_id(correlationId = nil)
- - (::VertxAmqpClient::AmqpMessageBuilder) creation_time(ct = nil)
- - (::VertxAmqpClient::AmqpMessageBuilder) delivery_count(count = nil)
- - (::VertxAmqpClient::AmqpMessageBuilder) durable(durable = nil)
- - (::VertxAmqpClient::AmqpMessageBuilder) expiry_time(expiry = nil)
- - (::VertxAmqpClient::AmqpMessageBuilder) first_acquirer(first = nil)
- - (::VertxAmqpClient::AmqpMessageBuilder) group_id(gi = nil)
- - (::VertxAmqpClient::AmqpMessageBuilder) id(id = nil)
- - (::VertxAmqpClient::AmqpMessageBuilder) priority(priority = nil)
- - (::VertxAmqpClient::AmqpMessageBuilder) reply_to(replyTo = nil)
- - (::VertxAmqpClient::AmqpMessageBuilder) reply_to_group_id(rt = nil)
- - (::VertxAmqpClient::AmqpMessageBuilder) subject(subject = nil)
- - (::VertxAmqpClient::AmqpMessageBuilder) ttl(ttl = nil)
- - (::VertxAmqpClient::AmqpMessageBuilder) with_body(value = nil)
- - (::VertxAmqpClient::AmqpMessageBuilder) with_boolean_as_body(v = nil)
- - (::VertxAmqpClient::AmqpMessageBuilder) with_buffer_as_body(buffer = nil)
- - (::VertxAmqpClient::AmqpMessageBuilder) with_byte_as_body(v = nil)
- - (::VertxAmqpClient::AmqpMessageBuilder) with_char_as_body(c = nil)
- - (::VertxAmqpClient::AmqpMessageBuilder) with_double_as_body(v = nil)
- - (::VertxAmqpClient::AmqpMessageBuilder) with_float_as_body(v = nil)
- - (::VertxAmqpClient::AmqpMessageBuilder) with_integer_as_body(v = nil)
- - (::VertxAmqpClient::AmqpMessageBuilder) with_json_array_as_body(json = nil)
- - (::VertxAmqpClient::AmqpMessageBuilder) with_json_object_as_body(json = nil)
- - (::VertxAmqpClient::AmqpMessageBuilder) with_long_as_body(v = nil)
- - (::VertxAmqpClient::AmqpMessageBuilder) with_short_as_body(v = nil)
- - (::VertxAmqpClient::AmqpMessageBuilder) with_symbol_as_body(value = nil)

## Class Method Details

### + (`Boolean`) accept?(obj)

Returns:

- (`Boolean`)

    24
    25
    26
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb', line 24

    def @@j_api_type.accept?(obj)
      obj.class == AmqpMessageBuilder
    end

### + (`::VertxAmqpClient::AmqpMessageBuilder`) create

Returns a new instance of VertxAmqpClient::AmqpMessageBuilder

Returns:

- (`::VertxAmqpClient::AmqpMessageBuilder`) —
  a new instance of VertxAmqpClient::AmqpMessageBuilder

Raises:

- (`ArgumentError`)

    40
    41
    42
    43
    44
    45
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb', line 40

    def self.create
      if !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxAmqp::AmqpMessageBuilder.java_method(:create, []).call(),::VertxAmqpClient::AmqpMessageBuilder)
      end
      raise ArgumentError, "Invalid arguments when calling create()"
    end

### + (`Object`) j_api_type

    33
    34
    35
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb', line 33

    def self.j_api_type
      @@j_api_type
    end

### + (`Object`) j_class

    36
    37
    38
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb', line 36

    def self.j_class
      Java::IoVertxAmqp::AmqpMessageBuilder.java_class
    end

### + (`Object`) unwrap(obj)

    30
    31
    32
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb', line 30

    def @@j_api_type.unwrap(obj)
      obj.j_del
    end

### + (`Object`) wrap(obj)

    27
    28
    29
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb', line 27

    def @@j_api_type.wrap(obj)
      AmqpMessageBuilder.new(obj)
    end

## Instance Method Details

### - (`::VertxAmqpClient::AmqpMessageBuilder`) address(address = nil)

Parameters:

- address (`String`) (defaults to: `nil`)

Returns:

- (`::VertxAmqpClient::AmqpMessageBuilder`)

Raises:

- (`ArgumentError`)

    103
    104
    105
    106
    107
    108
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb', line 103

    def address(address=nil)
      if address.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:address, [Java::java.lang.String.java_class]).call(address),::VertxAmqpClient::AmqpMessageBuilder)
      end
      raise ArgumentError, "Invalid arguments when calling address(#{address})"
    end

### - (`::VertxAmqpClient::AmqpMessageBuilder`) application_properties(props = nil)

Parameters:

- props (`Hash{String => Object}`) (defaults to: `nil`)

Returns:

- (`::VertxAmqpClient::AmqpMessageBuilder`)

Raises:

- (`ArgumentError`)

    199
    200
    201
    202
    203
    204
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb', line 199

    def application_properties(props=nil)
      if props.class == Hash && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:applicationProperties, [Java::IoVertxCoreJson::JsonObject.java_class]).call(::Vertx::Util::Utils.to_json_object(props)),::VertxAmqpClient::AmqpMessageBuilder)
      end
      raise ArgumentError, "Invalid arguments when calling application_properties(#{props})"
    end

### - (`::VertxAmqpClient::AmqpMessage`) build

Returns the message.

Returns:

- (`::VertxAmqpClient::AmqpMessage`) —
  the message.

Raises:

- (`ArgumentError`)

    47
    48
    49
    50
    51
    52
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb', line 47

    def build
      if !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:build, []).call(),::VertxAmqpClient::AmqpMessage)
      end
      raise ArgumentError, "Invalid arguments when calling build()"
    end

### - (`::VertxAmqpClient::AmqpMessageBuilder`) content_encoding(ct = nil)

Parameters:

- ct (`String`) (defaults to: `nil`)

Returns:

- (`::VertxAmqpClient::AmqpMessageBuilder`)

Raises:

- (`ArgumentError`)

    159
    160
    161
    162
    163
    164
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb', line 159

    def content_encoding(ct=nil)
      if ct.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:contentEncoding, [Java::java.lang.String.java_class]).call(ct),::VertxAmqpClient::AmqpMessageBuilder)
      end
      raise ArgumentError, "Invalid arguments when calling content_encoding(#{ct})"
    end

### - (`::VertxAmqpClient::AmqpMessageBuilder`) content_type(ct = nil)

Parameters:

- ct (`String`) (defaults to: `nil`)

Returns:

- (`::VertxAmqpClient::AmqpMessageBuilder`)

Raises:

- (`ArgumentError`)

    151
    152
    153
    154
    155
    156
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb', line 151

    def content_type(ct=nil)
      if ct.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:contentType, [Java::java.lang.String.java_class]).call(ct),::VertxAmqpClient::AmqpMessageBuilder)
      end
      raise ArgumentError, "Invalid arguments when calling content_type(#{ct})"
    end

### - (`::VertxAmqpClient::AmqpMessageBuilder`) correlation_id(correlationId = nil)

Parameters:

- correlationId (`String`) (defaults to: `nil`)

Returns:

- (`::VertxAmqpClient::AmqpMessageBuilder`)

Raises:

- (`ArgumentError`)

    119
    120
    121
    122
    123
    124
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb', line 119

    def correlation_id(correlationId=nil)
      if correlationId.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:correlationId, [Java::java.lang.String.java_class]).call(correlationId),::VertxAmqpClient::AmqpMessageBuilder)
      end
      raise ArgumentError, "Invalid arguments when calling correlation_id(#{correlationId})"
    end

### - (`::VertxAmqpClient::AmqpMessageBuilder`) creation_time(ct = nil)

Parameters:

- ct (`Fixnum`) (defaults to: `nil`)

Returns:

- (`::VertxAmqpClient::AmqpMessageBuilder`)

Raises:

- (`ArgumentError`)

    175
    176
    177
    178
    179
    180
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb', line 175

    def creation_time(ct=nil)
      if ct.class == Fixnum && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:creationTime, [Java::long.java_class]).call(ct),::VertxAmqpClient::AmqpMessageBuilder)
      end
      raise ArgumentError, "Invalid arguments when calling creation_time(#{ct})"
    end

### - (`::VertxAmqpClient::AmqpMessageBuilder`) delivery_count(count = nil)

Parameters:

- count (`Fixnum`) (defaults to: `nil`)

Returns:

- (`::VertxAmqpClient::AmqpMessageBuilder`)

Raises:

- (`ArgumentError`)

    87
    88
    89
    90
    91
    92
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb', line 87

    def delivery_count(count=nil)
      if count.class == Fixnum && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:deliveryCount, [Java::int.java_class]).call(count),::VertxAmqpClient::AmqpMessageBuilder)
      end
      raise ArgumentError, "Invalid arguments when calling delivery_count(#{count})"
    end

### - (`::VertxAmqpClient::AmqpMessageBuilder`) durable(durable = nil)

Parameters:

- durable (`true`, `false`) (defaults to: `nil`)

Returns:

- (`::VertxAmqpClient::AmqpMessageBuilder`)

Raises:

- (`ArgumentError`)

    63
    64
    65
    66
    67
    68
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb', line 63

    def durable(durable=nil)
      if (durable.class == TrueClass || durable.class == FalseClass) && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:durable, [Java::boolean.java_class]).call(durable),::VertxAmqpClient::AmqpMessageBuilder)
      end
      raise ArgumentError, "Invalid arguments when calling durable(#{durable})"
    end

### - (`::VertxAmqpClient::AmqpMessageBuilder`) expiry_time(expiry = nil)

Parameters:

- expiry (`Fixnum`) (defaults to: `nil`)

Returns:

- (`::VertxAmqpClient::AmqpMessageBuilder`)

Raises:

- (`ArgumentError`)

    167
    168
    169
    170
    171
    172
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb', line 167

    def expiry_time(expiry=nil)
      if expiry.class == Fixnum && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:expiryTime, [Java::long.java_class]).call(expiry),::VertxAmqpClient::AmqpMessageBuilder)
      end
      raise ArgumentError, "Invalid arguments when calling expiry_time(#{expiry})"
    end

### - (`::VertxAmqpClient::AmqpMessageBuilder`) first_acquirer(first = nil)

Parameters:

- first (`true`, `false`) (defaults to: `nil`)

Returns:

- (`::VertxAmqpClient::AmqpMessageBuilder`)

Raises:

- (`ArgumentError`)

    79
    80
    81
    82
    83
    84
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb', line 79

    def first_acquirer(first=nil)
      if (first.class == TrueClass || first.class == FalseClass) && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:firstAcquirer, [Java::boolean.java_class]).call(first),::VertxAmqpClient::AmqpMessageBuilder)
      end
      raise ArgumentError, "Invalid arguments when calling first_acquirer(#{first})"
    end

### - (`::VertxAmqpClient::AmqpMessageBuilder`) group_id(gi = nil)

Parameters:

- gi (`String`) (defaults to: `nil`)

Returns:

- (`::VertxAmqpClient::AmqpMessageBuilder`)

Raises:

- (`ArgumentError`)

    183
    184
    185
    186
    187
    188
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb', line 183

    def group_id(gi=nil)
      if gi.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:groupId, [Java::java.lang.String.java_class]).call(gi),::VertxAmqpClient::AmqpMessageBuilder)
      end
      raise ArgumentError, "Invalid arguments when calling group_id(#{gi})"
    end

### - (`::VertxAmqpClient::AmqpMessageBuilder`) id(id = nil)

Parameters:

- id (`String`) (defaults to: `nil`)

Returns:

- (`::VertxAmqpClient::AmqpMessageBuilder`)

Raises:

- (`ArgumentError`)

    95
    96
    97
    98
    99
    100
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb', line 95

    def id(id=nil)
      if id.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:id, [Java::java.lang.String.java_class]).call(id),::VertxAmqpClient::AmqpMessageBuilder)
      end
      raise ArgumentError, "Invalid arguments when calling id(#{id})"
    end

### - (`::VertxAmqpClient::AmqpMessageBuilder`) priority(priority = nil)

Parameters:

- priority (`Fixnum`) (defaults to: `nil`)

Returns:

- (`::VertxAmqpClient::AmqpMessageBuilder`)

Raises:

- (`ArgumentError`)

    55
    56
    57
    58
    59
    60
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb', line 55

    def priority(priority=nil)
      if priority.class == Fixnum && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:priority, [Java::short.java_class]).call(::Vertx::Util::Utils.to_short(priority)),::VertxAmqpClient::AmqpMessageBuilder)
      end
      raise ArgumentError, "Invalid arguments when calling priority(#{priority})"
    end

### - (`::VertxAmqpClient::AmqpMessageBuilder`) reply_to(replyTo = nil)

Parameters:

- replyTo (`String`) (defaults to: `nil`)

Returns:

- (`::VertxAmqpClient::AmqpMessageBuilder`)

Raises:

- (`ArgumentError`)

    111
    112
    113
    114
    115
    116
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb', line 111

    def reply_to(replyTo=nil)
      if replyTo.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:replyTo, [Java::java.lang.String.java_class]).call(replyTo),::VertxAmqpClient::AmqpMessageBuilder)
      end
      raise ArgumentError, "Invalid arguments when calling reply_to(#{replyTo})"
    end

### - (`::VertxAmqpClient::AmqpMessageBuilder`) reply_to_group_id(rt = nil)

Parameters:

- rt (`String`) (defaults to: `nil`)

Returns:

- (`::VertxAmqpClient::AmqpMessageBuilder`)

Raises:

- (`ArgumentError`)

    191
    192
    193
    194
    195
    196
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb', line 191

    def reply_to_group_id(rt=nil)
      if rt.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:replyToGroupId, [Java::java.lang.String.java_class]).call(rt),::VertxAmqpClient::AmqpMessageBuilder)
      end
      raise ArgumentError, "Invalid arguments when calling reply_to_group_id(#{rt})"
    end

### - (`::VertxAmqpClient::AmqpMessageBuilder`) subject(subject = nil)

Parameters:

- subject (`String`) (defaults to: `nil`)

Returns:

- (`::VertxAmqpClient::AmqpMessageBuilder`)

Raises:

- (`ArgumentError`)

    143
    144
    145
    146
    147
    148
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb', line 143

    def subject(subject=nil)
      if subject.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:subject, [Java::java.lang.String.java_class]).call(subject),::VertxAmqpClient::AmqpMessageBuilder)
      end
      raise ArgumentError, "Invalid arguments when calling subject(#{subject})"
    end

### - (`::VertxAmqpClient::AmqpMessageBuilder`) ttl(ttl = nil)

Parameters:

- ttl (`Fixnum`) (defaults to: `nil`)

Returns:

- (`::VertxAmqpClient::AmqpMessageBuilder`)

Raises:

- (`ArgumentError`)

    71
    72
    73
    74
    75
    76
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb', line 71

    def ttl(ttl=nil)
      if ttl.class == Fixnum && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:ttl, [Java::long.java_class]).call(ttl),::VertxAmqpClient::AmqpMessageBuilder)
      end
      raise ArgumentError, "Invalid arguments when calling ttl(#{ttl})"
    end

### - (`::VertxAmqpClient::AmqpMessageBuilder`) with_body(value = nil)

Parameters:

- value (`String`) (defaults to: `nil`)

Returns:

- (`::VertxAmqpClient::AmqpMessageBuilder`)

Raises:

- (`ArgumentError`)

    127
    128
    129
    130
    131
    132
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb', line 127

    def with_body(value=nil)
      if value.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:withBody, [Java::java.lang.String.java_class]).call(value),::VertxAmqpClient::AmqpMessageBuilder)
      end
      raise ArgumentError, "Invalid arguments when calling with_body(#{value})"
    end

### - (`::VertxAmqpClient::AmqpMessageBuilder`) with_boolean_as_body(v = nil)

Parameters:

- v (`true`, `false`) (defaults to: `nil`)

Returns:

- (`::VertxAmqpClient::AmqpMessageBuilder`)

Raises:

- (`ArgumentError`)

    207
    208
    209
    210
    211
    212
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb', line 207

    def with_boolean_as_body(v=nil)
      if (v.class == TrueClass || v.class == FalseClass) && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:withBooleanAsBody, [Java::boolean.java_class]).call(v),::VertxAmqpClient::AmqpMessageBuilder)
      end
      raise ArgumentError, "Invalid arguments when calling with_boolean_as_body(#{v})"
    end

### - (`::VertxAmqpClient::AmqpMessageBuilder`) with_buffer_as_body(buffer = nil)

Parameters:

- buffer (`::Vertx::Buffer`) (defaults to: `nil`)

Returns:

- (`::VertxAmqpClient::AmqpMessageBuilder`)

Raises:

- (`ArgumentError`)

    271
    272
    273
    274
    275
    276
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb', line 271

    def with_buffer_as_body(buffer=nil)
      if buffer.class.method_defined?(:j_del) && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:withBufferAsBody, [Java::IoVertxCoreBuffer::Buffer.java_class]).call(buffer.j_del),::VertxAmqpClient::AmqpMessageBuilder)
      end
      raise ArgumentError, "Invalid arguments when calling with_buffer_as_body(#{buffer})"
    end

### - (`::VertxAmqpClient::AmqpMessageBuilder`) with_byte_as_body(v = nil)

Parameters:

- v (`Fixnum`) (defaults to: `nil`)

Returns:

- (`::VertxAmqpClient::AmqpMessageBuilder`)

Raises:

- (`ArgumentError`)

    215
    216
    217
    218
    219
    220
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb', line 215

    def with_byte_as_body(v=nil)
      if v.class == Fixnum && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:withByteAsBody, [Java::byte.java_class]).call(::Vertx::Util::Utils.to_byte(v)),::VertxAmqpClient::AmqpMessageBuilder)
      end
      raise ArgumentError, "Invalid arguments when calling with_byte_as_body(#{v})"
    end

### - (`::VertxAmqpClient::AmqpMessageBuilder`) with_char_as_body(c = nil)

Parameters:

- c (`Fixnum`) (defaults to: `nil`)

Returns:

- (`::VertxAmqpClient::AmqpMessageBuilder`)

Raises:

- (`ArgumentError`)

    263
    264
    265
    266
    267
    268
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb', line 263

    def with_char_as_body(c=nil)
      if c.class == Fixnum && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:withCharAsBody, [Java::char.java_class]).call(::Vertx::Util::Utils.to_character(c)),::VertxAmqpClient::AmqpMessageBuilder)
      end
      raise ArgumentError, "Invalid arguments when calling with_char_as_body(#{c})"
    end

### - (`::VertxAmqpClient::AmqpMessageBuilder`) with_double_as_body(v = nil)

Parameters:

- v (`Float`) (defaults to: `nil`)

Returns:

- (`::VertxAmqpClient::AmqpMessageBuilder`)

Raises:

- (`ArgumentError`)

    255
    256
    257
    258
    259
    260
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb', line 255

    def with_double_as_body(v=nil)
      if v.class == Float && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:withDoubleAsBody, [Java::double.java_class]).call(::Vertx::Util::Utils.to_double(v)),::VertxAmqpClient::AmqpMessageBuilder)
      end
      raise ArgumentError, "Invalid arguments when calling with_double_as_body(#{v})"
    end

### - (`::VertxAmqpClient::AmqpMessageBuilder`) with_float_as_body(v = nil)

Parameters:

- v (`Float`) (defaults to: `nil`)

Returns:

- (`::VertxAmqpClient::AmqpMessageBuilder`)

Raises:

- (`ArgumentError`)

    247
    248
    249
    250
    251
    252
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb', line 247

    def with_float_as_body(v=nil)
      if v.class == Float && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:withFloatAsBody, [Java::float.java_class]).call(::Vertx::Util::Utils.to_float(v)),::VertxAmqpClient::AmqpMessageBuilder)
      end
      raise ArgumentError, "Invalid arguments when calling with_float_as_body(#{v})"
    end

### - (`::VertxAmqpClient::AmqpMessageBuilder`) with_integer_as_body(v = nil)

Parameters:

- v (`Fixnum`) (defaults to: `nil`)

Returns:

- (`::VertxAmqpClient::AmqpMessageBuilder`)

Raises:

- (`ArgumentError`)

    231
    232
    233
    234
    235
    236
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb', line 231

    def with_integer_as_body(v=nil)
      if v.class == Fixnum && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:withIntegerAsBody, [Java::int.java_class]).call(v),::VertxAmqpClient::AmqpMessageBuilder)
      end
      raise ArgumentError, "Invalid arguments when calling with_integer_as_body(#{v})"
    end

### - (`::VertxAmqpClient::AmqpMessageBuilder`) with_json_array_as_body(json = nil)

Parameters:

- json (`Array<String,Object>`) (defaults to: `nil`)

Returns:

- (`::VertxAmqpClient::AmqpMessageBuilder`)

Raises:

- (`ArgumentError`)

    287
    288
    289
    290
    291
    292
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb', line 287

    def with_json_array_as_body(json=nil)
      if json.class == Array && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:withJsonArrayAsBody, [Java::IoVertxCoreJson::JsonArray.java_class]).call(::Vertx::Util::Utils.to_json_array(json)),::VertxAmqpClient::AmqpMessageBuilder)
      end
      raise ArgumentError, "Invalid arguments when calling with_json_array_as_body(#{json})"
    end

### - (`::VertxAmqpClient::AmqpMessageBuilder`) with_json_object_as_body(json = nil)

Parameters:

- json (`Hash{String => Object}`) (defaults to: `nil`)

Returns:

- (`::VertxAmqpClient::AmqpMessageBuilder`)

Raises:

- (`ArgumentError`)

    279
    280
    281
    282
    283
    284
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb', line 279

    def with_json_object_as_body(json=nil)
      if json.class == Hash && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:withJsonObjectAsBody, [Java::IoVertxCoreJson::JsonObject.java_class]).call(::Vertx::Util::Utils.to_json_object(json)),::VertxAmqpClient::AmqpMessageBuilder)
      end
      raise ArgumentError, "Invalid arguments when calling with_json_object_as_body(#{json})"
    end

### - (`::VertxAmqpClient::AmqpMessageBuilder`) with_long_as_body(v = nil)

Parameters:

- v (`Fixnum`) (defaults to: `nil`)

Returns:

- (`::VertxAmqpClient::AmqpMessageBuilder`)

Raises:

- (`ArgumentError`)

    239
    240
    241
    242
    243
    244
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb', line 239

    def with_long_as_body(v=nil)
      if v.class == Fixnum && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:withLongAsBody, [Java::long.java_class]).call(v),::VertxAmqpClient::AmqpMessageBuilder)
      end
      raise ArgumentError, "Invalid arguments when calling with_long_as_body(#{v})"
    end

### - (`::VertxAmqpClient::AmqpMessageBuilder`) with_short_as_body(v = nil)

Parameters:

- v (`Fixnum`) (defaults to: `nil`)

Returns:

- (`::VertxAmqpClient::AmqpMessageBuilder`)

Raises:

- (`ArgumentError`)

    223
    224
    225
    226
    227
    228
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb', line 223

    def with_short_as_body(v=nil)
      if v.class == Fixnum && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:withShortAsBody, [Java::short.java_class]).call(::Vertx::Util::Utils.to_short(v)),::VertxAmqpClient::AmqpMessageBuilder)
      end
      raise ArgumentError, "Invalid arguments when calling with_short_as_body(#{v})"
    end

### - (`::VertxAmqpClient::AmqpMessageBuilder`) with_symbol_as_body(value = nil)

Parameters:

- value (`String`) (defaults to: `nil`)

Returns:

- (`::VertxAmqpClient::AmqpMessageBuilder`)

Raises:

- (`ArgumentError`)

    135
    136
    137
    138
    139
    140
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-amqp-client/amqp_message_builder.rb', line 135

    def with_symbol_as_body(value=nil)
      if value.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:withSymbolAsBody, [Java::java.lang.String.java_class]).call(value),::VertxAmqpClient::AmqpMessageBuilder)
      end
      raise ArgumentError, "Invalid arguments when calling with_symbol_as_body(#{value})"
    end