youtube  v3
live_chat_super_sticker_details.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_SUPER_STICKER_DETAILS_H_
31 #define GOOGLE_YOUTUBE_API_LIVE_CHAT_SUPER_STICKER_DETAILS_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/super_sticker_metadata.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_youtube_api {
46 using namespace googleapis;
47 
53 class LiveChatSuperStickerDetails : public client::JsonCppData {
54  public:
60  static LiveChatSuperStickerDetails* New();
61 
67  explicit LiveChatSuperStickerDetails(const Json::Value& storage);
68 
74  explicit LiveChatSuperStickerDetails(Json::Value* storage);
75 
79  virtual ~LiveChatSuperStickerDetails();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_youtube_api::LiveChatSuperStickerDetails");
88  }
89 
96  return Storage().isMember("amountDisplayString");
97  }
98 
103  MutableStorage()->removeMember("amountDisplayString");
104  }
105 
106 
110  const StringPiece get_amount_display_string() const {
111  const Json::Value& v = Storage("amountDisplayString");
112  if (v == Json::Value::null) return StringPiece("");
113  return StringPiece(v.asCString());
114  }
115 
123  void set_amount_display_string(const StringPiece& value) {
124  *MutableStorage("amountDisplayString") = value.data();
125  }
126 
132  bool has_amount_micros() const {
133  return Storage().isMember("amountMicros");
134  }
135 
140  MutableStorage()->removeMember("amountMicros");
141  }
142 
143 
147  uint64 get_amount_micros() const {
148  const Json::Value& storage = Storage("amountMicros");
149  return client::JsonValueToCppValueHelper<uint64 >(storage);
150  }
151 
159  void set_amount_micros(uint64 value) {
160  client::SetJsonValueFromCppValueHelper<uint64 >(
161  value, MutableStorage("amountMicros"));
162  }
163 
169  bool has_currency() const {
170  return Storage().isMember("currency");
171  }
172 
176  void clear_currency() {
177  MutableStorage()->removeMember("currency");
178  }
179 
180 
184  const StringPiece get_currency() const {
185  const Json::Value& v = Storage("currency");
186  if (v == Json::Value::null) return StringPiece("");
187  return StringPiece(v.asCString());
188  }
189 
197  void set_currency(const StringPiece& value) {
198  *MutableStorage("currency") = value.data();
199  }
200 
207  return Storage().isMember("superStickerMetadata");
208  }
209 
214  MutableStorage()->removeMember("superStickerMetadata");
215  }
216 
217 
222  const SuperStickerMetadata get_super_sticker_metadata() const;
223 
232  SuperStickerMetadata mutable_superStickerMetadata();
233 
239  bool has_tier() const {
240  return Storage().isMember("tier");
241  }
242 
246  void clear_tier() {
247  MutableStorage()->removeMember("tier");
248  }
249 
250 
254  uint32 get_tier() const {
255  const Json::Value& storage = Storage("tier");
256  return client::JsonValueToCppValueHelper<uint32 >(storage);
257  }
258 
267  void set_tier(uint32 value) {
268  client::SetJsonValueFromCppValueHelper<uint32 >(
269  value, MutableStorage("tier"));
270  }
271 
272  private:
273  void operator=(const LiveChatSuperStickerDetails&);
274 }; // LiveChatSuperStickerDetails
275 } // namespace google_youtube_api
276 #endif // GOOGLE_YOUTUBE_API_LIVE_CHAT_SUPER_STICKER_DETAILS_H_
void clear_amount_micros()
Definition: live_chat_super_sticker_details.h:139
Definition: access_policy.cc:40
bool has_amount_display_string() const
Definition: live_chat_super_sticker_details.h:95
Definition: super_sticker_metadata.h:50
void clear_tier()
Definition: live_chat_super_sticker_details.h:246
void clear_amount_display_string()
Definition: live_chat_super_sticker_details.h:102
bool has_amount_micros() const
Definition: live_chat_super_sticker_details.h:132
const StringPiece get_currency() const
Definition: live_chat_super_sticker_details.h:184
void clear_currency()
Definition: live_chat_super_sticker_details.h:176
Definition: live_chat_super_sticker_details.h:53
uint32 get_tier() const
Definition: live_chat_super_sticker_details.h:254
bool has_super_sticker_metadata() const
Definition: live_chat_super_sticker_details.h:206
void set_amount_micros(uint64 value)
Definition: live_chat_super_sticker_details.h:159
Definition: access_policy.h:38
const StringPiece get_amount_display_string() const
Definition: live_chat_super_sticker_details.h:110
void clear_super_sticker_metadata()
Definition: live_chat_super_sticker_details.h:213
uint64 get_amount_micros() const
Definition: live_chat_super_sticker_details.h:147
void set_currency(const StringPiece &value)
Definition: live_chat_super_sticker_details.h:197
const StringPiece GetTypeName() const
Definition: live_chat_super_sticker_details.h:86
void set_amount_display_string(const StringPiece &value)
Definition: live_chat_super_sticker_details.h:123
bool has_tier() const
Definition: live_chat_super_sticker_details.h:239
bool has_currency() const
Definition: live_chat_super_sticker_details.h:169
void set_tier(uint32 value)
Definition: live_chat_super_sticker_details.h:267