aboutsummaryrefslogtreecommitdiff
path: root/src/server/proto/Client/rpc_config.pb.cc
blob: 5e67ee6a963c8527eb13ba482b77ca607eedbe7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: rpc_config.proto

#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
#include "rpc_config.pb.h"

#include <utility>

#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/once.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/wire_format_lite_inl.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)

namespace bgs {
namespace protocol {
namespace config {

namespace {

const ::google::protobuf::Descriptor* RPCMethodConfig_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  RPCMethodConfig_reflection_ = NULL;
const ::google::protobuf::Descriptor* RPCMeterConfig_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  RPCMeterConfig_reflection_ = NULL;

}  // namespace

void protobuf_AssignDesc_rpc_5fconfig_2eproto() {
  protobuf_AddDesc_rpc_5fconfig_2eproto();
  const ::google::protobuf::FileDescriptor* file =
    ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
      "rpc_config.proto");
  GOOGLE_CHECK(file != NULL);
  RPCMethodConfig_descriptor_ = file->message_type(0);
  static const int RPCMethodConfig_offsets_[15] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RPCMethodConfig, service_name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RPCMethodConfig, method_name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RPCMethodConfig, fixed_call_cost_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RPCMethodConfig, fixed_packet_size_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RPCMethodConfig, variable_multiplier_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RPCMethodConfig, multiplier_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RPCMethodConfig, rate_limit_count_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RPCMethodConfig, rate_limit_seconds_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RPCMethodConfig, max_packet_size_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RPCMethodConfig, max_encoded_size_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RPCMethodConfig, timeout_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RPCMethodConfig, cap_balance_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RPCMethodConfig, income_per_second_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RPCMethodConfig, service_hash_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RPCMethodConfig, method_id_),
  };
  RPCMethodConfig_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      RPCMethodConfig_descriptor_,
      RPCMethodConfig::default_instance_,
      RPCMethodConfig_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RPCMethodConfig, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RPCMethodConfig, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(RPCMethodConfig));
  RPCMeterConfig_descriptor_ = file->message_type(1);
  static const int RPCMeterConfig_offsets_[5] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RPCMeterConfig, method_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RPCMeterConfig, income_per_second_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RPCMeterConfig, initial_balance_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RPCMeterConfig, cap_balance_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RPCMeterConfig, startup_period_),
  };
  RPCMeterConfig_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      RPCMeterConfig_descriptor_,
      RPCMeterConfig::default_instance_,
      RPCMeterConfig_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RPCMeterConfig, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RPCMeterConfig, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(RPCMeterConfig));
}

namespace {

GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
inline void protobuf_AssignDescriptorsOnce() {
  ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
                 &protobuf_AssignDesc_rpc_5fconfig_2eproto);
}

void protobuf_RegisterTypes(const ::std::string&) {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    RPCMethodConfig_descriptor_, &RPCMethodConfig::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    RPCMeterConfig_descriptor_, &RPCMeterConfig::default_instance());
}

}  // namespace

void protobuf_ShutdownFile_rpc_5fconfig_2eproto() {
  delete RPCMethodConfig::default_instance_;
  delete RPCMethodConfig_reflection_;
  delete RPCMeterConfig::default_instance_;
  delete RPCMeterConfig_reflection_;
}

void protobuf_AddDesc_rpc_5fconfig_2eproto() {
  static bool already_here = false;
  if (already_here) return;
  already_here = true;
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
    "\n\020rpc_config.proto\022\023bgs.protocol.config\""
    "\202\003\n\017RPCMethodConfig\022\030\n\014service_name\030\001 \001("
    "\tB\002\030\001\022\027\n\013method_name\030\002 \001(\tB\002\030\001\022\032\n\017fixed_"
    "call_cost\030\003 \001(\r:\0011\022\031\n\021fixed_packet_size\030"
    "\004 \001(\r\022\033\n\023variable_multiplier\030\005 \001(\002\022\025\n\nmu"
    "ltiplier\030\006 \001(\002:\0011\022\030\n\020rate_limit_count\030\007 "
    "\001(\r\022\032\n\022rate_limit_seconds\030\010 \001(\r\022\027\n\017max_p"
    "acket_size\030\t \001(\r\022\030\n\020max_encoded_size\030\n \001"
    "(\r\022\017\n\007timeout\030\013 \001(\002\022\023\n\013cap_balance\030\014 \001(\r"
    "\022\031\n\021income_per_second\030\r \001(\002\022\024\n\014service_h"
    "ash\030\016 \001(\r\022\021\n\tmethod_id\030\017 \001(\r\"\252\001\n\016RPCMete"
    "rConfig\0224\n\006method\030\001 \003(\0132$.bgs.protocol.c"
    "onfig.RPCMethodConfig\022\034\n\021income_per_seco"
    "nd\030\002 \001(\r:\0011\022\027\n\017initial_balance\030\003 \001(\r\022\023\n\013"
    "cap_balance\030\004 \001(\r\022\026\n\016startup_period\030\005 \001("
    "\002B\002H\002", 605);
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
    "rpc_config.proto", &protobuf_RegisterTypes);
  RPCMethodConfig::default_instance_ = new RPCMethodConfig();
  RPCMeterConfig::default_instance_ = new RPCMeterConfig();
  RPCMethodConfig::default_instance_->InitAsDefaultInstance();
  RPCMeterConfig::default_instance_->InitAsDefaultInstance();
  ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_rpc_5fconfig_2eproto);
}

// Force AddDescriptors() to be called at static initialization time.
struct StaticDescriptorInitializer_rpc_5fconfig_2eproto {
  StaticDescriptorInitializer_rpc_5fconfig_2eproto() {
    protobuf_AddDesc_rpc_5fconfig_2eproto();
  }
} static_descriptor_initializer_rpc_5fconfig_2eproto_;
// ===================================================================

#ifndef _MSC_VER
const int RPCMethodConfig::kServiceNameFieldNumber;
const int RPCMethodConfig::kMethodNameFieldNumber;
const int RPCMethodConfig::kFixedCallCostFieldNumber;
const int RPCMethodConfig::kFixedPacketSizeFieldNumber;
const int RPCMethodConfig::kVariableMultiplierFieldNumber;
const int RPCMethodConfig::kMultiplierFieldNumber;
const int RPCMethodConfig::kRateLimitCountFieldNumber;
const int RPCMethodConfig::kRateLimitSecondsFieldNumber;
const int RPCMethodConfig::kMaxPacketSizeFieldNumber;
const int RPCMethodConfig::kMaxEncodedSizeFieldNumber;
const int RPCMethodConfig::kTimeoutFieldNumber;
const int RPCMethodConfig::kCapBalanceFieldNumber;
const int RPCMethodConfig::kIncomePerSecondFieldNumber;
const int RPCMethodConfig::kServiceHashFieldNumber;
const int RPCMethodConfig::kMethodIdFieldNumber;
#endif  // !_MSC_VER

RPCMethodConfig::RPCMethodConfig()
  : ::google::protobuf::Message() {
  SharedCtor();
  // @@protoc_insertion_point(constructor:bgs.protocol.config.RPCMethodConfig)
}

void RPCMethodConfig::InitAsDefaultInstance() {
}

RPCMethodConfig::RPCMethodConfig(const RPCMethodConfig& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:bgs.protocol.config.RPCMethodConfig)
}

void RPCMethodConfig::SharedCtor() {
  ::google::protobuf::internal::GetEmptyString();
  _cached_size_ = 0;
  service_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  method_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  fixed_call_cost_ = 1u;
  fixed_packet_size_ = 0u;
  variable_multiplier_ = 0;
  multiplier_ = 1;
  rate_limit_count_ = 0u;
  rate_limit_seconds_ = 0u;
  max_packet_size_ = 0u;
  max_encoded_size_ = 0u;
  timeout_ = 0;
  cap_balance_ = 0u;
  income_per_second_ = 0;
  service_hash_ = 0u;
  method_id_ = 0u;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

RPCMethodConfig::~RPCMethodConfig() {
  // @@protoc_insertion_point(destructor:bgs.protocol.config.RPCMethodConfig)
  SharedDtor();
}

void RPCMethodConfig::SharedDtor() {
  if (service_name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
    delete service_name_;
  }
  if (method_name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
    delete method_name_;
  }
  if (this != default_instance_) {
  }
}

void RPCMethodConfig::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* RPCMethodConfig::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return RPCMethodConfig_descriptor_;
}

const RPCMethodConfig& RPCMethodConfig::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_rpc_5fconfig_2eproto();
  return *default_instance_;
}

RPCMethodConfig* RPCMethodConfig::default_instance_ = NULL;

RPCMethodConfig* RPCMethodConfig::New() const {
  return new RPCMethodConfig;
}

void RPCMethodConfig::Swap(RPCMethodConfig* other) {
  if (other != this) {
    GetReflection()->Swap(this, other);}
}

::google::protobuf::Metadata RPCMethodConfig::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = RPCMethodConfig_descriptor_;
  metadata.reflection = RPCMethodConfig_reflection_;
  return metadata;
}

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

#ifndef _MSC_VER
const int RPCMeterConfig::kMethodFieldNumber;
const int RPCMeterConfig::kIncomePerSecondFieldNumber;
const int RPCMeterConfig::kInitialBalanceFieldNumber;
const int RPCMeterConfig::kCapBalanceFieldNumber;
const int RPCMeterConfig::kStartupPeriodFieldNumber;
#endif  // !_MSC_VER

RPCMeterConfig::RPCMeterConfig()
  : ::google::protobuf::Message() {
  SharedCtor();
  // @@protoc_insertion_point(constructor:bgs.protocol.config.RPCMeterConfig)
}

void RPCMeterConfig::InitAsDefaultInstance() {
}

RPCMeterConfig::RPCMeterConfig(const RPCMeterConfig& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:bgs.protocol.config.RPCMeterConfig)
}

void RPCMeterConfig::SharedCtor() {
  _cached_size_ = 0;
  income_per_second_ = 1u;
  initial_balance_ = 0u;
  cap_balance_ = 0u;
  startup_period_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

RPCMeterConfig::~RPCMeterConfig() {
  // @@protoc_insertion_point(destructor:bgs.protocol.config.RPCMeterConfig)
  SharedDtor();
}

void RPCMeterConfig::SharedDtor() {
  if (this != default_instance_) {
  }
}

void RPCMeterConfig::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* RPCMeterConfig::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return RPCMeterConfig_descriptor_;
}

const RPCMeterConfig& RPCMeterConfig::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_rpc_5fconfig_2eproto();
  return *default_instance_;
}

RPCMeterConfig* RPCMeterConfig::default_instance_ = NULL;

RPCMeterConfig* RPCMeterConfig::New() const {
  return new RPCMeterConfig;
}

void RPCMeterConfig::Swap(RPCMeterConfig* other) {
  if (other != this) {
    GetReflection()->Swap(this, other);}
}

::google::protobuf::Metadata RPCMeterConfig::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = RPCMeterConfig_descriptor_;
  metadata.reflection = RPCMeterConfig_reflection_;
  return metadata;
}

// @@protoc_insertion_point(namespace_scope)

}  // namespace config
}  // namespace protocol
}  // namespace bgs

// @@protoc_insertion_point(global_scope)