Class: CadenceThrift::DataBlob

Inherits:
Object
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/gen/thrift/shared_types.rb,
lib/gen/thrift/shared_types.rb

Constant Summary collapse

ENCODINGTYPE =
10
DATA =
20
FIELDS =
{
  ENCODINGTYPE => {:type => ::Thrift::Types::I32, :name => 'EncodingType', :optional => true, :enum_class => ::CadenceThrift::EncodingType},
  DATA => {:type => ::Thrift::Types::STRING, :name => 'Data', :binary => true, :optional => true}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



952
# File 'lib/gen/thrift/shared_types.rb', line 952

def struct_fields; FIELDS; end

#validateObject



954
955
956
957
958
# File 'lib/gen/thrift/shared_types.rb', line 954

def validate
  unless @EncodingType.nil? || ::CadenceThrift::EncodingType::VALID_VALUES.include?(@EncodingType)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field EncodingType!')
  end
end