youtube  v3
live_chat_ban_snippet.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_BAN_SNIPPET_H_
31 #define GOOGLE_YOUTUBE_API_LIVE_CHAT_BAN_SNIPPET_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/youtube_api/channel_profile_details.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_youtube_api {
46 using namespace googleapis;
47 
53 class LiveChatBanSnippet : public client::JsonCppData {
54  public:
60  static LiveChatBanSnippet* New();
61 
67  explicit LiveChatBanSnippet(const Json::Value& storage);
68 
74  explicit LiveChatBanSnippet(Json::Value* storage);
75 
79  virtual ~LiveChatBanSnippet();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_youtube_api::LiveChatBanSnippet");
88  }
89 
95  bool has_ban_duration_seconds() const {
96  return Storage().isMember("banDurationSeconds");
97  }
98 
103  MutableStorage()->removeMember("banDurationSeconds");
104  }
105 
106 
110  uint64 get_ban_duration_seconds() const {
111  const Json::Value& storage = Storage("banDurationSeconds");
112  return client::JsonValueToCppValueHelper<uint64 >(storage);
113  }
114 
122  void set_ban_duration_seconds(uint64 value) {
123  client::SetJsonValueFromCppValueHelper<uint64 >(
124  value, MutableStorage("banDurationSeconds"));
125  }
126 
132  bool has_banned_user_details() const {
133  return Storage().isMember("bannedUserDetails");
134  }
135 
140  MutableStorage()->removeMember("bannedUserDetails");
141  }
142 
143 
148  const ChannelProfileDetails get_banned_user_details() const;
149 
155  ChannelProfileDetails mutable_bannedUserDetails();
156 
162  bool has_live_chat_id() const {
163  return Storage().isMember("liveChatId");
164  }
165 
170  MutableStorage()->removeMember("liveChatId");
171  }
172 
173 
177  const StringPiece get_live_chat_id() const {
178  const Json::Value& v = Storage("liveChatId");
179  if (v == Json::Value::null) return StringPiece("");
180  return StringPiece(v.asCString());
181  }
182 
190  void set_live_chat_id(const StringPiece& value) {
191  *MutableStorage("liveChatId") = value.data();
192  }
193 
199  bool has_type() const {
200  return Storage().isMember("type");
201  }
202 
206  void clear_type() {
207  MutableStorage()->removeMember("type");
208  }
209 
210 
214  const StringPiece get_type() const {
215  const Json::Value& v = Storage("type");
216  if (v == Json::Value::null) return StringPiece("");
217  return StringPiece(v.asCString());
218  }
219 
227  void set_type(const StringPiece& value) {
228  *MutableStorage("type") = value.data();
229  }
230 
231  private:
232  void operator=(const LiveChatBanSnippet&);
233 }; // LiveChatBanSnippet
234 } // namespace google_youtube_api
235 #endif // GOOGLE_YOUTUBE_API_LIVE_CHAT_BAN_SNIPPET_H_
uint64 get_ban_duration_seconds() const
Definition: live_chat_ban_snippet.h:110
Definition: access_policy.cc:40
void clear_type()
Definition: live_chat_ban_snippet.h:206
Definition: channel_profile_details.h:50
void clear_banned_user_details()
Definition: live_chat_ban_snippet.h:139
void set_type(const StringPiece &value)
Definition: live_chat_ban_snippet.h:227
bool has_type() const
Definition: live_chat_ban_snippet.h:199
void set_ban_duration_seconds(uint64 value)
Definition: live_chat_ban_snippet.h:122
bool has_ban_duration_seconds() const
Definition: live_chat_ban_snippet.h:95
Definition: live_chat_ban_snippet.h:53
void set_live_chat_id(const StringPiece &value)
Definition: live_chat_ban_snippet.h:190
Definition: access_policy.h:38
const StringPiece get_type() const
Definition: live_chat_ban_snippet.h:214
const StringPiece get_live_chat_id() const
Definition: live_chat_ban_snippet.h:177
bool has_live_chat_id() const
Definition: live_chat_ban_snippet.h:162
const StringPiece GetTypeName() const
Definition: live_chat_ban_snippet.h:86
bool has_banned_user_details() const
Definition: live_chat_ban_snippet.h:132
void clear_live_chat_id()
Definition: live_chat_ban_snippet.h:169
void clear_ban_duration_seconds()
Definition: live_chat_ban_snippet.h:102