youtube  v3
search_result.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_SEARCH_RESULT_H_
31 #define GOOGLE_YOUTUBE_API_SEARCH_RESULT_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/resource_id.h"
39 #include "google/youtube_api/search_result_snippet.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_youtube_api {
46 using namespace googleapis;
47 
56 class SearchResult : public client::JsonCppData {
57  public:
63  static SearchResult* New();
64 
70  explicit SearchResult(const Json::Value& storage);
71 
77  explicit SearchResult(Json::Value* storage);
78 
82  virtual ~SearchResult();
83 
89  const StringPiece GetTypeName() const {
90  return StringPiece("google_youtube_api::SearchResult");
91  }
92 
98  bool has_etag() const {
99  return Storage().isMember("etag");
100  }
101 
105  void clear_etag() {
106  MutableStorage()->removeMember("etag");
107  }
108 
109 
113  const StringPiece get_etag() const {
114  const Json::Value& v = Storage("etag");
115  if (v == Json::Value::null) return StringPiece("");
116  return StringPiece(v.asCString());
117  }
118 
126  void set_etag(const StringPiece& value) {
127  *MutableStorage("etag") = value.data();
128  }
129 
135  bool has_id() const {
136  return Storage().isMember("id");
137  }
138 
142  void clear_id() {
143  MutableStorage()->removeMember("id");
144  }
145 
146 
150  const ResourceId get_id() const;
151 
160  ResourceId mutable_id();
161 
167  bool has_kind() const {
168  return Storage().isMember("kind");
169  }
170 
174  void clear_kind() {
175  MutableStorage()->removeMember("kind");
176  }
177 
178 
182  const StringPiece get_kind() const {
183  const Json::Value& v = Storage("kind");
184  if (v == Json::Value::null) return StringPiece("");
185  return StringPiece(v.asCString());
186  }
187 
196  void set_kind(const StringPiece& value) {
197  *MutableStorage("kind") = value.data();
198  }
199 
205  bool has_snippet() const {
206  return Storage().isMember("snippet");
207  }
208 
212  void clear_snippet() {
213  MutableStorage()->removeMember("snippet");
214  }
215 
216 
220  const SearchResultSnippet get_snippet() const;
221 
232  SearchResultSnippet mutable_snippet();
233 
234  private:
235  void operator=(const SearchResult&);
236 }; // SearchResult
237 } // namespace google_youtube_api
238 #endif // GOOGLE_YOUTUBE_API_SEARCH_RESULT_H_
bool has_id() const
Definition: search_result.h:135
Definition: access_policy.cc:40
bool has_kind() const
Definition: search_result.h:167
void clear_kind()
Definition: search_result.h:174
Definition: search_result_snippet.h:54
void clear_etag()
Definition: search_result.h:105
Definition: search_result.h:56
const StringPiece get_kind() const
Definition: search_result.h:182
const StringPiece get_etag() const
Definition: search_result.h:113
void set_etag(const StringPiece &value)
Definition: search_result.h:126
Definition: access_policy.h:38
void clear_id()
Definition: search_result.h:142
void set_kind(const StringPiece &value)
Definition: search_result.h:196
void clear_snippet()
Definition: search_result.h:212
const StringPiece GetTypeName() const
Definition: search_result.h:89
bool has_snippet() const
Definition: search_result.h:205
Definition: resource_id.h:50
bool has_etag() const
Definition: search_result.h:98