Class: Storm::JavaObjectArg
- Inherits:
-
Thrift::Union
- Object
- Thrift::Union
- Storm::JavaObjectArg
- Includes:
- Thrift::Struct_Union
- Defined in:
- lib/storm/thrift/storm_types.rb
Constant Summary collapse
- INT_ARG =
1
- LONG_ARG =
2
- STRING_ARG =
3
- BOOL_ARG =
4
- BINARY_ARG =
5
- DOUBLE_ARG =
6
- FIELDS =
{ INT_ARG => {:type => ::Thrift::Types::I32, :name => 'int_arg'}, LONG_ARG => {:type => ::Thrift::Types::I64, :name => 'long_arg'}, STRING_ARG => {:type => ::Thrift::Types::STRING, :name => 'string_arg'}, BOOL_ARG => {:type => ::Thrift::Types::BOOL, :name => 'bool_arg'}, BINARY_ARG => {:type => ::Thrift::Types::STRING, :name => 'binary_arg', :binary => true}, DOUBLE_ARG => {:type => ::Thrift::Types::DOUBLE, :name => 'double_arg'} }
Class Method Summary collapse
- .binary_arg(val) ⇒ Object
- .bool_arg(val) ⇒ Object
- .double_arg(val) ⇒ Object
- .int_arg(val) ⇒ Object
- .long_arg(val) ⇒ Object
- .string_arg(val) ⇒ Object
Instance Method Summary collapse
Class Method Details
.binary_arg(val) ⇒ Object
29 30 31 |
# File 'lib/storm/thrift/storm_types.rb', line 29 def binary_arg(val) JavaObjectArg.new(:binary_arg, val) end |
.bool_arg(val) ⇒ Object
25 26 27 |
# File 'lib/storm/thrift/storm_types.rb', line 25 def bool_arg(val) JavaObjectArg.new(:bool_arg, val) end |
.double_arg(val) ⇒ Object
33 34 35 |
# File 'lib/storm/thrift/storm_types.rb', line 33 def double_arg(val) JavaObjectArg.new(:double_arg, val) end |
.int_arg(val) ⇒ Object
13 14 15 |
# File 'lib/storm/thrift/storm_types.rb', line 13 def int_arg(val) JavaObjectArg.new(:int_arg, val) end |
.long_arg(val) ⇒ Object
17 18 19 |
# File 'lib/storm/thrift/storm_types.rb', line 17 def long_arg(val) JavaObjectArg.new(:long_arg, val) end |
.string_arg(val) ⇒ Object
21 22 23 |
# File 'lib/storm/thrift/storm_types.rb', line 21 def string_arg(val) JavaObjectArg.new(:string_arg, val) end |
Instance Method Details
#struct_fields ⇒ Object
54 |
# File 'lib/storm/thrift/storm_types.rb', line 54 def struct_fields; FIELDS; end |
#validate ⇒ Object
56 57 58 |
# File 'lib/storm/thrift/storm_types.rb', line 56 def validate raise(StandardError, 'Union fields are not set.') if get_set_field.nil? || get_value.nil? end |