games  v1
peer_channel_diagnostics.h
1 // Copyright 2010 Google Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); you may not
4 // use this file except in compliance with the License. You may obtain a copy of
5 // the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 // License for the specific language governing permissions and limitations under
13 // the License.
14 
15 // This code was generated by google-apis-code-generator 1.5.1
16 // Build date: 2018-10-08 17:45:39 UTC
17 // on: 2020-03-07, 08:12:42 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // Google Play Game Services API (games/v1)
24 // Generated from:
25 // Version: v1
26 // Revision: 358
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_GAMES_API_PEER_CHANNEL_DIAGNOSTICS_H_
31 #define GOOGLE_GAMES_API_PEER_CHANNEL_DIAGNOSTICS_H_
32 
33 #include <string>
34 #include "googleapis/base/integral_types.h"
35 #include "googleapis/base/macros.h"
36 #include "googleapis/client/data/jsoncpp_data.h"
37 #include "googleapis/strings/stringpiece.h"
38 
39 #include "google/games_api/aggregate_stats.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_games_api {
46 using namespace googleapis;
47 
53 class PeerChannelDiagnostics : public client::JsonCppData {
54  public:
60  static PeerChannelDiagnostics* New();
61 
67  explicit PeerChannelDiagnostics(const Json::Value& storage);
68 
74  explicit PeerChannelDiagnostics(Json::Value* storage);
75 
79  virtual ~PeerChannelDiagnostics();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_games_api::PeerChannelDiagnostics");
88  }
89 
95  bool has_bytes_received() const {
96  return Storage().isMember("bytesReceived");
97  }
98 
103  MutableStorage()->removeMember("bytesReceived");
104  }
105 
106 
110  const AggregateStats get_bytes_received() const;
111 
120  AggregateStats mutable_bytesReceived();
121 
127  bool has_bytes_sent() const {
128  return Storage().isMember("bytesSent");
129  }
130 
135  MutableStorage()->removeMember("bytesSent");
136  }
137 
138 
142  const AggregateStats get_bytes_sent() const;
143 
152  AggregateStats mutable_bytesSent();
153 
159  bool has_kind() const {
160  return Storage().isMember("kind");
161  }
162 
166  void clear_kind() {
167  MutableStorage()->removeMember("kind");
168  }
169 
170 
174  const StringPiece get_kind() const {
175  const Json::Value& v = Storage("kind");
176  if (v == Json::Value::null) return StringPiece("");
177  return StringPiece(v.asCString());
178  }
179 
188  void set_kind(const StringPiece& value) {
189  *MutableStorage("kind") = value.data();
190  }
191 
197  bool has_num_messages_lost() const {
198  return Storage().isMember("numMessagesLost");
199  }
200 
205  MutableStorage()->removeMember("numMessagesLost");
206  }
207 
208 
212  int32 get_num_messages_lost() const {
213  const Json::Value& storage = Storage("numMessagesLost");
214  return client::JsonValueToCppValueHelper<int32 >(storage);
215  }
216 
224  void set_num_messages_lost(int32 value) {
225  client::SetJsonValueFromCppValueHelper<int32 >(
226  value, MutableStorage("numMessagesLost"));
227  }
228 
235  return Storage().isMember("numMessagesReceived");
236  }
237 
242  MutableStorage()->removeMember("numMessagesReceived");
243  }
244 
245 
250  const Json::Value& storage = Storage("numMessagesReceived");
251  return client::JsonValueToCppValueHelper<int32 >(storage);
252  }
253 
261  void set_num_messages_received(int32 value) {
262  client::SetJsonValueFromCppValueHelper<int32 >(
263  value, MutableStorage("numMessagesReceived"));
264  }
265 
271  bool has_num_messages_sent() const {
272  return Storage().isMember("numMessagesSent");
273  }
274 
279  MutableStorage()->removeMember("numMessagesSent");
280  }
281 
282 
286  int32 get_num_messages_sent() const {
287  const Json::Value& storage = Storage("numMessagesSent");
288  return client::JsonValueToCppValueHelper<int32 >(storage);
289  }
290 
298  void set_num_messages_sent(int32 value) {
299  client::SetJsonValueFromCppValueHelper<int32 >(
300  value, MutableStorage("numMessagesSent"));
301  }
302 
308  bool has_num_send_failures() const {
309  return Storage().isMember("numSendFailures");
310  }
311 
316  MutableStorage()->removeMember("numSendFailures");
317  }
318 
319 
323  int32 get_num_send_failures() const {
324  const Json::Value& storage = Storage("numSendFailures");
325  return client::JsonValueToCppValueHelper<int32 >(storage);
326  }
327 
335  void set_num_send_failures(int32 value) {
336  client::SetJsonValueFromCppValueHelper<int32 >(
337  value, MutableStorage("numSendFailures"));
338  }
339 
347  return Storage().isMember("roundtripLatencyMillis");
348  }
349 
354  MutableStorage()->removeMember("roundtripLatencyMillis");
355  }
356 
357 
362  const AggregateStats get_roundtrip_latency_millis() const;
363 
372  AggregateStats mutable_roundtripLatencyMillis();
373 
374  private:
375  void operator=(const PeerChannelDiagnostics&);
376 }; // PeerChannelDiagnostics
377 } // namespace google_games_api
378 #endif // GOOGLE_GAMES_API_PEER_CHANNEL_DIAGNOSTICS_H_
void clear_num_messages_received()
Definition: peer_channel_diagnostics.h:241
bool has_num_messages_sent() const
Definition: peer_channel_diagnostics.h:271
void clear_bytes_received()
Definition: peer_channel_diagnostics.h:102
void set_num_send_failures(int32 value)
Definition: peer_channel_diagnostics.h:335
const StringPiece GetTypeName() const
Definition: peer_channel_diagnostics.h:86
bool has_num_send_failures() const
Definition: peer_channel_diagnostics.h:308
void clear_num_messages_sent()
Definition: peer_channel_diagnostics.h:278
bool has_kind() const
Definition: peer_channel_diagnostics.h:159
void clear_roundtrip_latency_millis()
Definition: peer_channel_diagnostics.h:353
bool has_bytes_sent() const
Definition: peer_channel_diagnostics.h:127
void clear_bytes_sent()
Definition: peer_channel_diagnostics.h:134
void set_num_messages_sent(int32 value)
Definition: peer_channel_diagnostics.h:298
void clear_num_send_failures()
Definition: peer_channel_diagnostics.h:315
Definition: aggregate_stats.h:51
void set_num_messages_received(int32 value)
Definition: peer_channel_diagnostics.h:261
void set_kind(const StringPiece &value)
Definition: peer_channel_diagnostics.h:188
const StringPiece get_kind() const
Definition: peer_channel_diagnostics.h:174
Definition: achievement_definition.cc:41
Definition: achievement_definition.h:39
int32 get_num_messages_lost() const
Definition: peer_channel_diagnostics.h:212
bool has_bytes_received() const
Definition: peer_channel_diagnostics.h:95
bool has_roundtrip_latency_millis() const
Definition: peer_channel_diagnostics.h:346
void clear_num_messages_lost()
Definition: peer_channel_diagnostics.h:204
bool has_num_messages_received() const
Definition: peer_channel_diagnostics.h:234
int32 get_num_messages_sent() const
Definition: peer_channel_diagnostics.h:286
void clear_kind()
Definition: peer_channel_diagnostics.h:166
int32 get_num_send_failures() const
Definition: peer_channel_diagnostics.h:323
Definition: peer_channel_diagnostics.h:53
bool has_num_messages_lost() const
Definition: peer_channel_diagnostics.h:197
int32 get_num_messages_received() const
Definition: peer_channel_diagnostics.h:249
void set_num_messages_lost(int32 value)
Definition: peer_channel_diagnostics.h:224