youtube  v3
caption.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_CAPTION_H_
31 #define GOOGLE_YOUTUBE_API_CAPTION_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/caption_snippet.h"
39 
40 namespace Json {
41 class Value;
42 } // namespace Json
43 
44 namespace google_youtube_api {
45 using namespace googleapis;
46 
53 class Caption : public client::JsonCppData {
54  public:
60  static Caption* New();
61 
67  explicit Caption(const Json::Value& storage);
68 
74  explicit Caption(Json::Value* storage);
75 
79  virtual ~Caption();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_youtube_api::Caption");
88  }
89 
95  bool has_etag() const {
96  return Storage().isMember("etag");
97  }
98 
102  void clear_etag() {
103  MutableStorage()->removeMember("etag");
104  }
105 
106 
110  const StringPiece get_etag() const {
111  const Json::Value& v = Storage("etag");
112  if (v == Json::Value::null) return StringPiece("");
113  return StringPiece(v.asCString());
114  }
115 
123  void set_etag(const StringPiece& value) {
124  *MutableStorage("etag") = value.data();
125  }
126 
132  bool has_id() const {
133  return Storage().isMember("id");
134  }
135 
139  void clear_id() {
140  MutableStorage()->removeMember("id");
141  }
142 
143 
147  const StringPiece get_id() const {
148  const Json::Value& v = Storage("id");
149  if (v == Json::Value::null) return StringPiece("");
150  return StringPiece(v.asCString());
151  }
152 
160  void set_id(const StringPiece& value) {
161  *MutableStorage("id") = value.data();
162  }
163 
169  bool has_kind() const {
170  return Storage().isMember("kind");
171  }
172 
176  void clear_kind() {
177  MutableStorage()->removeMember("kind");
178  }
179 
180 
184  const StringPiece get_kind() const {
185  const Json::Value& v = Storage("kind");
186  if (v == Json::Value::null) return StringPiece("");
187  return StringPiece(v.asCString());
188  }
189 
198  void set_kind(const StringPiece& value) {
199  *MutableStorage("kind") = value.data();
200  }
201 
207  bool has_snippet() const {
208  return Storage().isMember("snippet");
209  }
210 
214  void clear_snippet() {
215  MutableStorage()->removeMember("snippet");
216  }
217 
218 
222  const CaptionSnippet get_snippet() const;
223 
231  CaptionSnippet mutable_snippet();
232 
233  private:
234  void operator=(const Caption&);
235 }; // Caption
236 } // namespace google_youtube_api
237 #endif // GOOGLE_YOUTUBE_API_CAPTION_H_
Definition: access_policy.cc:40
const StringPiece get_id() const
Definition: caption.h:147
void clear_kind()
Definition: caption.h:176
bool has_snippet() const
Definition: caption.h:207
bool has_kind() const
Definition: caption.h:169
void clear_snippet()
Definition: caption.h:214
const StringPiece GetTypeName() const
Definition: caption.h:86
void clear_id()
Definition: caption.h:139
Definition: access_policy.h:38
const StringPiece get_kind() const
Definition: caption.h:184
const StringPiece get_etag() const
Definition: caption.h:110
void clear_etag()
Definition: caption.h:102
Definition: caption_snippet.h:51
void set_etag(const StringPiece &value)
Definition: caption.h:123
Definition: caption.h:53
void set_id(const StringPiece &value)
Definition: caption.h:160
bool has_id() const
Definition: caption.h:132
bool has_etag() const
Definition: caption.h:95
void set_kind(const StringPiece &value)
Definition: caption.h:198