# Copyright 2015 Basho Technologies, Inc.
#
# This file is provided to you under the Apache License,
# Version 2.0 (the "License"); you may not use this file
# except in compliance with the License.  You may obtain
# a copy of the License at
#
#  http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.

# This is a generated file. DO NOT EDIT.

"""
Constants and mappings between Riak protocol codes and messages.
"""

import riak_pb.riak_dt_pb2
import riak_pb.riak_kv_pb2
import riak_pb.riak_pb2
import riak_pb.riak_search_pb2
import riak_pb.riak_yokozuna_pb2

# Protocol codes
MSG_CODE_ERROR_RESP = 0
MSG_CODE_PING_REQ = 1
MSG_CODE_PING_RESP = 2
MSG_CODE_GET_CLIENT_ID_REQ = 3
MSG_CODE_GET_CLIENT_ID_RESP = 4
MSG_CODE_SET_CLIENT_ID_REQ = 5
MSG_CODE_SET_CLIENT_ID_RESP = 6
MSG_CODE_GET_SERVER_INFO_REQ = 7
MSG_CODE_GET_SERVER_INFO_RESP = 8
MSG_CODE_GET_REQ = 9
MSG_CODE_GET_RESP = 10
MSG_CODE_PUT_REQ = 11
MSG_CODE_PUT_RESP = 12
MSG_CODE_DEL_REQ = 13
MSG_CODE_DEL_RESP = 14
MSG_CODE_LIST_BUCKETS_REQ = 15
MSG_CODE_LIST_BUCKETS_RESP = 16
MSG_CODE_LIST_KEYS_REQ = 17
MSG_CODE_LIST_KEYS_RESP = 18
MSG_CODE_GET_BUCKET_REQ = 19
MSG_CODE_GET_BUCKET_RESP = 20
MSG_CODE_SET_BUCKET_REQ = 21
MSG_CODE_SET_BUCKET_RESP = 22
MSG_CODE_MAP_RED_REQ = 23
MSG_CODE_MAP_RED_RESP = 24
MSG_CODE_INDEX_REQ = 25
MSG_CODE_INDEX_RESP = 26
MSG_CODE_SEARCH_QUERY_REQ = 27
MSG_CODE_SEARCH_QUERY_RESP = 28
MSG_CODE_RESET_BUCKET_REQ = 29
MSG_CODE_RESET_BUCKET_RESP = 30
MSG_CODE_GET_BUCKET_TYPE_REQ = 31
MSG_CODE_SET_BUCKET_TYPE_REQ = 32
MSG_CODE_GET_BUCKET_KEY_PREFLIST_REQ = 33
MSG_CODE_GET_BUCKET_KEY_PREFLIST_RESP = 34
MSG_CODE_CS_BUCKET_REQ = 40
MSG_CODE_CS_BUCKET_RESP = 41
MSG_CODE_COUNTER_UPDATE_REQ = 50
MSG_CODE_COUNTER_UPDATE_RESP = 51
MSG_CODE_COUNTER_GET_REQ = 52
MSG_CODE_COUNTER_GET_RESP = 53
MSG_CODE_YOKOZUNA_INDEX_GET_REQ = 54
MSG_CODE_YOKOZUNA_INDEX_GET_RESP = 55
MSG_CODE_YOKOZUNA_INDEX_PUT_REQ = 56
MSG_CODE_YOKOZUNA_INDEX_DELETE_REQ = 57
MSG_CODE_YOKOZUNA_SCHEMA_GET_REQ = 58
MSG_CODE_YOKOZUNA_SCHEMA_GET_RESP = 59
MSG_CODE_YOKOZUNA_SCHEMA_PUT_REQ = 60
MSG_CODE_DT_FETCH_REQ = 80
MSG_CODE_DT_FETCH_RESP = 81
MSG_CODE_DT_UPDATE_REQ = 82
MSG_CODE_DT_UPDATE_RESP = 83
MSG_CODE_AUTH_REQ = 253
MSG_CODE_AUTH_RESP = 254
MSG_CODE_START_TLS = 255

# Mapping from code to protobuf class
MESSAGE_CLASSES = {
    MSG_CODE_ERROR_RESP: None,
    MSG_CODE_PING_REQ: None,
    MSG_CODE_PING_RESP: None,
    MSG_CODE_GET_CLIENT_ID_REQ: None,
    MSG_CODE_GET_CLIENT_ID_RESP: None,
    MSG_CODE_SET_CLIENT_ID_REQ: None,
    MSG_CODE_SET_CLIENT_ID_RESP: None,
    MSG_CODE_GET_SERVER_INFO_REQ: None,
    MSG_CODE_GET_SERVER_INFO_RESP: None,
    MSG_CODE_GET_REQ: None,
    MSG_CODE_GET_RESP: None,
    MSG_CODE_PUT_REQ: None,
    MSG_CODE_PUT_RESP: None,
    MSG_CODE_DEL_REQ: None,
    MSG_CODE_DEL_RESP: None,
    MSG_CODE_LIST_BUCKETS_REQ: None,
    MSG_CODE_LIST_BUCKETS_RESP: None,
    MSG_CODE_LIST_KEYS_REQ: None,
    MSG_CODE_LIST_KEYS_RESP: None,
    MSG_CODE_GET_BUCKET_REQ: None,
    MSG_CODE_GET_BUCKET_RESP: None,
    MSG_CODE_SET_BUCKET_REQ: None,
    MSG_CODE_SET_BUCKET_RESP: None,
    MSG_CODE_MAP_RED_REQ: None,
    MSG_CODE_MAP_RED_RESP: None,
    MSG_CODE_INDEX_REQ: None,
    MSG_CODE_INDEX_RESP: None,
    MSG_CODE_SEARCH_QUERY_REQ: None,
    MSG_CODE_SEARCH_QUERY_RESP: None,
    MSG_CODE_RESET_BUCKET_REQ: None,
    MSG_CODE_RESET_BUCKET_RESP: None,
    MSG_CODE_GET_BUCKET_TYPE_REQ: None,
    MSG_CODE_SET_BUCKET_TYPE_REQ: None,
    MSG_CODE_GET_BUCKET_KEY_PREFLIST_REQ: None,
    MSG_CODE_GET_BUCKET_KEY_PREFLIST_RESP: None,
    MSG_CODE_CS_BUCKET_REQ: None,
    MSG_CODE_CS_BUCKET_RESP: None,
    MSG_CODE_COUNTER_UPDATE_REQ: None,
    MSG_CODE_COUNTER_UPDATE_RESP: None,
    MSG_CODE_COUNTER_GET_REQ: None,
    MSG_CODE_COUNTER_GET_RESP: None,
    MSG_CODE_YOKOZUNA_INDEX_GET_REQ: None,
    MSG_CODE_YOKOZUNA_INDEX_GET_RESP: None,
    MSG_CODE_YOKOZUNA_INDEX_PUT_REQ: None,
    MSG_CODE_YOKOZUNA_INDEX_DELETE_REQ: None,
    MSG_CODE_YOKOZUNA_SCHEMA_GET_REQ: None,
    MSG_CODE_YOKOZUNA_SCHEMA_GET_RESP: None,
    MSG_CODE_YOKOZUNA_SCHEMA_PUT_REQ: None,
    MSG_CODE_DT_FETCH_REQ: None,
    MSG_CODE_DT_FETCH_RESP: None,
    MSG_CODE_DT_UPDATE_REQ: None,
    MSG_CODE_DT_UPDATE_RESP: None,
    MSG_CODE_AUTH_REQ: None,
    MSG_CODE_AUTH_RESP: None,
    MSG_CODE_START_TLS: None
}
