youtube  v3
member.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_MEMBER_H_
31 #define GOOGLE_YOUTUBE_API_MEMBER_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/member_snippet.h"
39 
40 namespace Json {
41 class Value;
42 } // namespace Json
43 
44 namespace google_youtube_api {
45 using namespace googleapis;
46 
54 class Member : public client::JsonCppData {
55  public:
61  static Member* New();
62 
68  explicit Member(const Json::Value& storage);
69 
75  explicit Member(Json::Value* storage);
76 
80  virtual ~Member();
81 
87  const StringPiece GetTypeName() const {
88  return StringPiece("google_youtube_api::Member");
89  }
90 
96  bool has_etag() const {
97  return Storage().isMember("etag");
98  }
99 
103  void clear_etag() {
104  MutableStorage()->removeMember("etag");
105  }
106 
107 
111  const StringPiece get_etag() const {
112  const Json::Value& v = Storage("etag");
113  if (v == Json::Value::null) return StringPiece("");
114  return StringPiece(v.asCString());
115  }
116 
124  void set_etag(const StringPiece& value) {
125  *MutableStorage("etag") = value.data();
126  }
127 
133  bool has_kind() const {
134  return Storage().isMember("kind");
135  }
136 
140  void clear_kind() {
141  MutableStorage()->removeMember("kind");
142  }
143 
144 
148  const StringPiece get_kind() const {
149  const Json::Value& v = Storage("kind");
150  if (v == Json::Value::null) return StringPiece("");
151  return StringPiece(v.asCString());
152  }
153 
162  void set_kind(const StringPiece& value) {
163  *MutableStorage("kind") = value.data();
164  }
165 
171  bool has_snippet() const {
172  return Storage().isMember("snippet");
173  }
174 
178  void clear_snippet() {
179  MutableStorage()->removeMember("snippet");
180  }
181 
182 
186  const MemberSnippet get_snippet() const;
187 
195  MemberSnippet mutable_snippet();
196 
197  private:
198  void operator=(const Member&);
199 }; // Member
200 } // namespace google_youtube_api
201 #endif // GOOGLE_YOUTUBE_API_MEMBER_H_
Definition: access_policy.cc:40
const StringPiece GetTypeName() const
Definition: member.h:87
bool has_kind() const
Definition: member.h:133
bool has_snippet() const
Definition: member.h:171
void clear_snippet()
Definition: member.h:178
const StringPiece get_etag() const
Definition: member.h:111
const StringPiece get_kind() const
Definition: member.h:148
void set_kind(const StringPiece &value)
Definition: member.h:162
bool has_etag() const
Definition: member.h:96
Definition: access_policy.h:38
void set_etag(const StringPiece &value)
Definition: member.h:124
Definition: member.h:54
void clear_etag()
Definition: member.h:103
Definition: member_snippet.h:53
void clear_kind()
Definition: member.h:140