From fdae22c21c2fb0753f82c7c2e3a01a5c1008d78e Mon Sep 17 00:00:00 2001 From: Peter Zeller Date: Thu, 7 Jun 2018 14:04:25 +0200 Subject: [PATCH] remove gpb plugin and include generated files --> Windows clients don't need to compile protobuf files, which was problematic --- .gitignore | 1 - Makefile | 37 + include/antidote_pb.hrl | 275 ++ include/gpb.hrl | 117 + rebar.config | 26 +- src/antidote_pb.erl | 7842 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 8272 insertions(+), 26 deletions(-) create mode 100644 Makefile create mode 100644 include/antidote_pb.hrl create mode 100644 include/gpb.hrl create mode 100644 src/antidote_pb.erl diff --git a/.gitignore b/.gitignore index 247d1eb..f9e4fc0 100644 --- a/.gitignore +++ b/.gitignore @@ -14,5 +14,4 @@ erl_crash.dump logs _build .idea -*_pb.?rl diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..34df90e --- /dev/null +++ b/Makefile @@ -0,0 +1,37 @@ +REBAR = rebar3 + + +all: compile + + + + +compile: + $(REBAR) compile + +clean: + rm -rf ebin/* test/*.beam logs log + $(REBAR) clean + +test: + $(REBAR) eunit + +dialyzer: + $(REBAR) dialyzer + +shell: + $(REBAR) shell + + +_build/gpb: + mkdir -p _build/ + (cd _build/ && git clone https://github.com/tomas-abrahamsson/gpb && cd gpb && git checkout 4.1.8) + +_build/gpb/bin/protoc-erl: _build/gpb + (cd _build/gpb && make) + + + +generate_pb: proto/antidote.proto _build/gpb/bin/protoc-erl + _build/gpb/bin/protoc-erl -I. proto/antidote.proto -o-hrl include -o-erl src -modsuffix _pb -strbin + cp _build/gpb/include/gpb.hrl include/ diff --git a/include/antidote_pb.hrl b/include/antidote_pb.hrl new file mode 100644 index 0000000..3f68c97 --- /dev/null +++ b/include/antidote_pb.hrl @@ -0,0 +1,275 @@ +%% -*- coding: utf-8 -*- +%% Automatically generated, do not edit +%% Generated by gpb_compile version 4.1.8 + +-ifndef(antidote_pb). +-define(antidote_pb, true). + +-define(antidote_pb_gpb_version, "4.1.8"). + +-ifndef('APBERRORRESP_PB_H'). +-define('APBERRORRESP_PB_H', true). +-record('ApbErrorResp', + {errmsg, % = 1, bytes + errcode % = 2, uint32 + }). +-endif. + +-ifndef('APBCOUNTERUPDATE_PB_H'). +-define('APBCOUNTERUPDATE_PB_H', true). +-record('ApbCounterUpdate', + {inc % = 1, sint64 (optional) + }). +-endif. + +-ifndef('APBGETCOUNTERRESP_PB_H'). +-define('APBGETCOUNTERRESP_PB_H', true). +-record('ApbGetCounterResp', + {value % = 1, sint32 + }). +-endif. + +-ifndef('APBSETUPDATE_PB_H'). +-define('APBSETUPDATE_PB_H', true). +-record('ApbSetUpdate', + {optype, % = 1, {enum,'ApbSetUpdate.SetOpType'} + adds = [], % = 2, [bytes] + rems = [] % = 3, [bytes] + }). +-endif. + +-ifndef('APBGETSETRESP_PB_H'). +-define('APBGETSETRESP_PB_H', true). +-record('ApbGetSetResp', + {value = [] % = 1, [bytes] + }). +-endif. + +-ifndef('APBREGUPDATE_PB_H'). +-define('APBREGUPDATE_PB_H', true). +-record('ApbRegUpdate', + {value % = 1, bytes + }). +-endif. + +-ifndef('APBGETREGRESP_PB_H'). +-define('APBGETREGRESP_PB_H', true). +-record('ApbGetRegResp', + {value % = 1, bytes + }). +-endif. + +-ifndef('APBGETMVREGRESP_PB_H'). +-define('APBGETMVREGRESP_PB_H', true). +-record('ApbGetMVRegResp', + {values = [] % = 1, [bytes] + }). +-endif. + +-ifndef('APBMAPKEY_PB_H'). +-define('APBMAPKEY_PB_H', true). +-record('ApbMapKey', + {key, % = 1, bytes + type % = 2, {enum,'CRDT_type'} + }). +-endif. + +-ifndef('APBMAPUPDATE_PB_H'). +-define('APBMAPUPDATE_PB_H', true). +-record('ApbMapUpdate', + {updates = [], % = 1, [{msg,'ApbMapNestedUpdate'}] + removedKeys = [] % = 2, [{msg,'ApbMapKey'}] + }). +-endif. + +-ifndef('APBMAPNESTEDUPDATE_PB_H'). +-define('APBMAPNESTEDUPDATE_PB_H', true). +-record('ApbMapNestedUpdate', + {key, % = 1, {msg,'ApbMapKey'} + update % = 2, {msg,'ApbUpdateOperation'} + }). +-endif. + +-ifndef('APBGETMAPRESP_PB_H'). +-define('APBGETMAPRESP_PB_H', true). +-record('ApbGetMapResp', + {entries = [] % = 1, [{msg,'ApbMapEntry'}] + }). +-endif. + +-ifndef('APBMAPENTRY_PB_H'). +-define('APBMAPENTRY_PB_H', true). +-record('ApbMapEntry', + {key, % = 1, {msg,'ApbMapKey'} + value % = 2, {msg,'ApbReadObjectResp'} + }). +-endif. + +-ifndef('APBFLAGUPDATE_PB_H'). +-define('APBFLAGUPDATE_PB_H', true). +-record('ApbFlagUpdate', + {value % = 1, bool + }). +-endif. + +-ifndef('APBGETFLAGRESP_PB_H'). +-define('APBGETFLAGRESP_PB_H', true). +-record('ApbGetFlagResp', + {value % = 1, bool + }). +-endif. + +-ifndef('APBCRDTRESET_PB_H'). +-define('APBCRDTRESET_PB_H', true). +-record('ApbCrdtReset', + { + }). +-endif. + +-ifndef('APBOPERATIONRESP_PB_H'). +-define('APBOPERATIONRESP_PB_H', true). +-record('ApbOperationResp', + {success, % = 1, bool + errorcode % = 2, uint32 (optional) + }). +-endif. + +-ifndef('APBTXNPROPERTIES_PB_H'). +-define('APBTXNPROPERTIES_PB_H', true). +-record('ApbTxnProperties', + {read_write, % = 1, uint32 (optional) + red_blue % = 2, uint32 (optional) + }). +-endif. + +-ifndef('APBBOUNDOBJECT_PB_H'). +-define('APBBOUNDOBJECT_PB_H', true). +-record('ApbBoundObject', + {key, % = 1, bytes + type, % = 2, {enum,'CRDT_type'} + bucket % = 3, bytes + }). +-endif. + +-ifndef('APBREADOBJECTS_PB_H'). +-define('APBREADOBJECTS_PB_H', true). +-record('ApbReadObjects', + {boundobjects = [], % = 1, [{msg,'ApbBoundObject'}] + transaction_descriptor % = 2, bytes + }). +-endif. + +-ifndef('APBUPDATEOP_PB_H'). +-define('APBUPDATEOP_PB_H', true). +-record('ApbUpdateOp', + {boundobject, % = 1, {msg,'ApbBoundObject'} + operation % = 2, {msg,'ApbUpdateOperation'} + }). +-endif. + +-ifndef('APBUPDATEOPERATION_PB_H'). +-define('APBUPDATEOPERATION_PB_H', true). +-record('ApbUpdateOperation', + {counterop, % = 1, {msg,'ApbCounterUpdate'} (optional) + setop, % = 2, {msg,'ApbSetUpdate'} (optional) + regop, % = 3, {msg,'ApbRegUpdate'} (optional) + mapop, % = 5, {msg,'ApbMapUpdate'} (optional) + resetop, % = 6, {msg,'ApbCrdtReset'} (optional) + flagop % = 7, {msg,'ApbFlagUpdate'} (optional) + }). +-endif. + +-ifndef('APBUPDATEOBJECTS_PB_H'). +-define('APBUPDATEOBJECTS_PB_H', true). +-record('ApbUpdateObjects', + {updates = [], % = 1, [{msg,'ApbUpdateOp'}] + transaction_descriptor % = 2, bytes + }). +-endif. + +-ifndef('APBSTARTTRANSACTION_PB_H'). +-define('APBSTARTTRANSACTION_PB_H', true). +-record('ApbStartTransaction', + {timestamp, % = 1, bytes (optional) + properties % = 2, {msg,'ApbTxnProperties'} (optional) + }). +-endif. + +-ifndef('APBABORTTRANSACTION_PB_H'). +-define('APBABORTTRANSACTION_PB_H', true). +-record('ApbAbortTransaction', + {transaction_descriptor % = 1, bytes + }). +-endif. + +-ifndef('APBCOMMITTRANSACTION_PB_H'). +-define('APBCOMMITTRANSACTION_PB_H', true). +-record('ApbCommitTransaction', + {transaction_descriptor % = 1, bytes + }). +-endif. + +-ifndef('APBSTATICUPDATEOBJECTS_PB_H'). +-define('APBSTATICUPDATEOBJECTS_PB_H', true). +-record('ApbStaticUpdateObjects', + {transaction, % = 1, {msg,'ApbStartTransaction'} + updates = [] % = 2, [{msg,'ApbUpdateOp'}] + }). +-endif. + +-ifndef('APBSTATICREADOBJECTS_PB_H'). +-define('APBSTATICREADOBJECTS_PB_H', true). +-record('ApbStaticReadObjects', + {transaction, % = 1, {msg,'ApbStartTransaction'} + objects = [] % = 2, [{msg,'ApbBoundObject'}] + }). +-endif. + +-ifndef('APBSTARTTRANSACTIONRESP_PB_H'). +-define('APBSTARTTRANSACTIONRESP_PB_H', true). +-record('ApbStartTransactionResp', + {success, % = 1, bool + transaction_descriptor, % = 2, bytes (optional) + errorcode % = 3, uint32 (optional) + }). +-endif. + +-ifndef('APBREADOBJECTRESP_PB_H'). +-define('APBREADOBJECTRESP_PB_H', true). +-record('ApbReadObjectResp', + {counter, % = 1, {msg,'ApbGetCounterResp'} (optional) + set, % = 2, {msg,'ApbGetSetResp'} (optional) + reg, % = 3, {msg,'ApbGetRegResp'} (optional) + mvreg, % = 4, {msg,'ApbGetMVRegResp'} (optional) + map, % = 6, {msg,'ApbGetMapResp'} (optional) + flag % = 7, {msg,'ApbGetFlagResp'} (optional) + }). +-endif. + +-ifndef('APBREADOBJECTSRESP_PB_H'). +-define('APBREADOBJECTSRESP_PB_H', true). +-record('ApbReadObjectsResp', + {success, % = 1, bool + objects = [], % = 2, [{msg,'ApbReadObjectResp'}] + errorcode % = 3, uint32 (optional) + }). +-endif. + +-ifndef('APBCOMMITRESP_PB_H'). +-define('APBCOMMITRESP_PB_H', true). +-record('ApbCommitResp', + {success, % = 1, bool + commit_time, % = 2, bytes (optional) + errorcode % = 3, uint32 (optional) + }). +-endif. + +-ifndef('APBSTATICREADOBJECTSRESP_PB_H'). +-define('APBSTATICREADOBJECTSRESP_PB_H', true). +-record('ApbStaticReadObjectsResp', + {objects, % = 1, {msg,'ApbReadObjectsResp'} + committime % = 2, {msg,'ApbCommitResp'} + }). +-endif. + +-endif. diff --git a/include/gpb.hrl b/include/gpb.hrl new file mode 100644 index 0000000..a7856ed --- /dev/null +++ b/include/gpb.hrl @@ -0,0 +1,117 @@ +-ifndef(gpb_hrl). +-define(gpb_hrl, true). + +-type gpb_scalar() :: + int32 | int64 | uint32 | uint64 | sint32 | sint64 + | fixed32 | fixed64 | sfixed32 | sfixed64 + | bool + | float | double + | string + | bytes. + +-type gpb_map_key() :: % "any scalar type except floating point types and bytes" + int32 | int64 | uint32 | uint64 | sint32 | sint64 + | fixed32 | fixed64 | sfixed32 | sfixed64 + | bool + | string. + +%% It is not possible to have maps in maps directly, +%% so this type is any gpb_field_type() except {map,K,V}. +-type gpb_map_value() :: + gpb_scalar() + | {enum,atom()} + | {msg,atom()}. + +-type gpb_field_type() :: %% Erlang type Comment + int32 | int64 % integer() variable-length encoded + | uint32 | uint64 % integer() variable-length encoded + | sint32 | sint64 % integer() variable-length zig-zag encoded + | fixed32 | fixed64 % integer() always 4 | 8 bytes on wire + | sfixed32 | sfixed64 % integer() always 4 | 8 bytes on wire + | bool % true | false + | float | double % float() + | string % string() UTF-8 encoded + % | binary() iff option `strings_as_binaries' + | bytes % binary() + | {enum,atom()} % atom() the enum literal is the atom + | {msg,atom()} % record() the message name is record name + % | map() iff option `maps' + | {group,atom()} % record() name is _ + % | map() iff option `maps' + | {map,gpb_map_key(),gpb_map_value()}. % [{K,V}] | map() + +%% An intermediary type temporarily used internally within gpb during parsing, +%% neither returned from gpb, nor accepted as input go gpb. +-type gpb_internal_intermediary_ref() :: + {ref, term()} | + {msg, list()} | + {group, list()} | + {enum, list()}. + +-type gpb_internal_intermediary_map_ref() :: + {map, gpb_map_key(), gpb_map_value() | gpb_internal_intermediary_ref()}. + +%% The following two definitions (`gpb_field' and `gpb_rpc') are to +%% avoid clashes with other code, since the `field' and `rpc' are +%% really too general names, they should have been prefixed. +%% +%% Unfortunately, they are already part of the API, so they can't +%% be changed without breaking backwards compatibility. +%% (They appear as parameters or return values for functions in `gpb' +%% in generated code.) +%% +%% In case a clash, it is possible to redefine the name locally. +%% The recommendation is to redefine them with prefix, ie to `gpb_field' +%% and `gpb_rpc', since this is what they will change to in some future. +%% +-ifdef(gpb_field_record_name). +-define(gpb_field, ?gpb_field_record_name). +-else. +-define(gpb_field, field). %% odd definition is due to backwards compatibility +-endif. + +-ifdef(gpb_rpc_record_name). +-define(gpb_rpc, ?gpb_rpc_record_name). +-else. +-define(gpb_rpc, rpc). %% odd definition is due to backwards compatibility +-endif. + +-record(?gpb_field, % NB: record name is (currently) `field' (not `gpb_field')! + {name :: atom() + | undefined, % temporarily in some phases + fnum :: integer() + | undefined, % temporarily in some phases + rnum :: pos_integer() % field number in the record + | undefined, % temporarily, during parsing + type :: gpb_field_type() | + gpb_internal_intermediary_ref() | + gpb_internal_intermediary_map_ref() + | undefined, % temporarily in some phases + occurrence :: 'required' | 'optional' | 'repeated' + | undefined, % temporarily in some phases + opts = [] :: [term()] + }). + +-record(gpb_oneof, + {name :: atom() + | undefined, % temporarily in some phases + rnum :: pos_integer() % field number in the record + | undefined, % temporarily, during parsing + fields :: [#?gpb_field{}] % all fields have the same rnum + | undefined % temporarily in some phases + }). + +-record(?gpb_rpc, % NB: record name is (currently) `rpc' (not `gpb_rpc')! + {name :: atom() + | undefined, % temporarily in some phases + input, + output, + input_stream :: boolean() + | undefined, % temporarily in some phases + output_stream :: boolean() + | undefined, % temporarily in some phases + opts :: [term()] + | undefined % temporarily in some phases + }). + +-endif. diff --git a/rebar.config b/rebar.config index e58b117..7b1f06c 100644 --- a/rebar.config +++ b/rebar.config @@ -1,25 +1 @@ -{erl_opts, [ - debug_info, - {i, "./_build/default/plugins/gpb/include"} - ]}. - -{deps, []}. - -{plugins, [ - {rebar3_gpb_plugin, "2.2.7"} -]}. - -{gpb_opts, [ - {i, "proto"}, % path/to/proto_dir - {module_name_suffix, "_pb"}, % Naming convention - {o_erl, "src"}, % Where the generated source is placed - {o_hrl, "include"}, % Where the generated include files are placed - {strings_as_binaries, true}, - type_specs]}. - -{provider_hooks, [ - {pre, [ - {compile, {protobuf, compile}}, - {clean, {protobuf, clean}} - ]} -]}. +{deps, []}. \ No newline at end of file diff --git a/src/antidote_pb.erl b/src/antidote_pb.erl new file mode 100644 index 0000000..074427b --- /dev/null +++ b/src/antidote_pb.erl @@ -0,0 +1,7842 @@ +%% -*- coding: utf-8 -*- +%% Automatically generated, do not edit +%% Generated by gpb_compile version 4.1.8 +-module(antidote_pb). + +-export([encode_msg/1, encode_msg/2]). +-export([decode_msg/2, decode_msg/3]). +-export([merge_msgs/2, merge_msgs/3]). +-export([verify_msg/1, verify_msg/2]). +-export([get_msg_defs/0]). +-export([get_msg_names/0]). +-export([get_group_names/0]). +-export([get_msg_or_group_names/0]). +-export([get_enum_names/0]). +-export([find_msg_def/1, fetch_msg_def/1]). +-export([find_enum_def/1, fetch_enum_def/1]). +-export([enum_symbol_by_value/2, enum_value_by_symbol/2]). +-export([enum_symbol_by_value_CRDT_type/1, enum_value_by_symbol_CRDT_type/1]). +-export(['enum_symbol_by_value_ApbSetUpdate.SetOpType'/1, 'enum_value_by_symbol_ApbSetUpdate.SetOpType'/1]). +-export([get_service_names/0]). +-export([get_service_def/1]). +-export([get_rpc_names/1]). +-export([find_rpc_def/2, fetch_rpc_def/2]). +-export([get_package_name/0]). +-export([gpb_version_as_string/0, gpb_version_as_list/0]). + +-include("antidote_pb.hrl"). +-include("gpb.hrl"). + + +-spec encode_msg(#'ApbErrorResp'{} | #'ApbCounterUpdate'{} | #'ApbGetCounterResp'{} | #'ApbSetUpdate'{} | #'ApbGetSetResp'{} | #'ApbRegUpdate'{} | #'ApbGetRegResp'{} | #'ApbGetMVRegResp'{} | #'ApbMapKey'{} | #'ApbMapUpdate'{} | #'ApbMapNestedUpdate'{} | #'ApbGetMapResp'{} | #'ApbMapEntry'{} | #'ApbFlagUpdate'{} | #'ApbGetFlagResp'{} | #'ApbCrdtReset'{} | #'ApbOperationResp'{} | #'ApbTxnProperties'{} | #'ApbBoundObject'{} | #'ApbReadObjects'{} | #'ApbUpdateOp'{} | #'ApbUpdateOperation'{} | #'ApbUpdateObjects'{} | #'ApbStartTransaction'{} | #'ApbAbortTransaction'{} | #'ApbCommitTransaction'{} | #'ApbStaticUpdateObjects'{} | #'ApbStaticReadObjects'{} | #'ApbStartTransactionResp'{} | #'ApbReadObjectResp'{} | #'ApbReadObjectsResp'{} | #'ApbCommitResp'{} | #'ApbStaticReadObjectsResp'{}) -> binary(). +encode_msg(Msg) -> encode_msg(Msg, []). + + +-spec encode_msg(#'ApbErrorResp'{} | #'ApbCounterUpdate'{} | #'ApbGetCounterResp'{} | #'ApbSetUpdate'{} | #'ApbGetSetResp'{} | #'ApbRegUpdate'{} | #'ApbGetRegResp'{} | #'ApbGetMVRegResp'{} | #'ApbMapKey'{} | #'ApbMapUpdate'{} | #'ApbMapNestedUpdate'{} | #'ApbGetMapResp'{} | #'ApbMapEntry'{} | #'ApbFlagUpdate'{} | #'ApbGetFlagResp'{} | #'ApbCrdtReset'{} | #'ApbOperationResp'{} | #'ApbTxnProperties'{} | #'ApbBoundObject'{} | #'ApbReadObjects'{} | #'ApbUpdateOp'{} | #'ApbUpdateOperation'{} | #'ApbUpdateObjects'{} | #'ApbStartTransaction'{} | #'ApbAbortTransaction'{} | #'ApbCommitTransaction'{} | #'ApbStaticUpdateObjects'{} | #'ApbStaticReadObjects'{} | #'ApbStartTransactionResp'{} | #'ApbReadObjectResp'{} | #'ApbReadObjectsResp'{} | #'ApbCommitResp'{} | #'ApbStaticReadObjectsResp'{}, list()) -> binary(). +encode_msg(Msg, Opts) -> + case proplists:get_bool(verify, Opts) of + true -> verify_msg(Msg, Opts); + false -> ok + end, + TrUserData = proplists:get_value(user_data, Opts), + case Msg of + #'ApbErrorResp'{} -> + e_msg_ApbErrorResp(Msg, TrUserData); + #'ApbCounterUpdate'{} -> + e_msg_ApbCounterUpdate(Msg, TrUserData); + #'ApbGetCounterResp'{} -> + e_msg_ApbGetCounterResp(Msg, TrUserData); + #'ApbSetUpdate'{} -> + e_msg_ApbSetUpdate(Msg, TrUserData); + #'ApbGetSetResp'{} -> + e_msg_ApbGetSetResp(Msg, TrUserData); + #'ApbRegUpdate'{} -> + e_msg_ApbRegUpdate(Msg, TrUserData); + #'ApbGetRegResp'{} -> + e_msg_ApbGetRegResp(Msg, TrUserData); + #'ApbGetMVRegResp'{} -> + e_msg_ApbGetMVRegResp(Msg, TrUserData); + #'ApbMapKey'{} -> e_msg_ApbMapKey(Msg, TrUserData); + #'ApbMapUpdate'{} -> + e_msg_ApbMapUpdate(Msg, TrUserData); + #'ApbMapNestedUpdate'{} -> + e_msg_ApbMapNestedUpdate(Msg, TrUserData); + #'ApbGetMapResp'{} -> + e_msg_ApbGetMapResp(Msg, TrUserData); + #'ApbMapEntry'{} -> e_msg_ApbMapEntry(Msg, TrUserData); + #'ApbFlagUpdate'{} -> + e_msg_ApbFlagUpdate(Msg, TrUserData); + #'ApbGetFlagResp'{} -> + e_msg_ApbGetFlagResp(Msg, TrUserData); + #'ApbCrdtReset'{} -> + e_msg_ApbCrdtReset(Msg, TrUserData); + #'ApbOperationResp'{} -> + e_msg_ApbOperationResp(Msg, TrUserData); + #'ApbTxnProperties'{} -> + e_msg_ApbTxnProperties(Msg, TrUserData); + #'ApbBoundObject'{} -> + e_msg_ApbBoundObject(Msg, TrUserData); + #'ApbReadObjects'{} -> + e_msg_ApbReadObjects(Msg, TrUserData); + #'ApbUpdateOp'{} -> e_msg_ApbUpdateOp(Msg, TrUserData); + #'ApbUpdateOperation'{} -> + e_msg_ApbUpdateOperation(Msg, TrUserData); + #'ApbUpdateObjects'{} -> + e_msg_ApbUpdateObjects(Msg, TrUserData); + #'ApbStartTransaction'{} -> + e_msg_ApbStartTransaction(Msg, TrUserData); + #'ApbAbortTransaction'{} -> + e_msg_ApbAbortTransaction(Msg, TrUserData); + #'ApbCommitTransaction'{} -> + e_msg_ApbCommitTransaction(Msg, TrUserData); + #'ApbStaticUpdateObjects'{} -> + e_msg_ApbStaticUpdateObjects(Msg, TrUserData); + #'ApbStaticReadObjects'{} -> + e_msg_ApbStaticReadObjects(Msg, TrUserData); + #'ApbStartTransactionResp'{} -> + e_msg_ApbStartTransactionResp(Msg, TrUserData); + #'ApbReadObjectResp'{} -> + e_msg_ApbReadObjectResp(Msg, TrUserData); + #'ApbReadObjectsResp'{} -> + e_msg_ApbReadObjectsResp(Msg, TrUserData); + #'ApbCommitResp'{} -> + e_msg_ApbCommitResp(Msg, TrUserData); + #'ApbStaticReadObjectsResp'{} -> + e_msg_ApbStaticReadObjectsResp(Msg, TrUserData) + end. + + + +e_msg_ApbErrorResp(Msg, TrUserData) -> + e_msg_ApbErrorResp(Msg, <<>>, TrUserData). + + +e_msg_ApbErrorResp(#'ApbErrorResp'{errmsg = F1, + errcode = F2}, + Bin, TrUserData) -> + B1 = begin + TrF1 = id(F1, TrUserData), + e_type_bytes(TrF1, <>) + end, + begin + TrF2 = id(F2, TrUserData), + e_varint(TrF2, <>) + end. + +e_msg_ApbCounterUpdate(Msg, TrUserData) -> + e_msg_ApbCounterUpdate(Msg, <<>>, TrUserData). + + +e_msg_ApbCounterUpdate(#'ApbCounterUpdate'{inc = F1}, + Bin, TrUserData) -> + if F1 == undefined -> Bin; + true -> + begin + TrF1 = id(F1, TrUserData), + e_type_sint(TrF1, <>) + end + end. + +e_msg_ApbGetCounterResp(Msg, TrUserData) -> + e_msg_ApbGetCounterResp(Msg, <<>>, TrUserData). + + +e_msg_ApbGetCounterResp(#'ApbGetCounterResp'{value = + F1}, + Bin, TrUserData) -> + begin + TrF1 = id(F1, TrUserData), + e_type_sint(TrF1, <>) + end. + +e_msg_ApbSetUpdate(Msg, TrUserData) -> + e_msg_ApbSetUpdate(Msg, <<>>, TrUserData). + + +e_msg_ApbSetUpdate(#'ApbSetUpdate'{optype = F1, + adds = F2, rems = F3}, + Bin, TrUserData) -> + B1 = begin + TrF1 = id(F1, TrUserData), + 'e_enum_ApbSetUpdate.SetOpType'(TrF1, <>) + end, + B2 = begin + TrF2 = id(F2, TrUserData), + if TrF2 == [] -> B1; + true -> e_field_ApbSetUpdate_adds(TrF2, B1, TrUserData) + end + end, + begin + TrF3 = id(F3, TrUserData), + if TrF3 == [] -> B2; + true -> e_field_ApbSetUpdate_rems(TrF3, B2, TrUserData) + end + end. + +e_msg_ApbGetSetResp(Msg, TrUserData) -> + e_msg_ApbGetSetResp(Msg, <<>>, TrUserData). + + +e_msg_ApbGetSetResp(#'ApbGetSetResp'{value = F1}, Bin, + TrUserData) -> + begin + TrF1 = id(F1, TrUserData), + if TrF1 == [] -> Bin; + true -> + e_field_ApbGetSetResp_value(TrF1, Bin, TrUserData) + end + end. + +e_msg_ApbRegUpdate(Msg, TrUserData) -> + e_msg_ApbRegUpdate(Msg, <<>>, TrUserData). + + +e_msg_ApbRegUpdate(#'ApbRegUpdate'{value = F1}, Bin, + TrUserData) -> + begin + TrF1 = id(F1, TrUserData), + e_type_bytes(TrF1, <>) + end. + +e_msg_ApbGetRegResp(Msg, TrUserData) -> + e_msg_ApbGetRegResp(Msg, <<>>, TrUserData). + + +e_msg_ApbGetRegResp(#'ApbGetRegResp'{value = F1}, Bin, + TrUserData) -> + begin + TrF1 = id(F1, TrUserData), + e_type_bytes(TrF1, <>) + end. + +e_msg_ApbGetMVRegResp(Msg, TrUserData) -> + e_msg_ApbGetMVRegResp(Msg, <<>>, TrUserData). + + +e_msg_ApbGetMVRegResp(#'ApbGetMVRegResp'{values = F1}, + Bin, TrUserData) -> + begin + TrF1 = id(F1, TrUserData), + if TrF1 == [] -> Bin; + true -> + e_field_ApbGetMVRegResp_values(TrF1, Bin, TrUserData) + end + end. + +e_msg_ApbMapKey(Msg, TrUserData) -> + e_msg_ApbMapKey(Msg, <<>>, TrUserData). + + +e_msg_ApbMapKey(#'ApbMapKey'{key = F1, type = F2}, Bin, + TrUserData) -> + B1 = begin + TrF1 = id(F1, TrUserData), + e_type_bytes(TrF1, <>) + end, + begin + TrF2 = id(F2, TrUserData), + e_enum_CRDT_type(TrF2, <>) + end. + +e_msg_ApbMapUpdate(Msg, TrUserData) -> + e_msg_ApbMapUpdate(Msg, <<>>, TrUserData). + + +e_msg_ApbMapUpdate(#'ApbMapUpdate'{updates = F1, + removedKeys = F2}, + Bin, TrUserData) -> + B1 = begin + TrF1 = id(F1, TrUserData), + if TrF1 == [] -> Bin; + true -> + e_field_ApbMapUpdate_updates(TrF1, Bin, TrUserData) + end + end, + begin + TrF2 = id(F2, TrUserData), + if TrF2 == [] -> B1; + true -> + e_field_ApbMapUpdate_removedKeys(TrF2, B1, TrUserData) + end + end. + +e_msg_ApbMapNestedUpdate(Msg, TrUserData) -> + e_msg_ApbMapNestedUpdate(Msg, <<>>, TrUserData). + + +e_msg_ApbMapNestedUpdate(#'ApbMapNestedUpdate'{key = F1, + update = F2}, + Bin, TrUserData) -> + B1 = begin + TrF1 = id(F1, TrUserData), + e_mfield_ApbMapNestedUpdate_key(TrF1, + <>, TrUserData) + end, + begin + TrF2 = id(F2, TrUserData), + e_mfield_ApbMapNestedUpdate_update(TrF2, + <>, TrUserData) + end. + +e_msg_ApbGetMapResp(Msg, TrUserData) -> + e_msg_ApbGetMapResp(Msg, <<>>, TrUserData). + + +e_msg_ApbGetMapResp(#'ApbGetMapResp'{entries = F1}, Bin, + TrUserData) -> + begin + TrF1 = id(F1, TrUserData), + if TrF1 == [] -> Bin; + true -> + e_field_ApbGetMapResp_entries(TrF1, Bin, TrUserData) + end + end. + +e_msg_ApbMapEntry(Msg, TrUserData) -> + e_msg_ApbMapEntry(Msg, <<>>, TrUserData). + + +e_msg_ApbMapEntry(#'ApbMapEntry'{key = F1, value = F2}, + Bin, TrUserData) -> + B1 = begin + TrF1 = id(F1, TrUserData), + e_mfield_ApbMapEntry_key(TrF1, <>, + TrUserData) + end, + begin + TrF2 = id(F2, TrUserData), + e_mfield_ApbMapEntry_value(TrF2, <>, + TrUserData) + end. + +e_msg_ApbFlagUpdate(Msg, TrUserData) -> + e_msg_ApbFlagUpdate(Msg, <<>>, TrUserData). + + +e_msg_ApbFlagUpdate(#'ApbFlagUpdate'{value = F1}, Bin, + TrUserData) -> + begin + TrF1 = id(F1, TrUserData), + e_type_bool(TrF1, <>) + end. + +e_msg_ApbGetFlagResp(Msg, TrUserData) -> + e_msg_ApbGetFlagResp(Msg, <<>>, TrUserData). + + +e_msg_ApbGetFlagResp(#'ApbGetFlagResp'{value = F1}, Bin, + TrUserData) -> + begin + TrF1 = id(F1, TrUserData), + e_type_bool(TrF1, <>) + end. + +e_msg_ApbCrdtReset(_Msg, _TrUserData) -> <<>>. + +e_msg_ApbOperationResp(Msg, TrUserData) -> + e_msg_ApbOperationResp(Msg, <<>>, TrUserData). + + +e_msg_ApbOperationResp(#'ApbOperationResp'{success = F1, + errorcode = F2}, + Bin, TrUserData) -> + B1 = begin + TrF1 = id(F1, TrUserData), + e_type_bool(TrF1, <>) + end, + if F2 == undefined -> B1; + true -> + begin + TrF2 = id(F2, TrUserData), + e_varint(TrF2, <>) + end + end. + +e_msg_ApbTxnProperties(Msg, TrUserData) -> + e_msg_ApbTxnProperties(Msg, <<>>, TrUserData). + + +e_msg_ApbTxnProperties(#'ApbTxnProperties'{read_write = + F1, + red_blue = F2}, + Bin, TrUserData) -> + B1 = if F1 == undefined -> Bin; + true -> + begin + TrF1 = id(F1, TrUserData), + e_varint(TrF1, <>) + end + end, + if F2 == undefined -> B1; + true -> + begin + TrF2 = id(F2, TrUserData), + e_varint(TrF2, <>) + end + end. + +e_msg_ApbBoundObject(Msg, TrUserData) -> + e_msg_ApbBoundObject(Msg, <<>>, TrUserData). + + +e_msg_ApbBoundObject(#'ApbBoundObject'{key = F1, + type = F2, bucket = F3}, + Bin, TrUserData) -> + B1 = begin + TrF1 = id(F1, TrUserData), + e_type_bytes(TrF1, <>) + end, + B2 = begin + TrF2 = id(F2, TrUserData), + e_enum_CRDT_type(TrF2, <>) + end, + begin + TrF3 = id(F3, TrUserData), + e_type_bytes(TrF3, <>) + end. + +e_msg_ApbReadObjects(Msg, TrUserData) -> + e_msg_ApbReadObjects(Msg, <<>>, TrUserData). + + +e_msg_ApbReadObjects(#'ApbReadObjects'{boundobjects = + F1, + transaction_descriptor = F2}, + Bin, TrUserData) -> + B1 = begin + TrF1 = id(F1, TrUserData), + if TrF1 == [] -> Bin; + true -> + e_field_ApbReadObjects_boundobjects(TrF1, Bin, + TrUserData) + end + end, + begin + TrF2 = id(F2, TrUserData), + e_type_bytes(TrF2, <>) + end. + +e_msg_ApbUpdateOp(Msg, TrUserData) -> + e_msg_ApbUpdateOp(Msg, <<>>, TrUserData). + + +e_msg_ApbUpdateOp(#'ApbUpdateOp'{boundobject = F1, + operation = F2}, + Bin, TrUserData) -> + B1 = begin + TrF1 = id(F1, TrUserData), + e_mfield_ApbUpdateOp_boundobject(TrF1, + <>, TrUserData) + end, + begin + TrF2 = id(F2, TrUserData), + e_mfield_ApbUpdateOp_operation(TrF2, <>, + TrUserData) + end. + +e_msg_ApbUpdateOperation(Msg, TrUserData) -> + e_msg_ApbUpdateOperation(Msg, <<>>, TrUserData). + + +e_msg_ApbUpdateOperation(#'ApbUpdateOperation'{counterop + = F1, + setop = F2, regop = F3, + mapop = F4, resetop = F5, + flagop = F6}, + Bin, TrUserData) -> + B1 = if F1 == undefined -> Bin; + true -> + begin + TrF1 = id(F1, TrUserData), + e_mfield_ApbUpdateOperation_counterop(TrF1, + <>, + TrUserData) + end + end, + B2 = if F2 == undefined -> B1; + true -> + begin + TrF2 = id(F2, TrUserData), + e_mfield_ApbUpdateOperation_setop(TrF2, + <>, + TrUserData) + end + end, + B3 = if F3 == undefined -> B2; + true -> + begin + TrF3 = id(F3, TrUserData), + e_mfield_ApbUpdateOperation_regop(TrF3, + <>, + TrUserData) + end + end, + B4 = if F4 == undefined -> B3; + true -> + begin + TrF4 = id(F4, TrUserData), + e_mfield_ApbUpdateOperation_mapop(TrF4, + <>, + TrUserData) + end + end, + B5 = if F5 == undefined -> B4; + true -> + begin + TrF5 = id(F5, TrUserData), + e_mfield_ApbUpdateOperation_resetop(TrF5, + <>, + TrUserData) + end + end, + if F6 == undefined -> B5; + true -> + begin + TrF6 = id(F6, TrUserData), + e_mfield_ApbUpdateOperation_flagop(TrF6, + <>, TrUserData) + end + end. + +e_msg_ApbUpdateObjects(Msg, TrUserData) -> + e_msg_ApbUpdateObjects(Msg, <<>>, TrUserData). + + +e_msg_ApbUpdateObjects(#'ApbUpdateObjects'{updates = F1, + transaction_descriptor = F2}, + Bin, TrUserData) -> + B1 = begin + TrF1 = id(F1, TrUserData), + if TrF1 == [] -> Bin; + true -> + e_field_ApbUpdateObjects_updates(TrF1, Bin, TrUserData) + end + end, + begin + TrF2 = id(F2, TrUserData), + e_type_bytes(TrF2, <>) + end. + +e_msg_ApbStartTransaction(Msg, TrUserData) -> + e_msg_ApbStartTransaction(Msg, <<>>, TrUserData). + + +e_msg_ApbStartTransaction(#'ApbStartTransaction'{timestamp + = F1, + properties = F2}, + Bin, TrUserData) -> + B1 = if F1 == undefined -> Bin; + true -> + begin + TrF1 = id(F1, TrUserData), + e_type_bytes(TrF1, <>) + end + end, + if F2 == undefined -> B1; + true -> + begin + TrF2 = id(F2, TrUserData), + e_mfield_ApbStartTransaction_properties(TrF2, + <>, + TrUserData) + end + end. + +e_msg_ApbAbortTransaction(Msg, TrUserData) -> + e_msg_ApbAbortTransaction(Msg, <<>>, TrUserData). + + +e_msg_ApbAbortTransaction(#'ApbAbortTransaction'{transaction_descriptor + = F1}, + Bin, TrUserData) -> + begin + TrF1 = id(F1, TrUserData), + e_type_bytes(TrF1, <>) + end. + +e_msg_ApbCommitTransaction(Msg, TrUserData) -> + e_msg_ApbCommitTransaction(Msg, <<>>, TrUserData). + + +e_msg_ApbCommitTransaction(#'ApbCommitTransaction'{transaction_descriptor + = F1}, + Bin, TrUserData) -> + begin + TrF1 = id(F1, TrUserData), + e_type_bytes(TrF1, <>) + end. + +e_msg_ApbStaticUpdateObjects(Msg, TrUserData) -> + e_msg_ApbStaticUpdateObjects(Msg, <<>>, TrUserData). + + +e_msg_ApbStaticUpdateObjects(#'ApbStaticUpdateObjects'{transaction + = F1, + updates = F2}, + Bin, TrUserData) -> + B1 = begin + TrF1 = id(F1, TrUserData), + e_mfield_ApbStaticUpdateObjects_transaction(TrF1, + <>, + TrUserData) + end, + begin + TrF2 = id(F2, TrUserData), + if TrF2 == [] -> B1; + true -> + e_field_ApbStaticUpdateObjects_updates(TrF2, B1, + TrUserData) + end + end. + +e_msg_ApbStaticReadObjects(Msg, TrUserData) -> + e_msg_ApbStaticReadObjects(Msg, <<>>, TrUserData). + + +e_msg_ApbStaticReadObjects(#'ApbStaticReadObjects'{transaction + = F1, + objects = F2}, + Bin, TrUserData) -> + B1 = begin + TrF1 = id(F1, TrUserData), + e_mfield_ApbStaticReadObjects_transaction(TrF1, + <>, + TrUserData) + end, + begin + TrF2 = id(F2, TrUserData), + if TrF2 == [] -> B1; + true -> + e_field_ApbStaticReadObjects_objects(TrF2, B1, + TrUserData) + end + end. + +e_msg_ApbStartTransactionResp(Msg, TrUserData) -> + e_msg_ApbStartTransactionResp(Msg, <<>>, TrUserData). + + +e_msg_ApbStartTransactionResp(#'ApbStartTransactionResp'{success + = F1, + transaction_descriptor + = F2, + errorcode = F3}, + Bin, TrUserData) -> + B1 = begin + TrF1 = id(F1, TrUserData), + e_type_bool(TrF1, <>) + end, + B2 = if F2 == undefined -> B1; + true -> + begin + TrF2 = id(F2, TrUserData), + e_type_bytes(TrF2, <>) + end + end, + if F3 == undefined -> B2; + true -> + begin + TrF3 = id(F3, TrUserData), + e_varint(TrF3, <>) + end + end. + +e_msg_ApbReadObjectResp(Msg, TrUserData) -> + e_msg_ApbReadObjectResp(Msg, <<>>, TrUserData). + + +e_msg_ApbReadObjectResp(#'ApbReadObjectResp'{counter = + F1, + set = F2, reg = F3, mvreg = F4, + map = F5, flag = F6}, + Bin, TrUserData) -> + B1 = if F1 == undefined -> Bin; + true -> + begin + TrF1 = id(F1, TrUserData), + e_mfield_ApbReadObjectResp_counter(TrF1, + <>, + TrUserData) + end + end, + B2 = if F2 == undefined -> B1; + true -> + begin + TrF2 = id(F2, TrUserData), + e_mfield_ApbReadObjectResp_set(TrF2, <>, + TrUserData) + end + end, + B3 = if F3 == undefined -> B2; + true -> + begin + TrF3 = id(F3, TrUserData), + e_mfield_ApbReadObjectResp_reg(TrF3, <>, + TrUserData) + end + end, + B4 = if F4 == undefined -> B3; + true -> + begin + TrF4 = id(F4, TrUserData), + e_mfield_ApbReadObjectResp_mvreg(TrF4, + <>, + TrUserData) + end + end, + B5 = if F5 == undefined -> B4; + true -> + begin + TrF5 = id(F5, TrUserData), + e_mfield_ApbReadObjectResp_map(TrF5, <>, + TrUserData) + end + end, + if F6 == undefined -> B5; + true -> + begin + TrF6 = id(F6, TrUserData), + e_mfield_ApbReadObjectResp_flag(TrF6, <>, + TrUserData) + end + end. + +e_msg_ApbReadObjectsResp(Msg, TrUserData) -> + e_msg_ApbReadObjectsResp(Msg, <<>>, TrUserData). + + +e_msg_ApbReadObjectsResp(#'ApbReadObjectsResp'{success = + F1, + objects = F2, errorcode = F3}, + Bin, TrUserData) -> + B1 = begin + TrF1 = id(F1, TrUserData), + e_type_bool(TrF1, <>) + end, + B2 = begin + TrF2 = id(F2, TrUserData), + if TrF2 == [] -> B1; + true -> + e_field_ApbReadObjectsResp_objects(TrF2, B1, TrUserData) + end + end, + if F3 == undefined -> B2; + true -> + begin + TrF3 = id(F3, TrUserData), + e_varint(TrF3, <>) + end + end. + +e_msg_ApbCommitResp(Msg, TrUserData) -> + e_msg_ApbCommitResp(Msg, <<>>, TrUserData). + + +e_msg_ApbCommitResp(#'ApbCommitResp'{success = F1, + commit_time = F2, errorcode = F3}, + Bin, TrUserData) -> + B1 = begin + TrF1 = id(F1, TrUserData), + e_type_bool(TrF1, <>) + end, + B2 = if F2 == undefined -> B1; + true -> + begin + TrF2 = id(F2, TrUserData), + e_type_bytes(TrF2, <>) + end + end, + if F3 == undefined -> B2; + true -> + begin + TrF3 = id(F3, TrUserData), + e_varint(TrF3, <>) + end + end. + +e_msg_ApbStaticReadObjectsResp(Msg, TrUserData) -> + e_msg_ApbStaticReadObjectsResp(Msg, <<>>, TrUserData). + + +e_msg_ApbStaticReadObjectsResp(#'ApbStaticReadObjectsResp'{objects + = F1, + committime = F2}, + Bin, TrUserData) -> + B1 = begin + TrF1 = id(F1, TrUserData), + e_mfield_ApbStaticReadObjectsResp_objects(TrF1, + <>, + TrUserData) + end, + begin + TrF2 = id(F2, TrUserData), + e_mfield_ApbStaticReadObjectsResp_committime(TrF2, + <>, + TrUserData) + end. + +e_field_ApbSetUpdate_adds([Elem | Rest], Bin, + TrUserData) -> + Bin2 = <>, + Bin3 = e_type_bytes(id(Elem, TrUserData), Bin2), + e_field_ApbSetUpdate_adds(Rest, Bin3, TrUserData); +e_field_ApbSetUpdate_adds([], Bin, _TrUserData) -> Bin. + +e_field_ApbSetUpdate_rems([Elem | Rest], Bin, + TrUserData) -> + Bin2 = <>, + Bin3 = e_type_bytes(id(Elem, TrUserData), Bin2), + e_field_ApbSetUpdate_rems(Rest, Bin3, TrUserData); +e_field_ApbSetUpdate_rems([], Bin, _TrUserData) -> Bin. + +e_field_ApbGetSetResp_value([Elem | Rest], Bin, + TrUserData) -> + Bin2 = <>, + Bin3 = e_type_bytes(id(Elem, TrUserData), Bin2), + e_field_ApbGetSetResp_value(Rest, Bin3, TrUserData); +e_field_ApbGetSetResp_value([], Bin, _TrUserData) -> + Bin. + +e_field_ApbGetMVRegResp_values([Elem | Rest], Bin, + TrUserData) -> + Bin2 = <>, + Bin3 = e_type_bytes(id(Elem, TrUserData), Bin2), + e_field_ApbGetMVRegResp_values(Rest, Bin3, TrUserData); +e_field_ApbGetMVRegResp_values([], Bin, _TrUserData) -> + Bin. + +e_mfield_ApbMapUpdate_updates(Msg, Bin, TrUserData) -> + SubBin = e_msg_ApbMapNestedUpdate(Msg, <<>>, + TrUserData), + Bin2 = e_varint(byte_size(SubBin), Bin), + <>. + +e_field_ApbMapUpdate_updates([Elem | Rest], Bin, + TrUserData) -> + Bin2 = <>, + Bin3 = e_mfield_ApbMapUpdate_updates(id(Elem, + TrUserData), + Bin2, TrUserData), + e_field_ApbMapUpdate_updates(Rest, Bin3, TrUserData); +e_field_ApbMapUpdate_updates([], Bin, _TrUserData) -> + Bin. + +e_mfield_ApbMapUpdate_removedKeys(Msg, Bin, + TrUserData) -> + SubBin = e_msg_ApbMapKey(Msg, <<>>, TrUserData), + Bin2 = e_varint(byte_size(SubBin), Bin), + <>. + +e_field_ApbMapUpdate_removedKeys([Elem | Rest], Bin, + TrUserData) -> + Bin2 = <>, + Bin3 = e_mfield_ApbMapUpdate_removedKeys(id(Elem, + TrUserData), + Bin2, TrUserData), + e_field_ApbMapUpdate_removedKeys(Rest, Bin3, + TrUserData); +e_field_ApbMapUpdate_removedKeys([], Bin, + _TrUserData) -> + Bin. + +e_mfield_ApbMapNestedUpdate_key(Msg, Bin, TrUserData) -> + SubBin = e_msg_ApbMapKey(Msg, <<>>, TrUserData), + Bin2 = e_varint(byte_size(SubBin), Bin), + <>. + +e_mfield_ApbMapNestedUpdate_update(Msg, Bin, + TrUserData) -> + SubBin = e_msg_ApbUpdateOperation(Msg, <<>>, + TrUserData), + Bin2 = e_varint(byte_size(SubBin), Bin), + <>. + +e_mfield_ApbGetMapResp_entries(Msg, Bin, TrUserData) -> + SubBin = e_msg_ApbMapEntry(Msg, <<>>, TrUserData), + Bin2 = e_varint(byte_size(SubBin), Bin), + <>. + +e_field_ApbGetMapResp_entries([Elem | Rest], Bin, + TrUserData) -> + Bin2 = <>, + Bin3 = e_mfield_ApbGetMapResp_entries(id(Elem, + TrUserData), + Bin2, TrUserData), + e_field_ApbGetMapResp_entries(Rest, Bin3, TrUserData); +e_field_ApbGetMapResp_entries([], Bin, _TrUserData) -> + Bin. + +e_mfield_ApbMapEntry_key(Msg, Bin, TrUserData) -> + SubBin = e_msg_ApbMapKey(Msg, <<>>, TrUserData), + Bin2 = e_varint(byte_size(SubBin), Bin), + <>. + +e_mfield_ApbMapEntry_value(Msg, Bin, TrUserData) -> + SubBin = e_msg_ApbReadObjectResp(Msg, <<>>, TrUserData), + Bin2 = e_varint(byte_size(SubBin), Bin), + <>. + +e_mfield_ApbReadObjects_boundobjects(Msg, Bin, + TrUserData) -> + SubBin = e_msg_ApbBoundObject(Msg, <<>>, TrUserData), + Bin2 = e_varint(byte_size(SubBin), Bin), + <>. + +e_field_ApbReadObjects_boundobjects([Elem | Rest], Bin, + TrUserData) -> + Bin2 = <>, + Bin3 = e_mfield_ApbReadObjects_boundobjects(id(Elem, + TrUserData), + Bin2, TrUserData), + e_field_ApbReadObjects_boundobjects(Rest, Bin3, + TrUserData); +e_field_ApbReadObjects_boundobjects([], Bin, + _TrUserData) -> + Bin. + +e_mfield_ApbUpdateOp_boundobject(Msg, Bin, + TrUserData) -> + SubBin = e_msg_ApbBoundObject(Msg, <<>>, TrUserData), + Bin2 = e_varint(byte_size(SubBin), Bin), + <>. + +e_mfield_ApbUpdateOp_operation(Msg, Bin, TrUserData) -> + SubBin = e_msg_ApbUpdateOperation(Msg, <<>>, + TrUserData), + Bin2 = e_varint(byte_size(SubBin), Bin), + <>. + +e_mfield_ApbUpdateOperation_counterop(Msg, Bin, + TrUserData) -> + SubBin = e_msg_ApbCounterUpdate(Msg, <<>>, TrUserData), + Bin2 = e_varint(byte_size(SubBin), Bin), + <>. + +e_mfield_ApbUpdateOperation_setop(Msg, Bin, + TrUserData) -> + SubBin = e_msg_ApbSetUpdate(Msg, <<>>, TrUserData), + Bin2 = e_varint(byte_size(SubBin), Bin), + <>. + +e_mfield_ApbUpdateOperation_regop(Msg, Bin, + TrUserData) -> + SubBin = e_msg_ApbRegUpdate(Msg, <<>>, TrUserData), + Bin2 = e_varint(byte_size(SubBin), Bin), + <>. + +e_mfield_ApbUpdateOperation_mapop(Msg, Bin, + TrUserData) -> + SubBin = e_msg_ApbMapUpdate(Msg, <<>>, TrUserData), + Bin2 = e_varint(byte_size(SubBin), Bin), + <>. + +e_mfield_ApbUpdateOperation_resetop(_Msg, Bin, + _TrUserData) -> + <>. + +e_mfield_ApbUpdateOperation_flagop(Msg, Bin, + TrUserData) -> + Bin2 = <>, + e_msg_ApbFlagUpdate(Msg, Bin2, TrUserData). + +e_mfield_ApbUpdateObjects_updates(Msg, Bin, + TrUserData) -> + SubBin = e_msg_ApbUpdateOp(Msg, <<>>, TrUserData), + Bin2 = e_varint(byte_size(SubBin), Bin), + <>. + +e_field_ApbUpdateObjects_updates([Elem | Rest], Bin, + TrUserData) -> + Bin2 = <>, + Bin3 = e_mfield_ApbUpdateObjects_updates(id(Elem, + TrUserData), + Bin2, TrUserData), + e_field_ApbUpdateObjects_updates(Rest, Bin3, + TrUserData); +e_field_ApbUpdateObjects_updates([], Bin, + _TrUserData) -> + Bin. + +e_mfield_ApbStartTransaction_properties(Msg, Bin, + TrUserData) -> + SubBin = e_msg_ApbTxnProperties(Msg, <<>>, TrUserData), + Bin2 = e_varint(byte_size(SubBin), Bin), + <>. + +e_mfield_ApbStaticUpdateObjects_transaction(Msg, Bin, + TrUserData) -> + SubBin = e_msg_ApbStartTransaction(Msg, <<>>, + TrUserData), + Bin2 = e_varint(byte_size(SubBin), Bin), + <>. + +e_mfield_ApbStaticUpdateObjects_updates(Msg, Bin, + TrUserData) -> + SubBin = e_msg_ApbUpdateOp(Msg, <<>>, TrUserData), + Bin2 = e_varint(byte_size(SubBin), Bin), + <>. + +e_field_ApbStaticUpdateObjects_updates([Elem | Rest], + Bin, TrUserData) -> + Bin2 = <>, + Bin3 = e_mfield_ApbStaticUpdateObjects_updates(id(Elem, + TrUserData), + Bin2, TrUserData), + e_field_ApbStaticUpdateObjects_updates(Rest, Bin3, + TrUserData); +e_field_ApbStaticUpdateObjects_updates([], Bin, + _TrUserData) -> + Bin. + +e_mfield_ApbStaticReadObjects_transaction(Msg, Bin, + TrUserData) -> + SubBin = e_msg_ApbStartTransaction(Msg, <<>>, + TrUserData), + Bin2 = e_varint(byte_size(SubBin), Bin), + <>. + +e_mfield_ApbStaticReadObjects_objects(Msg, Bin, + TrUserData) -> + SubBin = e_msg_ApbBoundObject(Msg, <<>>, TrUserData), + Bin2 = e_varint(byte_size(SubBin), Bin), + <>. + +e_field_ApbStaticReadObjects_objects([Elem | Rest], Bin, + TrUserData) -> + Bin2 = <>, + Bin3 = e_mfield_ApbStaticReadObjects_objects(id(Elem, + TrUserData), + Bin2, TrUserData), + e_field_ApbStaticReadObjects_objects(Rest, Bin3, + TrUserData); +e_field_ApbStaticReadObjects_objects([], Bin, + _TrUserData) -> + Bin. + +e_mfield_ApbReadObjectResp_counter(Msg, Bin, + TrUserData) -> + SubBin = e_msg_ApbGetCounterResp(Msg, <<>>, TrUserData), + Bin2 = e_varint(byte_size(SubBin), Bin), + <>. + +e_mfield_ApbReadObjectResp_set(Msg, Bin, TrUserData) -> + SubBin = e_msg_ApbGetSetResp(Msg, <<>>, TrUserData), + Bin2 = e_varint(byte_size(SubBin), Bin), + <>. + +e_mfield_ApbReadObjectResp_reg(Msg, Bin, TrUserData) -> + SubBin = e_msg_ApbGetRegResp(Msg, <<>>, TrUserData), + Bin2 = e_varint(byte_size(SubBin), Bin), + <>. + +e_mfield_ApbReadObjectResp_mvreg(Msg, Bin, + TrUserData) -> + SubBin = e_msg_ApbGetMVRegResp(Msg, <<>>, TrUserData), + Bin2 = e_varint(byte_size(SubBin), Bin), + <>. + +e_mfield_ApbReadObjectResp_map(Msg, Bin, TrUserData) -> + SubBin = e_msg_ApbGetMapResp(Msg, <<>>, TrUserData), + Bin2 = e_varint(byte_size(SubBin), Bin), + <>. + +e_mfield_ApbReadObjectResp_flag(Msg, Bin, TrUserData) -> + Bin2 = <>, + e_msg_ApbGetFlagResp(Msg, Bin2, TrUserData). + +e_mfield_ApbReadObjectsResp_objects(Msg, Bin, + TrUserData) -> + SubBin = e_msg_ApbReadObjectResp(Msg, <<>>, TrUserData), + Bin2 = e_varint(byte_size(SubBin), Bin), + <>. + +e_field_ApbReadObjectsResp_objects([Elem | Rest], Bin, + TrUserData) -> + Bin2 = <>, + Bin3 = e_mfield_ApbReadObjectsResp_objects(id(Elem, + TrUserData), + Bin2, TrUserData), + e_field_ApbReadObjectsResp_objects(Rest, Bin3, + TrUserData); +e_field_ApbReadObjectsResp_objects([], Bin, + _TrUserData) -> + Bin. + +e_mfield_ApbStaticReadObjectsResp_objects(Msg, Bin, + TrUserData) -> + SubBin = e_msg_ApbReadObjectsResp(Msg, <<>>, + TrUserData), + Bin2 = e_varint(byte_size(SubBin), Bin), + <>. + +e_mfield_ApbStaticReadObjectsResp_committime(Msg, Bin, + TrUserData) -> + SubBin = e_msg_ApbCommitResp(Msg, <<>>, TrUserData), + Bin2 = e_varint(byte_size(SubBin), Bin), + <>. + +e_enum_CRDT_type('COUNTER', Bin) -> <>; +e_enum_CRDT_type('ORSET', Bin) -> <>; +e_enum_CRDT_type('LWWREG', Bin) -> <>; +e_enum_CRDT_type('MVREG', Bin) -> <>; +e_enum_CRDT_type('GMAP', Bin) -> <>; +e_enum_CRDT_type('RWSET', Bin) -> <>; +e_enum_CRDT_type('RRMAP', Bin) -> <>; +e_enum_CRDT_type('FATCOUNTER', Bin) -> + <>; +e_enum_CRDT_type('FLAG_EW', Bin) -> <>; +e_enum_CRDT_type('FLAG_DW', Bin) -> <>; +e_enum_CRDT_type(V, Bin) -> e_varint(V, Bin). + +'e_enum_ApbSetUpdate.SetOpType'('ADD', Bin) -> + <>; +'e_enum_ApbSetUpdate.SetOpType'('REMOVE', Bin) -> + <>; +'e_enum_ApbSetUpdate.SetOpType'(V, Bin) -> + e_varint(V, Bin). + +e_type_sint(Value, Bin) when Value >= 0 -> + e_varint(Value * 2, Bin); +e_type_sint(Value, Bin) -> + e_varint(Value * -2 - 1, Bin). + +e_type_bool(true, Bin) -> <>; +e_type_bool(false, Bin) -> <>; +e_type_bool(1, Bin) -> <>; +e_type_bool(0, Bin) -> <>. + +e_type_bytes(Bytes, Bin) when is_binary(Bytes) -> + Bin2 = e_varint(byte_size(Bytes), Bin), + <>; +e_type_bytes(Bytes, Bin) when is_list(Bytes) -> + BytesBin = iolist_to_binary(Bytes), + Bin2 = e_varint(byte_size(BytesBin), Bin), + <>. + +e_varint(N, Bin) when N =< 127 -> <>; +e_varint(N, Bin) -> + Bin2 = <>, + e_varint(N bsr 7, Bin2). + + +decode_msg(Bin, MsgName) when is_binary(Bin) -> + decode_msg(Bin, MsgName, []). + +decode_msg(Bin, MsgName, Opts) when is_binary(Bin) -> + TrUserData = proplists:get_value(user_data, Opts), + decode_msg_1_catch(Bin, MsgName, TrUserData). + +-ifdef('OTP_RELEASE'). +decode_msg_1_catch(Bin, MsgName, TrUserData) -> + try decode_msg_2_doit(MsgName, Bin, TrUserData) + catch Class:Reason:StackTrace -> error({gpb_error,{decoding_failure, {Bin, MsgName, {Class, Reason, StackTrace}}}}) + end. +-else. +-ifdef('GPB_PATTERN_STACK'). +decode_msg_1_catch(Bin, MsgName, TrUserData) -> + try decode_msg_2_doit(MsgName, Bin, TrUserData) + catch Class:Reason:StackTrace -> error({gpb_error,{decoding_failure, {Bin, MsgName, {Class, Reason, StackTrace}}}}) + end. +-else. +decode_msg_1_catch(Bin, MsgName, TrUserData) -> + try decode_msg_2_doit(MsgName, Bin, TrUserData) + catch Class:Reason -> + StackTrace = erlang:get_stacktrace(), + error({gpb_error,{decoding_failure, {Bin, MsgName, {Class, Reason, StackTrace}}}}) + end. +-endif. + +-endif. + +decode_msg_2_doit('ApbErrorResp', Bin, TrUserData) -> + d_msg_ApbErrorResp(Bin, TrUserData); +decode_msg_2_doit('ApbCounterUpdate', Bin, + TrUserData) -> + d_msg_ApbCounterUpdate(Bin, TrUserData); +decode_msg_2_doit('ApbGetCounterResp', Bin, + TrUserData) -> + d_msg_ApbGetCounterResp(Bin, TrUserData); +decode_msg_2_doit('ApbSetUpdate', Bin, TrUserData) -> + d_msg_ApbSetUpdate(Bin, TrUserData); +decode_msg_2_doit('ApbGetSetResp', Bin, TrUserData) -> + d_msg_ApbGetSetResp(Bin, TrUserData); +decode_msg_2_doit('ApbRegUpdate', Bin, TrUserData) -> + d_msg_ApbRegUpdate(Bin, TrUserData); +decode_msg_2_doit('ApbGetRegResp', Bin, TrUserData) -> + d_msg_ApbGetRegResp(Bin, TrUserData); +decode_msg_2_doit('ApbGetMVRegResp', Bin, TrUserData) -> + d_msg_ApbGetMVRegResp(Bin, TrUserData); +decode_msg_2_doit('ApbMapKey', Bin, TrUserData) -> + d_msg_ApbMapKey(Bin, TrUserData); +decode_msg_2_doit('ApbMapUpdate', Bin, TrUserData) -> + d_msg_ApbMapUpdate(Bin, TrUserData); +decode_msg_2_doit('ApbMapNestedUpdate', Bin, + TrUserData) -> + d_msg_ApbMapNestedUpdate(Bin, TrUserData); +decode_msg_2_doit('ApbGetMapResp', Bin, TrUserData) -> + d_msg_ApbGetMapResp(Bin, TrUserData); +decode_msg_2_doit('ApbMapEntry', Bin, TrUserData) -> + d_msg_ApbMapEntry(Bin, TrUserData); +decode_msg_2_doit('ApbFlagUpdate', Bin, TrUserData) -> + d_msg_ApbFlagUpdate(Bin, TrUserData); +decode_msg_2_doit('ApbGetFlagResp', Bin, TrUserData) -> + d_msg_ApbGetFlagResp(Bin, TrUserData); +decode_msg_2_doit('ApbCrdtReset', Bin, TrUserData) -> + d_msg_ApbCrdtReset(Bin, TrUserData); +decode_msg_2_doit('ApbOperationResp', Bin, + TrUserData) -> + d_msg_ApbOperationResp(Bin, TrUserData); +decode_msg_2_doit('ApbTxnProperties', Bin, + TrUserData) -> + d_msg_ApbTxnProperties(Bin, TrUserData); +decode_msg_2_doit('ApbBoundObject', Bin, TrUserData) -> + d_msg_ApbBoundObject(Bin, TrUserData); +decode_msg_2_doit('ApbReadObjects', Bin, TrUserData) -> + d_msg_ApbReadObjects(Bin, TrUserData); +decode_msg_2_doit('ApbUpdateOp', Bin, TrUserData) -> + d_msg_ApbUpdateOp(Bin, TrUserData); +decode_msg_2_doit('ApbUpdateOperation', Bin, + TrUserData) -> + d_msg_ApbUpdateOperation(Bin, TrUserData); +decode_msg_2_doit('ApbUpdateObjects', Bin, + TrUserData) -> + d_msg_ApbUpdateObjects(Bin, TrUserData); +decode_msg_2_doit('ApbStartTransaction', Bin, + TrUserData) -> + d_msg_ApbStartTransaction(Bin, TrUserData); +decode_msg_2_doit('ApbAbortTransaction', Bin, + TrUserData) -> + d_msg_ApbAbortTransaction(Bin, TrUserData); +decode_msg_2_doit('ApbCommitTransaction', Bin, + TrUserData) -> + d_msg_ApbCommitTransaction(Bin, TrUserData); +decode_msg_2_doit('ApbStaticUpdateObjects', Bin, + TrUserData) -> + d_msg_ApbStaticUpdateObjects(Bin, TrUserData); +decode_msg_2_doit('ApbStaticReadObjects', Bin, + TrUserData) -> + d_msg_ApbStaticReadObjects(Bin, TrUserData); +decode_msg_2_doit('ApbStartTransactionResp', Bin, + TrUserData) -> + d_msg_ApbStartTransactionResp(Bin, TrUserData); +decode_msg_2_doit('ApbReadObjectResp', Bin, + TrUserData) -> + d_msg_ApbReadObjectResp(Bin, TrUserData); +decode_msg_2_doit('ApbReadObjectsResp', Bin, + TrUserData) -> + d_msg_ApbReadObjectsResp(Bin, TrUserData); +decode_msg_2_doit('ApbCommitResp', Bin, TrUserData) -> + d_msg_ApbCommitResp(Bin, TrUserData); +decode_msg_2_doit('ApbStaticReadObjectsResp', Bin, + TrUserData) -> + d_msg_ApbStaticReadObjectsResp(Bin, TrUserData). + + + +d_msg_ApbErrorResp(Bin, TrUserData) -> + dfp_read_field_def_ApbErrorResp(Bin, 0, 0, + id(undefined, TrUserData), + id(undefined, TrUserData), TrUserData). + +dfp_read_field_def_ApbErrorResp(<<10, Rest/binary>>, Z1, + Z2, F@_1, F@_2, TrUserData) -> + d_field_ApbErrorResp_errmsg(Rest, Z1, Z2, F@_1, F@_2, + TrUserData); +dfp_read_field_def_ApbErrorResp(<<16, Rest/binary>>, Z1, + Z2, F@_1, F@_2, TrUserData) -> + d_field_ApbErrorResp_errcode(Rest, Z1, Z2, F@_1, F@_2, + TrUserData); +dfp_read_field_def_ApbErrorResp(<<>>, 0, 0, F@_1, F@_2, + _) -> + #'ApbErrorResp'{errmsg = F@_1, errcode = F@_2}; +dfp_read_field_def_ApbErrorResp(Other, Z1, Z2, F@_1, + F@_2, TrUserData) -> + dg_read_field_def_ApbErrorResp(Other, Z1, Z2, F@_1, + F@_2, TrUserData). + +dg_read_field_def_ApbErrorResp(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 32 - 7 -> + dg_read_field_def_ApbErrorResp(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, TrUserData); +dg_read_field_def_ApbErrorResp(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) -> + Key = X bsl N + Acc, + case Key of + 10 -> + d_field_ApbErrorResp_errmsg(Rest, 0, 0, F@_1, F@_2, + TrUserData); + 16 -> + d_field_ApbErrorResp_errcode(Rest, 0, 0, F@_1, F@_2, + TrUserData); + _ -> + case Key band 7 of + 0 -> + skip_varint_ApbErrorResp(Rest, 0, 0, F@_1, F@_2, + TrUserData); + 1 -> + skip_64_ApbErrorResp(Rest, 0, 0, F@_1, F@_2, + TrUserData); + 2 -> + skip_length_delimited_ApbErrorResp(Rest, 0, 0, F@_1, + F@_2, TrUserData); + 3 -> + skip_group_ApbErrorResp(Rest, Key bsr 3, 0, F@_1, F@_2, + TrUserData); + 5 -> + skip_32_ApbErrorResp(Rest, 0, 0, F@_1, F@_2, TrUserData) + end + end; +dg_read_field_def_ApbErrorResp(<<>>, 0, 0, F@_1, F@_2, + _) -> + #'ApbErrorResp'{errmsg = F@_1, errcode = F@_2}. + +d_field_ApbErrorResp_errmsg(<<1:1, X:7, Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + d_field_ApbErrorResp_errmsg(Rest, N + 7, X bsl N + Acc, + F@_1, F@_2, TrUserData); +d_field_ApbErrorResp_errmsg(<<0:1, X:7, Rest/binary>>, + N, Acc, _, F@_2, TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {binary:copy(Bytes), Rest2} + end, + dfp_read_field_def_ApbErrorResp(RestF, 0, 0, NewFValue, + F@_2, TrUserData). + +d_field_ApbErrorResp_errcode(<<1:1, X:7, Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + d_field_ApbErrorResp_errcode(Rest, N + 7, X bsl N + Acc, + F@_1, F@_2, TrUserData); +d_field_ApbErrorResp_errcode(<<0:1, X:7, Rest/binary>>, + N, Acc, F@_1, _, TrUserData) -> + {NewFValue, RestF} = {X bsl N + Acc, Rest}, + dfp_read_field_def_ApbErrorResp(RestF, 0, 0, F@_1, + NewFValue, TrUserData). + +skip_varint_ApbErrorResp(<<1:1, _:7, Rest/binary>>, Z1, + Z2, F@_1, F@_2, TrUserData) -> + skip_varint_ApbErrorResp(Rest, Z1, Z2, F@_1, F@_2, + TrUserData); +skip_varint_ApbErrorResp(<<0:1, _:7, Rest/binary>>, Z1, + Z2, F@_1, F@_2, TrUserData) -> + dfp_read_field_def_ApbErrorResp(Rest, Z1, Z2, F@_1, + F@_2, TrUserData). + +skip_length_delimited_ApbErrorResp(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + skip_length_delimited_ApbErrorResp(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, TrUserData); +skip_length_delimited_ApbErrorResp(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) -> + Length = X bsl N + Acc, + <<_:Length/binary, Rest2/binary>> = Rest, + dfp_read_field_def_ApbErrorResp(Rest2, 0, 0, F@_1, F@_2, + TrUserData). + +skip_group_ApbErrorResp(Bin, FNum, Z2, F@_1, F@_2, + TrUserData) -> + {_, Rest} = read_group(Bin, FNum), + dfp_read_field_def_ApbErrorResp(Rest, 0, Z2, F@_1, F@_2, + TrUserData). + +skip_32_ApbErrorResp(<<_:32, Rest/binary>>, Z1, Z2, + F@_1, F@_2, TrUserData) -> + dfp_read_field_def_ApbErrorResp(Rest, Z1, Z2, F@_1, + F@_2, TrUserData). + +skip_64_ApbErrorResp(<<_:64, Rest/binary>>, Z1, Z2, + F@_1, F@_2, TrUserData) -> + dfp_read_field_def_ApbErrorResp(Rest, Z1, Z2, F@_1, + F@_2, TrUserData). + +d_msg_ApbCounterUpdate(Bin, TrUserData) -> + dfp_read_field_def_ApbCounterUpdate(Bin, 0, 0, + id(undefined, TrUserData), TrUserData). + +dfp_read_field_def_ApbCounterUpdate(<<8, Rest/binary>>, + Z1, Z2, F@_1, TrUserData) -> + d_field_ApbCounterUpdate_inc(Rest, Z1, Z2, F@_1, + TrUserData); +dfp_read_field_def_ApbCounterUpdate(<<>>, 0, 0, F@_1, + _) -> + #'ApbCounterUpdate'{inc = F@_1}; +dfp_read_field_def_ApbCounterUpdate(Other, Z1, Z2, F@_1, + TrUserData) -> + dg_read_field_def_ApbCounterUpdate(Other, Z1, Z2, F@_1, + TrUserData). + +dg_read_field_def_ApbCounterUpdate(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) + when N < 32 - 7 -> + dg_read_field_def_ApbCounterUpdate(Rest, N + 7, + X bsl N + Acc, F@_1, TrUserData); +dg_read_field_def_ApbCounterUpdate(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) -> + Key = X bsl N + Acc, + case Key of + 8 -> + d_field_ApbCounterUpdate_inc(Rest, 0, 0, F@_1, + TrUserData); + _ -> + case Key band 7 of + 0 -> + skip_varint_ApbCounterUpdate(Rest, 0, 0, F@_1, + TrUserData); + 1 -> + skip_64_ApbCounterUpdate(Rest, 0, 0, F@_1, TrUserData); + 2 -> + skip_length_delimited_ApbCounterUpdate(Rest, 0, 0, F@_1, + TrUserData); + 3 -> + skip_group_ApbCounterUpdate(Rest, Key bsr 3, 0, F@_1, + TrUserData); + 5 -> + skip_32_ApbCounterUpdate(Rest, 0, 0, F@_1, TrUserData) + end + end; +dg_read_field_def_ApbCounterUpdate(<<>>, 0, 0, F@_1, + _) -> + #'ApbCounterUpdate'{inc = F@_1}. + +d_field_ApbCounterUpdate_inc(<<1:1, X:7, Rest/binary>>, + N, Acc, F@_1, TrUserData) + when N < 57 -> + d_field_ApbCounterUpdate_inc(Rest, N + 7, X bsl N + Acc, + F@_1, TrUserData); +d_field_ApbCounterUpdate_inc(<<0:1, X:7, Rest/binary>>, + N, Acc, _, TrUserData) -> + {NewFValue, RestF} = {begin + ZValue = X bsl N + Acc, + if ZValue band 1 =:= 0 -> ZValue bsr 1; + true -> -(ZValue + 1 bsr 1) + end + end, + Rest}, + dfp_read_field_def_ApbCounterUpdate(RestF, 0, 0, + NewFValue, TrUserData). + +skip_varint_ApbCounterUpdate(<<1:1, _:7, Rest/binary>>, + Z1, Z2, F@_1, TrUserData) -> + skip_varint_ApbCounterUpdate(Rest, Z1, Z2, F@_1, + TrUserData); +skip_varint_ApbCounterUpdate(<<0:1, _:7, Rest/binary>>, + Z1, Z2, F@_1, TrUserData) -> + dfp_read_field_def_ApbCounterUpdate(Rest, Z1, Z2, F@_1, + TrUserData). + +skip_length_delimited_ApbCounterUpdate(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) + when N < 57 -> + skip_length_delimited_ApbCounterUpdate(Rest, N + 7, + X bsl N + Acc, F@_1, TrUserData); +skip_length_delimited_ApbCounterUpdate(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) -> + Length = X bsl N + Acc, + <<_:Length/binary, Rest2/binary>> = Rest, + dfp_read_field_def_ApbCounterUpdate(Rest2, 0, 0, F@_1, + TrUserData). + +skip_group_ApbCounterUpdate(Bin, FNum, Z2, F@_1, + TrUserData) -> + {_, Rest} = read_group(Bin, FNum), + dfp_read_field_def_ApbCounterUpdate(Rest, 0, Z2, F@_1, + TrUserData). + +skip_32_ApbCounterUpdate(<<_:32, Rest/binary>>, Z1, Z2, + F@_1, TrUserData) -> + dfp_read_field_def_ApbCounterUpdate(Rest, Z1, Z2, F@_1, + TrUserData). + +skip_64_ApbCounterUpdate(<<_:64, Rest/binary>>, Z1, Z2, + F@_1, TrUserData) -> + dfp_read_field_def_ApbCounterUpdate(Rest, Z1, Z2, F@_1, + TrUserData). + +d_msg_ApbGetCounterResp(Bin, TrUserData) -> + dfp_read_field_def_ApbGetCounterResp(Bin, 0, 0, + id(undefined, TrUserData), TrUserData). + +dfp_read_field_def_ApbGetCounterResp(<<8, Rest/binary>>, + Z1, Z2, F@_1, TrUserData) -> + d_field_ApbGetCounterResp_value(Rest, Z1, Z2, F@_1, + TrUserData); +dfp_read_field_def_ApbGetCounterResp(<<>>, 0, 0, F@_1, + _) -> + #'ApbGetCounterResp'{value = F@_1}; +dfp_read_field_def_ApbGetCounterResp(Other, Z1, Z2, + F@_1, TrUserData) -> + dg_read_field_def_ApbGetCounterResp(Other, Z1, Z2, F@_1, + TrUserData). + +dg_read_field_def_ApbGetCounterResp(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) + when N < 32 - 7 -> + dg_read_field_def_ApbGetCounterResp(Rest, N + 7, + X bsl N + Acc, F@_1, TrUserData); +dg_read_field_def_ApbGetCounterResp(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) -> + Key = X bsl N + Acc, + case Key of + 8 -> + d_field_ApbGetCounterResp_value(Rest, 0, 0, F@_1, + TrUserData); + _ -> + case Key band 7 of + 0 -> + skip_varint_ApbGetCounterResp(Rest, 0, 0, F@_1, + TrUserData); + 1 -> + skip_64_ApbGetCounterResp(Rest, 0, 0, F@_1, TrUserData); + 2 -> + skip_length_delimited_ApbGetCounterResp(Rest, 0, 0, + F@_1, TrUserData); + 3 -> + skip_group_ApbGetCounterResp(Rest, Key bsr 3, 0, F@_1, + TrUserData); + 5 -> + skip_32_ApbGetCounterResp(Rest, 0, 0, F@_1, TrUserData) + end + end; +dg_read_field_def_ApbGetCounterResp(<<>>, 0, 0, F@_1, + _) -> + #'ApbGetCounterResp'{value = F@_1}. + +d_field_ApbGetCounterResp_value(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) + when N < 57 -> + d_field_ApbGetCounterResp_value(Rest, N + 7, + X bsl N + Acc, F@_1, TrUserData); +d_field_ApbGetCounterResp_value(<<0:1, X:7, + Rest/binary>>, + N, Acc, _, TrUserData) -> + {NewFValue, RestF} = {begin + ZValue = X bsl N + Acc, + if ZValue band 1 =:= 0 -> ZValue bsr 1; + true -> -(ZValue + 1 bsr 1) + end + end, + Rest}, + dfp_read_field_def_ApbGetCounterResp(RestF, 0, 0, + NewFValue, TrUserData). + +skip_varint_ApbGetCounterResp(<<1:1, _:7, Rest/binary>>, + Z1, Z2, F@_1, TrUserData) -> + skip_varint_ApbGetCounterResp(Rest, Z1, Z2, F@_1, + TrUserData); +skip_varint_ApbGetCounterResp(<<0:1, _:7, Rest/binary>>, + Z1, Z2, F@_1, TrUserData) -> + dfp_read_field_def_ApbGetCounterResp(Rest, Z1, Z2, F@_1, + TrUserData). + +skip_length_delimited_ApbGetCounterResp(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) + when N < 57 -> + skip_length_delimited_ApbGetCounterResp(Rest, N + 7, + X bsl N + Acc, F@_1, TrUserData); +skip_length_delimited_ApbGetCounterResp(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) -> + Length = X bsl N + Acc, + <<_:Length/binary, Rest2/binary>> = Rest, + dfp_read_field_def_ApbGetCounterResp(Rest2, 0, 0, F@_1, + TrUserData). + +skip_group_ApbGetCounterResp(Bin, FNum, Z2, F@_1, + TrUserData) -> + {_, Rest} = read_group(Bin, FNum), + dfp_read_field_def_ApbGetCounterResp(Rest, 0, Z2, F@_1, + TrUserData). + +skip_32_ApbGetCounterResp(<<_:32, Rest/binary>>, Z1, Z2, + F@_1, TrUserData) -> + dfp_read_field_def_ApbGetCounterResp(Rest, Z1, Z2, F@_1, + TrUserData). + +skip_64_ApbGetCounterResp(<<_:64, Rest/binary>>, Z1, Z2, + F@_1, TrUserData) -> + dfp_read_field_def_ApbGetCounterResp(Rest, Z1, Z2, F@_1, + TrUserData). + +d_msg_ApbSetUpdate(Bin, TrUserData) -> + dfp_read_field_def_ApbSetUpdate(Bin, 0, 0, + id(undefined, TrUserData), + id([], TrUserData), id([], TrUserData), + TrUserData). + +dfp_read_field_def_ApbSetUpdate(<<8, Rest/binary>>, Z1, + Z2, F@_1, F@_2, F@_3, TrUserData) -> + d_field_ApbSetUpdate_optype(Rest, Z1, Z2, F@_1, F@_2, + F@_3, TrUserData); +dfp_read_field_def_ApbSetUpdate(<<18, Rest/binary>>, Z1, + Z2, F@_1, F@_2, F@_3, TrUserData) -> + d_field_ApbSetUpdate_adds(Rest, Z1, Z2, F@_1, F@_2, + F@_3, TrUserData); +dfp_read_field_def_ApbSetUpdate(<<26, Rest/binary>>, Z1, + Z2, F@_1, F@_2, F@_3, TrUserData) -> + d_field_ApbSetUpdate_rems(Rest, Z1, Z2, F@_1, F@_2, + F@_3, TrUserData); +dfp_read_field_def_ApbSetUpdate(<<>>, 0, 0, F@_1, R1, + R2, TrUserData) -> + #'ApbSetUpdate'{optype = F@_1, + adds = lists_reverse(R1, TrUserData), + rems = lists_reverse(R2, TrUserData)}; +dfp_read_field_def_ApbSetUpdate(Other, Z1, Z2, F@_1, + F@_2, F@_3, TrUserData) -> + dg_read_field_def_ApbSetUpdate(Other, Z1, Z2, F@_1, + F@_2, F@_3, TrUserData). + +dg_read_field_def_ApbSetUpdate(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, TrUserData) + when N < 32 - 7 -> + dg_read_field_def_ApbSetUpdate(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, F@_3, TrUserData); +dg_read_field_def_ApbSetUpdate(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, TrUserData) -> + Key = X bsl N + Acc, + case Key of + 8 -> + d_field_ApbSetUpdate_optype(Rest, 0, 0, F@_1, F@_2, + F@_3, TrUserData); + 18 -> + d_field_ApbSetUpdate_adds(Rest, 0, 0, F@_1, F@_2, F@_3, + TrUserData); + 26 -> + d_field_ApbSetUpdate_rems(Rest, 0, 0, F@_1, F@_2, F@_3, + TrUserData); + _ -> + case Key band 7 of + 0 -> + skip_varint_ApbSetUpdate(Rest, 0, 0, F@_1, F@_2, F@_3, + TrUserData); + 1 -> + skip_64_ApbSetUpdate(Rest, 0, 0, F@_1, F@_2, F@_3, + TrUserData); + 2 -> + skip_length_delimited_ApbSetUpdate(Rest, 0, 0, F@_1, + F@_2, F@_3, TrUserData); + 3 -> + skip_group_ApbSetUpdate(Rest, Key bsr 3, 0, F@_1, F@_2, + F@_3, TrUserData); + 5 -> + skip_32_ApbSetUpdate(Rest, 0, 0, F@_1, F@_2, F@_3, + TrUserData) + end + end; +dg_read_field_def_ApbSetUpdate(<<>>, 0, 0, F@_1, R1, R2, + TrUserData) -> + #'ApbSetUpdate'{optype = F@_1, + adds = lists_reverse(R1, TrUserData), + rems = lists_reverse(R2, TrUserData)}. + +d_field_ApbSetUpdate_optype(<<1:1, X:7, Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, TrUserData) + when N < 57 -> + d_field_ApbSetUpdate_optype(Rest, N + 7, X bsl N + Acc, + F@_1, F@_2, F@_3, TrUserData); +d_field_ApbSetUpdate_optype(<<0:1, X:7, Rest/binary>>, + N, Acc, _, F@_2, F@_3, TrUserData) -> + {NewFValue, RestF} = + {'d_enum_ApbSetUpdate.SetOpType'(begin + <> = <<(X bsl N + + + Acc):32/unsigned-native>>, + Res + end), + Rest}, + dfp_read_field_def_ApbSetUpdate(RestF, 0, 0, NewFValue, + F@_2, F@_3, TrUserData). + +d_field_ApbSetUpdate_adds(<<1:1, X:7, Rest/binary>>, N, + Acc, F@_1, F@_2, F@_3, TrUserData) + when N < 57 -> + d_field_ApbSetUpdate_adds(Rest, N + 7, X bsl N + Acc, + F@_1, F@_2, F@_3, TrUserData); +d_field_ApbSetUpdate_adds(<<0:1, X:7, Rest/binary>>, N, + Acc, F@_1, Prev, F@_3, TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {binary:copy(Bytes), Rest2} + end, + dfp_read_field_def_ApbSetUpdate(RestF, 0, 0, F@_1, + cons(NewFValue, Prev, TrUserData), F@_3, + TrUserData). + +d_field_ApbSetUpdate_rems(<<1:1, X:7, Rest/binary>>, N, + Acc, F@_1, F@_2, F@_3, TrUserData) + when N < 57 -> + d_field_ApbSetUpdate_rems(Rest, N + 7, X bsl N + Acc, + F@_1, F@_2, F@_3, TrUserData); +d_field_ApbSetUpdate_rems(<<0:1, X:7, Rest/binary>>, N, + Acc, F@_1, F@_2, Prev, TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {binary:copy(Bytes), Rest2} + end, + dfp_read_field_def_ApbSetUpdate(RestF, 0, 0, F@_1, F@_2, + cons(NewFValue, Prev, TrUserData), + TrUserData). + +skip_varint_ApbSetUpdate(<<1:1, _:7, Rest/binary>>, Z1, + Z2, F@_1, F@_2, F@_3, TrUserData) -> + skip_varint_ApbSetUpdate(Rest, Z1, Z2, F@_1, F@_2, F@_3, + TrUserData); +skip_varint_ApbSetUpdate(<<0:1, _:7, Rest/binary>>, Z1, + Z2, F@_1, F@_2, F@_3, TrUserData) -> + dfp_read_field_def_ApbSetUpdate(Rest, Z1, Z2, F@_1, + F@_2, F@_3, TrUserData). + +skip_length_delimited_ApbSetUpdate(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, TrUserData) + when N < 57 -> + skip_length_delimited_ApbSetUpdate(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, F@_3, + TrUserData); +skip_length_delimited_ApbSetUpdate(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, TrUserData) -> + Length = X bsl N + Acc, + <<_:Length/binary, Rest2/binary>> = Rest, + dfp_read_field_def_ApbSetUpdate(Rest2, 0, 0, F@_1, F@_2, + F@_3, TrUserData). + +skip_group_ApbSetUpdate(Bin, FNum, Z2, F@_1, F@_2, F@_3, + TrUserData) -> + {_, Rest} = read_group(Bin, FNum), + dfp_read_field_def_ApbSetUpdate(Rest, 0, Z2, F@_1, F@_2, + F@_3, TrUserData). + +skip_32_ApbSetUpdate(<<_:32, Rest/binary>>, Z1, Z2, + F@_1, F@_2, F@_3, TrUserData) -> + dfp_read_field_def_ApbSetUpdate(Rest, Z1, Z2, F@_1, + F@_2, F@_3, TrUserData). + +skip_64_ApbSetUpdate(<<_:64, Rest/binary>>, Z1, Z2, + F@_1, F@_2, F@_3, TrUserData) -> + dfp_read_field_def_ApbSetUpdate(Rest, Z1, Z2, F@_1, + F@_2, F@_3, TrUserData). + +d_msg_ApbGetSetResp(Bin, TrUserData) -> + dfp_read_field_def_ApbGetSetResp(Bin, 0, 0, + id([], TrUserData), TrUserData). + +dfp_read_field_def_ApbGetSetResp(<<10, Rest/binary>>, + Z1, Z2, F@_1, TrUserData) -> + d_field_ApbGetSetResp_value(Rest, Z1, Z2, F@_1, + TrUserData); +dfp_read_field_def_ApbGetSetResp(<<>>, 0, 0, R1, + TrUserData) -> + #'ApbGetSetResp'{value = lists_reverse(R1, TrUserData)}; +dfp_read_field_def_ApbGetSetResp(Other, Z1, Z2, F@_1, + TrUserData) -> + dg_read_field_def_ApbGetSetResp(Other, Z1, Z2, F@_1, + TrUserData). + +dg_read_field_def_ApbGetSetResp(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) + when N < 32 - 7 -> + dg_read_field_def_ApbGetSetResp(Rest, N + 7, + X bsl N + Acc, F@_1, TrUserData); +dg_read_field_def_ApbGetSetResp(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) -> + Key = X bsl N + Acc, + case Key of + 10 -> + d_field_ApbGetSetResp_value(Rest, 0, 0, F@_1, + TrUserData); + _ -> + case Key band 7 of + 0 -> + skip_varint_ApbGetSetResp(Rest, 0, 0, F@_1, TrUserData); + 1 -> + skip_64_ApbGetSetResp(Rest, 0, 0, F@_1, TrUserData); + 2 -> + skip_length_delimited_ApbGetSetResp(Rest, 0, 0, F@_1, + TrUserData); + 3 -> + skip_group_ApbGetSetResp(Rest, Key bsr 3, 0, F@_1, + TrUserData); + 5 -> skip_32_ApbGetSetResp(Rest, 0, 0, F@_1, TrUserData) + end + end; +dg_read_field_def_ApbGetSetResp(<<>>, 0, 0, R1, + TrUserData) -> + #'ApbGetSetResp'{value = lists_reverse(R1, TrUserData)}. + +d_field_ApbGetSetResp_value(<<1:1, X:7, Rest/binary>>, + N, Acc, F@_1, TrUserData) + when N < 57 -> + d_field_ApbGetSetResp_value(Rest, N + 7, X bsl N + Acc, + F@_1, TrUserData); +d_field_ApbGetSetResp_value(<<0:1, X:7, Rest/binary>>, + N, Acc, Prev, TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {binary:copy(Bytes), Rest2} + end, + dfp_read_field_def_ApbGetSetResp(RestF, 0, 0, + cons(NewFValue, Prev, TrUserData), + TrUserData). + +skip_varint_ApbGetSetResp(<<1:1, _:7, Rest/binary>>, Z1, + Z2, F@_1, TrUserData) -> + skip_varint_ApbGetSetResp(Rest, Z1, Z2, F@_1, + TrUserData); +skip_varint_ApbGetSetResp(<<0:1, _:7, Rest/binary>>, Z1, + Z2, F@_1, TrUserData) -> + dfp_read_field_def_ApbGetSetResp(Rest, Z1, Z2, F@_1, + TrUserData). + +skip_length_delimited_ApbGetSetResp(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) + when N < 57 -> + skip_length_delimited_ApbGetSetResp(Rest, N + 7, + X bsl N + Acc, F@_1, TrUserData); +skip_length_delimited_ApbGetSetResp(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) -> + Length = X bsl N + Acc, + <<_:Length/binary, Rest2/binary>> = Rest, + dfp_read_field_def_ApbGetSetResp(Rest2, 0, 0, F@_1, + TrUserData). + +skip_group_ApbGetSetResp(Bin, FNum, Z2, F@_1, + TrUserData) -> + {_, Rest} = read_group(Bin, FNum), + dfp_read_field_def_ApbGetSetResp(Rest, 0, Z2, F@_1, + TrUserData). + +skip_32_ApbGetSetResp(<<_:32, Rest/binary>>, Z1, Z2, + F@_1, TrUserData) -> + dfp_read_field_def_ApbGetSetResp(Rest, Z1, Z2, F@_1, + TrUserData). + +skip_64_ApbGetSetResp(<<_:64, Rest/binary>>, Z1, Z2, + F@_1, TrUserData) -> + dfp_read_field_def_ApbGetSetResp(Rest, Z1, Z2, F@_1, + TrUserData). + +d_msg_ApbRegUpdate(Bin, TrUserData) -> + dfp_read_field_def_ApbRegUpdate(Bin, 0, 0, + id(undefined, TrUserData), TrUserData). + +dfp_read_field_def_ApbRegUpdate(<<10, Rest/binary>>, Z1, + Z2, F@_1, TrUserData) -> + d_field_ApbRegUpdate_value(Rest, Z1, Z2, F@_1, + TrUserData); +dfp_read_field_def_ApbRegUpdate(<<>>, 0, 0, F@_1, _) -> + #'ApbRegUpdate'{value = F@_1}; +dfp_read_field_def_ApbRegUpdate(Other, Z1, Z2, F@_1, + TrUserData) -> + dg_read_field_def_ApbRegUpdate(Other, Z1, Z2, F@_1, + TrUserData). + +dg_read_field_def_ApbRegUpdate(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) + when N < 32 - 7 -> + dg_read_field_def_ApbRegUpdate(Rest, N + 7, + X bsl N + Acc, F@_1, TrUserData); +dg_read_field_def_ApbRegUpdate(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) -> + Key = X bsl N + Acc, + case Key of + 10 -> + d_field_ApbRegUpdate_value(Rest, 0, 0, F@_1, + TrUserData); + _ -> + case Key band 7 of + 0 -> + skip_varint_ApbRegUpdate(Rest, 0, 0, F@_1, TrUserData); + 1 -> skip_64_ApbRegUpdate(Rest, 0, 0, F@_1, TrUserData); + 2 -> + skip_length_delimited_ApbRegUpdate(Rest, 0, 0, F@_1, + TrUserData); + 3 -> + skip_group_ApbRegUpdate(Rest, Key bsr 3, 0, F@_1, + TrUserData); + 5 -> skip_32_ApbRegUpdate(Rest, 0, 0, F@_1, TrUserData) + end + end; +dg_read_field_def_ApbRegUpdate(<<>>, 0, 0, F@_1, _) -> + #'ApbRegUpdate'{value = F@_1}. + +d_field_ApbRegUpdate_value(<<1:1, X:7, Rest/binary>>, N, + Acc, F@_1, TrUserData) + when N < 57 -> + d_field_ApbRegUpdate_value(Rest, N + 7, X bsl N + Acc, + F@_1, TrUserData); +d_field_ApbRegUpdate_value(<<0:1, X:7, Rest/binary>>, N, + Acc, _, TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {binary:copy(Bytes), Rest2} + end, + dfp_read_field_def_ApbRegUpdate(RestF, 0, 0, NewFValue, + TrUserData). + +skip_varint_ApbRegUpdate(<<1:1, _:7, Rest/binary>>, Z1, + Z2, F@_1, TrUserData) -> + skip_varint_ApbRegUpdate(Rest, Z1, Z2, F@_1, + TrUserData); +skip_varint_ApbRegUpdate(<<0:1, _:7, Rest/binary>>, Z1, + Z2, F@_1, TrUserData) -> + dfp_read_field_def_ApbRegUpdate(Rest, Z1, Z2, F@_1, + TrUserData). + +skip_length_delimited_ApbRegUpdate(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) + when N < 57 -> + skip_length_delimited_ApbRegUpdate(Rest, N + 7, + X bsl N + Acc, F@_1, TrUserData); +skip_length_delimited_ApbRegUpdate(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) -> + Length = X bsl N + Acc, + <<_:Length/binary, Rest2/binary>> = Rest, + dfp_read_field_def_ApbRegUpdate(Rest2, 0, 0, F@_1, + TrUserData). + +skip_group_ApbRegUpdate(Bin, FNum, Z2, F@_1, + TrUserData) -> + {_, Rest} = read_group(Bin, FNum), + dfp_read_field_def_ApbRegUpdate(Rest, 0, Z2, F@_1, + TrUserData). + +skip_32_ApbRegUpdate(<<_:32, Rest/binary>>, Z1, Z2, + F@_1, TrUserData) -> + dfp_read_field_def_ApbRegUpdate(Rest, Z1, Z2, F@_1, + TrUserData). + +skip_64_ApbRegUpdate(<<_:64, Rest/binary>>, Z1, Z2, + F@_1, TrUserData) -> + dfp_read_field_def_ApbRegUpdate(Rest, Z1, Z2, F@_1, + TrUserData). + +d_msg_ApbGetRegResp(Bin, TrUserData) -> + dfp_read_field_def_ApbGetRegResp(Bin, 0, 0, + id(undefined, TrUserData), TrUserData). + +dfp_read_field_def_ApbGetRegResp(<<10, Rest/binary>>, + Z1, Z2, F@_1, TrUserData) -> + d_field_ApbGetRegResp_value(Rest, Z1, Z2, F@_1, + TrUserData); +dfp_read_field_def_ApbGetRegResp(<<>>, 0, 0, F@_1, _) -> + #'ApbGetRegResp'{value = F@_1}; +dfp_read_field_def_ApbGetRegResp(Other, Z1, Z2, F@_1, + TrUserData) -> + dg_read_field_def_ApbGetRegResp(Other, Z1, Z2, F@_1, + TrUserData). + +dg_read_field_def_ApbGetRegResp(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) + when N < 32 - 7 -> + dg_read_field_def_ApbGetRegResp(Rest, N + 7, + X bsl N + Acc, F@_1, TrUserData); +dg_read_field_def_ApbGetRegResp(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) -> + Key = X bsl N + Acc, + case Key of + 10 -> + d_field_ApbGetRegResp_value(Rest, 0, 0, F@_1, + TrUserData); + _ -> + case Key band 7 of + 0 -> + skip_varint_ApbGetRegResp(Rest, 0, 0, F@_1, TrUserData); + 1 -> + skip_64_ApbGetRegResp(Rest, 0, 0, F@_1, TrUserData); + 2 -> + skip_length_delimited_ApbGetRegResp(Rest, 0, 0, F@_1, + TrUserData); + 3 -> + skip_group_ApbGetRegResp(Rest, Key bsr 3, 0, F@_1, + TrUserData); + 5 -> skip_32_ApbGetRegResp(Rest, 0, 0, F@_1, TrUserData) + end + end; +dg_read_field_def_ApbGetRegResp(<<>>, 0, 0, F@_1, _) -> + #'ApbGetRegResp'{value = F@_1}. + +d_field_ApbGetRegResp_value(<<1:1, X:7, Rest/binary>>, + N, Acc, F@_1, TrUserData) + when N < 57 -> + d_field_ApbGetRegResp_value(Rest, N + 7, X bsl N + Acc, + F@_1, TrUserData); +d_field_ApbGetRegResp_value(<<0:1, X:7, Rest/binary>>, + N, Acc, _, TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {binary:copy(Bytes), Rest2} + end, + dfp_read_field_def_ApbGetRegResp(RestF, 0, 0, NewFValue, + TrUserData). + +skip_varint_ApbGetRegResp(<<1:1, _:7, Rest/binary>>, Z1, + Z2, F@_1, TrUserData) -> + skip_varint_ApbGetRegResp(Rest, Z1, Z2, F@_1, + TrUserData); +skip_varint_ApbGetRegResp(<<0:1, _:7, Rest/binary>>, Z1, + Z2, F@_1, TrUserData) -> + dfp_read_field_def_ApbGetRegResp(Rest, Z1, Z2, F@_1, + TrUserData). + +skip_length_delimited_ApbGetRegResp(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) + when N < 57 -> + skip_length_delimited_ApbGetRegResp(Rest, N + 7, + X bsl N + Acc, F@_1, TrUserData); +skip_length_delimited_ApbGetRegResp(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) -> + Length = X bsl N + Acc, + <<_:Length/binary, Rest2/binary>> = Rest, + dfp_read_field_def_ApbGetRegResp(Rest2, 0, 0, F@_1, + TrUserData). + +skip_group_ApbGetRegResp(Bin, FNum, Z2, F@_1, + TrUserData) -> + {_, Rest} = read_group(Bin, FNum), + dfp_read_field_def_ApbGetRegResp(Rest, 0, Z2, F@_1, + TrUserData). + +skip_32_ApbGetRegResp(<<_:32, Rest/binary>>, Z1, Z2, + F@_1, TrUserData) -> + dfp_read_field_def_ApbGetRegResp(Rest, Z1, Z2, F@_1, + TrUserData). + +skip_64_ApbGetRegResp(<<_:64, Rest/binary>>, Z1, Z2, + F@_1, TrUserData) -> + dfp_read_field_def_ApbGetRegResp(Rest, Z1, Z2, F@_1, + TrUserData). + +d_msg_ApbGetMVRegResp(Bin, TrUserData) -> + dfp_read_field_def_ApbGetMVRegResp(Bin, 0, 0, + id([], TrUserData), TrUserData). + +dfp_read_field_def_ApbGetMVRegResp(<<10, Rest/binary>>, + Z1, Z2, F@_1, TrUserData) -> + d_field_ApbGetMVRegResp_values(Rest, Z1, Z2, F@_1, + TrUserData); +dfp_read_field_def_ApbGetMVRegResp(<<>>, 0, 0, R1, + TrUserData) -> + #'ApbGetMVRegResp'{values = + lists_reverse(R1, TrUserData)}; +dfp_read_field_def_ApbGetMVRegResp(Other, Z1, Z2, F@_1, + TrUserData) -> + dg_read_field_def_ApbGetMVRegResp(Other, Z1, Z2, F@_1, + TrUserData). + +dg_read_field_def_ApbGetMVRegResp(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) + when N < 32 - 7 -> + dg_read_field_def_ApbGetMVRegResp(Rest, N + 7, + X bsl N + Acc, F@_1, TrUserData); +dg_read_field_def_ApbGetMVRegResp(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) -> + Key = X bsl N + Acc, + case Key of + 10 -> + d_field_ApbGetMVRegResp_values(Rest, 0, 0, F@_1, + TrUserData); + _ -> + case Key band 7 of + 0 -> + skip_varint_ApbGetMVRegResp(Rest, 0, 0, F@_1, + TrUserData); + 1 -> + skip_64_ApbGetMVRegResp(Rest, 0, 0, F@_1, TrUserData); + 2 -> + skip_length_delimited_ApbGetMVRegResp(Rest, 0, 0, F@_1, + TrUserData); + 3 -> + skip_group_ApbGetMVRegResp(Rest, Key bsr 3, 0, F@_1, + TrUserData); + 5 -> + skip_32_ApbGetMVRegResp(Rest, 0, 0, F@_1, TrUserData) + end + end; +dg_read_field_def_ApbGetMVRegResp(<<>>, 0, 0, R1, + TrUserData) -> + #'ApbGetMVRegResp'{values = + lists_reverse(R1, TrUserData)}. + +d_field_ApbGetMVRegResp_values(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) + when N < 57 -> + d_field_ApbGetMVRegResp_values(Rest, N + 7, + X bsl N + Acc, F@_1, TrUserData); +d_field_ApbGetMVRegResp_values(<<0:1, X:7, + Rest/binary>>, + N, Acc, Prev, TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {binary:copy(Bytes), Rest2} + end, + dfp_read_field_def_ApbGetMVRegResp(RestF, 0, 0, + cons(NewFValue, Prev, TrUserData), + TrUserData). + +skip_varint_ApbGetMVRegResp(<<1:1, _:7, Rest/binary>>, + Z1, Z2, F@_1, TrUserData) -> + skip_varint_ApbGetMVRegResp(Rest, Z1, Z2, F@_1, + TrUserData); +skip_varint_ApbGetMVRegResp(<<0:1, _:7, Rest/binary>>, + Z1, Z2, F@_1, TrUserData) -> + dfp_read_field_def_ApbGetMVRegResp(Rest, Z1, Z2, F@_1, + TrUserData). + +skip_length_delimited_ApbGetMVRegResp(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) + when N < 57 -> + skip_length_delimited_ApbGetMVRegResp(Rest, N + 7, + X bsl N + Acc, F@_1, TrUserData); +skip_length_delimited_ApbGetMVRegResp(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) -> + Length = X bsl N + Acc, + <<_:Length/binary, Rest2/binary>> = Rest, + dfp_read_field_def_ApbGetMVRegResp(Rest2, 0, 0, F@_1, + TrUserData). + +skip_group_ApbGetMVRegResp(Bin, FNum, Z2, F@_1, + TrUserData) -> + {_, Rest} = read_group(Bin, FNum), + dfp_read_field_def_ApbGetMVRegResp(Rest, 0, Z2, F@_1, + TrUserData). + +skip_32_ApbGetMVRegResp(<<_:32, Rest/binary>>, Z1, Z2, + F@_1, TrUserData) -> + dfp_read_field_def_ApbGetMVRegResp(Rest, Z1, Z2, F@_1, + TrUserData). + +skip_64_ApbGetMVRegResp(<<_:64, Rest/binary>>, Z1, Z2, + F@_1, TrUserData) -> + dfp_read_field_def_ApbGetMVRegResp(Rest, Z1, Z2, F@_1, + TrUserData). + +d_msg_ApbMapKey(Bin, TrUserData) -> + dfp_read_field_def_ApbMapKey(Bin, 0, 0, + id(undefined, TrUserData), + id(undefined, TrUserData), TrUserData). + +dfp_read_field_def_ApbMapKey(<<10, Rest/binary>>, Z1, + Z2, F@_1, F@_2, TrUserData) -> + d_field_ApbMapKey_key(Rest, Z1, Z2, F@_1, F@_2, + TrUserData); +dfp_read_field_def_ApbMapKey(<<16, Rest/binary>>, Z1, + Z2, F@_1, F@_2, TrUserData) -> + d_field_ApbMapKey_type(Rest, Z1, Z2, F@_1, F@_2, + TrUserData); +dfp_read_field_def_ApbMapKey(<<>>, 0, 0, F@_1, F@_2, + _) -> + #'ApbMapKey'{key = F@_1, type = F@_2}; +dfp_read_field_def_ApbMapKey(Other, Z1, Z2, F@_1, F@_2, + TrUserData) -> + dg_read_field_def_ApbMapKey(Other, Z1, Z2, F@_1, F@_2, + TrUserData). + +dg_read_field_def_ApbMapKey(<<1:1, X:7, Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 32 - 7 -> + dg_read_field_def_ApbMapKey(Rest, N + 7, X bsl N + Acc, + F@_1, F@_2, TrUserData); +dg_read_field_def_ApbMapKey(<<0:1, X:7, Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) -> + Key = X bsl N + Acc, + case Key of + 10 -> + d_field_ApbMapKey_key(Rest, 0, 0, F@_1, F@_2, + TrUserData); + 16 -> + d_field_ApbMapKey_type(Rest, 0, 0, F@_1, F@_2, + TrUserData); + _ -> + case Key band 7 of + 0 -> + skip_varint_ApbMapKey(Rest, 0, 0, F@_1, F@_2, + TrUserData); + 1 -> + skip_64_ApbMapKey(Rest, 0, 0, F@_1, F@_2, TrUserData); + 2 -> + skip_length_delimited_ApbMapKey(Rest, 0, 0, F@_1, F@_2, + TrUserData); + 3 -> + skip_group_ApbMapKey(Rest, Key bsr 3, 0, F@_1, F@_2, + TrUserData); + 5 -> + skip_32_ApbMapKey(Rest, 0, 0, F@_1, F@_2, TrUserData) + end + end; +dg_read_field_def_ApbMapKey(<<>>, 0, 0, F@_1, F@_2, + _) -> + #'ApbMapKey'{key = F@_1, type = F@_2}. + +d_field_ApbMapKey_key(<<1:1, X:7, Rest/binary>>, N, Acc, + F@_1, F@_2, TrUserData) + when N < 57 -> + d_field_ApbMapKey_key(Rest, N + 7, X bsl N + Acc, F@_1, + F@_2, TrUserData); +d_field_ApbMapKey_key(<<0:1, X:7, Rest/binary>>, N, Acc, + _, F@_2, TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {binary:copy(Bytes), Rest2} + end, + dfp_read_field_def_ApbMapKey(RestF, 0, 0, NewFValue, + F@_2, TrUserData). + +d_field_ApbMapKey_type(<<1:1, X:7, Rest/binary>>, N, + Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + d_field_ApbMapKey_type(Rest, N + 7, X bsl N + Acc, F@_1, + F@_2, TrUserData); +d_field_ApbMapKey_type(<<0:1, X:7, Rest/binary>>, N, + Acc, F@_1, _, TrUserData) -> + {NewFValue, RestF} = {d_enum_CRDT_type(begin + <> = <<(X bsl + N + + + Acc):32/unsigned-native>>, + Res + end), + Rest}, + dfp_read_field_def_ApbMapKey(RestF, 0, 0, F@_1, + NewFValue, TrUserData). + +skip_varint_ApbMapKey(<<1:1, _:7, Rest/binary>>, Z1, Z2, + F@_1, F@_2, TrUserData) -> + skip_varint_ApbMapKey(Rest, Z1, Z2, F@_1, F@_2, + TrUserData); +skip_varint_ApbMapKey(<<0:1, _:7, Rest/binary>>, Z1, Z2, + F@_1, F@_2, TrUserData) -> + dfp_read_field_def_ApbMapKey(Rest, Z1, Z2, F@_1, F@_2, + TrUserData). + +skip_length_delimited_ApbMapKey(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + skip_length_delimited_ApbMapKey(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, TrUserData); +skip_length_delimited_ApbMapKey(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) -> + Length = X bsl N + Acc, + <<_:Length/binary, Rest2/binary>> = Rest, + dfp_read_field_def_ApbMapKey(Rest2, 0, 0, F@_1, F@_2, + TrUserData). + +skip_group_ApbMapKey(Bin, FNum, Z2, F@_1, F@_2, + TrUserData) -> + {_, Rest} = read_group(Bin, FNum), + dfp_read_field_def_ApbMapKey(Rest, 0, Z2, F@_1, F@_2, + TrUserData). + +skip_32_ApbMapKey(<<_:32, Rest/binary>>, Z1, Z2, F@_1, + F@_2, TrUserData) -> + dfp_read_field_def_ApbMapKey(Rest, Z1, Z2, F@_1, F@_2, + TrUserData). + +skip_64_ApbMapKey(<<_:64, Rest/binary>>, Z1, Z2, F@_1, + F@_2, TrUserData) -> + dfp_read_field_def_ApbMapKey(Rest, Z1, Z2, F@_1, F@_2, + TrUserData). + +d_msg_ApbMapUpdate(Bin, TrUserData) -> + dfp_read_field_def_ApbMapUpdate(Bin, 0, 0, + id([], TrUserData), id([], TrUserData), + TrUserData). + +dfp_read_field_def_ApbMapUpdate(<<10, Rest/binary>>, Z1, + Z2, F@_1, F@_2, TrUserData) -> + d_field_ApbMapUpdate_updates(Rest, Z1, Z2, F@_1, F@_2, + TrUserData); +dfp_read_field_def_ApbMapUpdate(<<18, Rest/binary>>, Z1, + Z2, F@_1, F@_2, TrUserData) -> + d_field_ApbMapUpdate_removedKeys(Rest, Z1, Z2, F@_1, + F@_2, TrUserData); +dfp_read_field_def_ApbMapUpdate(<<>>, 0, 0, R1, R2, + TrUserData) -> + #'ApbMapUpdate'{updates = lists_reverse(R1, TrUserData), + removedKeys = lists_reverse(R2, TrUserData)}; +dfp_read_field_def_ApbMapUpdate(Other, Z1, Z2, F@_1, + F@_2, TrUserData) -> + dg_read_field_def_ApbMapUpdate(Other, Z1, Z2, F@_1, + F@_2, TrUserData). + +dg_read_field_def_ApbMapUpdate(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 32 - 7 -> + dg_read_field_def_ApbMapUpdate(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, TrUserData); +dg_read_field_def_ApbMapUpdate(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) -> + Key = X bsl N + Acc, + case Key of + 10 -> + d_field_ApbMapUpdate_updates(Rest, 0, 0, F@_1, F@_2, + TrUserData); + 18 -> + d_field_ApbMapUpdate_removedKeys(Rest, 0, 0, F@_1, F@_2, + TrUserData); + _ -> + case Key band 7 of + 0 -> + skip_varint_ApbMapUpdate(Rest, 0, 0, F@_1, F@_2, + TrUserData); + 1 -> + skip_64_ApbMapUpdate(Rest, 0, 0, F@_1, F@_2, + TrUserData); + 2 -> + skip_length_delimited_ApbMapUpdate(Rest, 0, 0, F@_1, + F@_2, TrUserData); + 3 -> + skip_group_ApbMapUpdate(Rest, Key bsr 3, 0, F@_1, F@_2, + TrUserData); + 5 -> + skip_32_ApbMapUpdate(Rest, 0, 0, F@_1, F@_2, TrUserData) + end + end; +dg_read_field_def_ApbMapUpdate(<<>>, 0, 0, R1, R2, + TrUserData) -> + #'ApbMapUpdate'{updates = lists_reverse(R1, TrUserData), + removedKeys = lists_reverse(R2, TrUserData)}. + +d_field_ApbMapUpdate_updates(<<1:1, X:7, Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + d_field_ApbMapUpdate_updates(Rest, N + 7, X bsl N + Acc, + F@_1, F@_2, TrUserData); +d_field_ApbMapUpdate_updates(<<0:1, X:7, Rest/binary>>, + N, Acc, Prev, F@_2, TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {id(d_msg_ApbMapNestedUpdate(Bs, TrUserData), + TrUserData), + Rest2} + end, + dfp_read_field_def_ApbMapUpdate(RestF, 0, 0, + cons(NewFValue, Prev, TrUserData), F@_2, + TrUserData). + +d_field_ApbMapUpdate_removedKeys(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + d_field_ApbMapUpdate_removedKeys(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, TrUserData); +d_field_ApbMapUpdate_removedKeys(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, Prev, TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {id(d_msg_ApbMapKey(Bs, TrUserData), TrUserData), + Rest2} + end, + dfp_read_field_def_ApbMapUpdate(RestF, 0, 0, F@_1, + cons(NewFValue, Prev, TrUserData), + TrUserData). + +skip_varint_ApbMapUpdate(<<1:1, _:7, Rest/binary>>, Z1, + Z2, F@_1, F@_2, TrUserData) -> + skip_varint_ApbMapUpdate(Rest, Z1, Z2, F@_1, F@_2, + TrUserData); +skip_varint_ApbMapUpdate(<<0:1, _:7, Rest/binary>>, Z1, + Z2, F@_1, F@_2, TrUserData) -> + dfp_read_field_def_ApbMapUpdate(Rest, Z1, Z2, F@_1, + F@_2, TrUserData). + +skip_length_delimited_ApbMapUpdate(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + skip_length_delimited_ApbMapUpdate(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, TrUserData); +skip_length_delimited_ApbMapUpdate(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) -> + Length = X bsl N + Acc, + <<_:Length/binary, Rest2/binary>> = Rest, + dfp_read_field_def_ApbMapUpdate(Rest2, 0, 0, F@_1, F@_2, + TrUserData). + +skip_group_ApbMapUpdate(Bin, FNum, Z2, F@_1, F@_2, + TrUserData) -> + {_, Rest} = read_group(Bin, FNum), + dfp_read_field_def_ApbMapUpdate(Rest, 0, Z2, F@_1, F@_2, + TrUserData). + +skip_32_ApbMapUpdate(<<_:32, Rest/binary>>, Z1, Z2, + F@_1, F@_2, TrUserData) -> + dfp_read_field_def_ApbMapUpdate(Rest, Z1, Z2, F@_1, + F@_2, TrUserData). + +skip_64_ApbMapUpdate(<<_:64, Rest/binary>>, Z1, Z2, + F@_1, F@_2, TrUserData) -> + dfp_read_field_def_ApbMapUpdate(Rest, Z1, Z2, F@_1, + F@_2, TrUserData). + +d_msg_ApbMapNestedUpdate(Bin, TrUserData) -> + dfp_read_field_def_ApbMapNestedUpdate(Bin, 0, 0, + id(undefined, TrUserData), + id(undefined, TrUserData), + TrUserData). + +dfp_read_field_def_ApbMapNestedUpdate(<<10, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + d_field_ApbMapNestedUpdate_key(Rest, Z1, Z2, F@_1, F@_2, + TrUserData); +dfp_read_field_def_ApbMapNestedUpdate(<<18, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + d_field_ApbMapNestedUpdate_update(Rest, Z1, Z2, F@_1, + F@_2, TrUserData); +dfp_read_field_def_ApbMapNestedUpdate(<<>>, 0, 0, F@_1, + F@_2, _) -> + #'ApbMapNestedUpdate'{key = F@_1, update = F@_2}; +dfp_read_field_def_ApbMapNestedUpdate(Other, Z1, Z2, + F@_1, F@_2, TrUserData) -> + dg_read_field_def_ApbMapNestedUpdate(Other, Z1, Z2, + F@_1, F@_2, TrUserData). + +dg_read_field_def_ApbMapNestedUpdate(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 32 - 7 -> + dg_read_field_def_ApbMapNestedUpdate(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, TrUserData); +dg_read_field_def_ApbMapNestedUpdate(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) -> + Key = X bsl N + Acc, + case Key of + 10 -> + d_field_ApbMapNestedUpdate_key(Rest, 0, 0, F@_1, F@_2, + TrUserData); + 18 -> + d_field_ApbMapNestedUpdate_update(Rest, 0, 0, F@_1, + F@_2, TrUserData); + _ -> + case Key band 7 of + 0 -> + skip_varint_ApbMapNestedUpdate(Rest, 0, 0, F@_1, F@_2, + TrUserData); + 1 -> + skip_64_ApbMapNestedUpdate(Rest, 0, 0, F@_1, F@_2, + TrUserData); + 2 -> + skip_length_delimited_ApbMapNestedUpdate(Rest, 0, 0, + F@_1, F@_2, + TrUserData); + 3 -> + skip_group_ApbMapNestedUpdate(Rest, Key bsr 3, 0, F@_1, + F@_2, TrUserData); + 5 -> + skip_32_ApbMapNestedUpdate(Rest, 0, 0, F@_1, F@_2, + TrUserData) + end + end; +dg_read_field_def_ApbMapNestedUpdate(<<>>, 0, 0, F@_1, + F@_2, _) -> + #'ApbMapNestedUpdate'{key = F@_1, update = F@_2}. + +d_field_ApbMapNestedUpdate_key(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + d_field_ApbMapNestedUpdate_key(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, TrUserData); +d_field_ApbMapNestedUpdate_key(<<0:1, X:7, + Rest/binary>>, + N, Acc, Prev, F@_2, TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {id(d_msg_ApbMapKey(Bs, TrUserData), TrUserData), + Rest2} + end, + dfp_read_field_def_ApbMapNestedUpdate(RestF, 0, 0, + if Prev == undefined -> NewFValue; + true -> + merge_msg_ApbMapKey(Prev, + NewFValue, + TrUserData) + end, + F@_2, TrUserData). + +d_field_ApbMapNestedUpdate_update(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + d_field_ApbMapNestedUpdate_update(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, TrUserData); +d_field_ApbMapNestedUpdate_update(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, Prev, TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {id(d_msg_ApbUpdateOperation(Bs, TrUserData), + TrUserData), + Rest2} + end, + dfp_read_field_def_ApbMapNestedUpdate(RestF, 0, 0, F@_1, + if Prev == undefined -> NewFValue; + true -> + merge_msg_ApbUpdateOperation(Prev, + NewFValue, + TrUserData) + end, + TrUserData). + +skip_varint_ApbMapNestedUpdate(<<1:1, _:7, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + skip_varint_ApbMapNestedUpdate(Rest, Z1, Z2, F@_1, F@_2, + TrUserData); +skip_varint_ApbMapNestedUpdate(<<0:1, _:7, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + dfp_read_field_def_ApbMapNestedUpdate(Rest, Z1, Z2, + F@_1, F@_2, TrUserData). + +skip_length_delimited_ApbMapNestedUpdate(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + skip_length_delimited_ApbMapNestedUpdate(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, + TrUserData); +skip_length_delimited_ApbMapNestedUpdate(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) -> + Length = X bsl N + Acc, + <<_:Length/binary, Rest2/binary>> = Rest, + dfp_read_field_def_ApbMapNestedUpdate(Rest2, 0, 0, F@_1, + F@_2, TrUserData). + +skip_group_ApbMapNestedUpdate(Bin, FNum, Z2, F@_1, F@_2, + TrUserData) -> + {_, Rest} = read_group(Bin, FNum), + dfp_read_field_def_ApbMapNestedUpdate(Rest, 0, Z2, F@_1, + F@_2, TrUserData). + +skip_32_ApbMapNestedUpdate(<<_:32, Rest/binary>>, Z1, + Z2, F@_1, F@_2, TrUserData) -> + dfp_read_field_def_ApbMapNestedUpdate(Rest, Z1, Z2, + F@_1, F@_2, TrUserData). + +skip_64_ApbMapNestedUpdate(<<_:64, Rest/binary>>, Z1, + Z2, F@_1, F@_2, TrUserData) -> + dfp_read_field_def_ApbMapNestedUpdate(Rest, Z1, Z2, + F@_1, F@_2, TrUserData). + +d_msg_ApbGetMapResp(Bin, TrUserData) -> + dfp_read_field_def_ApbGetMapResp(Bin, 0, 0, + id([], TrUserData), TrUserData). + +dfp_read_field_def_ApbGetMapResp(<<10, Rest/binary>>, + Z1, Z2, F@_1, TrUserData) -> + d_field_ApbGetMapResp_entries(Rest, Z1, Z2, F@_1, + TrUserData); +dfp_read_field_def_ApbGetMapResp(<<>>, 0, 0, R1, + TrUserData) -> + #'ApbGetMapResp'{entries = + lists_reverse(R1, TrUserData)}; +dfp_read_field_def_ApbGetMapResp(Other, Z1, Z2, F@_1, + TrUserData) -> + dg_read_field_def_ApbGetMapResp(Other, Z1, Z2, F@_1, + TrUserData). + +dg_read_field_def_ApbGetMapResp(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) + when N < 32 - 7 -> + dg_read_field_def_ApbGetMapResp(Rest, N + 7, + X bsl N + Acc, F@_1, TrUserData); +dg_read_field_def_ApbGetMapResp(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) -> + Key = X bsl N + Acc, + case Key of + 10 -> + d_field_ApbGetMapResp_entries(Rest, 0, 0, F@_1, + TrUserData); + _ -> + case Key band 7 of + 0 -> + skip_varint_ApbGetMapResp(Rest, 0, 0, F@_1, TrUserData); + 1 -> + skip_64_ApbGetMapResp(Rest, 0, 0, F@_1, TrUserData); + 2 -> + skip_length_delimited_ApbGetMapResp(Rest, 0, 0, F@_1, + TrUserData); + 3 -> + skip_group_ApbGetMapResp(Rest, Key bsr 3, 0, F@_1, + TrUserData); + 5 -> skip_32_ApbGetMapResp(Rest, 0, 0, F@_1, TrUserData) + end + end; +dg_read_field_def_ApbGetMapResp(<<>>, 0, 0, R1, + TrUserData) -> + #'ApbGetMapResp'{entries = + lists_reverse(R1, TrUserData)}. + +d_field_ApbGetMapResp_entries(<<1:1, X:7, Rest/binary>>, + N, Acc, F@_1, TrUserData) + when N < 57 -> + d_field_ApbGetMapResp_entries(Rest, N + 7, + X bsl N + Acc, F@_1, TrUserData); +d_field_ApbGetMapResp_entries(<<0:1, X:7, Rest/binary>>, + N, Acc, Prev, TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {id(d_msg_ApbMapEntry(Bs, TrUserData), TrUserData), + Rest2} + end, + dfp_read_field_def_ApbGetMapResp(RestF, 0, 0, + cons(NewFValue, Prev, TrUserData), + TrUserData). + +skip_varint_ApbGetMapResp(<<1:1, _:7, Rest/binary>>, Z1, + Z2, F@_1, TrUserData) -> + skip_varint_ApbGetMapResp(Rest, Z1, Z2, F@_1, + TrUserData); +skip_varint_ApbGetMapResp(<<0:1, _:7, Rest/binary>>, Z1, + Z2, F@_1, TrUserData) -> + dfp_read_field_def_ApbGetMapResp(Rest, Z1, Z2, F@_1, + TrUserData). + +skip_length_delimited_ApbGetMapResp(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) + when N < 57 -> + skip_length_delimited_ApbGetMapResp(Rest, N + 7, + X bsl N + Acc, F@_1, TrUserData); +skip_length_delimited_ApbGetMapResp(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) -> + Length = X bsl N + Acc, + <<_:Length/binary, Rest2/binary>> = Rest, + dfp_read_field_def_ApbGetMapResp(Rest2, 0, 0, F@_1, + TrUserData). + +skip_group_ApbGetMapResp(Bin, FNum, Z2, F@_1, + TrUserData) -> + {_, Rest} = read_group(Bin, FNum), + dfp_read_field_def_ApbGetMapResp(Rest, 0, Z2, F@_1, + TrUserData). + +skip_32_ApbGetMapResp(<<_:32, Rest/binary>>, Z1, Z2, + F@_1, TrUserData) -> + dfp_read_field_def_ApbGetMapResp(Rest, Z1, Z2, F@_1, + TrUserData). + +skip_64_ApbGetMapResp(<<_:64, Rest/binary>>, Z1, Z2, + F@_1, TrUserData) -> + dfp_read_field_def_ApbGetMapResp(Rest, Z1, Z2, F@_1, + TrUserData). + +d_msg_ApbMapEntry(Bin, TrUserData) -> + dfp_read_field_def_ApbMapEntry(Bin, 0, 0, + id(undefined, TrUserData), + id(undefined, TrUserData), TrUserData). + +dfp_read_field_def_ApbMapEntry(<<10, Rest/binary>>, Z1, + Z2, F@_1, F@_2, TrUserData) -> + d_field_ApbMapEntry_key(Rest, Z1, Z2, F@_1, F@_2, + TrUserData); +dfp_read_field_def_ApbMapEntry(<<18, Rest/binary>>, Z1, + Z2, F@_1, F@_2, TrUserData) -> + d_field_ApbMapEntry_value(Rest, Z1, Z2, F@_1, F@_2, + TrUserData); +dfp_read_field_def_ApbMapEntry(<<>>, 0, 0, F@_1, F@_2, + _) -> + #'ApbMapEntry'{key = F@_1, value = F@_2}; +dfp_read_field_def_ApbMapEntry(Other, Z1, Z2, F@_1, + F@_2, TrUserData) -> + dg_read_field_def_ApbMapEntry(Other, Z1, Z2, F@_1, F@_2, + TrUserData). + +dg_read_field_def_ApbMapEntry(<<1:1, X:7, Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 32 - 7 -> + dg_read_field_def_ApbMapEntry(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, TrUserData); +dg_read_field_def_ApbMapEntry(<<0:1, X:7, Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) -> + Key = X bsl N + Acc, + case Key of + 10 -> + d_field_ApbMapEntry_key(Rest, 0, 0, F@_1, F@_2, + TrUserData); + 18 -> + d_field_ApbMapEntry_value(Rest, 0, 0, F@_1, F@_2, + TrUserData); + _ -> + case Key band 7 of + 0 -> + skip_varint_ApbMapEntry(Rest, 0, 0, F@_1, F@_2, + TrUserData); + 1 -> + skip_64_ApbMapEntry(Rest, 0, 0, F@_1, F@_2, TrUserData); + 2 -> + skip_length_delimited_ApbMapEntry(Rest, 0, 0, F@_1, + F@_2, TrUserData); + 3 -> + skip_group_ApbMapEntry(Rest, Key bsr 3, 0, F@_1, F@_2, + TrUserData); + 5 -> + skip_32_ApbMapEntry(Rest, 0, 0, F@_1, F@_2, TrUserData) + end + end; +dg_read_field_def_ApbMapEntry(<<>>, 0, 0, F@_1, F@_2, + _) -> + #'ApbMapEntry'{key = F@_1, value = F@_2}. + +d_field_ApbMapEntry_key(<<1:1, X:7, Rest/binary>>, N, + Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + d_field_ApbMapEntry_key(Rest, N + 7, X bsl N + Acc, + F@_1, F@_2, TrUserData); +d_field_ApbMapEntry_key(<<0:1, X:7, Rest/binary>>, N, + Acc, Prev, F@_2, TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {id(d_msg_ApbMapKey(Bs, TrUserData), TrUserData), + Rest2} + end, + dfp_read_field_def_ApbMapEntry(RestF, 0, 0, + if Prev == undefined -> NewFValue; + true -> + merge_msg_ApbMapKey(Prev, NewFValue, + TrUserData) + end, + F@_2, TrUserData). + +d_field_ApbMapEntry_value(<<1:1, X:7, Rest/binary>>, N, + Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + d_field_ApbMapEntry_value(Rest, N + 7, X bsl N + Acc, + F@_1, F@_2, TrUserData); +d_field_ApbMapEntry_value(<<0:1, X:7, Rest/binary>>, N, + Acc, F@_1, Prev, TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {id(d_msg_ApbReadObjectResp(Bs, TrUserData), + TrUserData), + Rest2} + end, + dfp_read_field_def_ApbMapEntry(RestF, 0, 0, F@_1, + if Prev == undefined -> NewFValue; + true -> + merge_msg_ApbReadObjectResp(Prev, + NewFValue, + TrUserData) + end, + TrUserData). + +skip_varint_ApbMapEntry(<<1:1, _:7, Rest/binary>>, Z1, + Z2, F@_1, F@_2, TrUserData) -> + skip_varint_ApbMapEntry(Rest, Z1, Z2, F@_1, F@_2, + TrUserData); +skip_varint_ApbMapEntry(<<0:1, _:7, Rest/binary>>, Z1, + Z2, F@_1, F@_2, TrUserData) -> + dfp_read_field_def_ApbMapEntry(Rest, Z1, Z2, F@_1, F@_2, + TrUserData). + +skip_length_delimited_ApbMapEntry(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + skip_length_delimited_ApbMapEntry(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, TrUserData); +skip_length_delimited_ApbMapEntry(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) -> + Length = X bsl N + Acc, + <<_:Length/binary, Rest2/binary>> = Rest, + dfp_read_field_def_ApbMapEntry(Rest2, 0, 0, F@_1, F@_2, + TrUserData). + +skip_group_ApbMapEntry(Bin, FNum, Z2, F@_1, F@_2, + TrUserData) -> + {_, Rest} = read_group(Bin, FNum), + dfp_read_field_def_ApbMapEntry(Rest, 0, Z2, F@_1, F@_2, + TrUserData). + +skip_32_ApbMapEntry(<<_:32, Rest/binary>>, Z1, Z2, F@_1, + F@_2, TrUserData) -> + dfp_read_field_def_ApbMapEntry(Rest, Z1, Z2, F@_1, F@_2, + TrUserData). + +skip_64_ApbMapEntry(<<_:64, Rest/binary>>, Z1, Z2, F@_1, + F@_2, TrUserData) -> + dfp_read_field_def_ApbMapEntry(Rest, Z1, Z2, F@_1, F@_2, + TrUserData). + +d_msg_ApbFlagUpdate(Bin, TrUserData) -> + dfp_read_field_def_ApbFlagUpdate(Bin, 0, 0, + id(undefined, TrUserData), TrUserData). + +dfp_read_field_def_ApbFlagUpdate(<<8, Rest/binary>>, Z1, + Z2, F@_1, TrUserData) -> + d_field_ApbFlagUpdate_value(Rest, Z1, Z2, F@_1, + TrUserData); +dfp_read_field_def_ApbFlagUpdate(<<>>, 0, 0, F@_1, _) -> + #'ApbFlagUpdate'{value = F@_1}; +dfp_read_field_def_ApbFlagUpdate(Other, Z1, Z2, F@_1, + TrUserData) -> + dg_read_field_def_ApbFlagUpdate(Other, Z1, Z2, F@_1, + TrUserData). + +dg_read_field_def_ApbFlagUpdate(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) + when N < 32 - 7 -> + dg_read_field_def_ApbFlagUpdate(Rest, N + 7, + X bsl N + Acc, F@_1, TrUserData); +dg_read_field_def_ApbFlagUpdate(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) -> + Key = X bsl N + Acc, + case Key of + 8 -> + d_field_ApbFlagUpdate_value(Rest, 0, 0, F@_1, + TrUserData); + _ -> + case Key band 7 of + 0 -> + skip_varint_ApbFlagUpdate(Rest, 0, 0, F@_1, TrUserData); + 1 -> + skip_64_ApbFlagUpdate(Rest, 0, 0, F@_1, TrUserData); + 2 -> + skip_length_delimited_ApbFlagUpdate(Rest, 0, 0, F@_1, + TrUserData); + 3 -> + skip_group_ApbFlagUpdate(Rest, Key bsr 3, 0, F@_1, + TrUserData); + 5 -> skip_32_ApbFlagUpdate(Rest, 0, 0, F@_1, TrUserData) + end + end; +dg_read_field_def_ApbFlagUpdate(<<>>, 0, 0, F@_1, _) -> + #'ApbFlagUpdate'{value = F@_1}. + +d_field_ApbFlagUpdate_value(<<1:1, X:7, Rest/binary>>, + N, Acc, F@_1, TrUserData) + when N < 57 -> + d_field_ApbFlagUpdate_value(Rest, N + 7, X bsl N + Acc, + F@_1, TrUserData); +d_field_ApbFlagUpdate_value(<<0:1, X:7, Rest/binary>>, + N, Acc, _, TrUserData) -> + {NewFValue, RestF} = {X bsl N + Acc =/= 0, Rest}, + dfp_read_field_def_ApbFlagUpdate(RestF, 0, 0, NewFValue, + TrUserData). + +skip_varint_ApbFlagUpdate(<<1:1, _:7, Rest/binary>>, Z1, + Z2, F@_1, TrUserData) -> + skip_varint_ApbFlagUpdate(Rest, Z1, Z2, F@_1, + TrUserData); +skip_varint_ApbFlagUpdate(<<0:1, _:7, Rest/binary>>, Z1, + Z2, F@_1, TrUserData) -> + dfp_read_field_def_ApbFlagUpdate(Rest, Z1, Z2, F@_1, + TrUserData). + +skip_length_delimited_ApbFlagUpdate(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) + when N < 57 -> + skip_length_delimited_ApbFlagUpdate(Rest, N + 7, + X bsl N + Acc, F@_1, TrUserData); +skip_length_delimited_ApbFlagUpdate(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) -> + Length = X bsl N + Acc, + <<_:Length/binary, Rest2/binary>> = Rest, + dfp_read_field_def_ApbFlagUpdate(Rest2, 0, 0, F@_1, + TrUserData). + +skip_group_ApbFlagUpdate(Bin, FNum, Z2, F@_1, + TrUserData) -> + {_, Rest} = read_group(Bin, FNum), + dfp_read_field_def_ApbFlagUpdate(Rest, 0, Z2, F@_1, + TrUserData). + +skip_32_ApbFlagUpdate(<<_:32, Rest/binary>>, Z1, Z2, + F@_1, TrUserData) -> + dfp_read_field_def_ApbFlagUpdate(Rest, Z1, Z2, F@_1, + TrUserData). + +skip_64_ApbFlagUpdate(<<_:64, Rest/binary>>, Z1, Z2, + F@_1, TrUserData) -> + dfp_read_field_def_ApbFlagUpdate(Rest, Z1, Z2, F@_1, + TrUserData). + +d_msg_ApbGetFlagResp(Bin, TrUserData) -> + dfp_read_field_def_ApbGetFlagResp(Bin, 0, 0, + id(undefined, TrUserData), TrUserData). + +dfp_read_field_def_ApbGetFlagResp(<<8, Rest/binary>>, + Z1, Z2, F@_1, TrUserData) -> + d_field_ApbGetFlagResp_value(Rest, Z1, Z2, F@_1, + TrUserData); +dfp_read_field_def_ApbGetFlagResp(<<>>, 0, 0, F@_1, + _) -> + #'ApbGetFlagResp'{value = F@_1}; +dfp_read_field_def_ApbGetFlagResp(Other, Z1, Z2, F@_1, + TrUserData) -> + dg_read_field_def_ApbGetFlagResp(Other, Z1, Z2, F@_1, + TrUserData). + +dg_read_field_def_ApbGetFlagResp(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) + when N < 32 - 7 -> + dg_read_field_def_ApbGetFlagResp(Rest, N + 7, + X bsl N + Acc, F@_1, TrUserData); +dg_read_field_def_ApbGetFlagResp(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) -> + Key = X bsl N + Acc, + case Key of + 8 -> + d_field_ApbGetFlagResp_value(Rest, 0, 0, F@_1, + TrUserData); + _ -> + case Key band 7 of + 0 -> + skip_varint_ApbGetFlagResp(Rest, 0, 0, F@_1, + TrUserData); + 1 -> + skip_64_ApbGetFlagResp(Rest, 0, 0, F@_1, TrUserData); + 2 -> + skip_length_delimited_ApbGetFlagResp(Rest, 0, 0, F@_1, + TrUserData); + 3 -> + skip_group_ApbGetFlagResp(Rest, Key bsr 3, 0, F@_1, + TrUserData); + 5 -> + skip_32_ApbGetFlagResp(Rest, 0, 0, F@_1, TrUserData) + end + end; +dg_read_field_def_ApbGetFlagResp(<<>>, 0, 0, F@_1, _) -> + #'ApbGetFlagResp'{value = F@_1}. + +d_field_ApbGetFlagResp_value(<<1:1, X:7, Rest/binary>>, + N, Acc, F@_1, TrUserData) + when N < 57 -> + d_field_ApbGetFlagResp_value(Rest, N + 7, X bsl N + Acc, + F@_1, TrUserData); +d_field_ApbGetFlagResp_value(<<0:1, X:7, Rest/binary>>, + N, Acc, _, TrUserData) -> + {NewFValue, RestF} = {X bsl N + Acc =/= 0, Rest}, + dfp_read_field_def_ApbGetFlagResp(RestF, 0, 0, + NewFValue, TrUserData). + +skip_varint_ApbGetFlagResp(<<1:1, _:7, Rest/binary>>, + Z1, Z2, F@_1, TrUserData) -> + skip_varint_ApbGetFlagResp(Rest, Z1, Z2, F@_1, + TrUserData); +skip_varint_ApbGetFlagResp(<<0:1, _:7, Rest/binary>>, + Z1, Z2, F@_1, TrUserData) -> + dfp_read_field_def_ApbGetFlagResp(Rest, Z1, Z2, F@_1, + TrUserData). + +skip_length_delimited_ApbGetFlagResp(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) + when N < 57 -> + skip_length_delimited_ApbGetFlagResp(Rest, N + 7, + X bsl N + Acc, F@_1, TrUserData); +skip_length_delimited_ApbGetFlagResp(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) -> + Length = X bsl N + Acc, + <<_:Length/binary, Rest2/binary>> = Rest, + dfp_read_field_def_ApbGetFlagResp(Rest2, 0, 0, F@_1, + TrUserData). + +skip_group_ApbGetFlagResp(Bin, FNum, Z2, F@_1, + TrUserData) -> + {_, Rest} = read_group(Bin, FNum), + dfp_read_field_def_ApbGetFlagResp(Rest, 0, Z2, F@_1, + TrUserData). + +skip_32_ApbGetFlagResp(<<_:32, Rest/binary>>, Z1, Z2, + F@_1, TrUserData) -> + dfp_read_field_def_ApbGetFlagResp(Rest, Z1, Z2, F@_1, + TrUserData). + +skip_64_ApbGetFlagResp(<<_:64, Rest/binary>>, Z1, Z2, + F@_1, TrUserData) -> + dfp_read_field_def_ApbGetFlagResp(Rest, Z1, Z2, F@_1, + TrUserData). + +d_msg_ApbCrdtReset(Bin, TrUserData) -> + dfp_read_field_def_ApbCrdtReset(Bin, 0, 0, TrUserData). + +dfp_read_field_def_ApbCrdtReset(<<>>, 0, 0, _) -> + #'ApbCrdtReset'{}; +dfp_read_field_def_ApbCrdtReset(Other, Z1, Z2, + TrUserData) -> + dg_read_field_def_ApbCrdtReset(Other, Z1, Z2, + TrUserData). + +dg_read_field_def_ApbCrdtReset(<<1:1, X:7, + Rest/binary>>, + N, Acc, TrUserData) + when N < 32 - 7 -> + dg_read_field_def_ApbCrdtReset(Rest, N + 7, + X bsl N + Acc, TrUserData); +dg_read_field_def_ApbCrdtReset(<<0:1, X:7, + Rest/binary>>, + N, Acc, TrUserData) -> + Key = X bsl N + Acc, + case Key band 7 of + 0 -> skip_varint_ApbCrdtReset(Rest, 0, 0, TrUserData); + 1 -> skip_64_ApbCrdtReset(Rest, 0, 0, TrUserData); + 2 -> + skip_length_delimited_ApbCrdtReset(Rest, 0, 0, + TrUserData); + 3 -> + skip_group_ApbCrdtReset(Rest, Key bsr 3, 0, TrUserData); + 5 -> skip_32_ApbCrdtReset(Rest, 0, 0, TrUserData) + end; +dg_read_field_def_ApbCrdtReset(<<>>, 0, 0, _) -> + #'ApbCrdtReset'{}. + +skip_varint_ApbCrdtReset(<<1:1, _:7, Rest/binary>>, Z1, + Z2, TrUserData) -> + skip_varint_ApbCrdtReset(Rest, Z1, Z2, TrUserData); +skip_varint_ApbCrdtReset(<<0:1, _:7, Rest/binary>>, Z1, + Z2, TrUserData) -> + dfp_read_field_def_ApbCrdtReset(Rest, Z1, Z2, + TrUserData). + +skip_length_delimited_ApbCrdtReset(<<1:1, X:7, + Rest/binary>>, + N, Acc, TrUserData) + when N < 57 -> + skip_length_delimited_ApbCrdtReset(Rest, N + 7, + X bsl N + Acc, TrUserData); +skip_length_delimited_ApbCrdtReset(<<0:1, X:7, + Rest/binary>>, + N, Acc, TrUserData) -> + Length = X bsl N + Acc, + <<_:Length/binary, Rest2/binary>> = Rest, + dfp_read_field_def_ApbCrdtReset(Rest2, 0, 0, + TrUserData). + +skip_group_ApbCrdtReset(Bin, FNum, Z2, TrUserData) -> + {_, Rest} = read_group(Bin, FNum), + dfp_read_field_def_ApbCrdtReset(Rest, 0, Z2, + TrUserData). + +skip_32_ApbCrdtReset(<<_:32, Rest/binary>>, Z1, Z2, + TrUserData) -> + dfp_read_field_def_ApbCrdtReset(Rest, Z1, Z2, + TrUserData). + +skip_64_ApbCrdtReset(<<_:64, Rest/binary>>, Z1, Z2, + TrUserData) -> + dfp_read_field_def_ApbCrdtReset(Rest, Z1, Z2, + TrUserData). + +d_msg_ApbOperationResp(Bin, TrUserData) -> + dfp_read_field_def_ApbOperationResp(Bin, 0, 0, + id(undefined, TrUserData), + id(undefined, TrUserData), TrUserData). + +dfp_read_field_def_ApbOperationResp(<<8, Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + d_field_ApbOperationResp_success(Rest, Z1, Z2, F@_1, + F@_2, TrUserData); +dfp_read_field_def_ApbOperationResp(<<16, Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + d_field_ApbOperationResp_errorcode(Rest, Z1, Z2, F@_1, + F@_2, TrUserData); +dfp_read_field_def_ApbOperationResp(<<>>, 0, 0, F@_1, + F@_2, _) -> + #'ApbOperationResp'{success = F@_1, errorcode = F@_2}; +dfp_read_field_def_ApbOperationResp(Other, Z1, Z2, F@_1, + F@_2, TrUserData) -> + dg_read_field_def_ApbOperationResp(Other, Z1, Z2, F@_1, + F@_2, TrUserData). + +dg_read_field_def_ApbOperationResp(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 32 - 7 -> + dg_read_field_def_ApbOperationResp(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, TrUserData); +dg_read_field_def_ApbOperationResp(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) -> + Key = X bsl N + Acc, + case Key of + 8 -> + d_field_ApbOperationResp_success(Rest, 0, 0, F@_1, F@_2, + TrUserData); + 16 -> + d_field_ApbOperationResp_errorcode(Rest, 0, 0, F@_1, + F@_2, TrUserData); + _ -> + case Key band 7 of + 0 -> + skip_varint_ApbOperationResp(Rest, 0, 0, F@_1, F@_2, + TrUserData); + 1 -> + skip_64_ApbOperationResp(Rest, 0, 0, F@_1, F@_2, + TrUserData); + 2 -> + skip_length_delimited_ApbOperationResp(Rest, 0, 0, F@_1, + F@_2, TrUserData); + 3 -> + skip_group_ApbOperationResp(Rest, Key bsr 3, 0, F@_1, + F@_2, TrUserData); + 5 -> + skip_32_ApbOperationResp(Rest, 0, 0, F@_1, F@_2, + TrUserData) + end + end; +dg_read_field_def_ApbOperationResp(<<>>, 0, 0, F@_1, + F@_2, _) -> + #'ApbOperationResp'{success = F@_1, errorcode = F@_2}. + +d_field_ApbOperationResp_success(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + d_field_ApbOperationResp_success(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, TrUserData); +d_field_ApbOperationResp_success(<<0:1, X:7, + Rest/binary>>, + N, Acc, _, F@_2, TrUserData) -> + {NewFValue, RestF} = {X bsl N + Acc =/= 0, Rest}, + dfp_read_field_def_ApbOperationResp(RestF, 0, 0, + NewFValue, F@_2, TrUserData). + +d_field_ApbOperationResp_errorcode(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + d_field_ApbOperationResp_errorcode(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, TrUserData); +d_field_ApbOperationResp_errorcode(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, _, TrUserData) -> + {NewFValue, RestF} = {X bsl N + Acc, Rest}, + dfp_read_field_def_ApbOperationResp(RestF, 0, 0, F@_1, + NewFValue, TrUserData). + +skip_varint_ApbOperationResp(<<1:1, _:7, Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + skip_varint_ApbOperationResp(Rest, Z1, Z2, F@_1, F@_2, + TrUserData); +skip_varint_ApbOperationResp(<<0:1, _:7, Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + dfp_read_field_def_ApbOperationResp(Rest, Z1, Z2, F@_1, + F@_2, TrUserData). + +skip_length_delimited_ApbOperationResp(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + skip_length_delimited_ApbOperationResp(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, + TrUserData); +skip_length_delimited_ApbOperationResp(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) -> + Length = X bsl N + Acc, + <<_:Length/binary, Rest2/binary>> = Rest, + dfp_read_field_def_ApbOperationResp(Rest2, 0, 0, F@_1, + F@_2, TrUserData). + +skip_group_ApbOperationResp(Bin, FNum, Z2, F@_1, F@_2, + TrUserData) -> + {_, Rest} = read_group(Bin, FNum), + dfp_read_field_def_ApbOperationResp(Rest, 0, Z2, F@_1, + F@_2, TrUserData). + +skip_32_ApbOperationResp(<<_:32, Rest/binary>>, Z1, Z2, + F@_1, F@_2, TrUserData) -> + dfp_read_field_def_ApbOperationResp(Rest, Z1, Z2, F@_1, + F@_2, TrUserData). + +skip_64_ApbOperationResp(<<_:64, Rest/binary>>, Z1, Z2, + F@_1, F@_2, TrUserData) -> + dfp_read_field_def_ApbOperationResp(Rest, Z1, Z2, F@_1, + F@_2, TrUserData). + +d_msg_ApbTxnProperties(Bin, TrUserData) -> + dfp_read_field_def_ApbTxnProperties(Bin, 0, 0, + id(undefined, TrUserData), + id(undefined, TrUserData), TrUserData). + +dfp_read_field_def_ApbTxnProperties(<<8, Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + d_field_ApbTxnProperties_read_write(Rest, Z1, Z2, F@_1, + F@_2, TrUserData); +dfp_read_field_def_ApbTxnProperties(<<16, Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + d_field_ApbTxnProperties_red_blue(Rest, Z1, Z2, F@_1, + F@_2, TrUserData); +dfp_read_field_def_ApbTxnProperties(<<>>, 0, 0, F@_1, + F@_2, _) -> + #'ApbTxnProperties'{read_write = F@_1, red_blue = F@_2}; +dfp_read_field_def_ApbTxnProperties(Other, Z1, Z2, F@_1, + F@_2, TrUserData) -> + dg_read_field_def_ApbTxnProperties(Other, Z1, Z2, F@_1, + F@_2, TrUserData). + +dg_read_field_def_ApbTxnProperties(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 32 - 7 -> + dg_read_field_def_ApbTxnProperties(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, TrUserData); +dg_read_field_def_ApbTxnProperties(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) -> + Key = X bsl N + Acc, + case Key of + 8 -> + d_field_ApbTxnProperties_read_write(Rest, 0, 0, F@_1, + F@_2, TrUserData); + 16 -> + d_field_ApbTxnProperties_red_blue(Rest, 0, 0, F@_1, + F@_2, TrUserData); + _ -> + case Key band 7 of + 0 -> + skip_varint_ApbTxnProperties(Rest, 0, 0, F@_1, F@_2, + TrUserData); + 1 -> + skip_64_ApbTxnProperties(Rest, 0, 0, F@_1, F@_2, + TrUserData); + 2 -> + skip_length_delimited_ApbTxnProperties(Rest, 0, 0, F@_1, + F@_2, TrUserData); + 3 -> + skip_group_ApbTxnProperties(Rest, Key bsr 3, 0, F@_1, + F@_2, TrUserData); + 5 -> + skip_32_ApbTxnProperties(Rest, 0, 0, F@_1, F@_2, + TrUserData) + end + end; +dg_read_field_def_ApbTxnProperties(<<>>, 0, 0, F@_1, + F@_2, _) -> + #'ApbTxnProperties'{read_write = F@_1, red_blue = F@_2}. + +d_field_ApbTxnProperties_read_write(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + d_field_ApbTxnProperties_read_write(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, TrUserData); +d_field_ApbTxnProperties_read_write(<<0:1, X:7, + Rest/binary>>, + N, Acc, _, F@_2, TrUserData) -> + {NewFValue, RestF} = {X bsl N + Acc, Rest}, + dfp_read_field_def_ApbTxnProperties(RestF, 0, 0, + NewFValue, F@_2, TrUserData). + +d_field_ApbTxnProperties_red_blue(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + d_field_ApbTxnProperties_red_blue(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, TrUserData); +d_field_ApbTxnProperties_red_blue(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, _, TrUserData) -> + {NewFValue, RestF} = {X bsl N + Acc, Rest}, + dfp_read_field_def_ApbTxnProperties(RestF, 0, 0, F@_1, + NewFValue, TrUserData). + +skip_varint_ApbTxnProperties(<<1:1, _:7, Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + skip_varint_ApbTxnProperties(Rest, Z1, Z2, F@_1, F@_2, + TrUserData); +skip_varint_ApbTxnProperties(<<0:1, _:7, Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + dfp_read_field_def_ApbTxnProperties(Rest, Z1, Z2, F@_1, + F@_2, TrUserData). + +skip_length_delimited_ApbTxnProperties(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + skip_length_delimited_ApbTxnProperties(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, + TrUserData); +skip_length_delimited_ApbTxnProperties(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) -> + Length = X bsl N + Acc, + <<_:Length/binary, Rest2/binary>> = Rest, + dfp_read_field_def_ApbTxnProperties(Rest2, 0, 0, F@_1, + F@_2, TrUserData). + +skip_group_ApbTxnProperties(Bin, FNum, Z2, F@_1, F@_2, + TrUserData) -> + {_, Rest} = read_group(Bin, FNum), + dfp_read_field_def_ApbTxnProperties(Rest, 0, Z2, F@_1, + F@_2, TrUserData). + +skip_32_ApbTxnProperties(<<_:32, Rest/binary>>, Z1, Z2, + F@_1, F@_2, TrUserData) -> + dfp_read_field_def_ApbTxnProperties(Rest, Z1, Z2, F@_1, + F@_2, TrUserData). + +skip_64_ApbTxnProperties(<<_:64, Rest/binary>>, Z1, Z2, + F@_1, F@_2, TrUserData) -> + dfp_read_field_def_ApbTxnProperties(Rest, Z1, Z2, F@_1, + F@_2, TrUserData). + +d_msg_ApbBoundObject(Bin, TrUserData) -> + dfp_read_field_def_ApbBoundObject(Bin, 0, 0, + id(undefined, TrUserData), + id(undefined, TrUserData), + id(undefined, TrUserData), TrUserData). + +dfp_read_field_def_ApbBoundObject(<<10, Rest/binary>>, + Z1, Z2, F@_1, F@_2, F@_3, TrUserData) -> + d_field_ApbBoundObject_key(Rest, Z1, Z2, F@_1, F@_2, + F@_3, TrUserData); +dfp_read_field_def_ApbBoundObject(<<16, Rest/binary>>, + Z1, Z2, F@_1, F@_2, F@_3, TrUserData) -> + d_field_ApbBoundObject_type(Rest, Z1, Z2, F@_1, F@_2, + F@_3, TrUserData); +dfp_read_field_def_ApbBoundObject(<<26, Rest/binary>>, + Z1, Z2, F@_1, F@_2, F@_3, TrUserData) -> + d_field_ApbBoundObject_bucket(Rest, Z1, Z2, F@_1, F@_2, + F@_3, TrUserData); +dfp_read_field_def_ApbBoundObject(<<>>, 0, 0, F@_1, + F@_2, F@_3, _) -> + #'ApbBoundObject'{key = F@_1, type = F@_2, + bucket = F@_3}; +dfp_read_field_def_ApbBoundObject(Other, Z1, Z2, F@_1, + F@_2, F@_3, TrUserData) -> + dg_read_field_def_ApbBoundObject(Other, Z1, Z2, F@_1, + F@_2, F@_3, TrUserData). + +dg_read_field_def_ApbBoundObject(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, TrUserData) + when N < 32 - 7 -> + dg_read_field_def_ApbBoundObject(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, F@_3, + TrUserData); +dg_read_field_def_ApbBoundObject(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, TrUserData) -> + Key = X bsl N + Acc, + case Key of + 10 -> + d_field_ApbBoundObject_key(Rest, 0, 0, F@_1, F@_2, F@_3, + TrUserData); + 16 -> + d_field_ApbBoundObject_type(Rest, 0, 0, F@_1, F@_2, + F@_3, TrUserData); + 26 -> + d_field_ApbBoundObject_bucket(Rest, 0, 0, F@_1, F@_2, + F@_3, TrUserData); + _ -> + case Key band 7 of + 0 -> + skip_varint_ApbBoundObject(Rest, 0, 0, F@_1, F@_2, F@_3, + TrUserData); + 1 -> + skip_64_ApbBoundObject(Rest, 0, 0, F@_1, F@_2, F@_3, + TrUserData); + 2 -> + skip_length_delimited_ApbBoundObject(Rest, 0, 0, F@_1, + F@_2, F@_3, TrUserData); + 3 -> + skip_group_ApbBoundObject(Rest, Key bsr 3, 0, F@_1, + F@_2, F@_3, TrUserData); + 5 -> + skip_32_ApbBoundObject(Rest, 0, 0, F@_1, F@_2, F@_3, + TrUserData) + end + end; +dg_read_field_def_ApbBoundObject(<<>>, 0, 0, F@_1, F@_2, + F@_3, _) -> + #'ApbBoundObject'{key = F@_1, type = F@_2, + bucket = F@_3}. + +d_field_ApbBoundObject_key(<<1:1, X:7, Rest/binary>>, N, + Acc, F@_1, F@_2, F@_3, TrUserData) + when N < 57 -> + d_field_ApbBoundObject_key(Rest, N + 7, X bsl N + Acc, + F@_1, F@_2, F@_3, TrUserData); +d_field_ApbBoundObject_key(<<0:1, X:7, Rest/binary>>, N, + Acc, _, F@_2, F@_3, TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {binary:copy(Bytes), Rest2} + end, + dfp_read_field_def_ApbBoundObject(RestF, 0, 0, + NewFValue, F@_2, F@_3, TrUserData). + +d_field_ApbBoundObject_type(<<1:1, X:7, Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, TrUserData) + when N < 57 -> + d_field_ApbBoundObject_type(Rest, N + 7, X bsl N + Acc, + F@_1, F@_2, F@_3, TrUserData); +d_field_ApbBoundObject_type(<<0:1, X:7, Rest/binary>>, + N, Acc, F@_1, _, F@_3, TrUserData) -> + {NewFValue, RestF} = {d_enum_CRDT_type(begin + <> = <<(X bsl + N + + + Acc):32/unsigned-native>>, + Res + end), + Rest}, + dfp_read_field_def_ApbBoundObject(RestF, 0, 0, F@_1, + NewFValue, F@_3, TrUserData). + +d_field_ApbBoundObject_bucket(<<1:1, X:7, Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, TrUserData) + when N < 57 -> + d_field_ApbBoundObject_bucket(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, F@_3, TrUserData); +d_field_ApbBoundObject_bucket(<<0:1, X:7, Rest/binary>>, + N, Acc, F@_1, F@_2, _, TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {binary:copy(Bytes), Rest2} + end, + dfp_read_field_def_ApbBoundObject(RestF, 0, 0, F@_1, + F@_2, NewFValue, TrUserData). + +skip_varint_ApbBoundObject(<<1:1, _:7, Rest/binary>>, + Z1, Z2, F@_1, F@_2, F@_3, TrUserData) -> + skip_varint_ApbBoundObject(Rest, Z1, Z2, F@_1, F@_2, + F@_3, TrUserData); +skip_varint_ApbBoundObject(<<0:1, _:7, Rest/binary>>, + Z1, Z2, F@_1, F@_2, F@_3, TrUserData) -> + dfp_read_field_def_ApbBoundObject(Rest, Z1, Z2, F@_1, + F@_2, F@_3, TrUserData). + +skip_length_delimited_ApbBoundObject(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, TrUserData) + when N < 57 -> + skip_length_delimited_ApbBoundObject(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, F@_3, + TrUserData); +skip_length_delimited_ApbBoundObject(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, TrUserData) -> + Length = X bsl N + Acc, + <<_:Length/binary, Rest2/binary>> = Rest, + dfp_read_field_def_ApbBoundObject(Rest2, 0, 0, F@_1, + F@_2, F@_3, TrUserData). + +skip_group_ApbBoundObject(Bin, FNum, Z2, F@_1, F@_2, + F@_3, TrUserData) -> + {_, Rest} = read_group(Bin, FNum), + dfp_read_field_def_ApbBoundObject(Rest, 0, Z2, F@_1, + F@_2, F@_3, TrUserData). + +skip_32_ApbBoundObject(<<_:32, Rest/binary>>, Z1, Z2, + F@_1, F@_2, F@_3, TrUserData) -> + dfp_read_field_def_ApbBoundObject(Rest, Z1, Z2, F@_1, + F@_2, F@_3, TrUserData). + +skip_64_ApbBoundObject(<<_:64, Rest/binary>>, Z1, Z2, + F@_1, F@_2, F@_3, TrUserData) -> + dfp_read_field_def_ApbBoundObject(Rest, Z1, Z2, F@_1, + F@_2, F@_3, TrUserData). + +d_msg_ApbReadObjects(Bin, TrUserData) -> + dfp_read_field_def_ApbReadObjects(Bin, 0, 0, + id([], TrUserData), + id(undefined, TrUserData), TrUserData). + +dfp_read_field_def_ApbReadObjects(<<10, Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + d_field_ApbReadObjects_boundobjects(Rest, Z1, Z2, F@_1, + F@_2, TrUserData); +dfp_read_field_def_ApbReadObjects(<<18, Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + d_field_ApbReadObjects_transaction_descriptor(Rest, Z1, + Z2, F@_1, F@_2, TrUserData); +dfp_read_field_def_ApbReadObjects(<<>>, 0, 0, R1, F@_2, + TrUserData) -> + #'ApbReadObjects'{boundobjects = + lists_reverse(R1, TrUserData), + transaction_descriptor = F@_2}; +dfp_read_field_def_ApbReadObjects(Other, Z1, Z2, F@_1, + F@_2, TrUserData) -> + dg_read_field_def_ApbReadObjects(Other, Z1, Z2, F@_1, + F@_2, TrUserData). + +dg_read_field_def_ApbReadObjects(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 32 - 7 -> + dg_read_field_def_ApbReadObjects(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, TrUserData); +dg_read_field_def_ApbReadObjects(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) -> + Key = X bsl N + Acc, + case Key of + 10 -> + d_field_ApbReadObjects_boundobjects(Rest, 0, 0, F@_1, + F@_2, TrUserData); + 18 -> + d_field_ApbReadObjects_transaction_descriptor(Rest, 0, + 0, F@_1, F@_2, + TrUserData); + _ -> + case Key band 7 of + 0 -> + skip_varint_ApbReadObjects(Rest, 0, 0, F@_1, F@_2, + TrUserData); + 1 -> + skip_64_ApbReadObjects(Rest, 0, 0, F@_1, F@_2, + TrUserData); + 2 -> + skip_length_delimited_ApbReadObjects(Rest, 0, 0, F@_1, + F@_2, TrUserData); + 3 -> + skip_group_ApbReadObjects(Rest, Key bsr 3, 0, F@_1, + F@_2, TrUserData); + 5 -> + skip_32_ApbReadObjects(Rest, 0, 0, F@_1, F@_2, + TrUserData) + end + end; +dg_read_field_def_ApbReadObjects(<<>>, 0, 0, R1, F@_2, + TrUserData) -> + #'ApbReadObjects'{boundobjects = + lists_reverse(R1, TrUserData), + transaction_descriptor = F@_2}. + +d_field_ApbReadObjects_boundobjects(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + d_field_ApbReadObjects_boundobjects(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, TrUserData); +d_field_ApbReadObjects_boundobjects(<<0:1, X:7, + Rest/binary>>, + N, Acc, Prev, F@_2, TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {id(d_msg_ApbBoundObject(Bs, TrUserData), + TrUserData), + Rest2} + end, + dfp_read_field_def_ApbReadObjects(RestF, 0, 0, + cons(NewFValue, Prev, TrUserData), F@_2, + TrUserData). + +d_field_ApbReadObjects_transaction_descriptor(<<1:1, + X:7, Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + d_field_ApbReadObjects_transaction_descriptor(Rest, + N + 7, X bsl N + Acc, F@_1, + F@_2, TrUserData); +d_field_ApbReadObjects_transaction_descriptor(<<0:1, + X:7, Rest/binary>>, + N, Acc, F@_1, _, TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {binary:copy(Bytes), Rest2} + end, + dfp_read_field_def_ApbReadObjects(RestF, 0, 0, F@_1, + NewFValue, TrUserData). + +skip_varint_ApbReadObjects(<<1:1, _:7, Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + skip_varint_ApbReadObjects(Rest, Z1, Z2, F@_1, F@_2, + TrUserData); +skip_varint_ApbReadObjects(<<0:1, _:7, Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + dfp_read_field_def_ApbReadObjects(Rest, Z1, Z2, F@_1, + F@_2, TrUserData). + +skip_length_delimited_ApbReadObjects(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + skip_length_delimited_ApbReadObjects(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, TrUserData); +skip_length_delimited_ApbReadObjects(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) -> + Length = X bsl N + Acc, + <<_:Length/binary, Rest2/binary>> = Rest, + dfp_read_field_def_ApbReadObjects(Rest2, 0, 0, F@_1, + F@_2, TrUserData). + +skip_group_ApbReadObjects(Bin, FNum, Z2, F@_1, F@_2, + TrUserData) -> + {_, Rest} = read_group(Bin, FNum), + dfp_read_field_def_ApbReadObjects(Rest, 0, Z2, F@_1, + F@_2, TrUserData). + +skip_32_ApbReadObjects(<<_:32, Rest/binary>>, Z1, Z2, + F@_1, F@_2, TrUserData) -> + dfp_read_field_def_ApbReadObjects(Rest, Z1, Z2, F@_1, + F@_2, TrUserData). + +skip_64_ApbReadObjects(<<_:64, Rest/binary>>, Z1, Z2, + F@_1, F@_2, TrUserData) -> + dfp_read_field_def_ApbReadObjects(Rest, Z1, Z2, F@_1, + F@_2, TrUserData). + +d_msg_ApbUpdateOp(Bin, TrUserData) -> + dfp_read_field_def_ApbUpdateOp(Bin, 0, 0, + id(undefined, TrUserData), + id(undefined, TrUserData), TrUserData). + +dfp_read_field_def_ApbUpdateOp(<<10, Rest/binary>>, Z1, + Z2, F@_1, F@_2, TrUserData) -> + d_field_ApbUpdateOp_boundobject(Rest, Z1, Z2, F@_1, + F@_2, TrUserData); +dfp_read_field_def_ApbUpdateOp(<<18, Rest/binary>>, Z1, + Z2, F@_1, F@_2, TrUserData) -> + d_field_ApbUpdateOp_operation(Rest, Z1, Z2, F@_1, F@_2, + TrUserData); +dfp_read_field_def_ApbUpdateOp(<<>>, 0, 0, F@_1, F@_2, + _) -> + #'ApbUpdateOp'{boundobject = F@_1, operation = F@_2}; +dfp_read_field_def_ApbUpdateOp(Other, Z1, Z2, F@_1, + F@_2, TrUserData) -> + dg_read_field_def_ApbUpdateOp(Other, Z1, Z2, F@_1, F@_2, + TrUserData). + +dg_read_field_def_ApbUpdateOp(<<1:1, X:7, Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 32 - 7 -> + dg_read_field_def_ApbUpdateOp(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, TrUserData); +dg_read_field_def_ApbUpdateOp(<<0:1, X:7, Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) -> + Key = X bsl N + Acc, + case Key of + 10 -> + d_field_ApbUpdateOp_boundobject(Rest, 0, 0, F@_1, F@_2, + TrUserData); + 18 -> + d_field_ApbUpdateOp_operation(Rest, 0, 0, F@_1, F@_2, + TrUserData); + _ -> + case Key band 7 of + 0 -> + skip_varint_ApbUpdateOp(Rest, 0, 0, F@_1, F@_2, + TrUserData); + 1 -> + skip_64_ApbUpdateOp(Rest, 0, 0, F@_1, F@_2, TrUserData); + 2 -> + skip_length_delimited_ApbUpdateOp(Rest, 0, 0, F@_1, + F@_2, TrUserData); + 3 -> + skip_group_ApbUpdateOp(Rest, Key bsr 3, 0, F@_1, F@_2, + TrUserData); + 5 -> + skip_32_ApbUpdateOp(Rest, 0, 0, F@_1, F@_2, TrUserData) + end + end; +dg_read_field_def_ApbUpdateOp(<<>>, 0, 0, F@_1, F@_2, + _) -> + #'ApbUpdateOp'{boundobject = F@_1, operation = F@_2}. + +d_field_ApbUpdateOp_boundobject(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + d_field_ApbUpdateOp_boundobject(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, TrUserData); +d_field_ApbUpdateOp_boundobject(<<0:1, X:7, + Rest/binary>>, + N, Acc, Prev, F@_2, TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {id(d_msg_ApbBoundObject(Bs, TrUserData), + TrUserData), + Rest2} + end, + dfp_read_field_def_ApbUpdateOp(RestF, 0, 0, + if Prev == undefined -> NewFValue; + true -> + merge_msg_ApbBoundObject(Prev, + NewFValue, + TrUserData) + end, + F@_2, TrUserData). + +d_field_ApbUpdateOp_operation(<<1:1, X:7, Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + d_field_ApbUpdateOp_operation(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, TrUserData); +d_field_ApbUpdateOp_operation(<<0:1, X:7, Rest/binary>>, + N, Acc, F@_1, Prev, TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {id(d_msg_ApbUpdateOperation(Bs, TrUserData), + TrUserData), + Rest2} + end, + dfp_read_field_def_ApbUpdateOp(RestF, 0, 0, F@_1, + if Prev == undefined -> NewFValue; + true -> + merge_msg_ApbUpdateOperation(Prev, + NewFValue, + TrUserData) + end, + TrUserData). + +skip_varint_ApbUpdateOp(<<1:1, _:7, Rest/binary>>, Z1, + Z2, F@_1, F@_2, TrUserData) -> + skip_varint_ApbUpdateOp(Rest, Z1, Z2, F@_1, F@_2, + TrUserData); +skip_varint_ApbUpdateOp(<<0:1, _:7, Rest/binary>>, Z1, + Z2, F@_1, F@_2, TrUserData) -> + dfp_read_field_def_ApbUpdateOp(Rest, Z1, Z2, F@_1, F@_2, + TrUserData). + +skip_length_delimited_ApbUpdateOp(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + skip_length_delimited_ApbUpdateOp(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, TrUserData); +skip_length_delimited_ApbUpdateOp(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) -> + Length = X bsl N + Acc, + <<_:Length/binary, Rest2/binary>> = Rest, + dfp_read_field_def_ApbUpdateOp(Rest2, 0, 0, F@_1, F@_2, + TrUserData). + +skip_group_ApbUpdateOp(Bin, FNum, Z2, F@_1, F@_2, + TrUserData) -> + {_, Rest} = read_group(Bin, FNum), + dfp_read_field_def_ApbUpdateOp(Rest, 0, Z2, F@_1, F@_2, + TrUserData). + +skip_32_ApbUpdateOp(<<_:32, Rest/binary>>, Z1, Z2, F@_1, + F@_2, TrUserData) -> + dfp_read_field_def_ApbUpdateOp(Rest, Z1, Z2, F@_1, F@_2, + TrUserData). + +skip_64_ApbUpdateOp(<<_:64, Rest/binary>>, Z1, Z2, F@_1, + F@_2, TrUserData) -> + dfp_read_field_def_ApbUpdateOp(Rest, Z1, Z2, F@_1, F@_2, + TrUserData). + +d_msg_ApbUpdateOperation(Bin, TrUserData) -> + dfp_read_field_def_ApbUpdateOperation(Bin, 0, 0, + id(undefined, TrUserData), + id(undefined, TrUserData), + id(undefined, TrUserData), + id(undefined, TrUserData), + id(undefined, TrUserData), + id(undefined, TrUserData), + TrUserData). + +dfp_read_field_def_ApbUpdateOperation(<<10, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, F@_3, F@_4, F@_5, + F@_6, TrUserData) -> + d_field_ApbUpdateOperation_counterop(Rest, Z1, Z2, F@_1, + F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData); +dfp_read_field_def_ApbUpdateOperation(<<18, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, F@_3, F@_4, F@_5, + F@_6, TrUserData) -> + d_field_ApbUpdateOperation_setop(Rest, Z1, Z2, F@_1, + F@_2, F@_3, F@_4, F@_5, F@_6, TrUserData); +dfp_read_field_def_ApbUpdateOperation(<<26, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, F@_3, F@_4, F@_5, + F@_6, TrUserData) -> + d_field_ApbUpdateOperation_regop(Rest, Z1, Z2, F@_1, + F@_2, F@_3, F@_4, F@_5, F@_6, TrUserData); +dfp_read_field_def_ApbUpdateOperation(<<42, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, F@_3, F@_4, F@_5, + F@_6, TrUserData) -> + d_field_ApbUpdateOperation_mapop(Rest, Z1, Z2, F@_1, + F@_2, F@_3, F@_4, F@_5, F@_6, TrUserData); +dfp_read_field_def_ApbUpdateOperation(<<50, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, F@_3, F@_4, F@_5, + F@_6, TrUserData) -> + d_field_ApbUpdateOperation_resetop(Rest, Z1, Z2, F@_1, + F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData); +dfp_read_field_def_ApbUpdateOperation(<<58, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, F@_3, F@_4, F@_5, + F@_6, TrUserData) -> + d_field_ApbUpdateOperation_flagop(Rest, Z1, Z2, F@_1, + F@_2, F@_3, F@_4, F@_5, F@_6, TrUserData); +dfp_read_field_def_ApbUpdateOperation(<<>>, 0, 0, F@_1, + F@_2, F@_3, F@_4, F@_5, F@_6, _) -> + #'ApbUpdateOperation'{counterop = F@_1, setop = F@_2, + regop = F@_3, mapop = F@_4, resetop = F@_5, + flagop = F@_6}; +dfp_read_field_def_ApbUpdateOperation(Other, Z1, Z2, + F@_1, F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData) -> + dg_read_field_def_ApbUpdateOperation(Other, Z1, Z2, + F@_1, F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData). + +dg_read_field_def_ApbUpdateOperation(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData) + when N < 32 - 7 -> + dg_read_field_def_ApbUpdateOperation(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, F@_3, F@_4, + F@_5, F@_6, TrUserData); +dg_read_field_def_ApbUpdateOperation(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData) -> + Key = X bsl N + Acc, + case Key of + 10 -> + d_field_ApbUpdateOperation_counterop(Rest, 0, 0, F@_1, + F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData); + 18 -> + d_field_ApbUpdateOperation_setop(Rest, 0, 0, F@_1, F@_2, + F@_3, F@_4, F@_5, F@_6, TrUserData); + 26 -> + d_field_ApbUpdateOperation_regop(Rest, 0, 0, F@_1, F@_2, + F@_3, F@_4, F@_5, F@_6, TrUserData); + 42 -> + d_field_ApbUpdateOperation_mapop(Rest, 0, 0, F@_1, F@_2, + F@_3, F@_4, F@_5, F@_6, TrUserData); + 50 -> + d_field_ApbUpdateOperation_resetop(Rest, 0, 0, F@_1, + F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData); + 58 -> + d_field_ApbUpdateOperation_flagop(Rest, 0, 0, F@_1, + F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData); + _ -> + case Key band 7 of + 0 -> + skip_varint_ApbUpdateOperation(Rest, 0, 0, F@_1, F@_2, + F@_3, F@_4, F@_5, F@_6, + TrUserData); + 1 -> + skip_64_ApbUpdateOperation(Rest, 0, 0, F@_1, F@_2, F@_3, + F@_4, F@_5, F@_6, TrUserData); + 2 -> + skip_length_delimited_ApbUpdateOperation(Rest, 0, 0, + F@_1, F@_2, F@_3, F@_4, + F@_5, F@_6, + TrUserData); + 3 -> + skip_group_ApbUpdateOperation(Rest, Key bsr 3, 0, F@_1, + F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData); + 5 -> + skip_32_ApbUpdateOperation(Rest, 0, 0, F@_1, F@_2, F@_3, + F@_4, F@_5, F@_6, TrUserData) + end + end; +dg_read_field_def_ApbUpdateOperation(<<>>, 0, 0, F@_1, + F@_2, F@_3, F@_4, F@_5, F@_6, _) -> + #'ApbUpdateOperation'{counterop = F@_1, setop = F@_2, + regop = F@_3, mapop = F@_4, resetop = F@_5, + flagop = F@_6}. + +d_field_ApbUpdateOperation_counterop(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData) + when N < 57 -> + d_field_ApbUpdateOperation_counterop(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, F@_3, F@_4, + F@_5, F@_6, TrUserData); +d_field_ApbUpdateOperation_counterop(<<0:1, X:7, + Rest/binary>>, + N, Acc, Prev, F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {id(d_msg_ApbCounterUpdate(Bs, TrUserData), + TrUserData), + Rest2} + end, + dfp_read_field_def_ApbUpdateOperation(RestF, 0, 0, + if Prev == undefined -> NewFValue; + true -> + merge_msg_ApbCounterUpdate(Prev, + NewFValue, + TrUserData) + end, + F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData). + +d_field_ApbUpdateOperation_setop(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData) + when N < 57 -> + d_field_ApbUpdateOperation_setop(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, F@_3, F@_4, + F@_5, F@_6, TrUserData); +d_field_ApbUpdateOperation_setop(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, Prev, F@_3, F@_4, F@_5, F@_6, + TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {id(d_msg_ApbSetUpdate(Bs, TrUserData), TrUserData), + Rest2} + end, + dfp_read_field_def_ApbUpdateOperation(RestF, 0, 0, F@_1, + if Prev == undefined -> NewFValue; + true -> + merge_msg_ApbSetUpdate(Prev, + NewFValue, + TrUserData) + end, + F@_3, F@_4, F@_5, F@_6, TrUserData). + +d_field_ApbUpdateOperation_regop(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData) + when N < 57 -> + d_field_ApbUpdateOperation_regop(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, F@_3, F@_4, + F@_5, F@_6, TrUserData); +d_field_ApbUpdateOperation_regop(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, Prev, F@_4, F@_5, F@_6, + TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {id(d_msg_ApbRegUpdate(Bs, TrUserData), TrUserData), + Rest2} + end, + dfp_read_field_def_ApbUpdateOperation(RestF, 0, 0, F@_1, + F@_2, + if Prev == undefined -> NewFValue; + true -> + merge_msg_ApbRegUpdate(Prev, + NewFValue, + TrUserData) + end, + F@_4, F@_5, F@_6, TrUserData). + +d_field_ApbUpdateOperation_mapop(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData) + when N < 57 -> + d_field_ApbUpdateOperation_mapop(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, F@_3, F@_4, + F@_5, F@_6, TrUserData); +d_field_ApbUpdateOperation_mapop(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, Prev, F@_5, F@_6, + TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {id(d_msg_ApbMapUpdate(Bs, TrUserData), TrUserData), + Rest2} + end, + dfp_read_field_def_ApbUpdateOperation(RestF, 0, 0, F@_1, + F@_2, F@_3, + if Prev == undefined -> NewFValue; + true -> + merge_msg_ApbMapUpdate(Prev, + NewFValue, + TrUserData) + end, + F@_5, F@_6, TrUserData). + +d_field_ApbUpdateOperation_resetop(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData) + when N < 57 -> + d_field_ApbUpdateOperation_resetop(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, F@_3, F@_4, + F@_5, F@_6, TrUserData); +d_field_ApbUpdateOperation_resetop(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, F@_4, Prev, F@_6, + TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {id(d_msg_ApbCrdtReset(Bs, TrUserData), TrUserData), + Rest2} + end, + dfp_read_field_def_ApbUpdateOperation(RestF, 0, 0, F@_1, + F@_2, F@_3, F@_4, + if Prev == undefined -> NewFValue; + true -> + merge_msg_ApbCrdtReset(Prev, + NewFValue, + TrUserData) + end, + F@_6, TrUserData). + +d_field_ApbUpdateOperation_flagop(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData) + when N < 57 -> + d_field_ApbUpdateOperation_flagop(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, F@_3, F@_4, + F@_5, F@_6, TrUserData); +d_field_ApbUpdateOperation_flagop(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, F@_4, F@_5, Prev, + TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {id(d_msg_ApbFlagUpdate(Bs, TrUserData), TrUserData), + Rest2} + end, + dfp_read_field_def_ApbUpdateOperation(RestF, 0, 0, F@_1, + F@_2, F@_3, F@_4, F@_5, + if Prev == undefined -> NewFValue; + true -> + merge_msg_ApbFlagUpdate(Prev, + NewFValue, + TrUserData) + end, + TrUserData). + +skip_varint_ApbUpdateOperation(<<1:1, _:7, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData) -> + skip_varint_ApbUpdateOperation(Rest, Z1, Z2, F@_1, F@_2, + F@_3, F@_4, F@_5, F@_6, TrUserData); +skip_varint_ApbUpdateOperation(<<0:1, _:7, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData) -> + dfp_read_field_def_ApbUpdateOperation(Rest, Z1, Z2, + F@_1, F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData). + +skip_length_delimited_ApbUpdateOperation(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, F@_4, F@_5, + F@_6, TrUserData) + when N < 57 -> + skip_length_delimited_ApbUpdateOperation(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, F@_3, + F@_4, F@_5, F@_6, TrUserData); +skip_length_delimited_ApbUpdateOperation(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, F@_4, F@_5, + F@_6, TrUserData) -> + Length = X bsl N + Acc, + <<_:Length/binary, Rest2/binary>> = Rest, + dfp_read_field_def_ApbUpdateOperation(Rest2, 0, 0, F@_1, + F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData). + +skip_group_ApbUpdateOperation(Bin, FNum, Z2, F@_1, F@_2, + F@_3, F@_4, F@_5, F@_6, TrUserData) -> + {_, Rest} = read_group(Bin, FNum), + dfp_read_field_def_ApbUpdateOperation(Rest, 0, Z2, F@_1, + F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData). + +skip_32_ApbUpdateOperation(<<_:32, Rest/binary>>, Z1, + Z2, F@_1, F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData) -> + dfp_read_field_def_ApbUpdateOperation(Rest, Z1, Z2, + F@_1, F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData). + +skip_64_ApbUpdateOperation(<<_:64, Rest/binary>>, Z1, + Z2, F@_1, F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData) -> + dfp_read_field_def_ApbUpdateOperation(Rest, Z1, Z2, + F@_1, F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData). + +d_msg_ApbUpdateObjects(Bin, TrUserData) -> + dfp_read_field_def_ApbUpdateObjects(Bin, 0, 0, + id([], TrUserData), + id(undefined, TrUserData), TrUserData). + +dfp_read_field_def_ApbUpdateObjects(<<10, Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + d_field_ApbUpdateObjects_updates(Rest, Z1, Z2, F@_1, + F@_2, TrUserData); +dfp_read_field_def_ApbUpdateObjects(<<18, Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + d_field_ApbUpdateObjects_transaction_descriptor(Rest, + Z1, Z2, F@_1, F@_2, + TrUserData); +dfp_read_field_def_ApbUpdateObjects(<<>>, 0, 0, R1, + F@_2, TrUserData) -> + #'ApbUpdateObjects'{updates = + lists_reverse(R1, TrUserData), + transaction_descriptor = F@_2}; +dfp_read_field_def_ApbUpdateObjects(Other, Z1, Z2, F@_1, + F@_2, TrUserData) -> + dg_read_field_def_ApbUpdateObjects(Other, Z1, Z2, F@_1, + F@_2, TrUserData). + +dg_read_field_def_ApbUpdateObjects(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 32 - 7 -> + dg_read_field_def_ApbUpdateObjects(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, TrUserData); +dg_read_field_def_ApbUpdateObjects(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) -> + Key = X bsl N + Acc, + case Key of + 10 -> + d_field_ApbUpdateObjects_updates(Rest, 0, 0, F@_1, F@_2, + TrUserData); + 18 -> + d_field_ApbUpdateObjects_transaction_descriptor(Rest, 0, + 0, F@_1, F@_2, + TrUserData); + _ -> + case Key band 7 of + 0 -> + skip_varint_ApbUpdateObjects(Rest, 0, 0, F@_1, F@_2, + TrUserData); + 1 -> + skip_64_ApbUpdateObjects(Rest, 0, 0, F@_1, F@_2, + TrUserData); + 2 -> + skip_length_delimited_ApbUpdateObjects(Rest, 0, 0, F@_1, + F@_2, TrUserData); + 3 -> + skip_group_ApbUpdateObjects(Rest, Key bsr 3, 0, F@_1, + F@_2, TrUserData); + 5 -> + skip_32_ApbUpdateObjects(Rest, 0, 0, F@_1, F@_2, + TrUserData) + end + end; +dg_read_field_def_ApbUpdateObjects(<<>>, 0, 0, R1, F@_2, + TrUserData) -> + #'ApbUpdateObjects'{updates = + lists_reverse(R1, TrUserData), + transaction_descriptor = F@_2}. + +d_field_ApbUpdateObjects_updates(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + d_field_ApbUpdateObjects_updates(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, TrUserData); +d_field_ApbUpdateObjects_updates(<<0:1, X:7, + Rest/binary>>, + N, Acc, Prev, F@_2, TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {id(d_msg_ApbUpdateOp(Bs, TrUserData), TrUserData), + Rest2} + end, + dfp_read_field_def_ApbUpdateObjects(RestF, 0, 0, + cons(NewFValue, Prev, TrUserData), F@_2, + TrUserData). + +d_field_ApbUpdateObjects_transaction_descriptor(<<1:1, + X:7, Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + d_field_ApbUpdateObjects_transaction_descriptor(Rest, + N + 7, X bsl N + Acc, F@_1, + F@_2, TrUserData); +d_field_ApbUpdateObjects_transaction_descriptor(<<0:1, + X:7, Rest/binary>>, + N, Acc, F@_1, _, TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {binary:copy(Bytes), Rest2} + end, + dfp_read_field_def_ApbUpdateObjects(RestF, 0, 0, F@_1, + NewFValue, TrUserData). + +skip_varint_ApbUpdateObjects(<<1:1, _:7, Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + skip_varint_ApbUpdateObjects(Rest, Z1, Z2, F@_1, F@_2, + TrUserData); +skip_varint_ApbUpdateObjects(<<0:1, _:7, Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + dfp_read_field_def_ApbUpdateObjects(Rest, Z1, Z2, F@_1, + F@_2, TrUserData). + +skip_length_delimited_ApbUpdateObjects(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + skip_length_delimited_ApbUpdateObjects(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, + TrUserData); +skip_length_delimited_ApbUpdateObjects(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) -> + Length = X bsl N + Acc, + <<_:Length/binary, Rest2/binary>> = Rest, + dfp_read_field_def_ApbUpdateObjects(Rest2, 0, 0, F@_1, + F@_2, TrUserData). + +skip_group_ApbUpdateObjects(Bin, FNum, Z2, F@_1, F@_2, + TrUserData) -> + {_, Rest} = read_group(Bin, FNum), + dfp_read_field_def_ApbUpdateObjects(Rest, 0, Z2, F@_1, + F@_2, TrUserData). + +skip_32_ApbUpdateObjects(<<_:32, Rest/binary>>, Z1, Z2, + F@_1, F@_2, TrUserData) -> + dfp_read_field_def_ApbUpdateObjects(Rest, Z1, Z2, F@_1, + F@_2, TrUserData). + +skip_64_ApbUpdateObjects(<<_:64, Rest/binary>>, Z1, Z2, + F@_1, F@_2, TrUserData) -> + dfp_read_field_def_ApbUpdateObjects(Rest, Z1, Z2, F@_1, + F@_2, TrUserData). + +d_msg_ApbStartTransaction(Bin, TrUserData) -> + dfp_read_field_def_ApbStartTransaction(Bin, 0, 0, + id(undefined, TrUserData), + id(undefined, TrUserData), + TrUserData). + +dfp_read_field_def_ApbStartTransaction(<<10, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + d_field_ApbStartTransaction_timestamp(Rest, Z1, Z2, + F@_1, F@_2, TrUserData); +dfp_read_field_def_ApbStartTransaction(<<18, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + d_field_ApbStartTransaction_properties(Rest, Z1, Z2, + F@_1, F@_2, TrUserData); +dfp_read_field_def_ApbStartTransaction(<<>>, 0, 0, F@_1, + F@_2, _) -> + #'ApbStartTransaction'{timestamp = F@_1, + properties = F@_2}; +dfp_read_field_def_ApbStartTransaction(Other, Z1, Z2, + F@_1, F@_2, TrUserData) -> + dg_read_field_def_ApbStartTransaction(Other, Z1, Z2, + F@_1, F@_2, TrUserData). + +dg_read_field_def_ApbStartTransaction(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 32 - 7 -> + dg_read_field_def_ApbStartTransaction(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, + TrUserData); +dg_read_field_def_ApbStartTransaction(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) -> + Key = X bsl N + Acc, + case Key of + 10 -> + d_field_ApbStartTransaction_timestamp(Rest, 0, 0, F@_1, + F@_2, TrUserData); + 18 -> + d_field_ApbStartTransaction_properties(Rest, 0, 0, F@_1, + F@_2, TrUserData); + _ -> + case Key band 7 of + 0 -> + skip_varint_ApbStartTransaction(Rest, 0, 0, F@_1, F@_2, + TrUserData); + 1 -> + skip_64_ApbStartTransaction(Rest, 0, 0, F@_1, F@_2, + TrUserData); + 2 -> + skip_length_delimited_ApbStartTransaction(Rest, 0, 0, + F@_1, F@_2, + TrUserData); + 3 -> + skip_group_ApbStartTransaction(Rest, Key bsr 3, 0, F@_1, + F@_2, TrUserData); + 5 -> + skip_32_ApbStartTransaction(Rest, 0, 0, F@_1, F@_2, + TrUserData) + end + end; +dg_read_field_def_ApbStartTransaction(<<>>, 0, 0, F@_1, + F@_2, _) -> + #'ApbStartTransaction'{timestamp = F@_1, + properties = F@_2}. + +d_field_ApbStartTransaction_timestamp(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + d_field_ApbStartTransaction_timestamp(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, + TrUserData); +d_field_ApbStartTransaction_timestamp(<<0:1, X:7, + Rest/binary>>, + N, Acc, _, F@_2, TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {binary:copy(Bytes), Rest2} + end, + dfp_read_field_def_ApbStartTransaction(RestF, 0, 0, + NewFValue, F@_2, TrUserData). + +d_field_ApbStartTransaction_properties(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + d_field_ApbStartTransaction_properties(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, + TrUserData); +d_field_ApbStartTransaction_properties(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, Prev, TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {id(d_msg_ApbTxnProperties(Bs, TrUserData), + TrUserData), + Rest2} + end, + dfp_read_field_def_ApbStartTransaction(RestF, 0, 0, + F@_1, + if Prev == undefined -> NewFValue; + true -> + merge_msg_ApbTxnProperties(Prev, + NewFValue, + TrUserData) + end, + TrUserData). + +skip_varint_ApbStartTransaction(<<1:1, _:7, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + skip_varint_ApbStartTransaction(Rest, Z1, Z2, F@_1, + F@_2, TrUserData); +skip_varint_ApbStartTransaction(<<0:1, _:7, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + dfp_read_field_def_ApbStartTransaction(Rest, Z1, Z2, + F@_1, F@_2, TrUserData). + +skip_length_delimited_ApbStartTransaction(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + skip_length_delimited_ApbStartTransaction(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, + TrUserData); +skip_length_delimited_ApbStartTransaction(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) -> + Length = X bsl N + Acc, + <<_:Length/binary, Rest2/binary>> = Rest, + dfp_read_field_def_ApbStartTransaction(Rest2, 0, 0, + F@_1, F@_2, TrUserData). + +skip_group_ApbStartTransaction(Bin, FNum, Z2, F@_1, + F@_2, TrUserData) -> + {_, Rest} = read_group(Bin, FNum), + dfp_read_field_def_ApbStartTransaction(Rest, 0, Z2, + F@_1, F@_2, TrUserData). + +skip_32_ApbStartTransaction(<<_:32, Rest/binary>>, Z1, + Z2, F@_1, F@_2, TrUserData) -> + dfp_read_field_def_ApbStartTransaction(Rest, Z1, Z2, + F@_1, F@_2, TrUserData). + +skip_64_ApbStartTransaction(<<_:64, Rest/binary>>, Z1, + Z2, F@_1, F@_2, TrUserData) -> + dfp_read_field_def_ApbStartTransaction(Rest, Z1, Z2, + F@_1, F@_2, TrUserData). + +d_msg_ApbAbortTransaction(Bin, TrUserData) -> + dfp_read_field_def_ApbAbortTransaction(Bin, 0, 0, + id(undefined, TrUserData), + TrUserData). + +dfp_read_field_def_ApbAbortTransaction(<<10, + Rest/binary>>, + Z1, Z2, F@_1, TrUserData) -> + d_field_ApbAbortTransaction_transaction_descriptor(Rest, + Z1, Z2, F@_1, + TrUserData); +dfp_read_field_def_ApbAbortTransaction(<<>>, 0, 0, F@_1, + _) -> + #'ApbAbortTransaction'{transaction_descriptor = F@_1}; +dfp_read_field_def_ApbAbortTransaction(Other, Z1, Z2, + F@_1, TrUserData) -> + dg_read_field_def_ApbAbortTransaction(Other, Z1, Z2, + F@_1, TrUserData). + +dg_read_field_def_ApbAbortTransaction(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) + when N < 32 - 7 -> + dg_read_field_def_ApbAbortTransaction(Rest, N + 7, + X bsl N + Acc, F@_1, TrUserData); +dg_read_field_def_ApbAbortTransaction(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) -> + Key = X bsl N + Acc, + case Key of + 10 -> + d_field_ApbAbortTransaction_transaction_descriptor(Rest, + 0, 0, F@_1, + TrUserData); + _ -> + case Key band 7 of + 0 -> + skip_varint_ApbAbortTransaction(Rest, 0, 0, F@_1, + TrUserData); + 1 -> + skip_64_ApbAbortTransaction(Rest, 0, 0, F@_1, + TrUserData); + 2 -> + skip_length_delimited_ApbAbortTransaction(Rest, 0, 0, + F@_1, TrUserData); + 3 -> + skip_group_ApbAbortTransaction(Rest, Key bsr 3, 0, F@_1, + TrUserData); + 5 -> + skip_32_ApbAbortTransaction(Rest, 0, 0, F@_1, + TrUserData) + end + end; +dg_read_field_def_ApbAbortTransaction(<<>>, 0, 0, F@_1, + _) -> + #'ApbAbortTransaction'{transaction_descriptor = F@_1}. + +d_field_ApbAbortTransaction_transaction_descriptor(<<1:1, + X:7, Rest/binary>>, + N, Acc, F@_1, TrUserData) + when N < 57 -> + d_field_ApbAbortTransaction_transaction_descriptor(Rest, + N + 7, X bsl N + Acc, + F@_1, TrUserData); +d_field_ApbAbortTransaction_transaction_descriptor(<<0:1, + X:7, Rest/binary>>, + N, Acc, _, TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {binary:copy(Bytes), Rest2} + end, + dfp_read_field_def_ApbAbortTransaction(RestF, 0, 0, + NewFValue, TrUserData). + +skip_varint_ApbAbortTransaction(<<1:1, _:7, + Rest/binary>>, + Z1, Z2, F@_1, TrUserData) -> + skip_varint_ApbAbortTransaction(Rest, Z1, Z2, F@_1, + TrUserData); +skip_varint_ApbAbortTransaction(<<0:1, _:7, + Rest/binary>>, + Z1, Z2, F@_1, TrUserData) -> + dfp_read_field_def_ApbAbortTransaction(Rest, Z1, Z2, + F@_1, TrUserData). + +skip_length_delimited_ApbAbortTransaction(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) + when N < 57 -> + skip_length_delimited_ApbAbortTransaction(Rest, N + 7, + X bsl N + Acc, F@_1, TrUserData); +skip_length_delimited_ApbAbortTransaction(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) -> + Length = X bsl N + Acc, + <<_:Length/binary, Rest2/binary>> = Rest, + dfp_read_field_def_ApbAbortTransaction(Rest2, 0, 0, + F@_1, TrUserData). + +skip_group_ApbAbortTransaction(Bin, FNum, Z2, F@_1, + TrUserData) -> + {_, Rest} = read_group(Bin, FNum), + dfp_read_field_def_ApbAbortTransaction(Rest, 0, Z2, + F@_1, TrUserData). + +skip_32_ApbAbortTransaction(<<_:32, Rest/binary>>, Z1, + Z2, F@_1, TrUserData) -> + dfp_read_field_def_ApbAbortTransaction(Rest, Z1, Z2, + F@_1, TrUserData). + +skip_64_ApbAbortTransaction(<<_:64, Rest/binary>>, Z1, + Z2, F@_1, TrUserData) -> + dfp_read_field_def_ApbAbortTransaction(Rest, Z1, Z2, + F@_1, TrUserData). + +d_msg_ApbCommitTransaction(Bin, TrUserData) -> + dfp_read_field_def_ApbCommitTransaction(Bin, 0, 0, + id(undefined, TrUserData), + TrUserData). + +dfp_read_field_def_ApbCommitTransaction(<<10, + Rest/binary>>, + Z1, Z2, F@_1, TrUserData) -> + d_field_ApbCommitTransaction_transaction_descriptor(Rest, + Z1, Z2, F@_1, + TrUserData); +dfp_read_field_def_ApbCommitTransaction(<<>>, 0, 0, + F@_1, _) -> + #'ApbCommitTransaction'{transaction_descriptor = F@_1}; +dfp_read_field_def_ApbCommitTransaction(Other, Z1, Z2, + F@_1, TrUserData) -> + dg_read_field_def_ApbCommitTransaction(Other, Z1, Z2, + F@_1, TrUserData). + +dg_read_field_def_ApbCommitTransaction(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) + when N < 32 - 7 -> + dg_read_field_def_ApbCommitTransaction(Rest, N + 7, + X bsl N + Acc, F@_1, TrUserData); +dg_read_field_def_ApbCommitTransaction(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) -> + Key = X bsl N + Acc, + case Key of + 10 -> + d_field_ApbCommitTransaction_transaction_descriptor(Rest, + 0, 0, F@_1, + TrUserData); + _ -> + case Key band 7 of + 0 -> + skip_varint_ApbCommitTransaction(Rest, 0, 0, F@_1, + TrUserData); + 1 -> + skip_64_ApbCommitTransaction(Rest, 0, 0, F@_1, + TrUserData); + 2 -> + skip_length_delimited_ApbCommitTransaction(Rest, 0, 0, + F@_1, TrUserData); + 3 -> + skip_group_ApbCommitTransaction(Rest, Key bsr 3, 0, + F@_1, TrUserData); + 5 -> + skip_32_ApbCommitTransaction(Rest, 0, 0, F@_1, + TrUserData) + end + end; +dg_read_field_def_ApbCommitTransaction(<<>>, 0, 0, F@_1, + _) -> + #'ApbCommitTransaction'{transaction_descriptor = F@_1}. + +d_field_ApbCommitTransaction_transaction_descriptor(<<1:1, + X:7, Rest/binary>>, + N, Acc, F@_1, TrUserData) + when N < 57 -> + d_field_ApbCommitTransaction_transaction_descriptor(Rest, + N + 7, X bsl N + Acc, + F@_1, TrUserData); +d_field_ApbCommitTransaction_transaction_descriptor(<<0:1, + X:7, Rest/binary>>, + N, Acc, _, TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {binary:copy(Bytes), Rest2} + end, + dfp_read_field_def_ApbCommitTransaction(RestF, 0, 0, + NewFValue, TrUserData). + +skip_varint_ApbCommitTransaction(<<1:1, _:7, + Rest/binary>>, + Z1, Z2, F@_1, TrUserData) -> + skip_varint_ApbCommitTransaction(Rest, Z1, Z2, F@_1, + TrUserData); +skip_varint_ApbCommitTransaction(<<0:1, _:7, + Rest/binary>>, + Z1, Z2, F@_1, TrUserData) -> + dfp_read_field_def_ApbCommitTransaction(Rest, Z1, Z2, + F@_1, TrUserData). + +skip_length_delimited_ApbCommitTransaction(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) + when N < 57 -> + skip_length_delimited_ApbCommitTransaction(Rest, N + 7, + X bsl N + Acc, F@_1, TrUserData); +skip_length_delimited_ApbCommitTransaction(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, TrUserData) -> + Length = X bsl N + Acc, + <<_:Length/binary, Rest2/binary>> = Rest, + dfp_read_field_def_ApbCommitTransaction(Rest2, 0, 0, + F@_1, TrUserData). + +skip_group_ApbCommitTransaction(Bin, FNum, Z2, F@_1, + TrUserData) -> + {_, Rest} = read_group(Bin, FNum), + dfp_read_field_def_ApbCommitTransaction(Rest, 0, Z2, + F@_1, TrUserData). + +skip_32_ApbCommitTransaction(<<_:32, Rest/binary>>, Z1, + Z2, F@_1, TrUserData) -> + dfp_read_field_def_ApbCommitTransaction(Rest, Z1, Z2, + F@_1, TrUserData). + +skip_64_ApbCommitTransaction(<<_:64, Rest/binary>>, Z1, + Z2, F@_1, TrUserData) -> + dfp_read_field_def_ApbCommitTransaction(Rest, Z1, Z2, + F@_1, TrUserData). + +d_msg_ApbStaticUpdateObjects(Bin, TrUserData) -> + dfp_read_field_def_ApbStaticUpdateObjects(Bin, 0, 0, + id(undefined, TrUserData), + id([], TrUserData), TrUserData). + +dfp_read_field_def_ApbStaticUpdateObjects(<<10, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + d_field_ApbStaticUpdateObjects_transaction(Rest, Z1, Z2, + F@_1, F@_2, TrUserData); +dfp_read_field_def_ApbStaticUpdateObjects(<<18, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + d_field_ApbStaticUpdateObjects_updates(Rest, Z1, Z2, + F@_1, F@_2, TrUserData); +dfp_read_field_def_ApbStaticUpdateObjects(<<>>, 0, 0, + F@_1, R1, TrUserData) -> + #'ApbStaticUpdateObjects'{transaction = F@_1, + updates = lists_reverse(R1, TrUserData)}; +dfp_read_field_def_ApbStaticUpdateObjects(Other, Z1, Z2, + F@_1, F@_2, TrUserData) -> + dg_read_field_def_ApbStaticUpdateObjects(Other, Z1, Z2, + F@_1, F@_2, TrUserData). + +dg_read_field_def_ApbStaticUpdateObjects(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 32 - 7 -> + dg_read_field_def_ApbStaticUpdateObjects(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, + TrUserData); +dg_read_field_def_ApbStaticUpdateObjects(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) -> + Key = X bsl N + Acc, + case Key of + 10 -> + d_field_ApbStaticUpdateObjects_transaction(Rest, 0, 0, + F@_1, F@_2, TrUserData); + 18 -> + d_field_ApbStaticUpdateObjects_updates(Rest, 0, 0, F@_1, + F@_2, TrUserData); + _ -> + case Key band 7 of + 0 -> + skip_varint_ApbStaticUpdateObjects(Rest, 0, 0, F@_1, + F@_2, TrUserData); + 1 -> + skip_64_ApbStaticUpdateObjects(Rest, 0, 0, F@_1, F@_2, + TrUserData); + 2 -> + skip_length_delimited_ApbStaticUpdateObjects(Rest, 0, 0, + F@_1, F@_2, + TrUserData); + 3 -> + skip_group_ApbStaticUpdateObjects(Rest, Key bsr 3, 0, + F@_1, F@_2, TrUserData); + 5 -> + skip_32_ApbStaticUpdateObjects(Rest, 0, 0, F@_1, F@_2, + TrUserData) + end + end; +dg_read_field_def_ApbStaticUpdateObjects(<<>>, 0, 0, + F@_1, R1, TrUserData) -> + #'ApbStaticUpdateObjects'{transaction = F@_1, + updates = lists_reverse(R1, TrUserData)}. + +d_field_ApbStaticUpdateObjects_transaction(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + d_field_ApbStaticUpdateObjects_transaction(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, + TrUserData); +d_field_ApbStaticUpdateObjects_transaction(<<0:1, X:7, + Rest/binary>>, + N, Acc, Prev, F@_2, TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {id(d_msg_ApbStartTransaction(Bs, TrUserData), + TrUserData), + Rest2} + end, + dfp_read_field_def_ApbStaticUpdateObjects(RestF, 0, 0, + if Prev == undefined -> NewFValue; + true -> + merge_msg_ApbStartTransaction(Prev, + NewFValue, + TrUserData) + end, + F@_2, TrUserData). + +d_field_ApbStaticUpdateObjects_updates(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + d_field_ApbStaticUpdateObjects_updates(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, + TrUserData); +d_field_ApbStaticUpdateObjects_updates(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, Prev, TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {id(d_msg_ApbUpdateOp(Bs, TrUserData), TrUserData), + Rest2} + end, + dfp_read_field_def_ApbStaticUpdateObjects(RestF, 0, 0, + F@_1, + cons(NewFValue, Prev, TrUserData), + TrUserData). + +skip_varint_ApbStaticUpdateObjects(<<1:1, _:7, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + skip_varint_ApbStaticUpdateObjects(Rest, Z1, Z2, F@_1, + F@_2, TrUserData); +skip_varint_ApbStaticUpdateObjects(<<0:1, _:7, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + dfp_read_field_def_ApbStaticUpdateObjects(Rest, Z1, Z2, + F@_1, F@_2, TrUserData). + +skip_length_delimited_ApbStaticUpdateObjects(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + skip_length_delimited_ApbStaticUpdateObjects(Rest, + N + 7, X bsl N + Acc, F@_1, + F@_2, TrUserData); +skip_length_delimited_ApbStaticUpdateObjects(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) -> + Length = X bsl N + Acc, + <<_:Length/binary, Rest2/binary>> = Rest, + dfp_read_field_def_ApbStaticUpdateObjects(Rest2, 0, 0, + F@_1, F@_2, TrUserData). + +skip_group_ApbStaticUpdateObjects(Bin, FNum, Z2, F@_1, + F@_2, TrUserData) -> + {_, Rest} = read_group(Bin, FNum), + dfp_read_field_def_ApbStaticUpdateObjects(Rest, 0, Z2, + F@_1, F@_2, TrUserData). + +skip_32_ApbStaticUpdateObjects(<<_:32, Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + dfp_read_field_def_ApbStaticUpdateObjects(Rest, Z1, Z2, + F@_1, F@_2, TrUserData). + +skip_64_ApbStaticUpdateObjects(<<_:64, Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + dfp_read_field_def_ApbStaticUpdateObjects(Rest, Z1, Z2, + F@_1, F@_2, TrUserData). + +d_msg_ApbStaticReadObjects(Bin, TrUserData) -> + dfp_read_field_def_ApbStaticReadObjects(Bin, 0, 0, + id(undefined, TrUserData), + id([], TrUserData), TrUserData). + +dfp_read_field_def_ApbStaticReadObjects(<<10, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + d_field_ApbStaticReadObjects_transaction(Rest, Z1, Z2, + F@_1, F@_2, TrUserData); +dfp_read_field_def_ApbStaticReadObjects(<<18, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + d_field_ApbStaticReadObjects_objects(Rest, Z1, Z2, F@_1, + F@_2, TrUserData); +dfp_read_field_def_ApbStaticReadObjects(<<>>, 0, 0, + F@_1, R1, TrUserData) -> + #'ApbStaticReadObjects'{transaction = F@_1, + objects = lists_reverse(R1, TrUserData)}; +dfp_read_field_def_ApbStaticReadObjects(Other, Z1, Z2, + F@_1, F@_2, TrUserData) -> + dg_read_field_def_ApbStaticReadObjects(Other, Z1, Z2, + F@_1, F@_2, TrUserData). + +dg_read_field_def_ApbStaticReadObjects(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 32 - 7 -> + dg_read_field_def_ApbStaticReadObjects(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, + TrUserData); +dg_read_field_def_ApbStaticReadObjects(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) -> + Key = X bsl N + Acc, + case Key of + 10 -> + d_field_ApbStaticReadObjects_transaction(Rest, 0, 0, + F@_1, F@_2, TrUserData); + 18 -> + d_field_ApbStaticReadObjects_objects(Rest, 0, 0, F@_1, + F@_2, TrUserData); + _ -> + case Key band 7 of + 0 -> + skip_varint_ApbStaticReadObjects(Rest, 0, 0, F@_1, F@_2, + TrUserData); + 1 -> + skip_64_ApbStaticReadObjects(Rest, 0, 0, F@_1, F@_2, + TrUserData); + 2 -> + skip_length_delimited_ApbStaticReadObjects(Rest, 0, 0, + F@_1, F@_2, + TrUserData); + 3 -> + skip_group_ApbStaticReadObjects(Rest, Key bsr 3, 0, + F@_1, F@_2, TrUserData); + 5 -> + skip_32_ApbStaticReadObjects(Rest, 0, 0, F@_1, F@_2, + TrUserData) + end + end; +dg_read_field_def_ApbStaticReadObjects(<<>>, 0, 0, F@_1, + R1, TrUserData) -> + #'ApbStaticReadObjects'{transaction = F@_1, + objects = lists_reverse(R1, TrUserData)}. + +d_field_ApbStaticReadObjects_transaction(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + d_field_ApbStaticReadObjects_transaction(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, + TrUserData); +d_field_ApbStaticReadObjects_transaction(<<0:1, X:7, + Rest/binary>>, + N, Acc, Prev, F@_2, TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {id(d_msg_ApbStartTransaction(Bs, TrUserData), + TrUserData), + Rest2} + end, + dfp_read_field_def_ApbStaticReadObjects(RestF, 0, 0, + if Prev == undefined -> NewFValue; + true -> + merge_msg_ApbStartTransaction(Prev, + NewFValue, + TrUserData) + end, + F@_2, TrUserData). + +d_field_ApbStaticReadObjects_objects(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + d_field_ApbStaticReadObjects_objects(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, TrUserData); +d_field_ApbStaticReadObjects_objects(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, Prev, TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {id(d_msg_ApbBoundObject(Bs, TrUserData), + TrUserData), + Rest2} + end, + dfp_read_field_def_ApbStaticReadObjects(RestF, 0, 0, + F@_1, + cons(NewFValue, Prev, TrUserData), + TrUserData). + +skip_varint_ApbStaticReadObjects(<<1:1, _:7, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + skip_varint_ApbStaticReadObjects(Rest, Z1, Z2, F@_1, + F@_2, TrUserData); +skip_varint_ApbStaticReadObjects(<<0:1, _:7, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + dfp_read_field_def_ApbStaticReadObjects(Rest, Z1, Z2, + F@_1, F@_2, TrUserData). + +skip_length_delimited_ApbStaticReadObjects(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + skip_length_delimited_ApbStaticReadObjects(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, + TrUserData); +skip_length_delimited_ApbStaticReadObjects(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) -> + Length = X bsl N + Acc, + <<_:Length/binary, Rest2/binary>> = Rest, + dfp_read_field_def_ApbStaticReadObjects(Rest2, 0, 0, + F@_1, F@_2, TrUserData). + +skip_group_ApbStaticReadObjects(Bin, FNum, Z2, F@_1, + F@_2, TrUserData) -> + {_, Rest} = read_group(Bin, FNum), + dfp_read_field_def_ApbStaticReadObjects(Rest, 0, Z2, + F@_1, F@_2, TrUserData). + +skip_32_ApbStaticReadObjects(<<_:32, Rest/binary>>, Z1, + Z2, F@_1, F@_2, TrUserData) -> + dfp_read_field_def_ApbStaticReadObjects(Rest, Z1, Z2, + F@_1, F@_2, TrUserData). + +skip_64_ApbStaticReadObjects(<<_:64, Rest/binary>>, Z1, + Z2, F@_1, F@_2, TrUserData) -> + dfp_read_field_def_ApbStaticReadObjects(Rest, Z1, Z2, + F@_1, F@_2, TrUserData). + +d_msg_ApbStartTransactionResp(Bin, TrUserData) -> + dfp_read_field_def_ApbStartTransactionResp(Bin, 0, 0, + id(undefined, TrUserData), + id(undefined, TrUserData), + id(undefined, TrUserData), + TrUserData). + +dfp_read_field_def_ApbStartTransactionResp(<<8, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, F@_3, + TrUserData) -> + d_field_ApbStartTransactionResp_success(Rest, Z1, Z2, + F@_1, F@_2, F@_3, TrUserData); +dfp_read_field_def_ApbStartTransactionResp(<<18, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, F@_3, + TrUserData) -> + d_field_ApbStartTransactionResp_transaction_descriptor(Rest, + Z1, Z2, F@_1, F@_2, + F@_3, TrUserData); +dfp_read_field_def_ApbStartTransactionResp(<<24, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, F@_3, + TrUserData) -> + d_field_ApbStartTransactionResp_errorcode(Rest, Z1, Z2, + F@_1, F@_2, F@_3, TrUserData); +dfp_read_field_def_ApbStartTransactionResp(<<>>, 0, 0, + F@_1, F@_2, F@_3, _) -> + #'ApbStartTransactionResp'{success = F@_1, + transaction_descriptor = F@_2, errorcode = F@_3}; +dfp_read_field_def_ApbStartTransactionResp(Other, Z1, + Z2, F@_1, F@_2, F@_3, TrUserData) -> + dg_read_field_def_ApbStartTransactionResp(Other, Z1, Z2, + F@_1, F@_2, F@_3, TrUserData). + +dg_read_field_def_ApbStartTransactionResp(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, TrUserData) + when N < 32 - 7 -> + dg_read_field_def_ApbStartTransactionResp(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, F@_3, + TrUserData); +dg_read_field_def_ApbStartTransactionResp(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, + TrUserData) -> + Key = X bsl N + Acc, + case Key of + 8 -> + d_field_ApbStartTransactionResp_success(Rest, 0, 0, + F@_1, F@_2, F@_3, TrUserData); + 18 -> + d_field_ApbStartTransactionResp_transaction_descriptor(Rest, + 0, 0, F@_1, + F@_2, F@_3, + TrUserData); + 24 -> + d_field_ApbStartTransactionResp_errorcode(Rest, 0, 0, + F@_1, F@_2, F@_3, + TrUserData); + _ -> + case Key band 7 of + 0 -> + skip_varint_ApbStartTransactionResp(Rest, 0, 0, F@_1, + F@_2, F@_3, TrUserData); + 1 -> + skip_64_ApbStartTransactionResp(Rest, 0, 0, F@_1, F@_2, + F@_3, TrUserData); + 2 -> + skip_length_delimited_ApbStartTransactionResp(Rest, 0, + 0, F@_1, F@_2, + F@_3, TrUserData); + 3 -> + skip_group_ApbStartTransactionResp(Rest, Key bsr 3, 0, + F@_1, F@_2, F@_3, + TrUserData); + 5 -> + skip_32_ApbStartTransactionResp(Rest, 0, 0, F@_1, F@_2, + F@_3, TrUserData) + end + end; +dg_read_field_def_ApbStartTransactionResp(<<>>, 0, 0, + F@_1, F@_2, F@_3, _) -> + #'ApbStartTransactionResp'{success = F@_1, + transaction_descriptor = F@_2, errorcode = F@_3}. + +d_field_ApbStartTransactionResp_success(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, TrUserData) + when N < 57 -> + d_field_ApbStartTransactionResp_success(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, F@_3, + TrUserData); +d_field_ApbStartTransactionResp_success(<<0:1, X:7, + Rest/binary>>, + N, Acc, _, F@_2, F@_3, TrUserData) -> + {NewFValue, RestF} = {X bsl N + Acc =/= 0, Rest}, + dfp_read_field_def_ApbStartTransactionResp(RestF, 0, 0, + NewFValue, F@_2, F@_3, + TrUserData). + +d_field_ApbStartTransactionResp_transaction_descriptor(<<1:1, + X:7, Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, + TrUserData) + when N < 57 -> + d_field_ApbStartTransactionResp_transaction_descriptor(Rest, + N + 7, X bsl N + Acc, + F@_1, F@_2, F@_3, + TrUserData); +d_field_ApbStartTransactionResp_transaction_descriptor(<<0:1, + X:7, Rest/binary>>, + N, Acc, F@_1, _, F@_3, + TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {binary:copy(Bytes), Rest2} + end, + dfp_read_field_def_ApbStartTransactionResp(RestF, 0, 0, + F@_1, NewFValue, F@_3, + TrUserData). + +d_field_ApbStartTransactionResp_errorcode(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, TrUserData) + when N < 57 -> + d_field_ApbStartTransactionResp_errorcode(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, F@_3, + TrUserData); +d_field_ApbStartTransactionResp_errorcode(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, _, TrUserData) -> + {NewFValue, RestF} = {X bsl N + Acc, Rest}, + dfp_read_field_def_ApbStartTransactionResp(RestF, 0, 0, + F@_1, F@_2, NewFValue, + TrUserData). + +skip_varint_ApbStartTransactionResp(<<1:1, _:7, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, F@_3, TrUserData) -> + skip_varint_ApbStartTransactionResp(Rest, Z1, Z2, F@_1, + F@_2, F@_3, TrUserData); +skip_varint_ApbStartTransactionResp(<<0:1, _:7, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, F@_3, TrUserData) -> + dfp_read_field_def_ApbStartTransactionResp(Rest, Z1, Z2, + F@_1, F@_2, F@_3, TrUserData). + +skip_length_delimited_ApbStartTransactionResp(<<1:1, + X:7, Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, + TrUserData) + when N < 57 -> + skip_length_delimited_ApbStartTransactionResp(Rest, + N + 7, X bsl N + Acc, F@_1, + F@_2, F@_3, TrUserData); +skip_length_delimited_ApbStartTransactionResp(<<0:1, + X:7, Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, + TrUserData) -> + Length = X bsl N + Acc, + <<_:Length/binary, Rest2/binary>> = Rest, + dfp_read_field_def_ApbStartTransactionResp(Rest2, 0, 0, + F@_1, F@_2, F@_3, TrUserData). + +skip_group_ApbStartTransactionResp(Bin, FNum, Z2, F@_1, + F@_2, F@_3, TrUserData) -> + {_, Rest} = read_group(Bin, FNum), + dfp_read_field_def_ApbStartTransactionResp(Rest, 0, Z2, + F@_1, F@_2, F@_3, TrUserData). + +skip_32_ApbStartTransactionResp(<<_:32, Rest/binary>>, + Z1, Z2, F@_1, F@_2, F@_3, TrUserData) -> + dfp_read_field_def_ApbStartTransactionResp(Rest, Z1, Z2, + F@_1, F@_2, F@_3, TrUserData). + +skip_64_ApbStartTransactionResp(<<_:64, Rest/binary>>, + Z1, Z2, F@_1, F@_2, F@_3, TrUserData) -> + dfp_read_field_def_ApbStartTransactionResp(Rest, Z1, Z2, + F@_1, F@_2, F@_3, TrUserData). + +d_msg_ApbReadObjectResp(Bin, TrUserData) -> + dfp_read_field_def_ApbReadObjectResp(Bin, 0, 0, + id(undefined, TrUserData), + id(undefined, TrUserData), + id(undefined, TrUserData), + id(undefined, TrUserData), + id(undefined, TrUserData), + id(undefined, TrUserData), TrUserData). + +dfp_read_field_def_ApbReadObjectResp(<<10, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData) -> + d_field_ApbReadObjectResp_counter(Rest, Z1, Z2, F@_1, + F@_2, F@_3, F@_4, F@_5, F@_6, TrUserData); +dfp_read_field_def_ApbReadObjectResp(<<18, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData) -> + d_field_ApbReadObjectResp_set(Rest, Z1, Z2, F@_1, F@_2, + F@_3, F@_4, F@_5, F@_6, TrUserData); +dfp_read_field_def_ApbReadObjectResp(<<26, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData) -> + d_field_ApbReadObjectResp_reg(Rest, Z1, Z2, F@_1, F@_2, + F@_3, F@_4, F@_5, F@_6, TrUserData); +dfp_read_field_def_ApbReadObjectResp(<<34, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData) -> + d_field_ApbReadObjectResp_mvreg(Rest, Z1, Z2, F@_1, + F@_2, F@_3, F@_4, F@_5, F@_6, TrUserData); +dfp_read_field_def_ApbReadObjectResp(<<50, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData) -> + d_field_ApbReadObjectResp_map(Rest, Z1, Z2, F@_1, F@_2, + F@_3, F@_4, F@_5, F@_6, TrUserData); +dfp_read_field_def_ApbReadObjectResp(<<58, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData) -> + d_field_ApbReadObjectResp_flag(Rest, Z1, Z2, F@_1, F@_2, + F@_3, F@_4, F@_5, F@_6, TrUserData); +dfp_read_field_def_ApbReadObjectResp(<<>>, 0, 0, F@_1, + F@_2, F@_3, F@_4, F@_5, F@_6, _) -> + #'ApbReadObjectResp'{counter = F@_1, set = F@_2, + reg = F@_3, mvreg = F@_4, map = F@_5, flag = F@_6}; +dfp_read_field_def_ApbReadObjectResp(Other, Z1, Z2, + F@_1, F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData) -> + dg_read_field_def_ApbReadObjectResp(Other, Z1, Z2, F@_1, + F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData). + +dg_read_field_def_ApbReadObjectResp(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData) + when N < 32 - 7 -> + dg_read_field_def_ApbReadObjectResp(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, F@_3, F@_4, + F@_5, F@_6, TrUserData); +dg_read_field_def_ApbReadObjectResp(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData) -> + Key = X bsl N + Acc, + case Key of + 10 -> + d_field_ApbReadObjectResp_counter(Rest, 0, 0, F@_1, + F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData); + 18 -> + d_field_ApbReadObjectResp_set(Rest, 0, 0, F@_1, F@_2, + F@_3, F@_4, F@_5, F@_6, TrUserData); + 26 -> + d_field_ApbReadObjectResp_reg(Rest, 0, 0, F@_1, F@_2, + F@_3, F@_4, F@_5, F@_6, TrUserData); + 34 -> + d_field_ApbReadObjectResp_mvreg(Rest, 0, 0, F@_1, F@_2, + F@_3, F@_4, F@_5, F@_6, TrUserData); + 50 -> + d_field_ApbReadObjectResp_map(Rest, 0, 0, F@_1, F@_2, + F@_3, F@_4, F@_5, F@_6, TrUserData); + 58 -> + d_field_ApbReadObjectResp_flag(Rest, 0, 0, F@_1, F@_2, + F@_3, F@_4, F@_5, F@_6, TrUserData); + _ -> + case Key band 7 of + 0 -> + skip_varint_ApbReadObjectResp(Rest, 0, 0, F@_1, F@_2, + F@_3, F@_4, F@_5, F@_6, + TrUserData); + 1 -> + skip_64_ApbReadObjectResp(Rest, 0, 0, F@_1, F@_2, F@_3, + F@_4, F@_5, F@_6, TrUserData); + 2 -> + skip_length_delimited_ApbReadObjectResp(Rest, 0, 0, + F@_1, F@_2, F@_3, F@_4, + F@_5, F@_6, TrUserData); + 3 -> + skip_group_ApbReadObjectResp(Rest, Key bsr 3, 0, F@_1, + F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData); + 5 -> + skip_32_ApbReadObjectResp(Rest, 0, 0, F@_1, F@_2, F@_3, + F@_4, F@_5, F@_6, TrUserData) + end + end; +dg_read_field_def_ApbReadObjectResp(<<>>, 0, 0, F@_1, + F@_2, F@_3, F@_4, F@_5, F@_6, _) -> + #'ApbReadObjectResp'{counter = F@_1, set = F@_2, + reg = F@_3, mvreg = F@_4, map = F@_5, flag = F@_6}. + +d_field_ApbReadObjectResp_counter(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData) + when N < 57 -> + d_field_ApbReadObjectResp_counter(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, F@_3, F@_4, + F@_5, F@_6, TrUserData); +d_field_ApbReadObjectResp_counter(<<0:1, X:7, + Rest/binary>>, + N, Acc, Prev, F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {id(d_msg_ApbGetCounterResp(Bs, TrUserData), + TrUserData), + Rest2} + end, + dfp_read_field_def_ApbReadObjectResp(RestF, 0, 0, + if Prev == undefined -> NewFValue; + true -> + merge_msg_ApbGetCounterResp(Prev, + NewFValue, + TrUserData) + end, + F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData). + +d_field_ApbReadObjectResp_set(<<1:1, X:7, Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData) + when N < 57 -> + d_field_ApbReadObjectResp_set(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, F@_3, F@_4, F@_5, + F@_6, TrUserData); +d_field_ApbReadObjectResp_set(<<0:1, X:7, Rest/binary>>, + N, Acc, F@_1, Prev, F@_3, F@_4, F@_5, F@_6, + TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {id(d_msg_ApbGetSetResp(Bs, TrUserData), TrUserData), + Rest2} + end, + dfp_read_field_def_ApbReadObjectResp(RestF, 0, 0, F@_1, + if Prev == undefined -> NewFValue; + true -> + merge_msg_ApbGetSetResp(Prev, + NewFValue, + TrUserData) + end, + F@_3, F@_4, F@_5, F@_6, TrUserData). + +d_field_ApbReadObjectResp_reg(<<1:1, X:7, Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData) + when N < 57 -> + d_field_ApbReadObjectResp_reg(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, F@_3, F@_4, F@_5, + F@_6, TrUserData); +d_field_ApbReadObjectResp_reg(<<0:1, X:7, Rest/binary>>, + N, Acc, F@_1, F@_2, Prev, F@_4, F@_5, F@_6, + TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {id(d_msg_ApbGetRegResp(Bs, TrUserData), TrUserData), + Rest2} + end, + dfp_read_field_def_ApbReadObjectResp(RestF, 0, 0, F@_1, + F@_2, + if Prev == undefined -> NewFValue; + true -> + merge_msg_ApbGetRegResp(Prev, + NewFValue, + TrUserData) + end, + F@_4, F@_5, F@_6, TrUserData). + +d_field_ApbReadObjectResp_mvreg(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData) + when N < 57 -> + d_field_ApbReadObjectResp_mvreg(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, F@_3, F@_4, F@_5, + F@_6, TrUserData); +d_field_ApbReadObjectResp_mvreg(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, Prev, F@_5, F@_6, + TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {id(d_msg_ApbGetMVRegResp(Bs, TrUserData), + TrUserData), + Rest2} + end, + dfp_read_field_def_ApbReadObjectResp(RestF, 0, 0, F@_1, + F@_2, F@_3, + if Prev == undefined -> NewFValue; + true -> + merge_msg_ApbGetMVRegResp(Prev, + NewFValue, + TrUserData) + end, + F@_5, F@_6, TrUserData). + +d_field_ApbReadObjectResp_map(<<1:1, X:7, Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData) + when N < 57 -> + d_field_ApbReadObjectResp_map(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, F@_3, F@_4, F@_5, + F@_6, TrUserData); +d_field_ApbReadObjectResp_map(<<0:1, X:7, Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, F@_4, Prev, F@_6, + TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {id(d_msg_ApbGetMapResp(Bs, TrUserData), TrUserData), + Rest2} + end, + dfp_read_field_def_ApbReadObjectResp(RestF, 0, 0, F@_1, + F@_2, F@_3, F@_4, + if Prev == undefined -> NewFValue; + true -> + merge_msg_ApbGetMapResp(Prev, + NewFValue, + TrUserData) + end, + F@_6, TrUserData). + +d_field_ApbReadObjectResp_flag(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData) + when N < 57 -> + d_field_ApbReadObjectResp_flag(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, F@_3, F@_4, F@_5, + F@_6, TrUserData); +d_field_ApbReadObjectResp_flag(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, F@_4, F@_5, Prev, + TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {id(d_msg_ApbGetFlagResp(Bs, TrUserData), + TrUserData), + Rest2} + end, + dfp_read_field_def_ApbReadObjectResp(RestF, 0, 0, F@_1, + F@_2, F@_3, F@_4, F@_5, + if Prev == undefined -> NewFValue; + true -> + merge_msg_ApbGetFlagResp(Prev, + NewFValue, + TrUserData) + end, + TrUserData). + +skip_varint_ApbReadObjectResp(<<1:1, _:7, Rest/binary>>, + Z1, Z2, F@_1, F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData) -> + skip_varint_ApbReadObjectResp(Rest, Z1, Z2, F@_1, F@_2, + F@_3, F@_4, F@_5, F@_6, TrUserData); +skip_varint_ApbReadObjectResp(<<0:1, _:7, Rest/binary>>, + Z1, Z2, F@_1, F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData) -> + dfp_read_field_def_ApbReadObjectResp(Rest, Z1, Z2, F@_1, + F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData). + +skip_length_delimited_ApbReadObjectResp(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, F@_4, F@_5, + F@_6, TrUserData) + when N < 57 -> + skip_length_delimited_ApbReadObjectResp(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, F@_3, + F@_4, F@_5, F@_6, TrUserData); +skip_length_delimited_ApbReadObjectResp(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, F@_4, F@_5, + F@_6, TrUserData) -> + Length = X bsl N + Acc, + <<_:Length/binary, Rest2/binary>> = Rest, + dfp_read_field_def_ApbReadObjectResp(Rest2, 0, 0, F@_1, + F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData). + +skip_group_ApbReadObjectResp(Bin, FNum, Z2, F@_1, F@_2, + F@_3, F@_4, F@_5, F@_6, TrUserData) -> + {_, Rest} = read_group(Bin, FNum), + dfp_read_field_def_ApbReadObjectResp(Rest, 0, Z2, F@_1, + F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData). + +skip_32_ApbReadObjectResp(<<_:32, Rest/binary>>, Z1, Z2, + F@_1, F@_2, F@_3, F@_4, F@_5, F@_6, TrUserData) -> + dfp_read_field_def_ApbReadObjectResp(Rest, Z1, Z2, F@_1, + F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData). + +skip_64_ApbReadObjectResp(<<_:64, Rest/binary>>, Z1, Z2, + F@_1, F@_2, F@_3, F@_4, F@_5, F@_6, TrUserData) -> + dfp_read_field_def_ApbReadObjectResp(Rest, Z1, Z2, F@_1, + F@_2, F@_3, F@_4, F@_5, F@_6, + TrUserData). + +d_msg_ApbReadObjectsResp(Bin, TrUserData) -> + dfp_read_field_def_ApbReadObjectsResp(Bin, 0, 0, + id(undefined, TrUserData), + id([], TrUserData), + id(undefined, TrUserData), + TrUserData). + +dfp_read_field_def_ApbReadObjectsResp(<<8, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, F@_3, TrUserData) -> + d_field_ApbReadObjectsResp_success(Rest, Z1, Z2, F@_1, + F@_2, F@_3, TrUserData); +dfp_read_field_def_ApbReadObjectsResp(<<18, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, F@_3, TrUserData) -> + d_field_ApbReadObjectsResp_objects(Rest, Z1, Z2, F@_1, + F@_2, F@_3, TrUserData); +dfp_read_field_def_ApbReadObjectsResp(<<24, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, F@_3, TrUserData) -> + d_field_ApbReadObjectsResp_errorcode(Rest, Z1, Z2, F@_1, + F@_2, F@_3, TrUserData); +dfp_read_field_def_ApbReadObjectsResp(<<>>, 0, 0, F@_1, + R1, F@_3, TrUserData) -> + #'ApbReadObjectsResp'{success = F@_1, + objects = lists_reverse(R1, TrUserData), + errorcode = F@_3}; +dfp_read_field_def_ApbReadObjectsResp(Other, Z1, Z2, + F@_1, F@_2, F@_3, TrUserData) -> + dg_read_field_def_ApbReadObjectsResp(Other, Z1, Z2, + F@_1, F@_2, F@_3, TrUserData). + +dg_read_field_def_ApbReadObjectsResp(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, TrUserData) + when N < 32 - 7 -> + dg_read_field_def_ApbReadObjectsResp(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, F@_3, + TrUserData); +dg_read_field_def_ApbReadObjectsResp(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, TrUserData) -> + Key = X bsl N + Acc, + case Key of + 8 -> + d_field_ApbReadObjectsResp_success(Rest, 0, 0, F@_1, + F@_2, F@_3, TrUserData); + 18 -> + d_field_ApbReadObjectsResp_objects(Rest, 0, 0, F@_1, + F@_2, F@_3, TrUserData); + 24 -> + d_field_ApbReadObjectsResp_errorcode(Rest, 0, 0, F@_1, + F@_2, F@_3, TrUserData); + _ -> + case Key band 7 of + 0 -> + skip_varint_ApbReadObjectsResp(Rest, 0, 0, F@_1, F@_2, + F@_3, TrUserData); + 1 -> + skip_64_ApbReadObjectsResp(Rest, 0, 0, F@_1, F@_2, F@_3, + TrUserData); + 2 -> + skip_length_delimited_ApbReadObjectsResp(Rest, 0, 0, + F@_1, F@_2, F@_3, + TrUserData); + 3 -> + skip_group_ApbReadObjectsResp(Rest, Key bsr 3, 0, F@_1, + F@_2, F@_3, TrUserData); + 5 -> + skip_32_ApbReadObjectsResp(Rest, 0, 0, F@_1, F@_2, F@_3, + TrUserData) + end + end; +dg_read_field_def_ApbReadObjectsResp(<<>>, 0, 0, F@_1, + R1, F@_3, TrUserData) -> + #'ApbReadObjectsResp'{success = F@_1, + objects = lists_reverse(R1, TrUserData), + errorcode = F@_3}. + +d_field_ApbReadObjectsResp_success(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, TrUserData) + when N < 57 -> + d_field_ApbReadObjectsResp_success(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, F@_3, + TrUserData); +d_field_ApbReadObjectsResp_success(<<0:1, X:7, + Rest/binary>>, + N, Acc, _, F@_2, F@_3, TrUserData) -> + {NewFValue, RestF} = {X bsl N + Acc =/= 0, Rest}, + dfp_read_field_def_ApbReadObjectsResp(RestF, 0, 0, + NewFValue, F@_2, F@_3, TrUserData). + +d_field_ApbReadObjectsResp_objects(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, TrUserData) + when N < 57 -> + d_field_ApbReadObjectsResp_objects(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, F@_3, + TrUserData); +d_field_ApbReadObjectsResp_objects(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, Prev, F@_3, TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {id(d_msg_ApbReadObjectResp(Bs, TrUserData), + TrUserData), + Rest2} + end, + dfp_read_field_def_ApbReadObjectsResp(RestF, 0, 0, F@_1, + cons(NewFValue, Prev, TrUserData), + F@_3, TrUserData). + +d_field_ApbReadObjectsResp_errorcode(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, TrUserData) + when N < 57 -> + d_field_ApbReadObjectsResp_errorcode(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, F@_3, + TrUserData); +d_field_ApbReadObjectsResp_errorcode(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, _, TrUserData) -> + {NewFValue, RestF} = {X bsl N + Acc, Rest}, + dfp_read_field_def_ApbReadObjectsResp(RestF, 0, 0, F@_1, + F@_2, NewFValue, TrUserData). + +skip_varint_ApbReadObjectsResp(<<1:1, _:7, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, F@_3, TrUserData) -> + skip_varint_ApbReadObjectsResp(Rest, Z1, Z2, F@_1, F@_2, + F@_3, TrUserData); +skip_varint_ApbReadObjectsResp(<<0:1, _:7, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, F@_3, TrUserData) -> + dfp_read_field_def_ApbReadObjectsResp(Rest, Z1, Z2, + F@_1, F@_2, F@_3, TrUserData). + +skip_length_delimited_ApbReadObjectsResp(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, TrUserData) + when N < 57 -> + skip_length_delimited_ApbReadObjectsResp(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, F@_3, + TrUserData); +skip_length_delimited_ApbReadObjectsResp(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, + TrUserData) -> + Length = X bsl N + Acc, + <<_:Length/binary, Rest2/binary>> = Rest, + dfp_read_field_def_ApbReadObjectsResp(Rest2, 0, 0, F@_1, + F@_2, F@_3, TrUserData). + +skip_group_ApbReadObjectsResp(Bin, FNum, Z2, F@_1, F@_2, + F@_3, TrUserData) -> + {_, Rest} = read_group(Bin, FNum), + dfp_read_field_def_ApbReadObjectsResp(Rest, 0, Z2, F@_1, + F@_2, F@_3, TrUserData). + +skip_32_ApbReadObjectsResp(<<_:32, Rest/binary>>, Z1, + Z2, F@_1, F@_2, F@_3, TrUserData) -> + dfp_read_field_def_ApbReadObjectsResp(Rest, Z1, Z2, + F@_1, F@_2, F@_3, TrUserData). + +skip_64_ApbReadObjectsResp(<<_:64, Rest/binary>>, Z1, + Z2, F@_1, F@_2, F@_3, TrUserData) -> + dfp_read_field_def_ApbReadObjectsResp(Rest, Z1, Z2, + F@_1, F@_2, F@_3, TrUserData). + +d_msg_ApbCommitResp(Bin, TrUserData) -> + dfp_read_field_def_ApbCommitResp(Bin, 0, 0, + id(undefined, TrUserData), + id(undefined, TrUserData), + id(undefined, TrUserData), TrUserData). + +dfp_read_field_def_ApbCommitResp(<<8, Rest/binary>>, Z1, + Z2, F@_1, F@_2, F@_3, TrUserData) -> + d_field_ApbCommitResp_success(Rest, Z1, Z2, F@_1, F@_2, + F@_3, TrUserData); +dfp_read_field_def_ApbCommitResp(<<18, Rest/binary>>, + Z1, Z2, F@_1, F@_2, F@_3, TrUserData) -> + d_field_ApbCommitResp_commit_time(Rest, Z1, Z2, F@_1, + F@_2, F@_3, TrUserData); +dfp_read_field_def_ApbCommitResp(<<24, Rest/binary>>, + Z1, Z2, F@_1, F@_2, F@_3, TrUserData) -> + d_field_ApbCommitResp_errorcode(Rest, Z1, Z2, F@_1, + F@_2, F@_3, TrUserData); +dfp_read_field_def_ApbCommitResp(<<>>, 0, 0, F@_1, F@_2, + F@_3, _) -> + #'ApbCommitResp'{success = F@_1, commit_time = F@_2, + errorcode = F@_3}; +dfp_read_field_def_ApbCommitResp(Other, Z1, Z2, F@_1, + F@_2, F@_3, TrUserData) -> + dg_read_field_def_ApbCommitResp(Other, Z1, Z2, F@_1, + F@_2, F@_3, TrUserData). + +dg_read_field_def_ApbCommitResp(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, TrUserData) + when N < 32 - 7 -> + dg_read_field_def_ApbCommitResp(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, F@_3, + TrUserData); +dg_read_field_def_ApbCommitResp(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, TrUserData) -> + Key = X bsl N + Acc, + case Key of + 8 -> + d_field_ApbCommitResp_success(Rest, 0, 0, F@_1, F@_2, + F@_3, TrUserData); + 18 -> + d_field_ApbCommitResp_commit_time(Rest, 0, 0, F@_1, + F@_2, F@_3, TrUserData); + 24 -> + d_field_ApbCommitResp_errorcode(Rest, 0, 0, F@_1, F@_2, + F@_3, TrUserData); + _ -> + case Key band 7 of + 0 -> + skip_varint_ApbCommitResp(Rest, 0, 0, F@_1, F@_2, F@_3, + TrUserData); + 1 -> + skip_64_ApbCommitResp(Rest, 0, 0, F@_1, F@_2, F@_3, + TrUserData); + 2 -> + skip_length_delimited_ApbCommitResp(Rest, 0, 0, F@_1, + F@_2, F@_3, TrUserData); + 3 -> + skip_group_ApbCommitResp(Rest, Key bsr 3, 0, F@_1, F@_2, + F@_3, TrUserData); + 5 -> + skip_32_ApbCommitResp(Rest, 0, 0, F@_1, F@_2, F@_3, + TrUserData) + end + end; +dg_read_field_def_ApbCommitResp(<<>>, 0, 0, F@_1, F@_2, + F@_3, _) -> + #'ApbCommitResp'{success = F@_1, commit_time = F@_2, + errorcode = F@_3}. + +d_field_ApbCommitResp_success(<<1:1, X:7, Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, TrUserData) + when N < 57 -> + d_field_ApbCommitResp_success(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, F@_3, TrUserData); +d_field_ApbCommitResp_success(<<0:1, X:7, Rest/binary>>, + N, Acc, _, F@_2, F@_3, TrUserData) -> + {NewFValue, RestF} = {X bsl N + Acc =/= 0, Rest}, + dfp_read_field_def_ApbCommitResp(RestF, 0, 0, NewFValue, + F@_2, F@_3, TrUserData). + +d_field_ApbCommitResp_commit_time(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, TrUserData) + when N < 57 -> + d_field_ApbCommitResp_commit_time(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, F@_3, + TrUserData); +d_field_ApbCommitResp_commit_time(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, _, F@_3, TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {binary:copy(Bytes), Rest2} + end, + dfp_read_field_def_ApbCommitResp(RestF, 0, 0, F@_1, + NewFValue, F@_3, TrUserData). + +d_field_ApbCommitResp_errorcode(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, TrUserData) + when N < 57 -> + d_field_ApbCommitResp_errorcode(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, F@_3, + TrUserData); +d_field_ApbCommitResp_errorcode(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, _, TrUserData) -> + {NewFValue, RestF} = {X bsl N + Acc, Rest}, + dfp_read_field_def_ApbCommitResp(RestF, 0, 0, F@_1, + F@_2, NewFValue, TrUserData). + +skip_varint_ApbCommitResp(<<1:1, _:7, Rest/binary>>, Z1, + Z2, F@_1, F@_2, F@_3, TrUserData) -> + skip_varint_ApbCommitResp(Rest, Z1, Z2, F@_1, F@_2, + F@_3, TrUserData); +skip_varint_ApbCommitResp(<<0:1, _:7, Rest/binary>>, Z1, + Z2, F@_1, F@_2, F@_3, TrUserData) -> + dfp_read_field_def_ApbCommitResp(Rest, Z1, Z2, F@_1, + F@_2, F@_3, TrUserData). + +skip_length_delimited_ApbCommitResp(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, TrUserData) + when N < 57 -> + skip_length_delimited_ApbCommitResp(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, F@_3, + TrUserData); +skip_length_delimited_ApbCommitResp(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, F@_3, TrUserData) -> + Length = X bsl N + Acc, + <<_:Length/binary, Rest2/binary>> = Rest, + dfp_read_field_def_ApbCommitResp(Rest2, 0, 0, F@_1, + F@_2, F@_3, TrUserData). + +skip_group_ApbCommitResp(Bin, FNum, Z2, F@_1, F@_2, + F@_3, TrUserData) -> + {_, Rest} = read_group(Bin, FNum), + dfp_read_field_def_ApbCommitResp(Rest, 0, Z2, F@_1, + F@_2, F@_3, TrUserData). + +skip_32_ApbCommitResp(<<_:32, Rest/binary>>, Z1, Z2, + F@_1, F@_2, F@_3, TrUserData) -> + dfp_read_field_def_ApbCommitResp(Rest, Z1, Z2, F@_1, + F@_2, F@_3, TrUserData). + +skip_64_ApbCommitResp(<<_:64, Rest/binary>>, Z1, Z2, + F@_1, F@_2, F@_3, TrUserData) -> + dfp_read_field_def_ApbCommitResp(Rest, Z1, Z2, F@_1, + F@_2, F@_3, TrUserData). + +d_msg_ApbStaticReadObjectsResp(Bin, TrUserData) -> + dfp_read_field_def_ApbStaticReadObjectsResp(Bin, 0, 0, + id(undefined, TrUserData), + id(undefined, TrUserData), + TrUserData). + +dfp_read_field_def_ApbStaticReadObjectsResp(<<10, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + d_field_ApbStaticReadObjectsResp_objects(Rest, Z1, Z2, + F@_1, F@_2, TrUserData); +dfp_read_field_def_ApbStaticReadObjectsResp(<<18, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + d_field_ApbStaticReadObjectsResp_committime(Rest, Z1, + Z2, F@_1, F@_2, TrUserData); +dfp_read_field_def_ApbStaticReadObjectsResp(<<>>, 0, 0, + F@_1, F@_2, _) -> + #'ApbStaticReadObjectsResp'{objects = F@_1, + committime = F@_2}; +dfp_read_field_def_ApbStaticReadObjectsResp(Other, Z1, + Z2, F@_1, F@_2, TrUserData) -> + dg_read_field_def_ApbStaticReadObjectsResp(Other, Z1, + Z2, F@_1, F@_2, TrUserData). + +dg_read_field_def_ApbStaticReadObjectsResp(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 32 - 7 -> + dg_read_field_def_ApbStaticReadObjectsResp(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, + TrUserData); +dg_read_field_def_ApbStaticReadObjectsResp(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) -> + Key = X bsl N + Acc, + case Key of + 10 -> + d_field_ApbStaticReadObjectsResp_objects(Rest, 0, 0, + F@_1, F@_2, TrUserData); + 18 -> + d_field_ApbStaticReadObjectsResp_committime(Rest, 0, 0, + F@_1, F@_2, TrUserData); + _ -> + case Key band 7 of + 0 -> + skip_varint_ApbStaticReadObjectsResp(Rest, 0, 0, F@_1, + F@_2, TrUserData); + 1 -> + skip_64_ApbStaticReadObjectsResp(Rest, 0, 0, F@_1, F@_2, + TrUserData); + 2 -> + skip_length_delimited_ApbStaticReadObjectsResp(Rest, 0, + 0, F@_1, F@_2, + TrUserData); + 3 -> + skip_group_ApbStaticReadObjectsResp(Rest, Key bsr 3, 0, + F@_1, F@_2, TrUserData); + 5 -> + skip_32_ApbStaticReadObjectsResp(Rest, 0, 0, F@_1, F@_2, + TrUserData) + end + end; +dg_read_field_def_ApbStaticReadObjectsResp(<<>>, 0, 0, + F@_1, F@_2, _) -> + #'ApbStaticReadObjectsResp'{objects = F@_1, + committime = F@_2}. + +d_field_ApbStaticReadObjectsResp_objects(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + d_field_ApbStaticReadObjectsResp_objects(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, + TrUserData); +d_field_ApbStaticReadObjectsResp_objects(<<0:1, X:7, + Rest/binary>>, + N, Acc, Prev, F@_2, TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {id(d_msg_ApbReadObjectsResp(Bs, TrUserData), + TrUserData), + Rest2} + end, + dfp_read_field_def_ApbStaticReadObjectsResp(RestF, 0, 0, + if Prev == undefined -> + NewFValue; + true -> + merge_msg_ApbReadObjectsResp(Prev, + NewFValue, + TrUserData) + end, + F@_2, TrUserData). + +d_field_ApbStaticReadObjectsResp_committime(<<1:1, X:7, + Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + d_field_ApbStaticReadObjectsResp_committime(Rest, N + 7, + X bsl N + Acc, F@_1, F@_2, + TrUserData); +d_field_ApbStaticReadObjectsResp_committime(<<0:1, X:7, + Rest/binary>>, + N, Acc, F@_1, Prev, TrUserData) -> + {NewFValue, RestF} = begin + Len = X bsl N + Acc, + <> = Rest, + {id(d_msg_ApbCommitResp(Bs, TrUserData), TrUserData), + Rest2} + end, + dfp_read_field_def_ApbStaticReadObjectsResp(RestF, 0, 0, + F@_1, + if Prev == undefined -> + NewFValue; + true -> + merge_msg_ApbCommitResp(Prev, + NewFValue, + TrUserData) + end, + TrUserData). + +skip_varint_ApbStaticReadObjectsResp(<<1:1, _:7, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + skip_varint_ApbStaticReadObjectsResp(Rest, Z1, Z2, F@_1, + F@_2, TrUserData); +skip_varint_ApbStaticReadObjectsResp(<<0:1, _:7, + Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + dfp_read_field_def_ApbStaticReadObjectsResp(Rest, Z1, + Z2, F@_1, F@_2, TrUserData). + +skip_length_delimited_ApbStaticReadObjectsResp(<<1:1, + X:7, Rest/binary>>, + N, Acc, F@_1, F@_2, TrUserData) + when N < 57 -> + skip_length_delimited_ApbStaticReadObjectsResp(Rest, + N + 7, X bsl N + Acc, F@_1, + F@_2, TrUserData); +skip_length_delimited_ApbStaticReadObjectsResp(<<0:1, + X:7, Rest/binary>>, + N, Acc, F@_1, F@_2, + TrUserData) -> + Length = X bsl N + Acc, + <<_:Length/binary, Rest2/binary>> = Rest, + dfp_read_field_def_ApbStaticReadObjectsResp(Rest2, 0, 0, + F@_1, F@_2, TrUserData). + +skip_group_ApbStaticReadObjectsResp(Bin, FNum, Z2, F@_1, + F@_2, TrUserData) -> + {_, Rest} = read_group(Bin, FNum), + dfp_read_field_def_ApbStaticReadObjectsResp(Rest, 0, Z2, + F@_1, F@_2, TrUserData). + +skip_32_ApbStaticReadObjectsResp(<<_:32, Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + dfp_read_field_def_ApbStaticReadObjectsResp(Rest, Z1, + Z2, F@_1, F@_2, TrUserData). + +skip_64_ApbStaticReadObjectsResp(<<_:64, Rest/binary>>, + Z1, Z2, F@_1, F@_2, TrUserData) -> + dfp_read_field_def_ApbStaticReadObjectsResp(Rest, Z1, + Z2, F@_1, F@_2, TrUserData). + +d_enum_CRDT_type(3) -> 'COUNTER'; +d_enum_CRDT_type(4) -> 'ORSET'; +d_enum_CRDT_type(5) -> 'LWWREG'; +d_enum_CRDT_type(6) -> 'MVREG'; +d_enum_CRDT_type(8) -> 'GMAP'; +d_enum_CRDT_type(10) -> 'RWSET'; +d_enum_CRDT_type(11) -> 'RRMAP'; +d_enum_CRDT_type(12) -> 'FATCOUNTER'; +d_enum_CRDT_type(13) -> 'FLAG_EW'; +d_enum_CRDT_type(14) -> 'FLAG_DW'; +d_enum_CRDT_type(V) -> V. + +'d_enum_ApbSetUpdate.SetOpType'(1) -> 'ADD'; +'d_enum_ApbSetUpdate.SetOpType'(2) -> 'REMOVE'; +'d_enum_ApbSetUpdate.SetOpType'(V) -> V. + +read_group(Bin, FieldNum) -> + {NumBytes, EndTagLen} = read_gr_b(Bin, 0, 0, 0, 0, FieldNum), + <> = Bin, + {Group, Rest}. + +%% Like skipping over fields, but record the total length, +%% Each field is <(FieldNum bsl 3) bor FieldType> ++ +%% Record the length because varints may be non-optimally encoded. +%% +%% Groups can be nested, but assume the same FieldNum cannot be nested +%% because group field numbers are shared with the rest of the fields +%% numbers. Thus we can search just for an group-end with the same +%% field number. +%% +%% (The only time the same group field number could occur would +%% be in a nested sub message, but then it would be inside a +%% length-delimited entry, which we skip-read by length.) +read_gr_b(<<1:1, X:7, Tl/binary>>, N, Acc, NumBytes, TagLen, FieldNum) + when N < (32-7) -> + read_gr_b(Tl, N+7, X bsl N + Acc, NumBytes, TagLen+1, FieldNum); +read_gr_b(<<0:1, X:7, Tl/binary>>, N, Acc, NumBytes, TagLen, + FieldNum) -> + Key = X bsl N + Acc, + TagLen1 = TagLen + 1, + case {Key bsr 3, Key band 7} of + {FieldNum, 4} -> % 4 = group_end + {NumBytes, TagLen1}; + {_, 0} -> % 0 = varint + read_gr_vi(Tl, 0, NumBytes + TagLen1, FieldNum); + {_, 1} -> % 1 = bits64 + <<_:64, Tl2/binary>> = Tl, + read_gr_b(Tl2, 0, 0, NumBytes + TagLen1 + 8, 0, FieldNum); + {_, 2} -> % 2 = length_delimited + read_gr_ld(Tl, 0, 0, NumBytes + TagLen1, FieldNum); + {_, 3} -> % 3 = group_start + read_gr_b(Tl, 0, 0, NumBytes + TagLen1, 0, FieldNum); + {_, 4} -> % 4 = group_end + read_gr_b(Tl, 0, 0, NumBytes + TagLen1, 0, FieldNum); + {_, 5} -> % 5 = bits32 + <<_:32, Tl2/binary>> = Tl, + read_gr_b(Tl2, 0, 0, NumBytes + TagLen1 + 4, 0, FieldNum) + end. + +read_gr_vi(<<1:1, _:7, Tl/binary>>, N, NumBytes, FieldNum) + when N < (64-7) -> + read_gr_vi(Tl, N+7, NumBytes+1, FieldNum); +read_gr_vi(<<0:1, _:7, Tl/binary>>, _, NumBytes, FieldNum) -> + read_gr_b(Tl, 0, 0, NumBytes+1, 0, FieldNum). + +read_gr_ld(<<1:1, X:7, Tl/binary>>, N, Acc, NumBytes, FieldNum) + when N < (64-7) -> + read_gr_ld(Tl, N+7, X bsl N + Acc, NumBytes+1, FieldNum); +read_gr_ld(<<0:1, X:7, Tl/binary>>, N, Acc, NumBytes, FieldNum) -> + Len = X bsl N + Acc, + NumBytes1 = NumBytes + 1, + <<_:Len/binary, Tl2/binary>> = Tl, + read_gr_b(Tl2, 0, 0, NumBytes1 + Len, 0, FieldNum). + +merge_msgs(Prev, New) -> merge_msgs(Prev, New, []). + +merge_msgs(Prev, New, Opts) + when element(1, Prev) =:= element(1, New) -> + TrUserData = proplists:get_value(user_data, Opts), + case Prev of + #'ApbErrorResp'{} -> + merge_msg_ApbErrorResp(Prev, New, TrUserData); + #'ApbCounterUpdate'{} -> + merge_msg_ApbCounterUpdate(Prev, New, TrUserData); + #'ApbGetCounterResp'{} -> + merge_msg_ApbGetCounterResp(Prev, New, TrUserData); + #'ApbSetUpdate'{} -> + merge_msg_ApbSetUpdate(Prev, New, TrUserData); + #'ApbGetSetResp'{} -> + merge_msg_ApbGetSetResp(Prev, New, TrUserData); + #'ApbRegUpdate'{} -> + merge_msg_ApbRegUpdate(Prev, New, TrUserData); + #'ApbGetRegResp'{} -> + merge_msg_ApbGetRegResp(Prev, New, TrUserData); + #'ApbGetMVRegResp'{} -> + merge_msg_ApbGetMVRegResp(Prev, New, TrUserData); + #'ApbMapKey'{} -> + merge_msg_ApbMapKey(Prev, New, TrUserData); + #'ApbMapUpdate'{} -> + merge_msg_ApbMapUpdate(Prev, New, TrUserData); + #'ApbMapNestedUpdate'{} -> + merge_msg_ApbMapNestedUpdate(Prev, New, TrUserData); + #'ApbGetMapResp'{} -> + merge_msg_ApbGetMapResp(Prev, New, TrUserData); + #'ApbMapEntry'{} -> + merge_msg_ApbMapEntry(Prev, New, TrUserData); + #'ApbFlagUpdate'{} -> + merge_msg_ApbFlagUpdate(Prev, New, TrUserData); + #'ApbGetFlagResp'{} -> + merge_msg_ApbGetFlagResp(Prev, New, TrUserData); + #'ApbCrdtReset'{} -> + merge_msg_ApbCrdtReset(Prev, New, TrUserData); + #'ApbOperationResp'{} -> + merge_msg_ApbOperationResp(Prev, New, TrUserData); + #'ApbTxnProperties'{} -> + merge_msg_ApbTxnProperties(Prev, New, TrUserData); + #'ApbBoundObject'{} -> + merge_msg_ApbBoundObject(Prev, New, TrUserData); + #'ApbReadObjects'{} -> + merge_msg_ApbReadObjects(Prev, New, TrUserData); + #'ApbUpdateOp'{} -> + merge_msg_ApbUpdateOp(Prev, New, TrUserData); + #'ApbUpdateOperation'{} -> + merge_msg_ApbUpdateOperation(Prev, New, TrUserData); + #'ApbUpdateObjects'{} -> + merge_msg_ApbUpdateObjects(Prev, New, TrUserData); + #'ApbStartTransaction'{} -> + merge_msg_ApbStartTransaction(Prev, New, TrUserData); + #'ApbAbortTransaction'{} -> + merge_msg_ApbAbortTransaction(Prev, New, TrUserData); + #'ApbCommitTransaction'{} -> + merge_msg_ApbCommitTransaction(Prev, New, TrUserData); + #'ApbStaticUpdateObjects'{} -> + merge_msg_ApbStaticUpdateObjects(Prev, New, TrUserData); + #'ApbStaticReadObjects'{} -> + merge_msg_ApbStaticReadObjects(Prev, New, TrUserData); + #'ApbStartTransactionResp'{} -> + merge_msg_ApbStartTransactionResp(Prev, New, + TrUserData); + #'ApbReadObjectResp'{} -> + merge_msg_ApbReadObjectResp(Prev, New, TrUserData); + #'ApbReadObjectsResp'{} -> + merge_msg_ApbReadObjectsResp(Prev, New, TrUserData); + #'ApbCommitResp'{} -> + merge_msg_ApbCommitResp(Prev, New, TrUserData); + #'ApbStaticReadObjectsResp'{} -> + merge_msg_ApbStaticReadObjectsResp(Prev, New, + TrUserData) + end. + +merge_msg_ApbErrorResp(#'ApbErrorResp'{}, + #'ApbErrorResp'{errmsg = NFerrmsg, errcode = NFerrcode}, + _) -> + #'ApbErrorResp'{errmsg = NFerrmsg, errcode = NFerrcode}. + +merge_msg_ApbCounterUpdate(#'ApbCounterUpdate'{inc = + PFinc}, + #'ApbCounterUpdate'{inc = NFinc}, _) -> + #'ApbCounterUpdate'{inc = + if NFinc =:= undefined -> PFinc; + true -> NFinc + end}. + +merge_msg_ApbGetCounterResp(#'ApbGetCounterResp'{}, + #'ApbGetCounterResp'{value = NFvalue}, _) -> + #'ApbGetCounterResp'{value = NFvalue}. + +merge_msg_ApbSetUpdate(#'ApbSetUpdate'{adds = PFadds, + rems = PFrems}, + #'ApbSetUpdate'{optype = NFoptype, adds = NFadds, + rems = NFrems}, + TrUserData) -> + #'ApbSetUpdate'{optype = NFoptype, + adds = + if PFadds /= undefined, NFadds /= undefined -> + 'erlang_++'(PFadds, NFadds, TrUserData); + PFadds == undefined -> NFadds; + NFadds == undefined -> PFadds + end, + rems = + if PFrems /= undefined, NFrems /= undefined -> + 'erlang_++'(PFrems, NFrems, TrUserData); + PFrems == undefined -> NFrems; + NFrems == undefined -> PFrems + end}. + +merge_msg_ApbGetSetResp(#'ApbGetSetResp'{value = + PFvalue}, + #'ApbGetSetResp'{value = NFvalue}, TrUserData) -> + #'ApbGetSetResp'{value = + if PFvalue /= undefined, NFvalue /= undefined -> + 'erlang_++'(PFvalue, NFvalue, TrUserData); + PFvalue == undefined -> NFvalue; + NFvalue == undefined -> PFvalue + end}. + +merge_msg_ApbRegUpdate(#'ApbRegUpdate'{}, + #'ApbRegUpdate'{value = NFvalue}, _) -> + #'ApbRegUpdate'{value = NFvalue}. + +merge_msg_ApbGetRegResp(#'ApbGetRegResp'{}, + #'ApbGetRegResp'{value = NFvalue}, _) -> + #'ApbGetRegResp'{value = NFvalue}. + +merge_msg_ApbGetMVRegResp(#'ApbGetMVRegResp'{values = + PFvalues}, + #'ApbGetMVRegResp'{values = NFvalues}, TrUserData) -> + #'ApbGetMVRegResp'{values = + if PFvalues /= undefined, NFvalues /= undefined -> + 'erlang_++'(PFvalues, NFvalues, TrUserData); + PFvalues == undefined -> NFvalues; + NFvalues == undefined -> PFvalues + end}. + +merge_msg_ApbMapKey(#'ApbMapKey'{}, + #'ApbMapKey'{key = NFkey, type = NFtype}, _) -> + #'ApbMapKey'{key = NFkey, type = NFtype}. + +merge_msg_ApbMapUpdate(#'ApbMapUpdate'{updates = + PFupdates, + removedKeys = PFremovedKeys}, + #'ApbMapUpdate'{updates = NFupdates, + removedKeys = NFremovedKeys}, + TrUserData) -> + #'ApbMapUpdate'{updates = + if PFupdates /= undefined, NFupdates /= undefined -> + 'erlang_++'(PFupdates, NFupdates, TrUserData); + PFupdates == undefined -> NFupdates; + NFupdates == undefined -> PFupdates + end, + removedKeys = + if PFremovedKeys /= undefined, + NFremovedKeys /= undefined -> + 'erlang_++'(PFremovedKeys, NFremovedKeys, + TrUserData); + PFremovedKeys == undefined -> NFremovedKeys; + NFremovedKeys == undefined -> PFremovedKeys + end}. + +merge_msg_ApbMapNestedUpdate(#'ApbMapNestedUpdate'{key = + PFkey, + update = PFupdate}, + #'ApbMapNestedUpdate'{key = NFkey, + update = NFupdate}, + TrUserData) -> + #'ApbMapNestedUpdate'{key = + merge_msg_ApbMapKey(PFkey, NFkey, TrUserData), + update = + merge_msg_ApbUpdateOperation(PFupdate, NFupdate, + TrUserData)}. + +merge_msg_ApbGetMapResp(#'ApbGetMapResp'{entries = + PFentries}, + #'ApbGetMapResp'{entries = NFentries}, TrUserData) -> + #'ApbGetMapResp'{entries = + if PFentries /= undefined, NFentries /= undefined -> + 'erlang_++'(PFentries, NFentries, TrUserData); + PFentries == undefined -> NFentries; + NFentries == undefined -> PFentries + end}. + +merge_msg_ApbMapEntry(#'ApbMapEntry'{key = PFkey, + value = PFvalue}, + #'ApbMapEntry'{key = NFkey, value = NFvalue}, + TrUserData) -> + #'ApbMapEntry'{key = + merge_msg_ApbMapKey(PFkey, NFkey, TrUserData), + value = + merge_msg_ApbReadObjectResp(PFvalue, NFvalue, + TrUserData)}. + +merge_msg_ApbFlagUpdate(#'ApbFlagUpdate'{}, + #'ApbFlagUpdate'{value = NFvalue}, _) -> + #'ApbFlagUpdate'{value = NFvalue}. + +merge_msg_ApbGetFlagResp(#'ApbGetFlagResp'{}, + #'ApbGetFlagResp'{value = NFvalue}, _) -> + #'ApbGetFlagResp'{value = NFvalue}. + +merge_msg_ApbCrdtReset(_Prev, New, _TrUserData) -> New. + +merge_msg_ApbOperationResp(#'ApbOperationResp'{errorcode + = PFerrorcode}, + #'ApbOperationResp'{success = NFsuccess, + errorcode = NFerrorcode}, + _) -> + #'ApbOperationResp'{success = NFsuccess, + errorcode = + if NFerrorcode =:= undefined -> PFerrorcode; + true -> NFerrorcode + end}. + +merge_msg_ApbTxnProperties(#'ApbTxnProperties'{read_write + = PFread_write, + red_blue = PFred_blue}, + #'ApbTxnProperties'{read_write = NFread_write, + red_blue = NFred_blue}, + _) -> + #'ApbTxnProperties'{read_write = + if NFread_write =:= undefined -> PFread_write; + true -> NFread_write + end, + red_blue = + if NFred_blue =:= undefined -> PFred_blue; + true -> NFred_blue + end}. + +merge_msg_ApbBoundObject(#'ApbBoundObject'{}, + #'ApbBoundObject'{key = NFkey, type = NFtype, + bucket = NFbucket}, + _) -> + #'ApbBoundObject'{key = NFkey, type = NFtype, + bucket = NFbucket}. + +merge_msg_ApbReadObjects(#'ApbReadObjects'{boundobjects + = PFboundobjects}, + #'ApbReadObjects'{boundobjects = NFboundobjects, + transaction_descriptor = + NFtransaction_descriptor}, + TrUserData) -> + #'ApbReadObjects'{boundobjects = + if PFboundobjects /= undefined, + NFboundobjects /= undefined -> + 'erlang_++'(PFboundobjects, NFboundobjects, + TrUserData); + PFboundobjects == undefined -> NFboundobjects; + NFboundobjects == undefined -> PFboundobjects + end, + transaction_descriptor = NFtransaction_descriptor}. + +merge_msg_ApbUpdateOp(#'ApbUpdateOp'{boundobject = + PFboundobject, + operation = PFoperation}, + #'ApbUpdateOp'{boundobject = NFboundobject, + operation = NFoperation}, + TrUserData) -> + #'ApbUpdateOp'{boundobject = + merge_msg_ApbBoundObject(PFboundobject, NFboundobject, + TrUserData), + operation = + merge_msg_ApbUpdateOperation(PFoperation, NFoperation, + TrUserData)}. + +merge_msg_ApbUpdateOperation(#'ApbUpdateOperation'{counterop + = PFcounterop, + setop = PFsetop, + regop = PFregop, + mapop = PFmapop, + resetop = PFresetop, + flagop = PFflagop}, + #'ApbUpdateOperation'{counterop = NFcounterop, + setop = NFsetop, + regop = NFregop, + mapop = NFmapop, + resetop = NFresetop, + flagop = NFflagop}, + TrUserData) -> + #'ApbUpdateOperation'{counterop = + if PFcounterop /= undefined, + NFcounterop /= undefined -> + merge_msg_ApbCounterUpdate(PFcounterop, + NFcounterop, + TrUserData); + PFcounterop == undefined -> NFcounterop; + NFcounterop == undefined -> PFcounterop + end, + setop = + if PFsetop /= undefined, NFsetop /= undefined -> + merge_msg_ApbSetUpdate(PFsetop, NFsetop, + TrUserData); + PFsetop == undefined -> NFsetop; + NFsetop == undefined -> PFsetop + end, + regop = + if PFregop /= undefined, NFregop /= undefined -> + merge_msg_ApbRegUpdate(PFregop, NFregop, + TrUserData); + PFregop == undefined -> NFregop; + NFregop == undefined -> PFregop + end, + mapop = + if PFmapop /= undefined, NFmapop /= undefined -> + merge_msg_ApbMapUpdate(PFmapop, NFmapop, + TrUserData); + PFmapop == undefined -> NFmapop; + NFmapop == undefined -> PFmapop + end, + resetop = + if PFresetop /= undefined, + NFresetop /= undefined -> + merge_msg_ApbCrdtReset(PFresetop, + NFresetop, + TrUserData); + PFresetop == undefined -> NFresetop; + NFresetop == undefined -> PFresetop + end, + flagop = + if PFflagop /= undefined, NFflagop /= undefined -> + merge_msg_ApbFlagUpdate(PFflagop, NFflagop, + TrUserData); + PFflagop == undefined -> NFflagop; + NFflagop == undefined -> PFflagop + end}. + +merge_msg_ApbUpdateObjects(#'ApbUpdateObjects'{updates = + PFupdates}, + #'ApbUpdateObjects'{updates = NFupdates, + transaction_descriptor = + NFtransaction_descriptor}, + TrUserData) -> + #'ApbUpdateObjects'{updates = + if PFupdates /= undefined, NFupdates /= undefined -> + 'erlang_++'(PFupdates, NFupdates, + TrUserData); + PFupdates == undefined -> NFupdates; + NFupdates == undefined -> PFupdates + end, + transaction_descriptor = NFtransaction_descriptor}. + +merge_msg_ApbStartTransaction(#'ApbStartTransaction'{timestamp + = PFtimestamp, + properties = PFproperties}, + #'ApbStartTransaction'{timestamp = NFtimestamp, + properties = NFproperties}, + TrUserData) -> + #'ApbStartTransaction'{timestamp = + if NFtimestamp =:= undefined -> PFtimestamp; + true -> NFtimestamp + end, + properties = + if PFproperties /= undefined, + NFproperties /= undefined -> + merge_msg_ApbTxnProperties(PFproperties, + NFproperties, + TrUserData); + PFproperties == undefined -> NFproperties; + NFproperties == undefined -> PFproperties + end}. + +merge_msg_ApbAbortTransaction(#'ApbAbortTransaction'{}, + #'ApbAbortTransaction'{transaction_descriptor = + NFtransaction_descriptor}, + _) -> + #'ApbAbortTransaction'{transaction_descriptor = + NFtransaction_descriptor}. + +merge_msg_ApbCommitTransaction(#'ApbCommitTransaction'{}, + #'ApbCommitTransaction'{transaction_descriptor = + NFtransaction_descriptor}, + _) -> + #'ApbCommitTransaction'{transaction_descriptor = + NFtransaction_descriptor}. + +merge_msg_ApbStaticUpdateObjects(#'ApbStaticUpdateObjects'{transaction + = PFtransaction, + updates = PFupdates}, + #'ApbStaticUpdateObjects'{transaction = + NFtransaction, + updates = NFupdates}, + TrUserData) -> + #'ApbStaticUpdateObjects'{transaction = + merge_msg_ApbStartTransaction(PFtransaction, + NFtransaction, + TrUserData), + updates = + if PFupdates /= undefined, + NFupdates /= undefined -> + 'erlang_++'(PFupdates, NFupdates, + TrUserData); + PFupdates == undefined -> NFupdates; + NFupdates == undefined -> PFupdates + end}. + +merge_msg_ApbStaticReadObjects(#'ApbStaticReadObjects'{transaction + = PFtransaction, + objects = PFobjects}, + #'ApbStaticReadObjects'{transaction = + NFtransaction, + objects = NFobjects}, + TrUserData) -> + #'ApbStaticReadObjects'{transaction = + merge_msg_ApbStartTransaction(PFtransaction, + NFtransaction, + TrUserData), + objects = + if PFobjects /= undefined, + NFobjects /= undefined -> + 'erlang_++'(PFobjects, NFobjects, + TrUserData); + PFobjects == undefined -> NFobjects; + NFobjects == undefined -> PFobjects + end}. + +merge_msg_ApbStartTransactionResp(#'ApbStartTransactionResp'{transaction_descriptor + = + PFtransaction_descriptor, + errorcode = + PFerrorcode}, + #'ApbStartTransactionResp'{success = + NFsuccess, + transaction_descriptor + = + NFtransaction_descriptor, + errorcode = + NFerrorcode}, + _) -> + #'ApbStartTransactionResp'{success = NFsuccess, + transaction_descriptor = + if NFtransaction_descriptor =:= undefined -> + PFtransaction_descriptor; + true -> NFtransaction_descriptor + end, + errorcode = + if NFerrorcode =:= undefined -> PFerrorcode; + true -> NFerrorcode + end}. + +merge_msg_ApbReadObjectResp(#'ApbReadObjectResp'{counter + = PFcounter, + set = PFset, reg = PFreg, + mvreg = PFmvreg, map = PFmap, + flag = PFflag}, + #'ApbReadObjectResp'{counter = NFcounter, + set = NFset, reg = NFreg, + mvreg = NFmvreg, map = NFmap, + flag = NFflag}, + TrUserData) -> + #'ApbReadObjectResp'{counter = + if PFcounter /= undefined, + NFcounter /= undefined -> + merge_msg_ApbGetCounterResp(PFcounter, + NFcounter, + TrUserData); + PFcounter == undefined -> NFcounter; + NFcounter == undefined -> PFcounter + end, + set = + if PFset /= undefined, NFset /= undefined -> + merge_msg_ApbGetSetResp(PFset, NFset, + TrUserData); + PFset == undefined -> NFset; + NFset == undefined -> PFset + end, + reg = + if PFreg /= undefined, NFreg /= undefined -> + merge_msg_ApbGetRegResp(PFreg, NFreg, + TrUserData); + PFreg == undefined -> NFreg; + NFreg == undefined -> PFreg + end, + mvreg = + if PFmvreg /= undefined, NFmvreg /= undefined -> + merge_msg_ApbGetMVRegResp(PFmvreg, NFmvreg, + TrUserData); + PFmvreg == undefined -> NFmvreg; + NFmvreg == undefined -> PFmvreg + end, + map = + if PFmap /= undefined, NFmap /= undefined -> + merge_msg_ApbGetMapResp(PFmap, NFmap, + TrUserData); + PFmap == undefined -> NFmap; + NFmap == undefined -> PFmap + end, + flag = + if PFflag /= undefined, NFflag /= undefined -> + merge_msg_ApbGetFlagResp(PFflag, NFflag, + TrUserData); + PFflag == undefined -> NFflag; + NFflag == undefined -> PFflag + end}. + +merge_msg_ApbReadObjectsResp(#'ApbReadObjectsResp'{objects + = PFobjects, + errorcode = PFerrorcode}, + #'ApbReadObjectsResp'{success = NFsuccess, + objects = NFobjects, + errorcode = NFerrorcode}, + TrUserData) -> + #'ApbReadObjectsResp'{success = NFsuccess, + objects = + if PFobjects /= undefined, + NFobjects /= undefined -> + 'erlang_++'(PFobjects, NFobjects, + TrUserData); + PFobjects == undefined -> NFobjects; + NFobjects == undefined -> PFobjects + end, + errorcode = + if NFerrorcode =:= undefined -> PFerrorcode; + true -> NFerrorcode + end}. + +merge_msg_ApbCommitResp(#'ApbCommitResp'{commit_time = + PFcommit_time, + errorcode = PFerrorcode}, + #'ApbCommitResp'{success = NFsuccess, + commit_time = NFcommit_time, + errorcode = NFerrorcode}, + _) -> + #'ApbCommitResp'{success = NFsuccess, + commit_time = + if NFcommit_time =:= undefined -> PFcommit_time; + true -> NFcommit_time + end, + errorcode = + if NFerrorcode =:= undefined -> PFerrorcode; + true -> NFerrorcode + end}. + +merge_msg_ApbStaticReadObjectsResp(#'ApbStaticReadObjectsResp'{objects + = PFobjects, + committime = + PFcommittime}, + #'ApbStaticReadObjectsResp'{objects = + NFobjects, + committime = + NFcommittime}, + TrUserData) -> + #'ApbStaticReadObjectsResp'{objects = + merge_msg_ApbReadObjectsResp(PFobjects, + NFobjects, + TrUserData), + committime = + merge_msg_ApbCommitResp(PFcommittime, + NFcommittime, + TrUserData)}. + + +verify_msg(Msg) -> verify_msg(Msg, []). + +verify_msg(Msg, Opts) -> + TrUserData = proplists:get_value(user_data, Opts), + case Msg of + #'ApbErrorResp'{} -> + v_msg_ApbErrorResp(Msg, ['ApbErrorResp'], TrUserData); + #'ApbCounterUpdate'{} -> + v_msg_ApbCounterUpdate(Msg, ['ApbCounterUpdate'], + TrUserData); + #'ApbGetCounterResp'{} -> + v_msg_ApbGetCounterResp(Msg, ['ApbGetCounterResp'], + TrUserData); + #'ApbSetUpdate'{} -> + v_msg_ApbSetUpdate(Msg, ['ApbSetUpdate'], TrUserData); + #'ApbGetSetResp'{} -> + v_msg_ApbGetSetResp(Msg, ['ApbGetSetResp'], TrUserData); + #'ApbRegUpdate'{} -> + v_msg_ApbRegUpdate(Msg, ['ApbRegUpdate'], TrUserData); + #'ApbGetRegResp'{} -> + v_msg_ApbGetRegResp(Msg, ['ApbGetRegResp'], TrUserData); + #'ApbGetMVRegResp'{} -> + v_msg_ApbGetMVRegResp(Msg, ['ApbGetMVRegResp'], + TrUserData); + #'ApbMapKey'{} -> + v_msg_ApbMapKey(Msg, ['ApbMapKey'], TrUserData); + #'ApbMapUpdate'{} -> + v_msg_ApbMapUpdate(Msg, ['ApbMapUpdate'], TrUserData); + #'ApbMapNestedUpdate'{} -> + v_msg_ApbMapNestedUpdate(Msg, ['ApbMapNestedUpdate'], + TrUserData); + #'ApbGetMapResp'{} -> + v_msg_ApbGetMapResp(Msg, ['ApbGetMapResp'], TrUserData); + #'ApbMapEntry'{} -> + v_msg_ApbMapEntry(Msg, ['ApbMapEntry'], TrUserData); + #'ApbFlagUpdate'{} -> + v_msg_ApbFlagUpdate(Msg, ['ApbFlagUpdate'], TrUserData); + #'ApbGetFlagResp'{} -> + v_msg_ApbGetFlagResp(Msg, ['ApbGetFlagResp'], + TrUserData); + #'ApbCrdtReset'{} -> + v_msg_ApbCrdtReset(Msg, ['ApbCrdtReset'], TrUserData); + #'ApbOperationResp'{} -> + v_msg_ApbOperationResp(Msg, ['ApbOperationResp'], + TrUserData); + #'ApbTxnProperties'{} -> + v_msg_ApbTxnProperties(Msg, ['ApbTxnProperties'], + TrUserData); + #'ApbBoundObject'{} -> + v_msg_ApbBoundObject(Msg, ['ApbBoundObject'], + TrUserData); + #'ApbReadObjects'{} -> + v_msg_ApbReadObjects(Msg, ['ApbReadObjects'], + TrUserData); + #'ApbUpdateOp'{} -> + v_msg_ApbUpdateOp(Msg, ['ApbUpdateOp'], TrUserData); + #'ApbUpdateOperation'{} -> + v_msg_ApbUpdateOperation(Msg, ['ApbUpdateOperation'], + TrUserData); + #'ApbUpdateObjects'{} -> + v_msg_ApbUpdateObjects(Msg, ['ApbUpdateObjects'], + TrUserData); + #'ApbStartTransaction'{} -> + v_msg_ApbStartTransaction(Msg, ['ApbStartTransaction'], + TrUserData); + #'ApbAbortTransaction'{} -> + v_msg_ApbAbortTransaction(Msg, ['ApbAbortTransaction'], + TrUserData); + #'ApbCommitTransaction'{} -> + v_msg_ApbCommitTransaction(Msg, + ['ApbCommitTransaction'], TrUserData); + #'ApbStaticUpdateObjects'{} -> + v_msg_ApbStaticUpdateObjects(Msg, + ['ApbStaticUpdateObjects'], TrUserData); + #'ApbStaticReadObjects'{} -> + v_msg_ApbStaticReadObjects(Msg, + ['ApbStaticReadObjects'], TrUserData); + #'ApbStartTransactionResp'{} -> + v_msg_ApbStartTransactionResp(Msg, + ['ApbStartTransactionResp'], + TrUserData); + #'ApbReadObjectResp'{} -> + v_msg_ApbReadObjectResp(Msg, ['ApbReadObjectResp'], + TrUserData); + #'ApbReadObjectsResp'{} -> + v_msg_ApbReadObjectsResp(Msg, ['ApbReadObjectsResp'], + TrUserData); + #'ApbCommitResp'{} -> + v_msg_ApbCommitResp(Msg, ['ApbCommitResp'], TrUserData); + #'ApbStaticReadObjectsResp'{} -> + v_msg_ApbStaticReadObjectsResp(Msg, + ['ApbStaticReadObjectsResp'], + TrUserData); + _ -> mk_type_error(not_a_known_message, Msg, []) + end. + + +-dialyzer({nowarn_function,v_msg_ApbErrorResp/3}). +v_msg_ApbErrorResp(#'ApbErrorResp'{errmsg = F1, + errcode = F2}, + Path, _) -> + v_type_bytes(F1, [errmsg | Path]), + v_type_uint32(F2, [errcode | Path]), + ok. + +-dialyzer({nowarn_function,v_msg_ApbCounterUpdate/3}). +v_msg_ApbCounterUpdate(#'ApbCounterUpdate'{inc = F1}, + Path, _) -> + if F1 == undefined -> ok; + true -> v_type_sint64(F1, [inc | Path]) + end, + ok; +v_msg_ApbCounterUpdate(X, Path, _TrUserData) -> + mk_type_error({expected_msg, 'ApbCounterUpdate'}, X, + Path). + +-dialyzer({nowarn_function,v_msg_ApbGetCounterResp/3}). +v_msg_ApbGetCounterResp(#'ApbGetCounterResp'{value = + F1}, + Path, _) -> + v_type_sint32(F1, [value | Path]), ok; +v_msg_ApbGetCounterResp(X, Path, _TrUserData) -> + mk_type_error({expected_msg, 'ApbGetCounterResp'}, X, + Path). + +-dialyzer({nowarn_function,v_msg_ApbSetUpdate/3}). +v_msg_ApbSetUpdate(#'ApbSetUpdate'{optype = F1, + adds = F2, rems = F3}, + Path, _) -> + 'v_enum_ApbSetUpdate.SetOpType'(F1, [optype | Path]), + if is_list(F2) -> + _ = [v_type_bytes(Elem, [adds | Path]) || Elem <- F2], + ok; + true -> + mk_type_error({invalid_list_of, bytes}, F2, + [adds | Path]) + end, + if is_list(F3) -> + _ = [v_type_bytes(Elem, [rems | Path]) || Elem <- F3], + ok; + true -> + mk_type_error({invalid_list_of, bytes}, F3, + [rems | Path]) + end, + ok; +v_msg_ApbSetUpdate(X, Path, _TrUserData) -> + mk_type_error({expected_msg, 'ApbSetUpdate'}, X, Path). + +-dialyzer({nowarn_function,v_msg_ApbGetSetResp/3}). +v_msg_ApbGetSetResp(#'ApbGetSetResp'{value = F1}, Path, + _) -> + if is_list(F1) -> + _ = [v_type_bytes(Elem, [value | Path]) || Elem <- F1], + ok; + true -> + mk_type_error({invalid_list_of, bytes}, F1, + [value | Path]) + end, + ok; +v_msg_ApbGetSetResp(X, Path, _TrUserData) -> + mk_type_error({expected_msg, 'ApbGetSetResp'}, X, Path). + +-dialyzer({nowarn_function,v_msg_ApbRegUpdate/3}). +v_msg_ApbRegUpdate(#'ApbRegUpdate'{value = F1}, Path, + _) -> + v_type_bytes(F1, [value | Path]), ok; +v_msg_ApbRegUpdate(X, Path, _TrUserData) -> + mk_type_error({expected_msg, 'ApbRegUpdate'}, X, Path). + +-dialyzer({nowarn_function,v_msg_ApbGetRegResp/3}). +v_msg_ApbGetRegResp(#'ApbGetRegResp'{value = F1}, Path, + _) -> + v_type_bytes(F1, [value | Path]), ok; +v_msg_ApbGetRegResp(X, Path, _TrUserData) -> + mk_type_error({expected_msg, 'ApbGetRegResp'}, X, Path). + +-dialyzer({nowarn_function,v_msg_ApbGetMVRegResp/3}). +v_msg_ApbGetMVRegResp(#'ApbGetMVRegResp'{values = F1}, + Path, _) -> + if is_list(F1) -> + _ = [v_type_bytes(Elem, [values | Path]) || Elem <- F1], + ok; + true -> + mk_type_error({invalid_list_of, bytes}, F1, + [values | Path]) + end, + ok; +v_msg_ApbGetMVRegResp(X, Path, _TrUserData) -> + mk_type_error({expected_msg, 'ApbGetMVRegResp'}, X, + Path). + +-dialyzer({nowarn_function,v_msg_ApbMapKey/3}). +v_msg_ApbMapKey(#'ApbMapKey'{key = F1, type = F2}, Path, + _) -> + v_type_bytes(F1, [key | Path]), + v_enum_CRDT_type(F2, [type | Path]), + ok; +v_msg_ApbMapKey(X, Path, _TrUserData) -> + mk_type_error({expected_msg, 'ApbMapKey'}, X, Path). + +-dialyzer({nowarn_function,v_msg_ApbMapUpdate/3}). +v_msg_ApbMapUpdate(#'ApbMapUpdate'{updates = F1, + removedKeys = F2}, + Path, TrUserData) -> + if is_list(F1) -> + _ = [v_msg_ApbMapNestedUpdate(Elem, [updates | Path], + TrUserData) + || Elem <- F1], + ok; + true -> + mk_type_error({invalid_list_of, + {msg, 'ApbMapNestedUpdate'}}, + F1, [updates | Path]) + end, + if is_list(F2) -> + _ = [v_msg_ApbMapKey(Elem, [removedKeys | Path], + TrUserData) + || Elem <- F2], + ok; + true -> + mk_type_error({invalid_list_of, {msg, 'ApbMapKey'}}, F2, + [removedKeys | Path]) + end, + ok; +v_msg_ApbMapUpdate(X, Path, _TrUserData) -> + mk_type_error({expected_msg, 'ApbMapUpdate'}, X, Path). + +-dialyzer({nowarn_function,v_msg_ApbMapNestedUpdate/3}). +v_msg_ApbMapNestedUpdate(#'ApbMapNestedUpdate'{key = F1, + update = F2}, + Path, TrUserData) -> + v_msg_ApbMapKey(F1, [key | Path], TrUserData), + v_msg_ApbUpdateOperation(F2, [update | Path], + TrUserData), + ok; +v_msg_ApbMapNestedUpdate(X, Path, _TrUserData) -> + mk_type_error({expected_msg, 'ApbMapNestedUpdate'}, X, + Path). + +-dialyzer({nowarn_function,v_msg_ApbGetMapResp/3}). +v_msg_ApbGetMapResp(#'ApbGetMapResp'{entries = F1}, + Path, TrUserData) -> + if is_list(F1) -> + _ = [v_msg_ApbMapEntry(Elem, [entries | Path], + TrUserData) + || Elem <- F1], + ok; + true -> + mk_type_error({invalid_list_of, {msg, 'ApbMapEntry'}}, + F1, [entries | Path]) + end, + ok; +v_msg_ApbGetMapResp(X, Path, _TrUserData) -> + mk_type_error({expected_msg, 'ApbGetMapResp'}, X, Path). + +-dialyzer({nowarn_function,v_msg_ApbMapEntry/3}). +v_msg_ApbMapEntry(#'ApbMapEntry'{key = F1, value = F2}, + Path, TrUserData) -> + v_msg_ApbMapKey(F1, [key | Path], TrUserData), + v_msg_ApbReadObjectResp(F2, [value | Path], TrUserData), + ok; +v_msg_ApbMapEntry(X, Path, _TrUserData) -> + mk_type_error({expected_msg, 'ApbMapEntry'}, X, Path). + +-dialyzer({nowarn_function,v_msg_ApbFlagUpdate/3}). +v_msg_ApbFlagUpdate(#'ApbFlagUpdate'{value = F1}, Path, + _) -> + v_type_bool(F1, [value | Path]), ok; +v_msg_ApbFlagUpdate(X, Path, _TrUserData) -> + mk_type_error({expected_msg, 'ApbFlagUpdate'}, X, Path). + +-dialyzer({nowarn_function,v_msg_ApbGetFlagResp/3}). +v_msg_ApbGetFlagResp(#'ApbGetFlagResp'{value = F1}, + Path, _) -> + v_type_bool(F1, [value | Path]), ok; +v_msg_ApbGetFlagResp(X, Path, _TrUserData) -> + mk_type_error({expected_msg, 'ApbGetFlagResp'}, X, + Path). + +-dialyzer({nowarn_function,v_msg_ApbCrdtReset/3}). +v_msg_ApbCrdtReset(#'ApbCrdtReset'{}, _Path, _) -> ok; +v_msg_ApbCrdtReset(X, Path, _TrUserData) -> + mk_type_error({expected_msg, 'ApbCrdtReset'}, X, Path). + +-dialyzer({nowarn_function,v_msg_ApbOperationResp/3}). +v_msg_ApbOperationResp(#'ApbOperationResp'{success = F1, + errorcode = F2}, + Path, _) -> + v_type_bool(F1, [success | Path]), + if F2 == undefined -> ok; + true -> v_type_uint32(F2, [errorcode | Path]) + end, + ok. + +-dialyzer({nowarn_function,v_msg_ApbTxnProperties/3}). +v_msg_ApbTxnProperties(#'ApbTxnProperties'{read_write = + F1, + red_blue = F2}, + Path, _) -> + if F1 == undefined -> ok; + true -> v_type_uint32(F1, [read_write | Path]) + end, + if F2 == undefined -> ok; + true -> v_type_uint32(F2, [red_blue | Path]) + end, + ok; +v_msg_ApbTxnProperties(X, Path, _TrUserData) -> + mk_type_error({expected_msg, 'ApbTxnProperties'}, X, + Path). + +-dialyzer({nowarn_function,v_msg_ApbBoundObject/3}). +v_msg_ApbBoundObject(#'ApbBoundObject'{key = F1, + type = F2, bucket = F3}, + Path, _) -> + v_type_bytes(F1, [key | Path]), + v_enum_CRDT_type(F2, [type | Path]), + v_type_bytes(F3, [bucket | Path]), + ok; +v_msg_ApbBoundObject(X, Path, _TrUserData) -> + mk_type_error({expected_msg, 'ApbBoundObject'}, X, + Path). + +-dialyzer({nowarn_function,v_msg_ApbReadObjects/3}). +v_msg_ApbReadObjects(#'ApbReadObjects'{boundobjects = + F1, + transaction_descriptor = F2}, + Path, TrUserData) -> + if is_list(F1) -> + _ = [v_msg_ApbBoundObject(Elem, [boundobjects | Path], + TrUserData) + || Elem <- F1], + ok; + true -> + mk_type_error({invalid_list_of, + {msg, 'ApbBoundObject'}}, + F1, [boundobjects | Path]) + end, + v_type_bytes(F2, [transaction_descriptor | Path]), + ok. + +-dialyzer({nowarn_function,v_msg_ApbUpdateOp/3}). +v_msg_ApbUpdateOp(#'ApbUpdateOp'{boundobject = F1, + operation = F2}, + Path, TrUserData) -> + v_msg_ApbBoundObject(F1, [boundobject | Path], + TrUserData), + v_msg_ApbUpdateOperation(F2, [operation | Path], + TrUserData), + ok; +v_msg_ApbUpdateOp(X, Path, _TrUserData) -> + mk_type_error({expected_msg, 'ApbUpdateOp'}, X, Path). + +-dialyzer({nowarn_function,v_msg_ApbUpdateOperation/3}). +v_msg_ApbUpdateOperation(#'ApbUpdateOperation'{counterop + = F1, + setop = F2, regop = F3, + mapop = F4, resetop = F5, + flagop = F6}, + Path, TrUserData) -> + if F1 == undefined -> ok; + true -> + v_msg_ApbCounterUpdate(F1, [counterop | Path], + TrUserData) + end, + if F2 == undefined -> ok; + true -> + v_msg_ApbSetUpdate(F2, [setop | Path], TrUserData) + end, + if F3 == undefined -> ok; + true -> + v_msg_ApbRegUpdate(F3, [regop | Path], TrUserData) + end, + if F4 == undefined -> ok; + true -> + v_msg_ApbMapUpdate(F4, [mapop | Path], TrUserData) + end, + if F5 == undefined -> ok; + true -> + v_msg_ApbCrdtReset(F5, [resetop | Path], TrUserData) + end, + if F6 == undefined -> ok; + true -> + v_msg_ApbFlagUpdate(F6, [flagop | Path], TrUserData) + end, + ok; +v_msg_ApbUpdateOperation(X, Path, _TrUserData) -> + mk_type_error({expected_msg, 'ApbUpdateOperation'}, X, + Path). + +-dialyzer({nowarn_function,v_msg_ApbUpdateObjects/3}). +v_msg_ApbUpdateObjects(#'ApbUpdateObjects'{updates = F1, + transaction_descriptor = F2}, + Path, TrUserData) -> + if is_list(F1) -> + _ = [v_msg_ApbUpdateOp(Elem, [updates | Path], + TrUserData) + || Elem <- F1], + ok; + true -> + mk_type_error({invalid_list_of, {msg, 'ApbUpdateOp'}}, + F1, [updates | Path]) + end, + v_type_bytes(F2, [transaction_descriptor | Path]), + ok. + +-dialyzer({nowarn_function,v_msg_ApbStartTransaction/3}). +v_msg_ApbStartTransaction(#'ApbStartTransaction'{timestamp + = F1, + properties = F2}, + Path, TrUserData) -> + if F1 == undefined -> ok; + true -> v_type_bytes(F1, [timestamp | Path]) + end, + if F2 == undefined -> ok; + true -> + v_msg_ApbTxnProperties(F2, [properties | Path], + TrUserData) + end, + ok; +v_msg_ApbStartTransaction(X, Path, _TrUserData) -> + mk_type_error({expected_msg, 'ApbStartTransaction'}, X, + Path). + +-dialyzer({nowarn_function,v_msg_ApbAbortTransaction/3}). +v_msg_ApbAbortTransaction(#'ApbAbortTransaction'{transaction_descriptor + = F1}, + Path, _) -> + v_type_bytes(F1, [transaction_descriptor | Path]), ok. + +-dialyzer({nowarn_function,v_msg_ApbCommitTransaction/3}). +v_msg_ApbCommitTransaction(#'ApbCommitTransaction'{transaction_descriptor + = F1}, + Path, _) -> + v_type_bytes(F1, [transaction_descriptor | Path]), ok. + +-dialyzer({nowarn_function,v_msg_ApbStaticUpdateObjects/3}). +v_msg_ApbStaticUpdateObjects(#'ApbStaticUpdateObjects'{transaction + = F1, + updates = F2}, + Path, TrUserData) -> + v_msg_ApbStartTransaction(F1, [transaction | Path], + TrUserData), + if is_list(F2) -> + _ = [v_msg_ApbUpdateOp(Elem, [updates | Path], + TrUserData) + || Elem <- F2], + ok; + true -> + mk_type_error({invalid_list_of, {msg, 'ApbUpdateOp'}}, + F2, [updates | Path]) + end, + ok. + +-dialyzer({nowarn_function,v_msg_ApbStaticReadObjects/3}). +v_msg_ApbStaticReadObjects(#'ApbStaticReadObjects'{transaction + = F1, + objects = F2}, + Path, TrUserData) -> + v_msg_ApbStartTransaction(F1, [transaction | Path], + TrUserData), + if is_list(F2) -> + _ = [v_msg_ApbBoundObject(Elem, [objects | Path], + TrUserData) + || Elem <- F2], + ok; + true -> + mk_type_error({invalid_list_of, + {msg, 'ApbBoundObject'}}, + F2, [objects | Path]) + end, + ok. + +-dialyzer({nowarn_function,v_msg_ApbStartTransactionResp/3}). +v_msg_ApbStartTransactionResp(#'ApbStartTransactionResp'{success + = F1, + transaction_descriptor + = F2, + errorcode = F3}, + Path, _) -> + v_type_bool(F1, [success | Path]), + if F2 == undefined -> ok; + true -> + v_type_bytes(F2, [transaction_descriptor | Path]) + end, + if F3 == undefined -> ok; + true -> v_type_uint32(F3, [errorcode | Path]) + end, + ok. + +-dialyzer({nowarn_function,v_msg_ApbReadObjectResp/3}). +v_msg_ApbReadObjectResp(#'ApbReadObjectResp'{counter = + F1, + set = F2, reg = F3, mvreg = F4, + map = F5, flag = F6}, + Path, TrUserData) -> + if F1 == undefined -> ok; + true -> + v_msg_ApbGetCounterResp(F1, [counter | Path], + TrUserData) + end, + if F2 == undefined -> ok; + true -> + v_msg_ApbGetSetResp(F2, [set | Path], TrUserData) + end, + if F3 == undefined -> ok; + true -> + v_msg_ApbGetRegResp(F3, [reg | Path], TrUserData) + end, + if F4 == undefined -> ok; + true -> + v_msg_ApbGetMVRegResp(F4, [mvreg | Path], TrUserData) + end, + if F5 == undefined -> ok; + true -> + v_msg_ApbGetMapResp(F5, [map | Path], TrUserData) + end, + if F6 == undefined -> ok; + true -> + v_msg_ApbGetFlagResp(F6, [flag | Path], TrUserData) + end, + ok; +v_msg_ApbReadObjectResp(X, Path, _TrUserData) -> + mk_type_error({expected_msg, 'ApbReadObjectResp'}, X, + Path). + +-dialyzer({nowarn_function,v_msg_ApbReadObjectsResp/3}). +v_msg_ApbReadObjectsResp(#'ApbReadObjectsResp'{success = + F1, + objects = F2, errorcode = F3}, + Path, TrUserData) -> + v_type_bool(F1, [success | Path]), + if is_list(F2) -> + _ = [v_msg_ApbReadObjectResp(Elem, [objects | Path], + TrUserData) + || Elem <- F2], + ok; + true -> + mk_type_error({invalid_list_of, + {msg, 'ApbReadObjectResp'}}, + F2, [objects | Path]) + end, + if F3 == undefined -> ok; + true -> v_type_uint32(F3, [errorcode | Path]) + end, + ok; +v_msg_ApbReadObjectsResp(X, Path, _TrUserData) -> + mk_type_error({expected_msg, 'ApbReadObjectsResp'}, X, + Path). + +-dialyzer({nowarn_function,v_msg_ApbCommitResp/3}). +v_msg_ApbCommitResp(#'ApbCommitResp'{success = F1, + commit_time = F2, errorcode = F3}, + Path, _) -> + v_type_bool(F1, [success | Path]), + if F2 == undefined -> ok; + true -> v_type_bytes(F2, [commit_time | Path]) + end, + if F3 == undefined -> ok; + true -> v_type_uint32(F3, [errorcode | Path]) + end, + ok; +v_msg_ApbCommitResp(X, Path, _TrUserData) -> + mk_type_error({expected_msg, 'ApbCommitResp'}, X, Path). + +-dialyzer({nowarn_function,v_msg_ApbStaticReadObjectsResp/3}). +v_msg_ApbStaticReadObjectsResp(#'ApbStaticReadObjectsResp'{objects + = F1, + committime = F2}, + Path, TrUserData) -> + v_msg_ApbReadObjectsResp(F1, [objects | Path], + TrUserData), + v_msg_ApbCommitResp(F2, [committime | Path], + TrUserData), + ok. + +-dialyzer({nowarn_function,v_enum_CRDT_type/2}). +v_enum_CRDT_type('COUNTER', _Path) -> ok; +v_enum_CRDT_type('ORSET', _Path) -> ok; +v_enum_CRDT_type('LWWREG', _Path) -> ok; +v_enum_CRDT_type('MVREG', _Path) -> ok; +v_enum_CRDT_type('GMAP', _Path) -> ok; +v_enum_CRDT_type('RWSET', _Path) -> ok; +v_enum_CRDT_type('RRMAP', _Path) -> ok; +v_enum_CRDT_type('FATCOUNTER', _Path) -> ok; +v_enum_CRDT_type('FLAG_EW', _Path) -> ok; +v_enum_CRDT_type('FLAG_DW', _Path) -> ok; +v_enum_CRDT_type(V, Path) when is_integer(V) -> + v_type_sint32(V, Path); +v_enum_CRDT_type(X, Path) -> + mk_type_error({invalid_enum, 'CRDT_type'}, X, Path). + +-dialyzer({nowarn_function,'v_enum_ApbSetUpdate.SetOpType'/2}). +'v_enum_ApbSetUpdate.SetOpType'('ADD', _Path) -> ok; +'v_enum_ApbSetUpdate.SetOpType'('REMOVE', _Path) -> ok; +'v_enum_ApbSetUpdate.SetOpType'(V, Path) + when is_integer(V) -> + v_type_sint32(V, Path); +'v_enum_ApbSetUpdate.SetOpType'(X, Path) -> + mk_type_error({invalid_enum, 'ApbSetUpdate.SetOpType'}, + X, Path). + +-dialyzer({nowarn_function,v_type_sint32/2}). +v_type_sint32(N, _Path) + when -2147483648 =< N, N =< 2147483647 -> + ok; +v_type_sint32(N, Path) when is_integer(N) -> + mk_type_error({value_out_of_range, sint32, signed, 32}, + N, Path); +v_type_sint32(X, Path) -> + mk_type_error({bad_integer, sint32, signed, 32}, X, + Path). + +-dialyzer({nowarn_function,v_type_sint64/2}). +v_type_sint64(N, _Path) + when -9223372036854775808 =< N, + N =< 9223372036854775807 -> + ok; +v_type_sint64(N, Path) when is_integer(N) -> + mk_type_error({value_out_of_range, sint64, signed, 64}, + N, Path); +v_type_sint64(X, Path) -> + mk_type_error({bad_integer, sint64, signed, 64}, X, + Path). + +-dialyzer({nowarn_function,v_type_uint32/2}). +v_type_uint32(N, _Path) when 0 =< N, N =< 4294967295 -> + ok; +v_type_uint32(N, Path) when is_integer(N) -> + mk_type_error({value_out_of_range, uint32, unsigned, + 32}, + N, Path); +v_type_uint32(X, Path) -> + mk_type_error({bad_integer, uint32, unsigned, 32}, X, + Path). + +-dialyzer({nowarn_function,v_type_bool/2}). +v_type_bool(false, _Path) -> ok; +v_type_bool(true, _Path) -> ok; +v_type_bool(0, _Path) -> ok; +v_type_bool(1, _Path) -> ok; +v_type_bool(X, Path) -> + mk_type_error(bad_boolean_value, X, Path). + +-dialyzer({nowarn_function,v_type_bytes/2}). +v_type_bytes(B, _Path) when is_binary(B) -> ok; +v_type_bytes(B, _Path) when is_list(B) -> ok; +v_type_bytes(X, Path) -> + mk_type_error(bad_binary_value, X, Path). + +-spec mk_type_error(_, _, list()) -> no_return(). +mk_type_error(Error, ValueSeen, Path) -> + Path2 = prettify_path(Path), + erlang:error({gpb_type_error, + {Error, [{value, ValueSeen}, {path, Path2}]}}). + + +-dialyzer({nowarn_function,prettify_path/1}). +prettify_path([]) -> top_level; +prettify_path(PathR) -> + list_to_atom(lists:append(lists:join(".", + lists:map(fun atom_to_list/1, + lists:reverse(PathR))))). + + +-compile({inline,id/2}). +id(X, _TrUserData) -> X. + +-compile({inline,cons/3}). +cons(Elem, Acc, _TrUserData) -> [Elem | Acc]. + +-compile({inline,lists_reverse/2}). +'lists_reverse'(L, _TrUserData) -> lists:reverse(L). +-compile({inline,'erlang_++'/3}). +'erlang_++'(A, B, _TrUserData) -> A ++ B. + +get_msg_defs() -> + [{{enum, 'CRDT_type'}, + [{'COUNTER', 3}, {'ORSET', 4}, {'LWWREG', 5}, + {'MVREG', 6}, {'GMAP', 8}, {'RWSET', 10}, {'RRMAP', 11}, + {'FATCOUNTER', 12}, {'FLAG_EW', 13}, {'FLAG_DW', 14}]}, + {{enum, 'ApbSetUpdate.SetOpType'}, + [{'ADD', 1}, {'REMOVE', 2}]}, + {{msg, 'ApbErrorResp'}, + [#field{name = errmsg, fnum = 1, rnum = 2, type = bytes, + occurrence = required, opts = []}, + #field{name = errcode, fnum = 2, rnum = 3, + type = uint32, occurrence = required, opts = []}]}, + {{msg, 'ApbCounterUpdate'}, + [#field{name = inc, fnum = 1, rnum = 2, type = sint64, + occurrence = optional, opts = []}]}, + {{msg, 'ApbGetCounterResp'}, + [#field{name = value, fnum = 1, rnum = 2, type = sint32, + occurrence = required, opts = []}]}, + {{msg, 'ApbSetUpdate'}, + [#field{name = optype, fnum = 1, rnum = 2, + type = {enum, 'ApbSetUpdate.SetOpType'}, + occurrence = required, opts = []}, + #field{name = adds, fnum = 2, rnum = 3, type = bytes, + occurrence = repeated, opts = []}, + #field{name = rems, fnum = 3, rnum = 4, type = bytes, + occurrence = repeated, opts = []}]}, + {{msg, 'ApbGetSetResp'}, + [#field{name = value, fnum = 1, rnum = 2, type = bytes, + occurrence = repeated, opts = []}]}, + {{msg, 'ApbRegUpdate'}, + [#field{name = value, fnum = 1, rnum = 2, type = bytes, + occurrence = required, opts = []}]}, + {{msg, 'ApbGetRegResp'}, + [#field{name = value, fnum = 1, rnum = 2, type = bytes, + occurrence = required, opts = []}]}, + {{msg, 'ApbGetMVRegResp'}, + [#field{name = values, fnum = 1, rnum = 2, type = bytes, + occurrence = repeated, opts = []}]}, + {{msg, 'ApbMapKey'}, + [#field{name = key, fnum = 1, rnum = 2, type = bytes, + occurrence = required, opts = []}, + #field{name = type, fnum = 2, rnum = 3, + type = {enum, 'CRDT_type'}, occurrence = required, + opts = []}]}, + {{msg, 'ApbMapUpdate'}, + [#field{name = updates, fnum = 1, rnum = 2, + type = {msg, 'ApbMapNestedUpdate'}, + occurrence = repeated, opts = []}, + #field{name = removedKeys, fnum = 2, rnum = 3, + type = {msg, 'ApbMapKey'}, occurrence = repeated, + opts = []}]}, + {{msg, 'ApbMapNestedUpdate'}, + [#field{name = key, fnum = 1, rnum = 2, + type = {msg, 'ApbMapKey'}, occurrence = required, + opts = []}, + #field{name = update, fnum = 2, rnum = 3, + type = {msg, 'ApbUpdateOperation'}, + occurrence = required, opts = []}]}, + {{msg, 'ApbGetMapResp'}, + [#field{name = entries, fnum = 1, rnum = 2, + type = {msg, 'ApbMapEntry'}, occurrence = repeated, + opts = []}]}, + {{msg, 'ApbMapEntry'}, + [#field{name = key, fnum = 1, rnum = 2, + type = {msg, 'ApbMapKey'}, occurrence = required, + opts = []}, + #field{name = value, fnum = 2, rnum = 3, + type = {msg, 'ApbReadObjectResp'}, + occurrence = required, opts = []}]}, + {{msg, 'ApbFlagUpdate'}, + [#field{name = value, fnum = 1, rnum = 2, type = bool, + occurrence = required, opts = []}]}, + {{msg, 'ApbGetFlagResp'}, + [#field{name = value, fnum = 1, rnum = 2, type = bool, + occurrence = required, opts = []}]}, + {{msg, 'ApbCrdtReset'}, []}, + {{msg, 'ApbOperationResp'}, + [#field{name = success, fnum = 1, rnum = 2, type = bool, + occurrence = required, opts = []}, + #field{name = errorcode, fnum = 2, rnum = 3, + type = uint32, occurrence = optional, opts = []}]}, + {{msg, 'ApbTxnProperties'}, + [#field{name = read_write, fnum = 1, rnum = 2, + type = uint32, occurrence = optional, opts = []}, + #field{name = red_blue, fnum = 2, rnum = 3, + type = uint32, occurrence = optional, opts = []}]}, + {{msg, 'ApbBoundObject'}, + [#field{name = key, fnum = 1, rnum = 2, type = bytes, + occurrence = required, opts = []}, + #field{name = type, fnum = 2, rnum = 3, + type = {enum, 'CRDT_type'}, occurrence = required, + opts = []}, + #field{name = bucket, fnum = 3, rnum = 4, type = bytes, + occurrence = required, opts = []}]}, + {{msg, 'ApbReadObjects'}, + [#field{name = boundobjects, fnum = 1, rnum = 2, + type = {msg, 'ApbBoundObject'}, occurrence = repeated, + opts = []}, + #field{name = transaction_descriptor, fnum = 2, + rnum = 3, type = bytes, occurrence = required, + opts = []}]}, + {{msg, 'ApbUpdateOp'}, + [#field{name = boundobject, fnum = 1, rnum = 2, + type = {msg, 'ApbBoundObject'}, occurrence = required, + opts = []}, + #field{name = operation, fnum = 2, rnum = 3, + type = {msg, 'ApbUpdateOperation'}, + occurrence = required, opts = []}]}, + {{msg, 'ApbUpdateOperation'}, + [#field{name = counterop, fnum = 1, rnum = 2, + type = {msg, 'ApbCounterUpdate'}, occurrence = optional, + opts = []}, + #field{name = setop, fnum = 2, rnum = 3, + type = {msg, 'ApbSetUpdate'}, occurrence = optional, + opts = []}, + #field{name = regop, fnum = 3, rnum = 4, + type = {msg, 'ApbRegUpdate'}, occurrence = optional, + opts = []}, + #field{name = mapop, fnum = 5, rnum = 5, + type = {msg, 'ApbMapUpdate'}, occurrence = optional, + opts = []}, + #field{name = resetop, fnum = 6, rnum = 6, + type = {msg, 'ApbCrdtReset'}, occurrence = optional, + opts = []}, + #field{name = flagop, fnum = 7, rnum = 7, + type = {msg, 'ApbFlagUpdate'}, occurrence = optional, + opts = []}]}, + {{msg, 'ApbUpdateObjects'}, + [#field{name = updates, fnum = 1, rnum = 2, + type = {msg, 'ApbUpdateOp'}, occurrence = repeated, + opts = []}, + #field{name = transaction_descriptor, fnum = 2, + rnum = 3, type = bytes, occurrence = required, + opts = []}]}, + {{msg, 'ApbStartTransaction'}, + [#field{name = timestamp, fnum = 1, rnum = 2, + type = bytes, occurrence = optional, opts = []}, + #field{name = properties, fnum = 2, rnum = 3, + type = {msg, 'ApbTxnProperties'}, occurrence = optional, + opts = []}]}, + {{msg, 'ApbAbortTransaction'}, + [#field{name = transaction_descriptor, fnum = 1, + rnum = 2, type = bytes, occurrence = required, + opts = []}]}, + {{msg, 'ApbCommitTransaction'}, + [#field{name = transaction_descriptor, fnum = 1, + rnum = 2, type = bytes, occurrence = required, + opts = []}]}, + {{msg, 'ApbStaticUpdateObjects'}, + [#field{name = transaction, fnum = 1, rnum = 2, + type = {msg, 'ApbStartTransaction'}, + occurrence = required, opts = []}, + #field{name = updates, fnum = 2, rnum = 3, + type = {msg, 'ApbUpdateOp'}, occurrence = repeated, + opts = []}]}, + {{msg, 'ApbStaticReadObjects'}, + [#field{name = transaction, fnum = 1, rnum = 2, + type = {msg, 'ApbStartTransaction'}, + occurrence = required, opts = []}, + #field{name = objects, fnum = 2, rnum = 3, + type = {msg, 'ApbBoundObject'}, occurrence = repeated, + opts = []}]}, + {{msg, 'ApbStartTransactionResp'}, + [#field{name = success, fnum = 1, rnum = 2, type = bool, + occurrence = required, opts = []}, + #field{name = transaction_descriptor, fnum = 2, + rnum = 3, type = bytes, occurrence = optional, + opts = []}, + #field{name = errorcode, fnum = 3, rnum = 4, + type = uint32, occurrence = optional, opts = []}]}, + {{msg, 'ApbReadObjectResp'}, + [#field{name = counter, fnum = 1, rnum = 2, + type = {msg, 'ApbGetCounterResp'}, + occurrence = optional, opts = []}, + #field{name = set, fnum = 2, rnum = 3, + type = {msg, 'ApbGetSetResp'}, occurrence = optional, + opts = []}, + #field{name = reg, fnum = 3, rnum = 4, + type = {msg, 'ApbGetRegResp'}, occurrence = optional, + opts = []}, + #field{name = mvreg, fnum = 4, rnum = 5, + type = {msg, 'ApbGetMVRegResp'}, occurrence = optional, + opts = []}, + #field{name = map, fnum = 6, rnum = 6, + type = {msg, 'ApbGetMapResp'}, occurrence = optional, + opts = []}, + #field{name = flag, fnum = 7, rnum = 7, + type = {msg, 'ApbGetFlagResp'}, occurrence = optional, + opts = []}]}, + {{msg, 'ApbReadObjectsResp'}, + [#field{name = success, fnum = 1, rnum = 2, type = bool, + occurrence = required, opts = []}, + #field{name = objects, fnum = 2, rnum = 3, + type = {msg, 'ApbReadObjectResp'}, + occurrence = repeated, opts = []}, + #field{name = errorcode, fnum = 3, rnum = 4, + type = uint32, occurrence = optional, opts = []}]}, + {{msg, 'ApbCommitResp'}, + [#field{name = success, fnum = 1, rnum = 2, type = bool, + occurrence = required, opts = []}, + #field{name = commit_time, fnum = 2, rnum = 3, + type = bytes, occurrence = optional, opts = []}, + #field{name = errorcode, fnum = 3, rnum = 4, + type = uint32, occurrence = optional, opts = []}]}, + {{msg, 'ApbStaticReadObjectsResp'}, + [#field{name = objects, fnum = 1, rnum = 2, + type = {msg, 'ApbReadObjectsResp'}, + occurrence = required, opts = []}, + #field{name = committime, fnum = 2, rnum = 3, + type = {msg, 'ApbCommitResp'}, occurrence = required, + opts = []}]}]. + + +get_msg_names() -> + ['ApbErrorResp', 'ApbCounterUpdate', + 'ApbGetCounterResp', 'ApbSetUpdate', 'ApbGetSetResp', + 'ApbRegUpdate', 'ApbGetRegResp', 'ApbGetMVRegResp', + 'ApbMapKey', 'ApbMapUpdate', 'ApbMapNestedUpdate', + 'ApbGetMapResp', 'ApbMapEntry', 'ApbFlagUpdate', + 'ApbGetFlagResp', 'ApbCrdtReset', 'ApbOperationResp', + 'ApbTxnProperties', 'ApbBoundObject', 'ApbReadObjects', + 'ApbUpdateOp', 'ApbUpdateOperation', 'ApbUpdateObjects', + 'ApbStartTransaction', 'ApbAbortTransaction', + 'ApbCommitTransaction', 'ApbStaticUpdateObjects', + 'ApbStaticReadObjects', 'ApbStartTransactionResp', + 'ApbReadObjectResp', 'ApbReadObjectsResp', + 'ApbCommitResp', 'ApbStaticReadObjectsResp']. + + +get_group_names() -> []. + + +get_msg_or_group_names() -> + ['ApbErrorResp', 'ApbCounterUpdate', + 'ApbGetCounterResp', 'ApbSetUpdate', 'ApbGetSetResp', + 'ApbRegUpdate', 'ApbGetRegResp', 'ApbGetMVRegResp', + 'ApbMapKey', 'ApbMapUpdate', 'ApbMapNestedUpdate', + 'ApbGetMapResp', 'ApbMapEntry', 'ApbFlagUpdate', + 'ApbGetFlagResp', 'ApbCrdtReset', 'ApbOperationResp', + 'ApbTxnProperties', 'ApbBoundObject', 'ApbReadObjects', + 'ApbUpdateOp', 'ApbUpdateOperation', 'ApbUpdateObjects', + 'ApbStartTransaction', 'ApbAbortTransaction', + 'ApbCommitTransaction', 'ApbStaticUpdateObjects', + 'ApbStaticReadObjects', 'ApbStartTransactionResp', + 'ApbReadObjectResp', 'ApbReadObjectsResp', + 'ApbCommitResp', 'ApbStaticReadObjectsResp']. + + +get_enum_names() -> + ['CRDT_type', 'ApbSetUpdate.SetOpType']. + + +fetch_msg_def(MsgName) -> + case find_msg_def(MsgName) of + Fs when is_list(Fs) -> Fs; + error -> erlang:error({no_such_msg, MsgName}) + end. + + +fetch_enum_def(EnumName) -> + case find_enum_def(EnumName) of + Es when is_list(Es) -> Es; + error -> erlang:error({no_such_enum, EnumName}) + end. + + +find_msg_def('ApbErrorResp') -> + [#field{name = errmsg, fnum = 1, rnum = 2, type = bytes, + occurrence = required, opts = []}, + #field{name = errcode, fnum = 2, rnum = 3, + type = uint32, occurrence = required, opts = []}]; +find_msg_def('ApbCounterUpdate') -> + [#field{name = inc, fnum = 1, rnum = 2, type = sint64, + occurrence = optional, opts = []}]; +find_msg_def('ApbGetCounterResp') -> + [#field{name = value, fnum = 1, rnum = 2, type = sint32, + occurrence = required, opts = []}]; +find_msg_def('ApbSetUpdate') -> + [#field{name = optype, fnum = 1, rnum = 2, + type = {enum, 'ApbSetUpdate.SetOpType'}, + occurrence = required, opts = []}, + #field{name = adds, fnum = 2, rnum = 3, type = bytes, + occurrence = repeated, opts = []}, + #field{name = rems, fnum = 3, rnum = 4, type = bytes, + occurrence = repeated, opts = []}]; +find_msg_def('ApbGetSetResp') -> + [#field{name = value, fnum = 1, rnum = 2, type = bytes, + occurrence = repeated, opts = []}]; +find_msg_def('ApbRegUpdate') -> + [#field{name = value, fnum = 1, rnum = 2, type = bytes, + occurrence = required, opts = []}]; +find_msg_def('ApbGetRegResp') -> + [#field{name = value, fnum = 1, rnum = 2, type = bytes, + occurrence = required, opts = []}]; +find_msg_def('ApbGetMVRegResp') -> + [#field{name = values, fnum = 1, rnum = 2, type = bytes, + occurrence = repeated, opts = []}]; +find_msg_def('ApbMapKey') -> + [#field{name = key, fnum = 1, rnum = 2, type = bytes, + occurrence = required, opts = []}, + #field{name = type, fnum = 2, rnum = 3, + type = {enum, 'CRDT_type'}, occurrence = required, + opts = []}]; +find_msg_def('ApbMapUpdate') -> + [#field{name = updates, fnum = 1, rnum = 2, + type = {msg, 'ApbMapNestedUpdate'}, + occurrence = repeated, opts = []}, + #field{name = removedKeys, fnum = 2, rnum = 3, + type = {msg, 'ApbMapKey'}, occurrence = repeated, + opts = []}]; +find_msg_def('ApbMapNestedUpdate') -> + [#field{name = key, fnum = 1, rnum = 2, + type = {msg, 'ApbMapKey'}, occurrence = required, + opts = []}, + #field{name = update, fnum = 2, rnum = 3, + type = {msg, 'ApbUpdateOperation'}, + occurrence = required, opts = []}]; +find_msg_def('ApbGetMapResp') -> + [#field{name = entries, fnum = 1, rnum = 2, + type = {msg, 'ApbMapEntry'}, occurrence = repeated, + opts = []}]; +find_msg_def('ApbMapEntry') -> + [#field{name = key, fnum = 1, rnum = 2, + type = {msg, 'ApbMapKey'}, occurrence = required, + opts = []}, + #field{name = value, fnum = 2, rnum = 3, + type = {msg, 'ApbReadObjectResp'}, + occurrence = required, opts = []}]; +find_msg_def('ApbFlagUpdate') -> + [#field{name = value, fnum = 1, rnum = 2, type = bool, + occurrence = required, opts = []}]; +find_msg_def('ApbGetFlagResp') -> + [#field{name = value, fnum = 1, rnum = 2, type = bool, + occurrence = required, opts = []}]; +find_msg_def('ApbCrdtReset') -> []; +find_msg_def('ApbOperationResp') -> + [#field{name = success, fnum = 1, rnum = 2, type = bool, + occurrence = required, opts = []}, + #field{name = errorcode, fnum = 2, rnum = 3, + type = uint32, occurrence = optional, opts = []}]; +find_msg_def('ApbTxnProperties') -> + [#field{name = read_write, fnum = 1, rnum = 2, + type = uint32, occurrence = optional, opts = []}, + #field{name = red_blue, fnum = 2, rnum = 3, + type = uint32, occurrence = optional, opts = []}]; +find_msg_def('ApbBoundObject') -> + [#field{name = key, fnum = 1, rnum = 2, type = bytes, + occurrence = required, opts = []}, + #field{name = type, fnum = 2, rnum = 3, + type = {enum, 'CRDT_type'}, occurrence = required, + opts = []}, + #field{name = bucket, fnum = 3, rnum = 4, type = bytes, + occurrence = required, opts = []}]; +find_msg_def('ApbReadObjects') -> + [#field{name = boundobjects, fnum = 1, rnum = 2, + type = {msg, 'ApbBoundObject'}, occurrence = repeated, + opts = []}, + #field{name = transaction_descriptor, fnum = 2, + rnum = 3, type = bytes, occurrence = required, + opts = []}]; +find_msg_def('ApbUpdateOp') -> + [#field{name = boundobject, fnum = 1, rnum = 2, + type = {msg, 'ApbBoundObject'}, occurrence = required, + opts = []}, + #field{name = operation, fnum = 2, rnum = 3, + type = {msg, 'ApbUpdateOperation'}, + occurrence = required, opts = []}]; +find_msg_def('ApbUpdateOperation') -> + [#field{name = counterop, fnum = 1, rnum = 2, + type = {msg, 'ApbCounterUpdate'}, occurrence = optional, + opts = []}, + #field{name = setop, fnum = 2, rnum = 3, + type = {msg, 'ApbSetUpdate'}, occurrence = optional, + opts = []}, + #field{name = regop, fnum = 3, rnum = 4, + type = {msg, 'ApbRegUpdate'}, occurrence = optional, + opts = []}, + #field{name = mapop, fnum = 5, rnum = 5, + type = {msg, 'ApbMapUpdate'}, occurrence = optional, + opts = []}, + #field{name = resetop, fnum = 6, rnum = 6, + type = {msg, 'ApbCrdtReset'}, occurrence = optional, + opts = []}, + #field{name = flagop, fnum = 7, rnum = 7, + type = {msg, 'ApbFlagUpdate'}, occurrence = optional, + opts = []}]; +find_msg_def('ApbUpdateObjects') -> + [#field{name = updates, fnum = 1, rnum = 2, + type = {msg, 'ApbUpdateOp'}, occurrence = repeated, + opts = []}, + #field{name = transaction_descriptor, fnum = 2, + rnum = 3, type = bytes, occurrence = required, + opts = []}]; +find_msg_def('ApbStartTransaction') -> + [#field{name = timestamp, fnum = 1, rnum = 2, + type = bytes, occurrence = optional, opts = []}, + #field{name = properties, fnum = 2, rnum = 3, + type = {msg, 'ApbTxnProperties'}, occurrence = optional, + opts = []}]; +find_msg_def('ApbAbortTransaction') -> + [#field{name = transaction_descriptor, fnum = 1, + rnum = 2, type = bytes, occurrence = required, + opts = []}]; +find_msg_def('ApbCommitTransaction') -> + [#field{name = transaction_descriptor, fnum = 1, + rnum = 2, type = bytes, occurrence = required, + opts = []}]; +find_msg_def('ApbStaticUpdateObjects') -> + [#field{name = transaction, fnum = 1, rnum = 2, + type = {msg, 'ApbStartTransaction'}, + occurrence = required, opts = []}, + #field{name = updates, fnum = 2, rnum = 3, + type = {msg, 'ApbUpdateOp'}, occurrence = repeated, + opts = []}]; +find_msg_def('ApbStaticReadObjects') -> + [#field{name = transaction, fnum = 1, rnum = 2, + type = {msg, 'ApbStartTransaction'}, + occurrence = required, opts = []}, + #field{name = objects, fnum = 2, rnum = 3, + type = {msg, 'ApbBoundObject'}, occurrence = repeated, + opts = []}]; +find_msg_def('ApbStartTransactionResp') -> + [#field{name = success, fnum = 1, rnum = 2, type = bool, + occurrence = required, opts = []}, + #field{name = transaction_descriptor, fnum = 2, + rnum = 3, type = bytes, occurrence = optional, + opts = []}, + #field{name = errorcode, fnum = 3, rnum = 4, + type = uint32, occurrence = optional, opts = []}]; +find_msg_def('ApbReadObjectResp') -> + [#field{name = counter, fnum = 1, rnum = 2, + type = {msg, 'ApbGetCounterResp'}, + occurrence = optional, opts = []}, + #field{name = set, fnum = 2, rnum = 3, + type = {msg, 'ApbGetSetResp'}, occurrence = optional, + opts = []}, + #field{name = reg, fnum = 3, rnum = 4, + type = {msg, 'ApbGetRegResp'}, occurrence = optional, + opts = []}, + #field{name = mvreg, fnum = 4, rnum = 5, + type = {msg, 'ApbGetMVRegResp'}, occurrence = optional, + opts = []}, + #field{name = map, fnum = 6, rnum = 6, + type = {msg, 'ApbGetMapResp'}, occurrence = optional, + opts = []}, + #field{name = flag, fnum = 7, rnum = 7, + type = {msg, 'ApbGetFlagResp'}, occurrence = optional, + opts = []}]; +find_msg_def('ApbReadObjectsResp') -> + [#field{name = success, fnum = 1, rnum = 2, type = bool, + occurrence = required, opts = []}, + #field{name = objects, fnum = 2, rnum = 3, + type = {msg, 'ApbReadObjectResp'}, + occurrence = repeated, opts = []}, + #field{name = errorcode, fnum = 3, rnum = 4, + type = uint32, occurrence = optional, opts = []}]; +find_msg_def('ApbCommitResp') -> + [#field{name = success, fnum = 1, rnum = 2, type = bool, + occurrence = required, opts = []}, + #field{name = commit_time, fnum = 2, rnum = 3, + type = bytes, occurrence = optional, opts = []}, + #field{name = errorcode, fnum = 3, rnum = 4, + type = uint32, occurrence = optional, opts = []}]; +find_msg_def('ApbStaticReadObjectsResp') -> + [#field{name = objects, fnum = 1, rnum = 2, + type = {msg, 'ApbReadObjectsResp'}, + occurrence = required, opts = []}, + #field{name = committime, fnum = 2, rnum = 3, + type = {msg, 'ApbCommitResp'}, occurrence = required, + opts = []}]; +find_msg_def(_) -> error. + + +find_enum_def('CRDT_type') -> + [{'COUNTER', 3}, {'ORSET', 4}, {'LWWREG', 5}, + {'MVREG', 6}, {'GMAP', 8}, {'RWSET', 10}, {'RRMAP', 11}, + {'FATCOUNTER', 12}, {'FLAG_EW', 13}, {'FLAG_DW', 14}]; +find_enum_def('ApbSetUpdate.SetOpType') -> + [{'ADD', 1}, {'REMOVE', 2}]; +find_enum_def(_) -> error. + + +enum_symbol_by_value('CRDT_type', Value) -> + enum_symbol_by_value_CRDT_type(Value); +enum_symbol_by_value('ApbSetUpdate.SetOpType', Value) -> + 'enum_symbol_by_value_ApbSetUpdate.SetOpType'(Value). + + +enum_value_by_symbol('CRDT_type', Sym) -> + enum_value_by_symbol_CRDT_type(Sym); +enum_value_by_symbol('ApbSetUpdate.SetOpType', Sym) -> + 'enum_value_by_symbol_ApbSetUpdate.SetOpType'(Sym). + + +enum_symbol_by_value_CRDT_type(3) -> 'COUNTER'; +enum_symbol_by_value_CRDT_type(4) -> 'ORSET'; +enum_symbol_by_value_CRDT_type(5) -> 'LWWREG'; +enum_symbol_by_value_CRDT_type(6) -> 'MVREG'; +enum_symbol_by_value_CRDT_type(8) -> 'GMAP'; +enum_symbol_by_value_CRDT_type(10) -> 'RWSET'; +enum_symbol_by_value_CRDT_type(11) -> 'RRMAP'; +enum_symbol_by_value_CRDT_type(12) -> 'FATCOUNTER'; +enum_symbol_by_value_CRDT_type(13) -> 'FLAG_EW'; +enum_symbol_by_value_CRDT_type(14) -> 'FLAG_DW'. + + +enum_value_by_symbol_CRDT_type('COUNTER') -> 3; +enum_value_by_symbol_CRDT_type('ORSET') -> 4; +enum_value_by_symbol_CRDT_type('LWWREG') -> 5; +enum_value_by_symbol_CRDT_type('MVREG') -> 6; +enum_value_by_symbol_CRDT_type('GMAP') -> 8; +enum_value_by_symbol_CRDT_type('RWSET') -> 10; +enum_value_by_symbol_CRDT_type('RRMAP') -> 11; +enum_value_by_symbol_CRDT_type('FATCOUNTER') -> 12; +enum_value_by_symbol_CRDT_type('FLAG_EW') -> 13; +enum_value_by_symbol_CRDT_type('FLAG_DW') -> 14. + +'enum_symbol_by_value_ApbSetUpdate.SetOpType'(1) -> + 'ADD'; +'enum_symbol_by_value_ApbSetUpdate.SetOpType'(2) -> + 'REMOVE'. + + +'enum_value_by_symbol_ApbSetUpdate.SetOpType'('ADD') -> + 1; +'enum_value_by_symbol_ApbSetUpdate.SetOpType'('REMOVE') -> + 2. + + +get_service_names() -> []. + + +get_service_def(_) -> error. + + +get_rpc_names(_) -> error. + + +find_rpc_def(_, _) -> error. + + + +-spec fetch_rpc_def(_, _) -> no_return(). +fetch_rpc_def(ServiceName, RpcName) -> + erlang:error({no_such_rpc, ServiceName, RpcName}). + + +get_package_name() -> undefined. + + + +gpb_version_as_string() -> + "4.1.8". + +gpb_version_as_list() -> + [4,1,8].