youtube  v3
localized_property.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_LOCALIZED_PROPERTY_H_
31 #define GOOGLE_YOUTUBE_API_LOCALIZED_PROPERTY_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/language_tag.h"
39 #include "google/youtube_api/localized_string.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_youtube_api {
46 using namespace googleapis;
47 
53 class LocalizedProperty : public client::JsonCppData {
54  public:
60  static LocalizedProperty* New();
61 
67  explicit LocalizedProperty(const Json::Value& storage);
68 
74  explicit LocalizedProperty(Json::Value* storage);
75 
79  virtual ~LocalizedProperty();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_youtube_api::LocalizedProperty");
88  }
89 
95  bool has_default() const {
96  return Storage().isMember("default");
97  }
98 
102  void clear_default() {
103  MutableStorage()->removeMember("default");
104  }
105 
106 
110  const StringPiece get_default() const {
111  const Json::Value& v = Storage("default");
112  if (v == Json::Value::null) return StringPiece("");
113  return StringPiece(v.asCString());
114  }
115 
120  void set_default(const StringPiece& value) {
121  *MutableStorage("default") = value.data();
122  }
123 
129  bool has_default_language() const {
130  return Storage().isMember("defaultLanguage");
131  }
132 
137  MutableStorage()->removeMember("defaultLanguage");
138  }
139 
140 
145  const LanguageTag get_default_language() const;
146 
155  LanguageTag mutable_defaultLanguage();
156 
162  bool has_localized() const {
163  return Storage().isMember("localized");
164  }
165 
170  MutableStorage()->removeMember("localized");
171  }
172 
173 
177  const client::JsonCppArray<LocalizedString > get_localized() const;
178 
184  client::JsonCppArray<LocalizedString > mutable_localized();
185 
186  private:
187  void operator=(const LocalizedProperty&);
188 }; // LocalizedProperty
189 } // namespace google_youtube_api
190 #endif // GOOGLE_YOUTUBE_API_LOCALIZED_PROPERTY_H_
Definition: access_policy.cc:40
void set_default(const StringPiece &value)
Definition: localized_property.h:120
const StringPiece GetTypeName() const
Definition: localized_property.h:86
void clear_default_language()
Definition: localized_property.h:136
bool has_default_language() const
Definition: localized_property.h:129
Definition: localized_property.h:53
bool has_localized() const
Definition: localized_property.h:162
Definition: access_policy.h:38
Definition: language_tag.h:50
void clear_localized()
Definition: localized_property.h:169
const StringPiece get_default() const
Definition: localized_property.h:110
void clear_default()
Definition: localized_property.h:102
bool has_default() const
Definition: localized_property.h:95