youtube  v3
live_chat_message.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-02-27, 01:46:08 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // YouTube Data API (youtube/v3)
24 // Generated from:
25 // Version: v3
26 // Revision: 222
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_YOUTUBE_API_LIVE_CHAT_MESSAGE_H_
31 #define GOOGLE_YOUTUBE_API_LIVE_CHAT_MESSAGE_H_
32 
33 #include <string>
34 #include "googleapis/base/macros.h"
35 #include "googleapis/client/data/jsoncpp_data.h"
36 #include "googleapis/strings/stringpiece.h"
37 
38 #include "google/youtube_api/live_chat_message_author_details.h"
39 #include "google/youtube_api/live_chat_message_snippet.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_youtube_api {
46 using namespace googleapis;
47 
53 class LiveChatMessage : public client::JsonCppData {
54  public:
60  static LiveChatMessage* New();
61 
67  explicit LiveChatMessage(const Json::Value& storage);
68 
74  explicit LiveChatMessage(Json::Value* storage);
75 
79  virtual ~LiveChatMessage();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_youtube_api::LiveChatMessage");
88  }
89 
95  bool has_author_details() const {
96  return Storage().isMember("authorDetails");
97  }
98 
103  MutableStorage()->removeMember("authorDetails");
104  }
105 
106 
110  const LiveChatMessageAuthorDetails get_author_details() const;
111 
121  LiveChatMessageAuthorDetails mutable_authorDetails();
122 
128  bool has_etag() const {
129  return Storage().isMember("etag");
130  }
131 
135  void clear_etag() {
136  MutableStorage()->removeMember("etag");
137  }
138 
139 
143  const StringPiece get_etag() const {
144  const Json::Value& v = Storage("etag");
145  if (v == Json::Value::null) return StringPiece("");
146  return StringPiece(v.asCString());
147  }
148 
156  void set_etag(const StringPiece& value) {
157  *MutableStorage("etag") = value.data();
158  }
159 
165  bool has_id() const {
166  return Storage().isMember("id");
167  }
168 
172  void clear_id() {
173  MutableStorage()->removeMember("id");
174  }
175 
176 
180  const StringPiece get_id() const {
181  const Json::Value& v = Storage("id");
182  if (v == Json::Value::null) return StringPiece("");
183  return StringPiece(v.asCString());
184  }
185 
193  void set_id(const StringPiece& value) {
194  *MutableStorage("id") = value.data();
195  }
196 
202  bool has_kind() const {
203  return Storage().isMember("kind");
204  }
205 
209  void clear_kind() {
210  MutableStorage()->removeMember("kind");
211  }
212 
213 
217  const StringPiece get_kind() const {
218  const Json::Value& v = Storage("kind");
219  if (v == Json::Value::null) return StringPiece("");
220  return StringPiece(v.asCString());
221  }
222 
231  void set_kind(const StringPiece& value) {
232  *MutableStorage("kind") = value.data();
233  }
234 
240  bool has_snippet() const {
241  return Storage().isMember("snippet");
242  }
243 
247  void clear_snippet() {
248  MutableStorage()->removeMember("snippet");
249  }
250 
251 
255  const LiveChatMessageSnippet get_snippet() const;
256 
264  LiveChatMessageSnippet mutable_snippet();
265 
266  private:
267  void operator=(const LiveChatMessage&);
268 }; // LiveChatMessage
269 } // namespace google_youtube_api
270 #endif // GOOGLE_YOUTUBE_API_LIVE_CHAT_MESSAGE_H_
bool has_id() const
Definition: live_chat_message.h:165
bool has_kind() const
Definition: live_chat_message.h:202
Definition: access_policy.cc:40
bool has_snippet() const
Definition: live_chat_message.h:240
void clear_author_details()
Definition: live_chat_message.h:102
const StringPiece get_kind() const
Definition: live_chat_message.h:217
void set_kind(const StringPiece &value)
Definition: live_chat_message.h:231
Definition: live_chat_message_author_details.h:50
Definition: access_policy.h:38
Definition: live_chat_message_snippet.h:63
const StringPiece GetTypeName() const
Definition: live_chat_message.h:86
void clear_etag()
Definition: live_chat_message.h:135
const StringPiece get_etag() const
Definition: live_chat_message.h:143
void set_id(const StringPiece &value)
Definition: live_chat_message.h:193
Definition: live_chat_message.h:53
bool has_author_details() const
Definition: live_chat_message.h:95
void clear_snippet()
Definition: live_chat_message.h:247
void set_etag(const StringPiece &value)
Definition: live_chat_message.h:156
void clear_id()
Definition: live_chat_message.h:172
void clear_kind()
Definition: live_chat_message.h:209
const StringPiece get_id() const
Definition: live_chat_message.h:180
bool has_etag() const
Definition: live_chat_message.h:128