youtube  v3
activity_content_details_promoted_item.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_ACTIVITY_CONTENT_DETAILS_PROMOTED_ITEM_H_
31 #define GOOGLE_YOUTUBE_API_ACTIVITY_CONTENT_DETAILS_PROMOTED_ITEM_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 namespace Json {
39 class Value;
40 } // namespace Json
41 
42 namespace google_youtube_api {
43 using namespace googleapis;
44 
50 class ActivityContentDetailsPromotedItem : public client::JsonCppData {
51  public:
58 
64  explicit ActivityContentDetailsPromotedItem(const Json::Value& storage);
65 
71  explicit ActivityContentDetailsPromotedItem(Json::Value* storage);
72 
77 
83  const StringPiece GetTypeName() const {
84  return StringPiece("google_youtube_api::ActivityContentDetailsPromotedItem");
85  }
86 
92  bool has_ad_tag() const {
93  return Storage().isMember("adTag");
94  }
95 
99  void clear_ad_tag() {
100  MutableStorage()->removeMember("adTag");
101  }
102 
103 
107  const StringPiece get_ad_tag() const {
108  const Json::Value& v = Storage("adTag");
109  if (v == Json::Value::null) return StringPiece("");
110  return StringPiece(v.asCString());
111  }
112 
120  void set_ad_tag(const StringPiece& value) {
121  *MutableStorage("adTag") = value.data();
122  }
123 
129  bool has_click_tracking_url() const {
130  return Storage().isMember("clickTrackingUrl");
131  }
132 
137  MutableStorage()->removeMember("clickTrackingUrl");
138  }
139 
140 
144  const StringPiece get_click_tracking_url() const {
145  const Json::Value& v = Storage("clickTrackingUrl");
146  if (v == Json::Value::null) return StringPiece("");
147  return StringPiece(v.asCString());
148  }
149 
158  void set_click_tracking_url(const StringPiece& value) {
159  *MutableStorage("clickTrackingUrl") = value.data();
160  }
161 
167  bool has_creative_view_url() const {
168  return Storage().isMember("creativeViewUrl");
169  }
170 
175  MutableStorage()->removeMember("creativeViewUrl");
176  }
177 
178 
182  const StringPiece get_creative_view_url() const {
183  const Json::Value& v = Storage("creativeViewUrl");
184  if (v == Json::Value::null) return StringPiece("");
185  return StringPiece(v.asCString());
186  }
187 
196  void set_creative_view_url(const StringPiece& value) {
197  *MutableStorage("creativeViewUrl") = value.data();
198  }
199 
205  bool has_cta_type() const {
206  return Storage().isMember("ctaType");
207  }
208 
212  void clear_cta_type() {
213  MutableStorage()->removeMember("ctaType");
214  }
215 
216 
220  const StringPiece get_cta_type() const {
221  const Json::Value& v = Storage("ctaType");
222  if (v == Json::Value::null) return StringPiece("");
223  return StringPiece(v.asCString());
224  }
225 
234  void set_cta_type(const StringPiece& value) {
235  *MutableStorage("ctaType") = value.data();
236  }
237 
244  return Storage().isMember("customCtaButtonText");
245  }
246 
251  MutableStorage()->removeMember("customCtaButtonText");
252  }
253 
254 
258  const StringPiece get_custom_cta_button_text() const {
259  const Json::Value& v = Storage("customCtaButtonText");
260  if (v == Json::Value::null) return StringPiece("");
261  return StringPiece(v.asCString());
262  }
263 
272  void set_custom_cta_button_text(const StringPiece& value) {
273  *MutableStorage("customCtaButtonText") = value.data();
274  }
275 
281  bool has_description_text() const {
282  return Storage().isMember("descriptionText");
283  }
284 
289  MutableStorage()->removeMember("descriptionText");
290  }
291 
292 
296  const StringPiece get_description_text() const {
297  const Json::Value& v = Storage("descriptionText");
298  if (v == Json::Value::null) return StringPiece("");
299  return StringPiece(v.asCString());
300  }
301 
309  void set_description_text(const StringPiece& value) {
310  *MutableStorage("descriptionText") = value.data();
311  }
312 
318  bool has_destination_url() const {
319  return Storage().isMember("destinationUrl");
320  }
321 
326  MutableStorage()->removeMember("destinationUrl");
327  }
328 
329 
333  const StringPiece get_destination_url() const {
334  const Json::Value& v = Storage("destinationUrl");
335  if (v == Json::Value::null) return StringPiece("");
336  return StringPiece(v.asCString());
337  }
338 
347  void set_destination_url(const StringPiece& value) {
348  *MutableStorage("destinationUrl") = value.data();
349  }
350 
356  bool has_forecasting_url() const {
357  return Storage().isMember("forecastingUrl");
358  }
359 
364  MutableStorage()->removeMember("forecastingUrl");
365  }
366 
367 
372  const client::JsonCppArray<string > get_forecasting_url() const {
373  const Json::Value& storage = Storage("forecastingUrl");
374  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
375  }
376 
387  client::JsonCppArray<string > mutable_forecastingUrl() {
388  Json::Value* storage = MutableStorage("forecastingUrl");
389  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
390  }
391 
397  bool has_impression_url() const {
398  return Storage().isMember("impressionUrl");
399  }
400 
405  MutableStorage()->removeMember("impressionUrl");
406  }
407 
408 
412  const client::JsonCppArray<string > get_impression_url() const {
413  const Json::Value& storage = Storage("impressionUrl");
414  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
415  }
416 
426  client::JsonCppArray<string > mutable_impressionUrl() {
427  Json::Value* storage = MutableStorage("impressionUrl");
428  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
429  }
430 
436  bool has_video_id() const {
437  return Storage().isMember("videoId");
438  }
439 
443  void clear_video_id() {
444  MutableStorage()->removeMember("videoId");
445  }
446 
447 
451  const StringPiece get_video_id() const {
452  const Json::Value& v = Storage("videoId");
453  if (v == Json::Value::null) return StringPiece("");
454  return StringPiece(v.asCString());
455  }
456 
464  void set_video_id(const StringPiece& value) {
465  *MutableStorage("videoId") = value.data();
466  }
467 
468  private:
469  void operator=(const ActivityContentDetailsPromotedItem&);
470 }; // ActivityContentDetailsPromotedItem
471 } // namespace google_youtube_api
472 #endif // GOOGLE_YOUTUBE_API_ACTIVITY_CONTENT_DETAILS_PROMOTED_ITEM_H_
const StringPiece get_ad_tag() const
Definition: activity_content_details_promoted_item.h:107
Definition: access_policy.cc:40
const StringPiece get_cta_type() const
Definition: activity_content_details_promoted_item.h:220
const StringPiece get_destination_url() const
Definition: activity_content_details_promoted_item.h:333
void clear_creative_view_url()
Definition: activity_content_details_promoted_item.h:174
const StringPiece get_creative_view_url() const
Definition: activity_content_details_promoted_item.h:182
void clear_custom_cta_button_text()
Definition: activity_content_details_promoted_item.h:250
void set_cta_type(const StringPiece &value)
Definition: activity_content_details_promoted_item.h:234
const StringPiece GetTypeName() const
Definition: activity_content_details_promoted_item.h:83
void set_destination_url(const StringPiece &value)
Definition: activity_content_details_promoted_item.h:347
bool has_impression_url() const
Definition: activity_content_details_promoted_item.h:397
void clear_destination_url()
Definition: activity_content_details_promoted_item.h:325
bool has_forecasting_url() const
Definition: activity_content_details_promoted_item.h:356
void set_creative_view_url(const StringPiece &value)
Definition: activity_content_details_promoted_item.h:196
void clear_forecasting_url()
Definition: activity_content_details_promoted_item.h:363
void clear_description_text()
Definition: activity_content_details_promoted_item.h:288
void set_description_text(const StringPiece &value)
Definition: activity_content_details_promoted_item.h:309
Definition: activity_content_details_promoted_item.h:50
void set_ad_tag(const StringPiece &value)
Definition: activity_content_details_promoted_item.h:120
const StringPiece get_custom_cta_button_text() const
Definition: activity_content_details_promoted_item.h:258
const StringPiece get_click_tracking_url() const
Definition: activity_content_details_promoted_item.h:144
void clear_ad_tag()
Definition: activity_content_details_promoted_item.h:99
Definition: access_policy.h:38
void set_click_tracking_url(const StringPiece &value)
Definition: activity_content_details_promoted_item.h:158
bool has_cta_type() const
Definition: activity_content_details_promoted_item.h:205
void clear_click_tracking_url()
Definition: activity_content_details_promoted_item.h:136
void clear_cta_type()
Definition: activity_content_details_promoted_item.h:212
bool has_description_text() const
Definition: activity_content_details_promoted_item.h:281
bool has_ad_tag() const
Definition: activity_content_details_promoted_item.h:92
void clear_video_id()
Definition: activity_content_details_promoted_item.h:443
void set_video_id(const StringPiece &value)
Definition: activity_content_details_promoted_item.h:464
client::JsonCppArray< string > mutable_impressionUrl()
Definition: activity_content_details_promoted_item.h:426
void clear_impression_url()
Definition: activity_content_details_promoted_item.h:404
bool has_custom_cta_button_text() const
Definition: activity_content_details_promoted_item.h:243
const StringPiece get_description_text() const
Definition: activity_content_details_promoted_item.h:296
bool has_click_tracking_url() const
Definition: activity_content_details_promoted_item.h:129
client::JsonCppArray< string > mutable_forecastingUrl()
Definition: activity_content_details_promoted_item.h:387
bool has_video_id() const
Definition: activity_content_details_promoted_item.h:436
bool has_destination_url() const
Definition: activity_content_details_promoted_item.h:318
const StringPiece get_video_id() const
Definition: activity_content_details_promoted_item.h:451
const client::JsonCppArray< string > get_impression_url() const
Definition: activity_content_details_promoted_item.h:412
const client::JsonCppArray< string > get_forecasting_url() const
Definition: activity_content_details_promoted_item.h:372
void set_custom_cta_button_text(const StringPiece &value)
Definition: activity_content_details_promoted_item.h:272
bool has_creative_view_url() const
Definition: activity_content_details_promoted_item.h:167