youtube  v3
invideo_promotion.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_INVIDEO_PROMOTION_H_
31 #define GOOGLE_YOUTUBE_API_INVIDEO_PROMOTION_H_
32 
33 #include "googleapis/base/macros.h"
34 #include "googleapis/client/data/jsoncpp_data.h"
35 #include "googleapis/strings/stringpiece.h"
36 
37 #include "google/youtube_api/invideo_position.h"
38 #include "google/youtube_api/invideo_timing.h"
39 #include "google/youtube_api/promoted_item.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_youtube_api {
46 using namespace googleapis;
47 
54 class InvideoPromotion : public client::JsonCppData {
55  public:
61  static InvideoPromotion* New();
62 
68  explicit InvideoPromotion(const Json::Value& storage);
69 
75  explicit InvideoPromotion(Json::Value* storage);
76 
80  virtual ~InvideoPromotion();
81 
87  const StringPiece GetTypeName() const {
88  return StringPiece("google_youtube_api::InvideoPromotion");
89  }
90 
96  bool has_default_timing() const {
97  return Storage().isMember("defaultTiming");
98  }
99 
104  MutableStorage()->removeMember("defaultTiming");
105  }
106 
107 
111  const InvideoTiming get_default_timing() const;
112 
122  InvideoTiming mutable_defaultTiming();
123 
129  bool has_items() const {
130  return Storage().isMember("items");
131  }
132 
136  void clear_items() {
137  MutableStorage()->removeMember("items");
138  }
139 
140 
144  const client::JsonCppArray<PromotedItem > get_items() const;
145 
153  client::JsonCppArray<PromotedItem > mutable_items();
154 
160  bool has_position() const {
161  return Storage().isMember("position");
162  }
163 
167  void clear_position() {
168  MutableStorage()->removeMember("position");
169  }
170 
171 
175  const InvideoPosition get_position() const;
176 
186  InvideoPosition mutable_position();
187 
193  bool has_use_smart_timing() const {
194  return Storage().isMember("useSmartTiming");
195  }
196 
201  MutableStorage()->removeMember("useSmartTiming");
202  }
203 
204 
208  bool get_use_smart_timing() const {
209  const Json::Value& storage = Storage("useSmartTiming");
210  return client::JsonValueToCppValueHelper<bool >(storage);
211  }
212 
224  void set_use_smart_timing(bool value) {
225  client::SetJsonValueFromCppValueHelper<bool >(
226  value, MutableStorage("useSmartTiming"));
227  }
228 
229  private:
230  void operator=(const InvideoPromotion&);
231 }; // InvideoPromotion
232 } // namespace google_youtube_api
233 #endif // GOOGLE_YOUTUBE_API_INVIDEO_PROMOTION_H_
Definition: invideo_timing.h:51
Definition: access_policy.cc:40
bool get_use_smart_timing() const
Definition: invideo_promotion.h:208
void clear_use_smart_timing()
Definition: invideo_promotion.h:200
Definition: invideo_promotion.h:54
const StringPiece GetTypeName() const
Definition: invideo_promotion.h:87
bool has_default_timing() const
Definition: invideo_promotion.h:96
bool has_items() const
Definition: invideo_promotion.h:129
Definition: invideo_position.h:51
Definition: access_policy.h:38
bool has_position() const
Definition: invideo_promotion.h:160
void clear_items()
Definition: invideo_promotion.h:136
bool has_use_smart_timing() const
Definition: invideo_promotion.h:193
void clear_default_timing()
Definition: invideo_promotion.h:103
void set_use_smart_timing(bool value)
Definition: invideo_promotion.h:224
void clear_position()
Definition: invideo_promotion.h:167