# # Autogenerated by Thrift Compiler (0.8.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # require 'statestore_types_types' require 'status_types' require 'types_types' module Impala module Protocol module StateStoreSubscriberServiceVersion V1 = 0 VALUE_MAP = { 0 => "V1" } VALID_VALUES = Set.new([V1]).freeze end class TUpdateStateRequest include ::Thrift::Struct, ::Thrift::Struct_Union PROTOCOLVERSION = 1 SERVICE_MEMBERSHIPS = 2 UPDATED_OBJECTS = 3 DELETED_OBJECT_KEYS = 4 FIELDS = { PROTOCOLVERSION => { :type => ::Thrift::Types::I32, :name => 'protocolVersion', :default => 0, :enum_class => Impala::Protocol::StateStoreSubscriberServiceVersion }, SERVICE_MEMBERSHIPS => { :type => ::Thrift::Types::LIST, :name => 'service_memberships', :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TServiceMembership }, :optional => true }, UPDATED_OBJECTS => { :type => ::Thrift::Types::LIST, :name => 'updated_objects', :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TVersionedObject }, :optional => true }, DELETED_OBJECT_KEYS => { :type => ::Thrift::Types::LIST, :name => 'deleted_object_keys', :element => { :type => ::Thrift::Types::STRING }, :optional => true } } def struct_fields; FIELDS; end def validate raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field protocolVersion is unset!') unless @protocolVersion unless @protocolVersion.nil? || Impala::Protocol::StateStoreSubscriberServiceVersion::VALID_VALUES.include?(@protocolVersion) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field protocolVersion!') end end ::Thrift::Struct.generate_accessors self end class TUpdateStateResponse include ::Thrift::Struct, ::Thrift::Struct_Union STATUS = 1 UPDATED_OBJECTS = 2 DELETED_OBJECT_KEYS = 3 FIELDS = { STATUS => { :type => ::Thrift::Types::STRUCT, :name => 'status', :class => Impala::Protocol::TStatus, :optional => true }, UPDATED_OBJECTS => { :type => ::Thrift::Types::LIST, :name => 'updated_objects', :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TVersionedObject }, :optional => true }, DELETED_OBJECT_KEYS => { :type => ::Thrift::Types::LIST, :name => 'deleted_object_keys', :element => { :type => ::Thrift::Types::STRING }, :optional => true } } def struct_fields; FIELDS; end def validate end ::Thrift::Struct.generate_accessors self end end end