youtube  v3
live_chat_moderator.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_MODERATOR_H_
31 #define GOOGLE_YOUTUBE_API_LIVE_CHAT_MODERATOR_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_moderator_snippet.h"
39 
40 namespace Json {
41 class Value;
42 } // namespace Json
43 
44 namespace google_youtube_api {
45 using namespace googleapis;
46 
54 class LiveChatModerator : public client::JsonCppData {
55  public:
61  static LiveChatModerator* New();
62 
68  explicit LiveChatModerator(const Json::Value& storage);
69 
75  explicit LiveChatModerator(Json::Value* storage);
76 
80  virtual ~LiveChatModerator();
81 
87  const StringPiece GetTypeName() const {
88  return StringPiece("google_youtube_api::LiveChatModerator");
89  }
90 
96  bool has_etag() const {
97  return Storage().isMember("etag");
98  }
99 
103  void clear_etag() {
104  MutableStorage()->removeMember("etag");
105  }
106 
107 
111  const StringPiece get_etag() const {
112  const Json::Value& v = Storage("etag");
113  if (v == Json::Value::null) return StringPiece("");
114  return StringPiece(v.asCString());
115  }
116 
124  void set_etag(const StringPiece& value) {
125  *MutableStorage("etag") = value.data();
126  }
127 
133  bool has_id() const {
134  return Storage().isMember("id");
135  }
136 
140  void clear_id() {
141  MutableStorage()->removeMember("id");
142  }
143 
144 
148  const StringPiece get_id() const {
149  const Json::Value& v = Storage("id");
150  if (v == Json::Value::null) return StringPiece("");
151  return StringPiece(v.asCString());
152  }
153 
161  void set_id(const StringPiece& value) {
162  *MutableStorage("id") = value.data();
163  }
164 
170  bool has_kind() const {
171  return Storage().isMember("kind");
172  }
173 
177  void clear_kind() {
178  MutableStorage()->removeMember("kind");
179  }
180 
181 
185  const StringPiece get_kind() const {
186  const Json::Value& v = Storage("kind");
187  if (v == Json::Value::null) return StringPiece("");
188  return StringPiece(v.asCString());
189  }
190 
199  void set_kind(const StringPiece& value) {
200  *MutableStorage("kind") = value.data();
201  }
202 
208  bool has_snippet() const {
209  return Storage().isMember("snippet");
210  }
211 
215  void clear_snippet() {
216  MutableStorage()->removeMember("snippet");
217  }
218 
219 
223  const LiveChatModeratorSnippet get_snippet() const;
224 
232  LiveChatModeratorSnippet mutable_snippet();
233 
234  private:
235  void operator=(const LiveChatModerator&);
236 }; // LiveChatModerator
237 } // namespace google_youtube_api
238 #endif // GOOGLE_YOUTUBE_API_LIVE_CHAT_MODERATOR_H_
void clear_id()
Definition: live_chat_moderator.h:140
Definition: live_chat_moderator.h:54
Definition: access_policy.cc:40
void set_etag(const StringPiece &value)
Definition: live_chat_moderator.h:124
void set_kind(const StringPiece &value)
Definition: live_chat_moderator.h:199
bool has_id() const
Definition: live_chat_moderator.h:133
const StringPiece get_kind() const
Definition: live_chat_moderator.h:185
void set_id(const StringPiece &value)
Definition: live_chat_moderator.h:161
const StringPiece get_etag() const
Definition: live_chat_moderator.h:111
bool has_etag() const
Definition: live_chat_moderator.h:96
Definition: access_policy.h:38
bool has_snippet() const
Definition: live_chat_moderator.h:208
bool has_kind() const
Definition: live_chat_moderator.h:170
const StringPiece GetTypeName() const
Definition: live_chat_moderator.h:87
Definition: live_chat_moderator_snippet.h:52
const StringPiece get_id() const
Definition: live_chat_moderator.h:148
void clear_kind()
Definition: live_chat_moderator.h:177
void clear_snippet()
Definition: live_chat_moderator.h:215
void clear_etag()
Definition: live_chat_moderator.h:103