Class: ElasticSearch::Thrift::RestResponse
- Inherits:
-
Object
- Object
- ElasticSearch::Thrift::RestResponse
- Includes:
- Thrift::Struct, Thrift::Struct_Union
- Defined in:
- lib/elasticsearch/transport/thrift/elasticsearch_types.rb
Constant Summary collapse
- STATUS =
1
- HEADERS =
2
- BODY =
3
- FIELDS =
{ STATUS => {:type => ::Thrift::Types::I32, :name => 'status', :enum_class => ElasticSearch::Thrift::Status}, HEADERS => {:type => ::Thrift::Types::MAP, :name => 'headers', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}, :optional => true}, BODY => {:type => ::Thrift::Types::STRING, :name => 'body', :binary => true, :optional => true} }
Instance Method Summary collapse
Instance Method Details
#struct_fields ⇒ Object
111 |
# File 'lib/elasticsearch/transport/thrift/elasticsearch_types.rb', line 111 def struct_fields; FIELDS; end |
#validate ⇒ Object
113 114 115 116 117 118 |
# File 'lib/elasticsearch/transport/thrift/elasticsearch_types.rb', line 113 def validate raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status unless @status.nil? || ElasticSearch::Thrift::Status::VALID_VALUES.include?(@status) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field status!') end end |