games  v1
peer_session_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_SESSION_DIAGNOSTICS_H_
31 #define GOOGLE_GAMES_API_PEER_SESSION_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/peer_channel_diagnostics.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_games_api {
46 using namespace googleapis;
47 
53 class PeerSessionDiagnostics : public client::JsonCppData {
54  public:
60  static PeerSessionDiagnostics* New();
61 
67  explicit PeerSessionDiagnostics(const Json::Value& storage);
68 
74  explicit PeerSessionDiagnostics(Json::Value* storage);
75 
79  virtual ~PeerSessionDiagnostics();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_games_api::PeerSessionDiagnostics");
88  }
89 
97  return Storage().isMember("connectedTimestampMillis");
98  }
99 
104  MutableStorage()->removeMember("connectedTimestampMillis");
105  }
106 
107 
112  const Json::Value& storage = Storage("connectedTimestampMillis");
113  return client::JsonValueToCppValueHelper<int64 >(storage);
114  }
115 
123  void set_connected_timestamp_millis(int64 value) {
124  client::SetJsonValueFromCppValueHelper<int64 >(
125  value, MutableStorage("connectedTimestampMillis"));
126  }
127 
133  bool has_kind() const {
134  return Storage().isMember("kind");
135  }
136 
140  void clear_kind() {
141  MutableStorage()->removeMember("kind");
142  }
143 
144 
148  const StringPiece get_kind() const {
149  const Json::Value& v = Storage("kind");
150  if (v == Json::Value::null) return StringPiece("");
151  return StringPiece(v.asCString());
152  }
153 
162  void set_kind(const StringPiece& value) {
163  *MutableStorage("kind") = value.data();
164  }
165 
171  bool has_participant_id() const {
172  return Storage().isMember("participantId");
173  }
174 
179  MutableStorage()->removeMember("participantId");
180  }
181 
182 
186  const StringPiece get_participant_id() const {
187  const Json::Value& v = Storage("participantId");
188  if (v == Json::Value::null) return StringPiece("");
189  return StringPiece(v.asCString());
190  }
191 
199  void set_participant_id(const StringPiece& value) {
200  *MutableStorage("participantId") = value.data();
201  }
202 
208  bool has_reliable_channel() const {
209  return Storage().isMember("reliableChannel");
210  }
211 
216  MutableStorage()->removeMember("reliableChannel");
217  }
218 
219 
224  const PeerChannelDiagnostics get_reliable_channel() const;
225 
234  PeerChannelDiagnostics mutable_reliableChannel();
235 
241  bool has_unreliable_channel() const {
242  return Storage().isMember("unreliableChannel");
243  }
244 
249  MutableStorage()->removeMember("unreliableChannel");
250  }
251 
252 
257  const PeerChannelDiagnostics get_unreliable_channel() const;
258 
267  PeerChannelDiagnostics mutable_unreliableChannel();
268 
269  private:
270  void operator=(const PeerSessionDiagnostics&);
271 }; // PeerSessionDiagnostics
272 } // namespace google_games_api
273 #endif // GOOGLE_GAMES_API_PEER_SESSION_DIAGNOSTICS_H_
void set_connected_timestamp_millis(int64 value)
Definition: peer_session_diagnostics.h:123
const StringPiece get_kind() const
Definition: peer_session_diagnostics.h:148
bool has_participant_id() const
Definition: peer_session_diagnostics.h:171
const StringPiece GetTypeName() const
Definition: peer_session_diagnostics.h:86
bool has_connected_timestamp_millis() const
Definition: peer_session_diagnostics.h:96
bool has_kind() const
Definition: peer_session_diagnostics.h:133
void set_kind(const StringPiece &value)
Definition: peer_session_diagnostics.h:162
void set_participant_id(const StringPiece &value)
Definition: peer_session_diagnostics.h:199
bool has_unreliable_channel() const
Definition: peer_session_diagnostics.h:241
int64 get_connected_timestamp_millis() const
Definition: peer_session_diagnostics.h:111
void clear_kind()
Definition: peer_session_diagnostics.h:140
Definition: achievement_definition.cc:41
const StringPiece get_participant_id() const
Definition: peer_session_diagnostics.h:186
void clear_unreliable_channel()
Definition: peer_session_diagnostics.h:248
Definition: achievement_definition.h:39
void clear_reliable_channel()
Definition: peer_session_diagnostics.h:215
Definition: peer_session_diagnostics.h:53
bool has_reliable_channel() const
Definition: peer_session_diagnostics.h:208
void clear_connected_timestamp_millis()
Definition: peer_session_diagnostics.h:103
void clear_participant_id()
Definition: peer_session_diagnostics.h:178
Definition: peer_channel_diagnostics.h:53