text:
"""Disassembler engine for disassemble and instrumentation base on Capstone
disassemble engine.

"""

import struct
import os
from Log import LoggerFactory

class CodeManager(object):

    def __init__(self, code, rva):
        self.code = code
        self.rva = rva
        self.log = LoggerFactory().get_new_logger("Instrument.log")
        self._code_need_handled = True

    def __del__(self):
        self.log.fin()

    def get_base_rva(self):
        return self.rva

    def get_dword_from_offset(self, offset, offset_end):
        return self.get_data_from_offset_with_format(offset, offset_end)

    def get_data_from_offset_with_format(self, offset, offset_end):
        size = offset_end - offset
        return struct.unpack(self.get_format_from_size(size),
                             self.code[offset:offset_end])[0]

    def get_data_at_offset(self, offset, offset_end):
        return self.code[offset:offset_end]

    def instrument(self, offset, instrument_instruction):
        self.log.log(
            '[0] [0x{:05x}]\t{}\n'.format(offset, instrument_instruction))
        self.code[offset:offset] = instrument_instruction
        self.need_code_handle()

    def instrument_with_replace(self, offset, origin_instruction_size,
                                instrument_instruction):
        self.log.log(
            '[0] [0x{:05x}]\t{}\n'.format(offset, instrument_instruction))
        self.code[offset:origin_instruction_size] = instrument_instruction
        self.need_code_handle()

    def instrument_at_last(self, instrument_instruction):
        offset = len(self.code) - 1
        self.log.log("[LAST]")
        self.instrument(offset, instrument_instruction)
        return offset

    def set_instruction_at_offset(self, offset, offset_end, instruction):
        self.log.log(
            '[1] [0x{:05x}]\t{} \t{} \n'.format(offset,
                                                self.code[offset:offset_end],
                                                instruction))
        self.code[offset:offset_end] = instruction
        self.need_code_handle()

    def set_data_at_offset_with_format(self, offset, offset_end, data):
        size = offset_end - offset
        fmt = self.get_format_from_size(size)
        unpack_data = struct.unpack(fmt, self.code[offset:offset_end])
        self.log.log('[2] [0x{:05x}]\t{} \t{} \n'.format(offset,
                                                         unpack_data,
                                                         data))
        self.code[offset:offset_end] = struct.pack(fmt, data)
        self.need_code_handle()

    def get_code(self):
        return self.code

    def is_need_code_handle(self):
        return self._code_need_handled

    def code_handled(self):
        self._code_need_handled = False

    def need_code_handle(self):
        self._code_need_handled = True

    @staticmethod
    def get_format_from_size(size):
        if size == 8:
            fmt = 'q'
        elif size == 4:
            fmt = 'i'
        elif size == 2:
            fmt = 'h'
        elif size == 1:
            fmt = 'b'
        else:
            fmt = None
        return fmt

    @staticmethod
    def get_format_from_size_little_endian(size):
        if size == 8:
            fmt = '<q'
        elif size == 4:
            fmt = '<i'
        elif size == 2:
            fmt = '<h'
        elif size == 1:
            fmt = '<b'
        else:
            fmt = None
            print("ERROR")
            exit()
        return fmt

    def get_data_from_rva(self, rva, length):
        zero_relative_rva = rva - self.rva
        data = self.get_data_at_offset(zero_relative_rva,
                                       zero_relative_rva + length)
        return data


text:
extern PROTOBUF_INTERNAL_EXPORT_RpcHeader_2eproto ::PROTOBUF_NAMESPACE_ID::
    internal::SCCInfo<0>
        scc_info_RpcSaslProto_SaslAuth_RpcHeader_2eproto;
namespace Hdfs {
namespace Internal {
class RpcRequestHeaderProtoDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<
      RpcRequestHeaderProto>
      _instance;
} _RpcRequestHeaderProto_default_instance_;
class RpcResponseHeaderProtoDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<
      RpcResponseHeaderProto>
      _instance;
} _RpcResponseHeaderProto_default_instance_;
class RpcSaslProto_SaslAuthDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<
      RpcSaslProto_SaslAuth>
      _instance;
} _RpcSaslProto_SaslAuth_default_instance_;
class RpcSaslProtoDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<RpcSaslProto>
      _instance;
} _RpcSaslProto_default_instance_;
}  // namespace Internal
}  // namespace Hdfs
static void InitDefaultsscc_info_RpcRequestHeaderProto_RpcHeader_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::Hdfs::Internal::_RpcRequestHeaderProto_default_instance_;
    new (ptr)::Hdfs::Internal::RpcRequestHeaderProto();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::Hdfs::Internal::RpcRequestHeaderProto::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0>
    scc_info_RpcRequestHeaderProto_RpcHeader_2eproto = {
        {ATOMIC_VAR_INIT(
             ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized),
         0, 0, InitDefaultsscc_info_RpcRequestHeaderProto_RpcHeader_2eproto},
        {}};

static void InitDefaultsscc_info_RpcResponseHeaderProto_RpcHeader_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::Hdfs::Internal::_RpcResponseHeaderProto_default_instance_;
    new (ptr)::Hdfs::Internal::RpcResponseHeaderProto();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::Hdfs::Internal::RpcResponseHeaderProto::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0>
    scc_info_RpcResponseHeaderProto_RpcHeader_2eproto = {
        {ATOMIC_VAR_INIT(
             ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized),
         0, 0, InitDefaultsscc_info_RpcResponseHeaderProto_RpcHeader_2eproto},
        {}};

static void InitDefaultsscc_info_RpcSaslProto_RpcHeader_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::Hdfs::Internal::_RpcSaslProto_default_instance_;
    new (ptr)::Hdfs::Internal::RpcSaslProto();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::Hdfs::Internal::RpcSaslProto::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1>
    scc_info_RpcSaslProto_RpcHeader_2eproto = {
        {ATOMIC_VAR_INIT(
             ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized),
         1, 0, InitDefaultsscc_info_RpcSaslProto_RpcHeader_2eproto},
        {
            &scc_info_RpcSaslProto_SaslAuth_RpcHeader_2eproto.base,
        }};

static void InitDefaultsscc_info_RpcSaslProto_SaslAuth_RpcHeader_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::Hdfs::Internal::_RpcSaslProto_SaslAuth_default_instance_;
    new (ptr)::Hdfs::Internal::RpcSaslProto_SaslAuth();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::Hdfs::Internal::RpcSaslProto_SaslAuth::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0>
    scc_info_RpcSaslProto_SaslAuth_RpcHeader_2eproto = {
        {ATOMIC_VAR_INIT(
             ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized),
         0, 0, InitDefaultsscc_info_RpcSaslProto_SaslAuth_RpcHeader_2eproto},
        {}};

static ::PROTOBUF_NAMESPACE_ID::Metadata
    file_level_metadata_RpcHeader_2eproto[4];
static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor*
    file_level_enum_descriptors_RpcHeader_2eproto[5];
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const**
    file_level_service_descriptors_RpcHeader_2eproto = nullptr;

const ::PROTOBUF_NAMESPACE_ID::uint32
    TableStruct_RpcHeader_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(
        protodesc_cold) = {
        PROTOBUF_FIELD_OFFSET(::Hdfs::Internal::RpcRequestHeaderProto,
                              _has_bits_),
        PROTOBUF_FIELD_OFFSET(::Hdfs::Internal::RpcRequestHeaderProto,
                              _internal_metadata_),
        ~0u,  // no _extensions_
        ~0u,  // no _oneof_case_
        ~0u,  // no _weak_field_map_
        PROTOBUF_FIELD_OFFSET(::Hdfs::Internal::RpcRequestHeaderProto,
                              rpckind_),
        PROTOBUF_FIELD_OFFSET(::Hdfs::Internal::RpcRequestHeaderProto, rpcop_),
        PROTOBUF_FIELD_OFFSET(::Hdfs::Internal::RpcRequestHeaderProto, callid_),
        PROTOBUF_FIELD_OFFSET(::Hdfs::Internal::RpcRequestHeaderProto,
                              clientid_),
        PROTOBUF_FIELD_OFFSET(::Hdfs::Internal::RpcRequestHeaderProto,
                              retrycount_),
        1,
        2,
        3,
        0,
        4,
        PROTOBUF_FIELD_OFFSET(::Hdfs::Internal::RpcResponseHeaderProto,
                              _has_bits_),
        PROTOBUF_FIELD_OFFSET(::Hdfs::Internal::RpcResponseHeaderProto,
                              _internal_metadata_),
        ~0u,  // no _extensions_
        ~0u,  // no _oneof_case_
        ~0u,  // no _weak_field_map_
        PROTOBUF_FIELD_OFFSET(::Hdfs::Internal::RpcResponseHeaderProto,
                              callid_),
        PROTOBUF_FIELD_OFFSET(::Hdfs::Internal::RpcResponseHeaderProto,
                              status_),
        PROTOBUF_FIELD_OFFSET(::Hdfs::Internal::RpcResponseHeaderProto,
                              serveripcversionnum_),
        PROTOBUF_FIELD_OFFSET(::Hdfs::Internal::RpcResponseHeaderProto,
                              exceptionclassname_),
        PROTOBUF_FIELD_OFFSET(::Hdfs::Internal::RpcResponseHeaderProto,
                              errormsg_),
        PROTOBUF_FIELD_OFFSET(::Hdfs::Internal::RpcResponseHeaderProto,
                              errordetail_),
        PROTOBUF_FIELD_OFFSET(::Hdfs::Internal::RpcResponseHeaderProto,
                              clientid_),
        PROTOBUF_FIELD_OFFSET(::Hdfs::Internal::RpcResponseHeaderProto,
                              retrycount_),
        3,
        4,
        5,
        0,
        1,
        6,
        2,
        7,
        PROTOBUF_FIELD_OFFSET(::Hdfs::Internal::RpcSaslProto_SaslAuth,
                              _has_bits_),
        PROTOBUF_FIELD_OFFSET(::Hdfs::Internal::RpcSaslProto_SaslAuth,
                              _internal_metadata_),
        ~0u,  // no _extensions_
        ~0u,  // no _oneof_case_
        ~0u,  // no _weak_field_map_
        PROTOBUF_FIELD_OFFSET(::Hdfs::Internal::RpcSaslProto_SaslAuth, method_),
        PROTOBUF_FIELD_OFFSET(::Hdfs::Internal::RpcSaslProto_SaslAuth,
                              mechanism_),
        PROTOBUF_FIELD_OFFSET(::Hdfs::Internal::RpcSaslProto_SaslAuth,
                              protocol_),
        PROTOBUF_FIELD_OFFSET(::Hdfs::Internal::RpcSaslProto_SaslAuth,
                              serverid_),
        PROTOBUF_FIELD_OFFSET(::Hdfs::Internal::RpcSaslProto_SaslAuth,
                              challenge_),
        0,
        1,
        2,
        3,
        4,
        PROTOBUF_FIELD_OFFSET(::Hdfs::Internal::RpcSaslProto, _has_bits_),
        PROTOBUF_FIELD_OFFSET(::Hdfs::Internal::RpcSaslProto,
                              _internal_metadata_),
        ~0u,  // no _extensions_
        ~0u,  // no _oneof_case_
        ~0u,  // no _weak_field_map_
        PROTOBUF_FIELD_OFFSET(::Hdfs::Internal::RpcSaslProto, version_),
        PROTOBUF_FIELD_OFFSET(::Hdfs::Internal::RpcSaslProto, state_),
        PROTOBUF_FIELD_OFFSET(::Hdfs::Internal::RpcSaslProto, token_),
        PROTOBUF_FIELD_OFFSET(::Hdfs::Internal::RpcSaslProto, auths_),
        1,
        2,
        0,
        ~0u,
};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema
    schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
        {0, 10, sizeof(::Hdfs::Internal::RpcRequestHeaderProto)},
        {15, 28, sizeof(::Hdfs::Internal::RpcResponseHeaderProto)},
        {36, 46, sizeof(::Hdfs::Internal::RpcSaslProto_SaslAuth)},
        {51, 60, sizeof(::Hdfs::Internal::RpcSaslProto)},
};

static ::PROTOBUF_NAMESPACE_ID::Message const* const file_default_instances[] =
    {
        reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(
            &::Hdfs::Internal::_RpcRequestHeaderProto_default_instance_),
        reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(
            &::Hdfs::Internal::_RpcResponseHeaderProto_default_instance_),
        reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(
            &::Hdfs::Internal::_RpcSaslProto_SaslAuth_default_instance_),
        reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(
            &::Hdfs::Internal::_RpcSaslProto_default_instance_),
};

const char
    descriptor_table_protodef_RpcHeader_2eproto[] PROTOBUF_SECTION_VARIABLE(
        protodesc_cold) =
        "\n\017RpcHeader.proto\022\rHdfs.Internal\"\242\002\n\025Rpc"
        "RequestHeaderProto\022,\n\007rpcKind\030\001 \001(\0162\033.Hd"
        "fs.Internal.RpcKindProto\022B\n\005rpcOp\030\002 \001(\0162"
        "3.Hdfs.Internal.RpcRequestHeaderProto.Op"
        "erationProto\022\016\n\006callId\030\003 "
        "\002(\021\022\020\n\010clientId"
        "\030\004 \002(\014\022\026\n\nretryCount\030\005 "
        "\001(\021:\002-1\"]\n\016Operat"
        "ionProto\022\024\n\020RPC_FINAL_PACKET\020\000\022\033\n\027RPC_CO"
        "NTINUATION_PACKET\020\001\022\030\n\024RPC_CLOSE_CONNECT"
        "ION\020\002\"\312\005\n\026RpcResponseHeaderProto\022\016\n\006call"
        "Id\030\001 \002(\r\022D\n\006status\030\002 \002(\01624.Hdfs.Internal"
        ".RpcResponseHeaderProto.RpcStatusProto\022\033"
        "\n\023serverIpcVersionNum\030\003 \001(\r\022\032\n\022exception"
        "ClassName\030\004 \001(\t\022\020\n\010errorMsg\030\005 "
        "\001(\t\022L\n\013err"
        "orDetail\030\006 \001(\01627.Hdfs.Internal.RpcRespon"
        "seHeaderProto.RpcErrorCodeProto\022\020\n\010clien"
        "tId\030\007 \001(\014\022\026\n\nretryCount\030\010 "
        "\001(\021:\002-1\"3\n\016Rpc"
        "StatusProto\022\013\n\007SUCCESS\020\000\022\t\n\005ERROR\020\001\022"
        "\t\n\005F"
        "ATAL\020\002\"\341\002\n\021RpcErrorCodeProto\022\025\n\021ERROR_AP"
        "PLICATION\020\001\022\030\n\024ERROR_NO_SUCH_METHOD\020\002\022\032\n"
        "\026ERROR_NO_SUCH_PROTOCOL\020\003\022\024\n\020ERROR_RPC_S"
        "ERVER\020\004\022\036\n\032ERROR_SERIALIZING_RESPONSE\020\005\022"
        "\036\n\032ERROR_RPC_VERSION_MISMATCH\020\006\022\021\n\rFATAL"
        "_UNKNOWN\020\n\022#\n\037FATAL_UNSUPPORTED_SERIALIZ"
        "ATION\020\013\022\034\n\030FATAL_INVALID_RPC_HEADER\020\014\022\037\n"
        "\033FATAL_DESERIALIZING_REQUEST\020\r\022\032\n\026FATAL_"
        "VERSION_MISMATCH\020\016\022\026\n\022FATAL_UNAUTHORIZED"
        "\020\017\"\335\002\n\014RpcSaslProto\022\017\n\007version\030\001 "
        "\001(\r\0224\n\005"
        "state\030\002 \002(\0162%.Hdfs.Internal.RpcSaslProto"
        ".SaslState\022\r\n\005token\030\003 \001(\014\0223\n\005auths\030\004 "
        "\003(\013"
        "2$.Hdfs.Internal.RpcSaslProto.SaslAuth\032d"
        "\n\010SaslAuth\022\016\n\006method\030\001 "
        "\002(\t\022\021\n\tmechanism\030"
        "\002 \002(\t\022\020\n\010protocol\030\003 "
        "\001(\t\022\020\n\010serverId\030\004 \001("
        "\t\022\021\n\tchallenge\030\005 "
        "\001(\014\"\\\n\tSaslState\022\013\n\007SUC"
        "CESS\020\000\022\r\n\tNEGOTIATE\020\001\022\014\n\010INITIATE\020\002"
        "\022\r\n\tC"
        "HALLENGE\020\003\022\014\n\010RESPONSE\020\004\022\010\n\004WRAP\020"
        "\005*J\n\014Rp"
        "cKindProto\022\017\n\013RPC_BUILTIN\020\000\022\020\n\014RPC_WRITA"
        "BLE\020\001\022\027\n\023RPC_PROTOCOL_BUFFER\020\002B4\n\036org.ap"
        "ache.hadoop.ipc.protobufB\017RpcHeaderProto"
        "s\240\001\001";
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* const
    descriptor_table_RpcHeader_2eproto_deps[1] = {};
static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase* const
    descriptor_table_RpcHeader_2eproto_sccs[4] = {
        &scc_info_RpcRequestHeaderProto_RpcHeader_2eproto.base,
        &scc_info_RpcResponseHeaderProto_RpcHeader_2eproto.base,
        &scc_info_RpcSaslProto_RpcHeader_2eproto.base,
        &scc_info_RpcSaslProto_SaslAuth_RpcHeader_2eproto.base,
};
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag
    descriptor_table_RpcHeader_2eproto_once;
static bool descriptor_table_RpcHeader_2eproto_initialized = false;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable
    descriptor_table_RpcHeader_2eproto = {
        &descriptor_table_RpcHeader_2eproto_initialized,
        descriptor_table_protodef_RpcHeader_2eproto,
        "RpcHeader.proto",
        1524,
        &descriptor_table_RpcHeader_2eproto_once,
        descriptor_table_RpcHeader_2eproto_sccs,
        descriptor_table_RpcHeader_2eproto_deps,
        4,
        0,
        schemas,
        file_default_instances,
        TableStruct_RpcHeader_2eproto::offsets,
        file_level_metadata_RpcHeader_2eproto,
        4,
        file_level_enum_descriptors_RpcHeader_2eproto,
        file_level_service_descriptors_RpcHeader_2eproto,
};

// Force running AddDescriptors() at dynamic initialization time.
static bool dynamic_init_dummy_RpcHeader_2eproto =
    (::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(
         &descriptor_table_RpcHeader_2eproto),
     true);
namespace Hdfs {
namespace Internal {
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor*
RpcRequestHeaderProto_OperationProto_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_RpcHeader_2eproto);
  return file_level_enum_descriptors_RpcHeader_2eproto[0];
}
bool RpcRequestHeaderProto_OperationProto_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
constexpr RpcRequestHeaderProto_OperationProto
    RpcRequestHeaderProto::RPC_FINAL_PACKET;
constexpr RpcRequestHeaderProto_OperationProto
    RpcRequestHeaderProto::RPC_CONTINUATION_PACKET;
constexpr RpcRequestHeaderProto_OperationProto
    RpcRequestHeaderProto::RPC_CLOSE_CONNECTION;
constexpr RpcRequestHeaderProto_OperationProto
    RpcRequestHeaderProto::OperationProto_MIN;
constexpr RpcRequestHeaderProto_OperationProto
    RpcRequestHeaderProto::OperationProto_MAX;
constexpr int RpcRequestHeaderProto::OperationProto_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor*
RpcResponseHeaderProto_RpcStatusProto_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_RpcHeader_2eproto);
  return file_level_enum_descriptors_RpcHeader_2eproto[1];
}
bool RpcResponseHeaderProto_RpcStatusProto_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
constexpr RpcResponseHeaderProto_RpcStatusProto RpcResponseHeaderProto::SUCCESS;
constexpr RpcResponseHeaderProto_RpcStatusProto RpcResponseHeaderProto::ERROR;
constexpr RpcResponseHeaderProto_RpcStatusProto RpcResponseHeaderProto::FATAL;
constexpr RpcResponseHeaderProto_RpcStatusProto
    RpcResponseHeaderProto::RpcStatusProto_MIN;
constexpr RpcResponseHeaderProto_RpcStatusProto
    RpcResponseHeaderProto::RpcStatusProto_MAX;
constexpr int RpcResponseHeaderProto::RpcStatusProto_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor*
RpcResponseHeaderProto_RpcErrorCodeProto_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_RpcHeader_2eproto);
  return file_level_enum_descriptors_RpcHeader_2eproto[2];
}
bool RpcResponseHeaderProto_RpcErrorCodeProto_IsValid(int value) {
  switch (value) {
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
    case 6:
    case 10:
    case 11:
    case 12:
    case 13:
    case 14:
    case 15:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
constexpr RpcResponseHeaderProto_RpcErrorCodeProto
    RpcResponseHeaderProto::ERROR_APPLICATION;
constexpr RpcResponseHeaderProto_RpcErrorCodeProto
    RpcResponseHeaderProto::ERROR_NO_SUCH_METHOD;
constexpr RpcResponseHeaderProto_RpcErrorCodeProto
    RpcResponseHeaderProto::ERROR_NO_SUCH_PROTOCOL;
constexpr RpcResponseHeaderProto_RpcErrorCodeProto
    RpcResponseHeaderProto::ERROR_RPC_SERVER;
constexpr RpcResponseHeaderProto_RpcErrorCodeProto
    RpcResponseHeaderProto::ERROR_SERIALIZING_RESPONSE;
constexpr RpcResponseHeaderProto_RpcErrorCodeProto
    RpcResponseHeaderProto::ERROR_RPC_VERSION_MISMATCH;
constexpr RpcResponseHeaderProto_RpcErrorCodeProto
    RpcResponseHeaderProto::FATAL_UNKNOWN;
constexpr RpcResponseHeaderProto_RpcErrorCodeProto
    RpcResponseHeaderProto::FATAL_UNSUPPORTED_SERIALIZATION;
constexpr RpcResponseHeaderProto_RpcErrorCodeProto
    RpcResponseHeaderProto::FATAL_INVALID_RPC_HEADER;
constexpr RpcResponseHeaderProto_RpcErrorCodeProto
    RpcResponseHeaderProto::FATAL_DESERIALIZING_REQUEST;
constexpr RpcResponseHeaderProto_RpcErrorCodeProto
    RpcResponseHeaderProto::FATAL_VERSION_MISMATCH;
constexpr RpcResponseHeaderProto_RpcErrorCodeProto
    RpcResponseHeaderProto::FATAL_UNAUTHORIZED;
constexpr RpcResponseHeaderProto_RpcErrorCodeProto
    RpcResponseHeaderProto::RpcErrorCodeProto_MIN;
constexpr RpcResponseHeaderProto_RpcErrorCodeProto
    RpcResponseHeaderProto::RpcErrorCodeProto_MAX;
constexpr int RpcResponseHeaderProto::RpcErrorCodeProto_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor*
RpcSaslProto_SaslState_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_RpcHeader_2eproto);
  return file_level_enum_descriptors_RpcHeader_2eproto[3];
}
bool RpcSaslProto_SaslState_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
constexpr RpcSaslProto_SaslState RpcSaslProto::SUCCESS;
constexpr RpcSaslProto_SaslState RpcSaslProto::NEGOTIATE;
constexpr RpcSaslProto_SaslState RpcSaslProto::INITIATE;
constexpr RpcSaslProto_SaslState RpcSaslProto::CHALLENGE;
constexpr RpcSaslProto_SaslState RpcSaslProto::RESPONSE;
constexpr RpcSaslProto_SaslState RpcSaslProto::WRAP;
constexpr RpcSaslProto_SaslState RpcSaslProto::SaslState_MIN;
constexpr RpcSaslProto_SaslState RpcSaslProto::SaslState_MAX;
constexpr int RpcSaslProto::SaslState_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* RpcKindProto_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_RpcHeader_2eproto);
  return file_level_enum_descriptors_RpcHeader_2eproto[4];
}
bool RpcKindProto_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

// ===================================================================

void RpcRequestHeaderProto::InitAsDefaultInstance() {}
class RpcRequestHeaderProto::_Internal {
 public:
  using HasBits = decltype(std::declval<RpcRequestHeaderProto>()._has_bits_);
  static void set_has_rpckind(HasBits* has_bits) { (*has_bits)[0] |= 2u; }
  static void set_has_rpcop(HasBits* has_bits) { (*has_bits)[0] |= 4u; }
  static void set_has_callid(HasBits* has_bits) { (*has_bits)[0] |= 8u; }
  static void set_has_clientid(HasBits* has_bits) { (*has_bits)[0] |= 1u; }
  static void set_has_retrycount(HasBits* has_bits) { (*has_bits)[0] |= 16u; }
};

RpcRequestHeaderProto::RpcRequestHeaderProto()
    : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:Hdfs.Internal.RpcRequestHeaderProto)
}
RpcRequestHeaderProto::RpcRequestHeaderProto(const RpcRequestHeaderProto& from)
    : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  clientid_.UnsafeSetDefault(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (from._internal_has_clientid()) {
    clientid_.AssignWithDefault(
        &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
        from.clientid_);
  }
  ::memcpy(&rpckind_, &from.rpckind_,
           static_cast<size_t>(reinterpret_cast<char*>(&retrycount_) -
                               reinterpret_cast<char*>(&rpckind_)) +
               sizeof(retrycount_));
  // @@protoc_insertion_point(copy_constructor:Hdfs.Internal.RpcRequestHeaderProto)
}

void RpcRequestHeaderProto::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(
      &scc_info_RpcRequestHeaderProto_RpcHeader_2eproto.base);
  clientid_.UnsafeSetDefault(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  ::memset(&rpckind_, 0,
           static_cast<size_t>(reinterpret_cast<char*>(&callid_) -
                               reinterpret_cast<char*>(&rpckind_)) +
               sizeof(callid_));
  retrycount_ = -1;
}

RpcRequestHeaderProto::~RpcRequestHeaderProto() {
  // @@protoc_insertion_point(destructor:Hdfs.Internal.RpcRequestHeaderProto)
  SharedDtor();
}

void RpcRequestHeaderProto::SharedDtor() {
  clientid_.DestroyNoArena(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void RpcRequestHeaderProto::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const RpcRequestHeaderProto& RpcRequestHeaderProto::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(
      &::scc_info_RpcRequestHeaderProto_RpcHeader_2eproto.base);
  return *internal_default_instance();
}

void RpcRequestHeaderProto::Clear() {
  // @@protoc_insertion_point(message_clear_start:Hdfs.Internal.RpcRequestHeaderProto)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void)cached_has_bits;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    clientid_.ClearNonDefaultToEmptyNoArena();
  }
  if (cached_has_bits & 0x0000001eu) {
    ::memset(&rpckind_, 0,
             static_cast<size_t>(reinterpret_cast<char*>(&callid_) -
                                 reinterpret_cast<char*>(&rpckind_)) +
                 sizeof(callid_));
    retrycount_ = -1;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

const char* RpcRequestHeaderProto::_InternalParse(
    const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) \
  if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // optional .Hdfs.Internal.RpcKindProto rpcKind = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(
                static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
          ::PROTOBUF_NAMESPACE_ID::uint64 val =
              ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(
                  ::Hdfs::Internal::RpcKindProto_IsValid(val))) {
            _internal_set_rpckind(
                static_cast<::Hdfs::Internal::RpcKindProto>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(
                1, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional .Hdfs.Internal.RpcRequestHeaderProto.OperationProto rpcOp = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(
                static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
          ::PROTOBUF_NAMESPACE_ID::uint64 val =
              ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(
                  ::Hdfs::Internal::
                      RpcRequestHeaderProto_OperationProto_IsValid(val))) {
            _internal_set_rpcop(
                static_cast<
                    ::Hdfs::Internal::RpcRequestHeaderProto_OperationProto>(
                    val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(
                2, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // required sint32 callId = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(
                static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
          _Internal::set_has_callid(&has_bits);
          callid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarintZigZag32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // required bytes clientId = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(
                static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
          auto str = _internal_mutable_clientid();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(
              str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional sint32 retryCount = 5 [default = -1];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(
                static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) {
          _Internal::set_has_retrycount(&has_bits);
          retrycount_ =
              ::PROTOBUF_NAMESPACE_ID::internal::ReadVarintZigZag32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }    // while
success:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* RpcRequestHeaderProto::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target,
    ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:Hdfs.Internal.RpcRequestHeaderProto)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional .Hdfs.Internal.RpcKindProto rpcKind = 1;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target =
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
            1, this->_internal_rpckind(), target);
  }

  // optional .Hdfs.Internal.RpcRequestHeaderProto.OperationProto rpcOp = 2;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target =
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
            2, this->_internal_rpcop(), target);
  }

  // required sint32 callId = 3;
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target =
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteSInt32ToArray(
            3, this->_internal_callid(), target);
  }

  // required bytes clientId = 4;
  if (cached_has_bits & 0x00000001u) {
    target =
        stream->WriteBytesMaybeAliased(4, this->_internal_clientid(), target);
  }

  // optional sint32 retryCount = 5 [default = -1];
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target =
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteSInt32ToArray(
            5, this->_internal_retrycount(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::
        InternalSerializeUnknownFieldsToArray(
            _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:Hdfs.Internal.RpcRequestHeaderProto)
  return target;
}

size_t RpcRequestHeaderProto::RequiredFieldsByteSizeFallback() const {
  // @@protoc_insertion_point(required_fields_byte_size_fallback_start:Hdfs.Internal.RpcRequestHeaderProto)
  size_t total_size = 0;

  if (_internal_has_clientid()) {
    // required bytes clientId = 4;
    total_size +=
        1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
                this->_internal_clientid());
  }

  if (_internal_has_callid()) {
    // required sint32 callId = 3;
    total_size +=
        1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SInt32Size(
                this->_internal_callid());
  }

  return total_size;
}
size_t RpcRequestHeaderProto::ByteSizeLong() const {
  // @@protoc_insertion_point(message_byte_size_start:Hdfs.Internal.RpcRequestHeaderProto)
  size_t total_size = 0;

  if (((_has_bits_[0] & 0x00000009) ^ 0x00000009) ==
      0) {  // All required fields are present.
    // required bytes clientId = 4;
    total_size +=
        1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
                this->_internal_clientid());

    // required sint32 callId = 3;
    total_size +=
        1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SInt32Size(
                this->_internal_callid());

  } else {
    total_size += RequiredFieldsByteSizeFallback();
  }
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void)cached_has_bits;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000006u) {
    // optional .Hdfs.Internal.RpcKindProto rpcKind = 1;
    if (cached_has_bits & 0x00000002u) {
      total_size +=
          1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(
                  this->_internal_rpckind());
    }

    // optional .Hdfs.Internal.RpcRequestHeaderProto.OperationProto rpcOp = 2;
    if (cached_has_bits & 0x00000004u) {
      total_size +=
          1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(
                  this->_internal_rpcop());
    }
  }
  // optional sint32 retryCount = 5 [default = -1];
  if (cached_has_bits & 0x00000010u) {
    total_size +=
        1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SInt32Size(
                this->_internal_retrycount());
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void RpcRequestHeaderProto::MergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  // @@protoc_insertion_point(generalized_merge_from_start:Hdfs.Internal.RpcRequestHeaderProto)
  GOOGLE_DCHECK_NE(&from, this);
  const RpcRequestHeaderProto* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<RpcRequestHeaderProto>(
          &from);
  if (source == nullptr) {
    // @@protoc_insertion_point(generalized_merge_from_cast_fail:Hdfs.Internal.RpcRequestHeaderProto)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
    // @@protoc_insertion_point(generalized_merge_from_cast_success:Hdfs.Internal.RpcRequestHeaderProto)
    MergeFrom(*source);
  }
}

void RpcRequestHeaderProto::MergeFrom(const RpcRequestHeaderProto& from) {
  // @@protoc_insertion_point(class_specific_merge_from_start:Hdfs.Internal.RpcRequestHeaderProto)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    if (cached_has_bits & 0x00000001u) {
      _has_bits_[0] |= 0x00000001u;
      clientid_.AssignWithDefault(
          &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
          from.clientid_);
    }
    if (cached_has_bits & 0x00000002u) {
      rpckind_ = from.rpckind_;
    }
    if (cached_has_bits & 0x00000004u) {
      rpcop_ = from.rpcop_;
    }
    if (cached_has_bits & 0x00000008u) {
      callid_ = from.callid_;
    }
    if (cached_has_bits & 0x00000010u) {
      retrycount_ = from.retrycount_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

void RpcRequestHeaderProto::CopyFrom(
    const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  // @@protoc_insertion_point(generalized_copy_from_start:Hdfs.Internal.RpcRequestHeaderProto)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void RpcRequestHeaderProto::CopyFrom(const RpcRequestHeaderProto& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:Hdfs.Internal.RpcRequestHeaderProto)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool RpcRequestHeaderProto::IsInitialized() const {
  if ((_has_bits_[0] & 0x00000009) != 0x00000009) return false;
  return true;
}

void RpcRequestHeaderProto::InternalSwap(RpcRequestHeaderProto* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  clientid_.Swap(
      &other->clientid_,
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      GetArenaNoVirtual());
  swap(rpckind_, other->rpckind_);
  swap(rpcop_, other->rpcop_);
  swap(callid_, other->callid_);
  swap(retrycount_, other->retrycount_);
}

::PROTOBUF_NAMESPACE_ID::Metadata RpcRequestHeaderProto::GetMetadata() const {
  return GetMetadataStatic();
}

// ===================================================================

void RpcResponseHeaderProto::InitAsDefaultInstance() {}
class RpcResponseHeaderProto::_Internal {
 public:
  using HasBits = decltype(std::declval<RpcResponseHeaderProto>()._has_bits_);
  static void set_has_callid(HasBits* has_bits) { (*has_bits)[0] |= 8u; }
  static void set_has_status(HasBits* has_bits) { (*has_bits)[0] |= 16u; }
  static void set_has_serveripcversionnum(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_exceptionclassname(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_errormsg(HasBits* has_bits) { (*has_bits)[0] |= 2u; }
  static void set_has_errordetail(HasBits* has_bits) { (*has_bits)[0] |= 64u; }
  static void set_has_clientid(HasBits* has_bits) { (*has_bits)[0] |= 4u; }
  static void set_has_retrycount(HasBits* has_bits) { (*has_bits)[0] |= 128u; }
};

RpcResponseHeaderProto::RpcResponseHeaderProto()
    : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:Hdfs.Internal.RpcResponseHeaderProto)
}
RpcResponseHeaderProto::RpcResponseHeaderProto(
    const RpcResponseHeaderProto& from)
    : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  exceptionclassname_.UnsafeSetDefault(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (from._internal_has_exceptionclassname()) {
    exceptionclassname_.AssignWithDefault(
        &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
        from.exceptionclassname_);
  }
  errormsg_.UnsafeSetDefault(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (from._internal_has_errormsg()) {
    errormsg_.AssignWithDefault(
        &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
        from.errormsg_);
  }
  clientid_.UnsafeSetDefault(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (from._internal_has_clientid()) {
    clientid_.AssignWithDefault(
        &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
        from.clientid_);
  }
  ::memcpy(&callid_, &from.callid_,
           static_cast<size_t>(reinterpret_cast<char*>(&retrycount_) -
                               reinterpret_cast<char*>(&callid_)) +
               sizeof(retrycount_));
  // @@protoc_insertion_point(copy_constructor:Hdfs.Internal.RpcResponseHeaderProto)
}

void RpcResponseHeaderProto::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(
      &scc_info_RpcResponseHeaderProto_RpcHeader_2eproto.base);
  exceptionclassname_.UnsafeSetDefault(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  errormsg_.UnsafeSetDefault(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  clientid_.UnsafeSetDefault(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  ::memset(&callid_, 0,
           static_cast<size_t>(reinterpret_cast<char*>(&serveripcversionnum_) -
                               reinterpret_cast<char*>(&callid_)) +
               sizeof(serveripcversionnum_));
  errordetail_ = 1;
  retrycount_ = -1;
}

RpcResponseHeaderProto::~RpcResponseHeaderProto() {
  // @@protoc_insertion_point(destructor:Hdfs.Internal.RpcResponseHeaderProto)
  SharedDtor();
}

void RpcResponseHeaderProto::SharedDtor() {
  exceptionclassname_.DestroyNoArena(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  errormsg_.DestroyNoArena(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  clientid_.DestroyNoArena(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void RpcResponseHeaderProto::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const RpcResponseHeaderProto& RpcResponseHeaderProto::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(
      &::scc_info_RpcResponseHeaderProto_RpcHeader_2eproto.base);
  return *internal_default_instance();
}

void RpcResponseHeaderProto::Clear() {
  // @@protoc_insertion_point(message_clear_start:Hdfs.Internal.RpcResponseHeaderProto)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void)cached_has_bits;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      exceptionclassname_.ClearNonDefaultToEmptyNoArena();
    }
    if (cached_has_bits & 0x00000002u) {
      errormsg_.ClearNonDefaultToEmptyNoArena();
    }
    if (cached_has_bits & 0x00000004u) {
      clientid_.ClearNonDefaultToEmptyNoArena();
    }
  }
  if (cached_has_bits & 0x000000f8u) {
    ::memset(
        &callid_, 0,
        static_cast<size_t>(reinterpret_cast<char*>(&serveripcversionnum_) -
                            reinterpret_cast<char*>(&callid_)) +
            sizeof(serveripcversionnum_));
    errordetail_ = 1;
    retrycount_ = -1;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

const char* RpcResponseHeaderProto::_InternalParse(
    const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) \
  if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // required uint32 callId = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(
                static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
          _Internal::set_has_callid(&has_bits);
          callid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // required .Hdfs.Internal.RpcResponseHeaderProto.RpcStatusProto status =
      // 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(
                static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
          ::PROTOBUF_NAMESPACE_ID::uint64 val =
              ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(
                  ::Hdfs::Internal::
                      RpcResponseHeaderProto_RpcStatusProto_IsValid(val))) {
            _internal_set_status(
                static_cast<
                    ::Hdfs::Internal::RpcResponseHeaderProto_RpcStatusProto>(
                    val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(
                2, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional uint32 serverIpcVersionNum = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(
                static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
          _Internal::set_has_serveripcversionnum(&has_bits);
          serveripcversionnum_ =
              ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional string exceptionClassName = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(
                static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
          auto str = _internal_mutable_exceptionclassname();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(
              str, ptr, ctx);
#ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(
              str, "Hdfs.Internal.RpcResponseHeaderProto.exceptionClassName");
#endif  // !NDEBUG
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional string errorMsg = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(
                static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
          auto str = _internal_mutable_errormsg();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(
              str, ptr, ctx);
#ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(
              str, "Hdfs.Internal.RpcResponseHeaderProto.errorMsg");
#endif  // !NDEBUG
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .Hdfs.Internal.RpcResponseHeaderProto.RpcErrorCodeProto
      // errorDetail = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(
                static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) {
          ::PROTOBUF_NAMESPACE_ID::uint64 val =
              ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(
                  ::Hdfs::Internal::
                      RpcResponseHeaderProto_RpcErrorCodeProto_IsValid(val))) {
            _internal_set_errordetail(
                static_cast<
                    ::Hdfs::Internal::RpcResponseHeaderProto_RpcErrorCodeProto>(
                    val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(
                6, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional bytes clientId = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(
                static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) {
          auto str = _internal_mutable_clientid();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(
              str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional sint32 retryCount = 8 [default = -1];
      case 8:
        if (PROTOBUF_PREDICT_TRUE(
                static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) {
          _Internal::set_has_retrycount(&has_bits);
          retrycount_ =
              ::PROTOBUF_NAMESPACE_ID::internal::ReadVarintZigZag32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }    // while
success:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* RpcResponseHeaderProto::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target,
    ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:Hdfs.Internal.RpcResponseHeaderProto)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // required uint32 callId = 1;
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target =
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(
            1, this->_internal_callid(), target);
  }

  // required .Hdfs.Internal.RpcResponseHeaderProto.RpcStatusProto status = 2;
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target =
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
            2, this->_internal_status(), target);
  }

  // optional uint32 serverIpcVersionNum = 3;
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target =
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(
            3, this->_internal_serveripcversionnum(), target);
  }

  // optional string exceptionClassName = 4;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
        this->_internal_exceptionclassname().data(),
        static_cast<int>(this->_internal_exceptionclassname().length()),
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
        "Hdfs.Internal.RpcResponseHeaderProto.exceptionClassName");
    target = stream->WriteStringMaybeAliased(
        4, this->_internal_exceptionclassname(), target);
  }

  // optional string errorMsg = 5;
  if (cached_has_bits & 0x00000002u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
        this->_internal_errormsg().data(),
        static_cast<int>(this->_internal_errormsg().length()),
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
        "Hdfs.Internal.RpcResponseHeaderProto.errorMsg");
    target =
        stream->WriteStringMaybeAliased(5, this->_internal_errormsg(), target);
  }

  // optional .Hdfs.Internal.RpcResponseHeaderProto.RpcErrorCodeProto
  // errorDetail = 6;
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target =
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
            6, this->_internal_errordetail(), target);
  }

  // optional bytes clientId = 7;
  if (cached_has_bits & 0x00000004u) {
    target =
        stream->WriteBytesMaybeAliased(7, this->_internal_clientid(), target);
  }

  // optional sint32 retryCount = 8 [default = -1];
  if (cached_has_bits & 0x00000080u) {
    target = stream->EnsureSpace(target);
    target =
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteSInt32ToArray(
            8, this->_internal_retrycount(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::
        InternalSerializeUnknownFieldsToArray(
            _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:Hdfs.Internal.RpcResponseHeaderProto)
  return target;
}

size_t RpcResponseHeaderProto::RequiredFieldsByteSizeFallback() const {
  // @@protoc_insertion_point(required_fields_byte_size_fallback_start:Hdfs.Internal.RpcResponseHeaderProto)
  size_t total_size = 0;

  if (_internal_has_callid()) {
    // required uint32 callId = 1;
    total_size +=
        1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(
                this->_internal_callid());
  }

  if (_internal_has_status()) {
    // required .Hdfs.Internal.RpcResponseHeaderProto.RpcStatusProto status = 2;
    total_size +=
        1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(
                this->_internal_status());
  }

  return total_size;
}
size_t RpcResponseHeaderProto::ByteSizeLong() const {
  // @@protoc_insertion_point(message_byte_size_start:Hdfs.Internal.RpcResponseHeaderProto)
  size_t total_size = 0;

  if (((_has_bits_[0] & 0x00000018) ^ 0x00000018) ==
      0) {  // All required fields are present.
    // required uint32 callId = 1;
    total_size +=
        1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(
                this->_internal_callid());

    // required .Hdfs.Internal.RpcResponseHeaderProto.RpcStatusProto status = 2;
    total_size +=
        1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(
                this->_internal_status());

  } else {
    total_size += RequiredFieldsByteSizeFallback();
  }
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void)cached_has_bits;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    // optional string exceptionClassName = 4;
    if (cached_has_bits & 0x00000001u) {
      total_size +=
          1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                  this->_internal_exceptionclassname());
    }

    // optional string errorMsg = 5;
    if (cached_has_bits & 0x00000002u) {
      total_size +=
          1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                  this->_internal_errormsg());
    }

    // optional bytes clientId = 7;
    if (cached_has_bits & 0x00000004u) {
      total_size +=
          1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
                  this->_internal_clientid());
    }
  }
  if (cached_has_bits & 0x000000e0u) {
    // optional uint32 serverIpcVersionNum = 3;
    if (cached_has_bits & 0x00000020u) {
      total_size +=
          1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(
                  this->_internal_serveripcversionnum());
    }

    // optional .Hdfs.Internal.RpcResponseHeaderProto.RpcErrorCodeProto
    // errorDetail = 6;
    if (cached_has_bits & 0x00000040u) {
      total_size +=
          1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(
                  this->_internal_errordetail());
    }

    // optional sint32 retryCount = 8 [default = -1];
    if (cached_has_bits & 0x00000080u) {
      total_size +=
          1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SInt32Size(
                  this->_internal_retrycount());
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void RpcResponseHeaderProto::MergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  // @@protoc_insertion_point(generalized_merge_from_start:Hdfs.Internal.RpcResponseHeaderProto)
  GOOGLE_DCHECK_NE(&from, this);
  const RpcResponseHeaderProto* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<RpcResponseHeaderProto>(
          &from);
  if (source == nullptr) {
    // @@protoc_insertion_point(generalized_merge_from_cast_fail:Hdfs.Internal.RpcResponseHeaderProto)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
    // @@protoc_insertion_point(generalized_merge_from_cast_success:Hdfs.Internal.RpcResponseHeaderProto)
    MergeFrom(*source);
  }
}

void RpcResponseHeaderProto::MergeFrom(const RpcResponseHeaderProto& from) {
  // @@protoc_insertion_point(class_specific_merge_from_start:Hdfs.Internal.RpcResponseHeaderProto)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _has_bits_[0] |= 0x00000001u;
      exceptionclassname_.AssignWithDefault(
          &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
          from.exceptionclassname_);
    }
    if (cached_has_bits & 0x00000002u) {
      _has_bits_[0] |= 0x00000002u;
      errormsg_.AssignWithDefault(
          &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
          from.errormsg_);
    }
    if (cached_has_bits & 0x00000004u) {
      _has_bits_[0] |= 0x00000004u;
      clientid_.AssignWithDefault(
          &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
          from.clientid_);
    }
    if (cached_has_bits & 0x00000008u) {
      callid_ = from.callid_;
    }
    if (cached_has_bits & 0x00000010u) {
      status_ = from.status_;
    }
    if (cached_has_bits & 0x00000020u) {
      serveripcversionnum_ = from.serveripcversionnum_;
    }
    if (cached_has_bits & 0x00000040u) {
      errordetail_ = from.errordetail_;
    }
    if (cached_has_bits & 0x00000080u) {
      retrycount_ = from.retrycount_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

void RpcResponseHeaderProto::CopyFrom(
    const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  // @@protoc_insertion_point(generalized_copy_from_start:Hdfs.Internal.RpcResponseHeaderProto)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void RpcResponseHeaderProto::CopyFrom(const RpcResponseHeaderProto& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:Hdfs.Internal.RpcResponseHeaderProto)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool RpcResponseHeaderProto::IsInitialized() const {
  if ((_has_bits_[0] & 0x00000018) != 0x00000018) return false;
  return true;
}

void RpcResponseHeaderProto::InternalSwap(RpcResponseHeaderProto* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  exceptionclassname_.Swap(
      &other->exceptionclassname_,
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      GetArenaNoVirtual());
  errormsg_.Swap(
      &other->errormsg_,
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      GetArenaNoVirtual());
  clientid_.Swap(
      &other->clientid_,
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      GetArenaNoVirtual());
  swap(callid_, other->callid_);
  swap(status_, other->status_);
  swap(serveripcversionnum_, other->serveripcversionnum_);
  swap(errordetail_, other->errordetail_);
  swap(retrycount_, other->retrycount_);
}

::PROTOBUF_NAMESPACE_ID::Metadata RpcResponseHeaderProto::GetMetadata() const {
  return GetMetadataStatic();
}

// ===================================================================

void RpcSaslProto_SaslAuth::InitAsDefaultInstance() {}
class RpcSaslProto_SaslAuth::_Internal {
 public:
  using HasBits = decltype(std::declval<RpcSaslProto_SaslAuth>()._has_bits_);
  static void set_has_method(HasBits* has_bits) { (*has_bits)[0] |= 1u; }
  static void set_has_mechanism(HasBits* has_bits) { (*has_bits)[0] |= 2u; }
  static void set_has_protocol(HasBits* has_bits) { (*has_bits)[0] |= 4u; }
  static void set_has_serverid(HasBits* has_bits) { (*has_bits)[0] |= 8u; }
  static void set_has_challenge(HasBits* has_bits) { (*has_bits)[0] |= 16u; }
};

RpcSaslProto_SaslAuth::RpcSaslProto_SaslAuth()
    : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:Hdfs.Internal.RpcSaslProto.SaslAuth)
}
RpcSaslProto_SaslAuth::RpcSaslProto_SaslAuth(const RpcSaslProto_SaslAuth& from)
    : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  method_.UnsafeSetDefault(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (from._internal_has_method()) {
    method_.AssignWithDefault(
        &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
        from.method_);
  }
  mechanism_.UnsafeSetDefault(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (from._internal_has_mechanism()) {
    mechanism_.AssignWithDefault(
        &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
        from.mechanism_);
  }
  protocol_.UnsafeSetDefault(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (from._internal_has_protocol()) {
    protocol_.AssignWithDefault(
        &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
        from.protocol_);
  }
  serverid_.UnsafeSetDefault(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (from._internal_has_serverid()) {
    serverid_.AssignWithDefault(
        &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
        from.serverid_);
  }
  challenge_.UnsafeSetDefault(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (from._internal_has_challenge()) {
    challenge_.AssignWithDefault(
        &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
        from.challenge_);
  }
  // @@protoc_insertion_point(copy_constructor:Hdfs.Internal.RpcSaslProto.SaslAuth)
}

void RpcSaslProto_SaslAuth::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(
      &scc_info_RpcSaslProto_SaslAuth_RpcHeader_2eproto.base);
  method_.UnsafeSetDefault(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  mechanism_.UnsafeSetDefault(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  protocol_.UnsafeSetDefault(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  serverid_.UnsafeSetDefault(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  challenge_.UnsafeSetDefault(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

RpcSaslProto_SaslAuth::~RpcSaslProto_SaslAuth() {
  // @@protoc_insertion_point(destructor:Hdfs.Internal.RpcSaslProto.SaslAuth)
  SharedDtor();
}

void RpcSaslProto_SaslAuth::SharedDtor() {
  method_.DestroyNoArena(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  mechanism_.DestroyNoArena(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  protocol_.DestroyNoArena(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  serverid_.DestroyNoArena(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  challenge_.DestroyNoArena(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void RpcSaslProto_SaslAuth::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const RpcSaslProto_SaslAuth& RpcSaslProto_SaslAuth::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(
      &::scc_info_RpcSaslProto_SaslAuth_RpcHeader_2eproto.base);
  return *internal_default_instance();
}

void RpcSaslProto_SaslAuth::Clear() {
  // @@protoc_insertion_point(message_clear_start:Hdfs.Internal.RpcSaslProto.SaslAuth)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void)cached_has_bits;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    if (cached_has_bits & 0x00000001u) {
      method_.ClearNonDefaultToEmptyNoArena();
    }
    if (cached_has_bits & 0x00000002u) {
      mechanism_.ClearNonDefaultToEmptyNoArena();
    }
    if (cached_has_bits & 0x00000004u) {
      protocol_.ClearNonDefaultToEmptyNoArena();
    }
    if (cached_has_bits & 0x00000008u) {
      serverid_.ClearNonDefaultToEmptyNoArena();
    }
    if (cached_has_bits & 0x00000010u) {
      challenge_.ClearNonDefaultToEmptyNoArena();
    }
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

const char* RpcSaslProto_SaslAuth::_InternalParse(
    const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) \
  if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // required string method = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(
                static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          auto str = _internal_mutable_method();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(
              str, ptr, ctx);
#ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(
              str, "Hdfs.Internal.RpcSaslProto.SaslAuth.method");
#endif  // !NDEBUG
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // required string mechanism = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(
                static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          auto str = _internal_mutable_mechanism();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(
              str, ptr, ctx);
#ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(
              str, "Hdfs.Internal.RpcSaslProto.SaslAuth.mechanism");
#endif  // !NDEBUG
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional string protocol = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(
                static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
          auto str = _internal_mutable_protocol();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(
              str, ptr, ctx);
#ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(
              str, "Hdfs.Internal.RpcSaslProto.SaslAuth.protocol");
#endif  // !NDEBUG
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional string serverId = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(
                static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
          auto str = _internal_mutable_serverid();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(
              str, ptr, ctx);
#ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(
              str, "Hdfs.Internal.RpcSaslProto.SaslAuth.serverId");
#endif  // !NDEBUG
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bytes challenge = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(
                static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
          auto str = _internal_mutable_challenge();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(
              str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }    // while
success:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* RpcSaslProto_SaslAuth::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target,
    ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:Hdfs.Internal.RpcSaslProto.SaslAuth)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // required string method = 1;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
        this->_internal_method().data(),
        static_cast<int>(this->_internal_method().length()),
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
        "Hdfs.Internal.RpcSaslProto.SaslAuth.method");
    target =
        stream->WriteStringMaybeAliased(1, this->_internal_method(), target);
  }

  // required string mechanism = 2;
  if (cached_has_bits & 0x00000002u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
        this->_internal_mechanism().data(),
        static_cast<int>(this->_internal_mechanism().length()),
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
        "Hdfs.Internal.RpcSaslProto.SaslAuth.mechanism");
    target =
        stream->WriteStringMaybeAliased(2, this->_internal_mechanism(), target);
  }

  // optional string protocol = 3;
  if (cached_has_bits & 0x00000004u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
        this->_internal_protocol().data(),
        static_cast<int>(this->_internal_protocol().length()),
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
        "Hdfs.Internal.RpcSaslProto.SaslAuth.protocol");
    target =
        stream->WriteStringMaybeAliased(3, this->_internal_protocol(), target);
  }

  // optional string serverId = 4;
  if (cached_has_bits & 0x00000008u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
        this->_internal_serverid().data(),
        static_cast<int>(this->_internal_serverid().length()),
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
        "Hdfs.Internal.RpcSaslProto.SaslAuth.serverId");
    target =
        stream->WriteStringMaybeAliased(4, this->_internal_serverid(), target);
  }

  // optional bytes challenge = 5;
  if (cached_has_bits & 0x00000010u) {
    target =
        stream->WriteBytesMaybeAliased(5, this->_internal_challenge(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::
        InternalSerializeUnknownFieldsToArray(
            _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:Hdfs.Internal.RpcSaslProto.SaslAuth)
  return target;
}

size_t RpcSaslProto_SaslAuth::RequiredFieldsByteSizeFallback() const {
  // @@protoc_insertion_point(required_fields_byte_size_fallback_start:Hdfs.Internal.RpcSaslProto.SaslAuth)
  size_t total_size = 0;

  if (_internal_has_method()) {
    // required string method = 1;
    total_size +=
        1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                this->_internal_method());
  }

  if (_internal_has_mechanism()) {
    // required string mechanism = 2;
    total_size +=
        1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                this->_internal_mechanism());
  }

  return total_size;
}
size_t RpcSaslProto_SaslAuth::ByteSizeLong() const {
  // @@protoc_insertion_point(message_byte_size_start:Hdfs.Internal.RpcSaslProto.SaslAuth)
  size_t total_size = 0;

  if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) ==
      0) {  // All required fields are present.
    // required string method = 1;
    total_size +=
        1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                this->_internal_method());

    // required string mechanism = 2;
    total_size +=
        1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                this->_internal_mechanism());

  } else {
    total_size += RequiredFieldsByteSizeFallback();
  }
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void)cached_has_bits;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000001cu) {
    // optional string protocol = 3;
    if (cached_has_bits & 0x00000004u) {
      total_size +=
          1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                  this->_internal_protocol());
    }

    // optional string serverId = 4;
    if (cached_has_bits & 0x00000008u) {
      total_size +=
          1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                  this->_internal_serverid());
    }

    // optional bytes challenge = 5;
    if (cached_has_bits & 0x00000010u) {
      total_size +=
          1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
                  this->_internal_challenge());
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void RpcSaslProto_SaslAuth::MergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  // @@protoc_insertion_point(generalized_merge_from_start:Hdfs.Internal.RpcSaslProto.SaslAuth)
  GOOGLE_DCHECK_NE(&from, this);
  const RpcSaslProto_SaslAuth* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<RpcSaslProto_SaslAuth>(
          &from);
  if (source == nullptr) {
    // @@protoc_insertion_point(generalized_merge_from_cast_fail:Hdfs.Internal.RpcSaslProto.SaslAuth)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
    // @@protoc_insertion_point(generalized_merge_from_cast_success:Hdfs.Internal.RpcSaslProto.SaslAuth)
    MergeFrom(*source);
  }
}

void RpcSaslProto_SaslAuth::MergeFrom(const RpcSaslProto_SaslAuth& from) {
  // @@protoc_insertion_point(class_specific_merge_from_start:Hdfs.Internal.RpcSaslProto.SaslAuth)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    if (cached_has_bits & 0x00000001u) {
      _has_bits_[0] |= 0x00000001u;
      method_.AssignWithDefault(
          &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
          from.method_);
    }
    if (cached_has_bits & 0x00000002u) {
      _has_bits_[0] |= 0x00000002u;
      mechanism_.AssignWithDefault(
          &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
          from.mechanism_);
    }
    if (cached_has_bits & 0x00000004u) {
      _has_bits_[0] |= 0x00000004u;
      protocol_.AssignWithDefault(
          &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
          from.protocol_);
    }
    if (cached_has_bits & 0x00000008u) {
      _has_bits_[0] |= 0x00000008u;
      serverid_.AssignWithDefault(
          &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
          from.serverid_);
    }
    if (cached_has_bits & 0x00000010u) {
      _has_bits_[0] |= 0x00000010u;
      challenge_.AssignWithDefault(
          &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
          from.challenge_);
    }
  }
}

void RpcSaslProto_SaslAuth::CopyFrom(
    const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  // @@protoc_insertion_point(generalized_copy_from_start:Hdfs.Internal.RpcSaslProto.SaslAuth)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void RpcSaslProto_SaslAuth::CopyFrom(const RpcSaslProto_SaslAuth& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:Hdfs.Internal.RpcSaslProto.SaslAuth)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool RpcSaslProto_SaslAuth::IsInitialized() const {
  if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
  return true;
}

void RpcSaslProto_SaslAuth::InternalSwap(RpcSaslProto_SaslAuth* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  method_.Swap(
      &other->method_,
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      GetArenaNoVirtual());
  mechanism_.Swap(
      &other->mechanism_,
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      GetArenaNoVirtual());
  protocol_.Swap(
      &other->protocol_,
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      GetArenaNoVirtual());
  serverid_.Swap(
      &other->serverid_,
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      GetArenaNoVirtual());
  challenge_.Swap(
      &other->challenge_,
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      GetArenaNoVirtual());
}

::PROTOBUF_NAMESPACE_ID::Metadata RpcSaslProto_SaslAuth::GetMetadata() const {
  return GetMetadataStatic();
}

// ===================================================================

void RpcSaslProto::InitAsDefaultInstance() {}
class RpcSaslProto::_Internal {
 public:
  using HasBits = decltype(std::declval<RpcSaslProto>()._has_bits_);
  static void set_has_version(HasBits* has_bits) { (*has_bits)[0] |= 2u; }
  static void set_has_state(HasBits* has_bits) { (*has_bits)[0] |= 4u; }
  static void set_has_token(HasBits* has_bits) { (*has_bits)[0] |= 1u; }
};

RpcSaslProto::RpcSaslProto()
    : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:Hdfs.Internal.RpcSaslProto)
}
RpcSaslProto::RpcSaslProto(const RpcSaslProto& from)
    : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr),
      _has_bits_(from._has_bits_),
      auths_(from.auths_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  token_.UnsafeSetDefault(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (from._internal_has_token()) {
    token_.AssignWithDefault(
        &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
        from.token_);
  }
  ::memcpy(&version_, &from.version_,
           static_cast<size_t>(reinterpret_cast<char*>(&state_) -
                               reinterpret_cast<char*>(&version_)) +
               sizeof(state_));
  // @@protoc_insertion_point(copy_constructor:Hdfs.Internal.RpcSaslProto)
}

void RpcSaslProto::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(
      &scc_info_RpcSaslProto_RpcHeader_2eproto.base);
  token_.UnsafeSetDefault(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  ::memset(&version_, 0,
           static_cast<size_t>(reinterpret_cast<char*>(&state_) -
                               reinterpret_cast<char*>(&version_)) +
               sizeof(state_));
}

RpcSaslProto::~RpcSaslProto() {
  // @@protoc_insertion_point(destructor:Hdfs.Internal.RpcSaslProto)
  SharedDtor();
}

void RpcSaslProto::SharedDtor() {
  token_.DestroyNoArena(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void RpcSaslProto::SetCachedSize(int size) const { _cached_size_.Set(size); }
const RpcSaslProto& RpcSaslProto::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(
      &::scc_info_RpcSaslProto_RpcHeader_2eproto.base);
  return *internal_default_instance();
}

void RpcSaslProto::Clear() {
  // @@protoc_insertion_point(message_clear_start:Hdfs.Internal.RpcSaslProto)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void)cached_has_bits;

  auths_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    token_.ClearNonDefaultToEmptyNoArena();
  }
  if (cached_has_bits & 0x00000006u) {
    ::memset(&version_, 0,
             static_cast<size_t>(reinterpret_cast<char*>(&state_) -
                                 reinterpret_cast<char*>(&version_)) +
                 sizeof(state_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

const char* RpcSaslProto::_InternalParse(
    const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) \
  if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // optional uint32 version = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(
                static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
          _Internal::set_has_version(&has_bits);
          version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // required .Hdfs.Internal.RpcSaslProto.SaslState state = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(
                static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
          ::PROTOBUF_NAMESPACE_ID::uint64 val =
              ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(
                  ::Hdfs::Internal::RpcSaslProto_SaslState_IsValid(val))) {
            _internal_set_state(
                static_cast<::Hdfs::Internal::RpcSaslProto_SaslState>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(
                2, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional bytes token = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(
                static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
          auto str = _internal_mutable_token();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(
              str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .Hdfs.Internal.RpcSaslProto.SaslAuth auths = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(
                static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_auths(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
        } else
          goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }    // while
success:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* RpcSaslProto::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target,
    ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:Hdfs.Internal.RpcSaslProto)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional uint32 version = 1;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target =
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(
            1, this->_internal_version(), target);
  }

  // required .Hdfs.Internal.RpcSaslProto.SaslState state = 2;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target =
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
            2, this->_internal_state(), target);
  }

  // optional bytes token = 3;
  if (cached_has_bits & 0x00000001u) {
    target = stream->WriteBytesMaybeAliased(3, this->_internal_token(), target);
  }

  // repeated .Hdfs.Internal.RpcSaslProto.SaslAuth auths = 4;
  for (unsigned int i = 0,
                    n = static_cast<unsigned int>(this->_internal_auths_size());
       i < n; i++) {
    target = stream->EnsureSpace(target);
    target =
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::InternalWriteMessage(
            4, this->_internal_auths(i), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::
        InternalSerializeUnknownFieldsToArray(
            _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:Hdfs.Internal.RpcSaslProto)
  return target;
}

size_t RpcSaslProto::ByteSizeLong() const {
  // @@protoc_insertion_point(message_byte_size_start:Hdfs.Internal.RpcSaslProto)
  size_t total_size = 0;

  // required .Hdfs.Internal.RpcSaslProto.SaslState state = 2;
  if (_internal_has_state()) {
    total_size +=
        1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(
                this->_internal_state());
  }
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void)cached_has_bits;

  // repeated .Hdfs.Internal.RpcSaslProto.SaslAuth auths = 4;
  total_size += 1UL * this->_internal_auths_size();
  for (const auto& msg : this->auths_) {
    total_size +=
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    // optional bytes token = 3;
    if (cached_has_bits & 0x00000001u) {
      total_size +=
          1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
                  this->_internal_token());
    }

    // optional uint32 version = 1;
    if (cached_has_bits & 0x00000002u) {
      total_size +=
          1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(
                  this->_internal_version());
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void RpcSaslProto::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  // @@protoc_insertion_point(generalized_merge_from_start:Hdfs.Internal.RpcSaslProto)
  GOOGLE_DCHECK_NE(&from, this);
  const RpcSaslProto* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<RpcSaslProto>(&from);
  if (source == nullptr) {
    // @@protoc_insertion_point(generalized_merge_from_cast_fail:Hdfs.Internal.RpcSaslProto)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
    // @@protoc_insertion_point(generalized_merge_from_cast_success:Hdfs.Internal.RpcSaslProto)
    MergeFrom(*source);
  }
}

void RpcSaslProto::MergeFrom(const RpcSaslProto& from) {
  // @@protoc_insertion_point(class_specific_merge_from_start:Hdfs.Internal.RpcSaslProto)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void)cached_has_bits;

  auths_.MergeFrom(from.auths_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      _has_bits_[0] |= 0x00000001u;
      token_.AssignWithDefault(
          &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
          from.token_);
    }
    if (cached_has_bits & 0x00000002u) {
      version_ = from.version_;
    }
    if (cached_has_bits & 0x00000004u) {
      state_ = from.state_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

void RpcSaslProto::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  // @@protoc_insertion_point(generalized_copy_from_start:Hdfs.Internal.RpcSaslProto)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void RpcSaslProto::CopyFrom(const RpcSaslProto& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:Hdfs.Internal.RpcSaslProto)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool RpcSaslProto::IsInitialized() const {
  if ((_has_bits_[0] & 0x00000004) != 0x00000004) return false;
  if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(auths_))
    return false;
  return true;
}

void RpcSaslProto::InternalSwap(RpcSaslProto* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  auths_.InternalSwap(&other->auths_);
  token_.Swap(&other->token_,
              &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
              GetArenaNoVirtual());
  swap(version_, other->version_);
  swap(state_, other->state_);
}

::PROTOBUF_NAMESPACE_ID::Metadata RpcSaslProto::GetMetadata() const {
  return GetMetadataStatic();
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace Internal
}  // namespace Hdfs
PROTOBUF_NAMESPACE_OPEN
template <>
PROTOBUF_NOINLINE ::Hdfs::Internal::RpcRequestHeaderProto*
Arena::CreateMaybeMessage<::Hdfs::Internal::RpcRequestHeaderProto>(
    Arena* arena) {
  return Arena::CreateInternal<::Hdfs::Internal::RpcRequestHeaderProto>(arena);
}
template <>
PROTOBUF_NOINLINE ::Hdfs::Internal::RpcResponseHeaderProto*
Arena::CreateMaybeMessage<::Hdfs::Internal::RpcResponseHeaderProto>(
    Arena* arena) {
  return Arena::CreateInternal<::Hdfs::Internal::RpcResponseHeaderProto>(arena);
}
template <>
PROTOBUF_NOINLINE ::Hdfs::Internal::RpcSaslProto_SaslAuth*
Arena::CreateMaybeMessage<::Hdfs::Internal::RpcSaslProto_SaslAuth>(
    Arena* arena) {
  return Arena::CreateInternal<::Hdfs::Internal::RpcSaslProto_SaslAuth>(arena);
}
template <>
PROTOBUF_NOINLINE ::Hdfs::Internal::RpcSaslProto*
Arena::CreateMaybeMessage<::Hdfs::Internal::RpcSaslProto>(Arena* arena) {
  return Arena::CreateInternal<::Hdfs::Internal::RpcSaslProto>(arena);
}
PROTOBUF_NAMESPACE_CLOSE

// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>

redpajama_set_name: RedPajamaGithub


text:
package com.test.util;

import java.io.File;

import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;

public class Log {
	private static Logger logger;
	private static String filePath = "src/log4j.properties";
	private static boolean flag = false;

	private static synchronized void getPropertyFile() {
		logger = Logger.getLogger("TestProject");
		PropertyConfigurator.configure(new File(filePath).getAbsolutePath());
		flag = true;
	}

	private static void getFlag() {
		if (flag == false) {
			Log.getPropertyFile();
		}
	}

	public static void logInfo(String message) {
		Log.getFlag();
		logger.info(message);
	}

	public static void logError(String message) {
		Log.getFlag();
		logger.error(message);
	}

	public static void logWarn(String message) {
		Log.getFlag();
		logger.warn(message);
	}
}


text:
package slogo.backend.impl.evaluation.commands.math;

import java.util.List;

import slogo.backend.evaluation.MalformedSyntaxException;
import slogo.backend.impl.evaluation.commands.MathOperation;

public class Quotient extends MathOperation {
    private static final String COMMAND_NAME = "Quotient";
    private static final int MIN_NUM_CONTEXT = 2;
    private static final int MAX_NUM_CONTEXT = 2;

    public Quotient () {
        super(COMMAND_NAME, MIN_NUM_CONTEXT, MAX_NUM_CONTEXT);
    }

    @Override
    protected Number executeMath (List<Number> args) throws MalformedSyntaxException {
        try {
            return args.get(0).doubleValue() / args.get(1).doubleValue();
        } catch (ArithmeticException e) {
            throw new MalformedSyntaxException(e.getMessage());
        }
    }
}


text:
<!DOCTYPE html>

    <title>three-mesh-bvh - Geometry Sculpting</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

		Inspired by SculptGL.

		Matcap textures from nidorx/matcaps repo.