Class: ElasticSearch::Thrift::RestResponse
- Inherits:
-
Object
- Object
- ElasticSearch::Thrift::RestResponse
- Includes:
- Thrift::Struct, Thrift::Struct_Union
- Defined in:
- lib/elastic_search/thrift/elastic_search_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
110 |
# File 'lib/elastic_search/thrift/elastic_search_types.rb', line 110 def struct_fields; FIELDS; end |
#validate ⇒ Object
112 113 114 115 116 117 |
# File 'lib/elastic_search/thrift/elastic_search_types.rb', line 112 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 |