webfonts  v1
webfont.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-03-07, 05:09:15 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // Google Fonts Developer API (webfonts/v1)
24 // Generated from:
25 // Version: v1
26 // Revision: 65
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_WEBFONTS_API_WEBFONT_H_
31 #define GOOGLE_WEBFONTS_API_WEBFONT_H_
32 
33 #include <string>
34 #include "googleapis/base/macros.h"
35 #include "googleapis/client/data/jsoncpp_data.h"
36 #include "googleapis/client/util/date_time.h"
37 #include "googleapis/strings/stringpiece.h"
38 
39 namespace Json {
40 class Value;
41 } // namespace Json
42 
43 namespace google_webfonts_api {
44 using namespace googleapis;
45 
51 class Webfont : public client::JsonCppData {
52  public:
58  static Webfont* New();
59 
65  explicit Webfont(const Json::Value& storage);
66 
72  explicit Webfont(Json::Value* storage);
73 
77  virtual ~Webfont();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_webfonts_api::Webfont");
86  }
87 
93  bool has_category() const {
94  return Storage().isMember("category");
95  }
96 
100  void clear_category() {
101  MutableStorage()->removeMember("category");
102  }
103 
104 
108  const StringPiece get_category() const {
109  const Json::Value& v = Storage("category");
110  if (v == Json::Value::null) return StringPiece("");
111  return StringPiece(v.asCString());
112  }
113 
121  void set_category(const StringPiece& value) {
122  *MutableStorage("category") = value.data();
123  }
124 
130  bool has_family() const {
131  return Storage().isMember("family");
132  }
133 
137  void clear_family() {
138  MutableStorage()->removeMember("family");
139  }
140 
141 
145  const StringPiece get_family() const {
146  const Json::Value& v = Storage("family");
147  if (v == Json::Value::null) return StringPiece("");
148  return StringPiece(v.asCString());
149  }
150 
158  void set_family(const StringPiece& value) {
159  *MutableStorage("family") = value.data();
160  }
161 
167  bool has_files() const {
168  return Storage().isMember("files");
169  }
170 
174  void clear_files() {
175  MutableStorage()->removeMember("files");
176  }
177 
178 
182  const client::JsonCppAssociativeArray<string > get_files() const {
183  const Json::Value& storage = Storage("files");
184  return client::JsonValueToCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
185  }
186 
195  client::JsonCppAssociativeArray<string > mutable_files() {
196  Json::Value* storage = MutableStorage("files");
197  return client::JsonValueToMutableCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
198  }
199 
205  bool has_kind() const {
206  return Storage().isMember("kind");
207  }
208 
212  void clear_kind() {
213  MutableStorage()->removeMember("kind");
214  }
215 
216 
220  const StringPiece get_kind() const {
221  const Json::Value& v = Storage("kind");
222  if (v == Json::Value::null) return StringPiece("");
223  return StringPiece(v.asCString());
224  }
225 
233  void set_kind(const StringPiece& value) {
234  *MutableStorage("kind") = value.data();
235  }
236 
242  bool has_last_modified() const {
243  return Storage().isMember("lastModified");
244  }
245 
250  MutableStorage()->removeMember("lastModified");
251  }
252 
253 
257  client::Date get_last_modified() const {
258  const Json::Value& storage = Storage("lastModified");
259  return client::JsonValueToCppValueHelper<client::Date >(storage);
260  }
261 
269  void set_last_modified(client::Date value) {
270  client::SetJsonValueFromCppValueHelper<client::Date >(
271  value, MutableStorage("lastModified"));
272  }
273 
279  bool has_subsets() const {
280  return Storage().isMember("subsets");
281  }
282 
286  void clear_subsets() {
287  MutableStorage()->removeMember("subsets");
288  }
289 
290 
294  const client::JsonCppArray<string > get_subsets() const {
295  const Json::Value& storage = Storage("subsets");
296  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
297  }
298 
306  client::JsonCppArray<string > mutable_subsets() {
307  Json::Value* storage = MutableStorage("subsets");
308  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
309  }
310 
316  bool has_variants() const {
317  return Storage().isMember("variants");
318  }
319 
323  void clear_variants() {
324  MutableStorage()->removeMember("variants");
325  }
326 
327 
331  const client::JsonCppArray<string > get_variants() const {
332  const Json::Value& storage = Storage("variants");
333  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
334  }
335 
344  client::JsonCppArray<string > mutable_variants() {
345  Json::Value* storage = MutableStorage("variants");
346  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
347  }
348 
354  bool has_version() const {
355  return Storage().isMember("version");
356  }
357 
361  void clear_version() {
362  MutableStorage()->removeMember("version");
363  }
364 
365 
369  const StringPiece get_version() const {
370  const Json::Value& v = Storage("version");
371  if (v == Json::Value::null) return StringPiece("");
372  return StringPiece(v.asCString());
373  }
374 
382  void set_version(const StringPiece& value) {
383  *MutableStorage("version") = value.data();
384  }
385 
386  private:
387  void operator=(const Webfont&);
388 }; // Webfont
389 } // namespace google_webfonts_api
390 #endif // GOOGLE_WEBFONTS_API_WEBFONT_H_
const StringPiece get_category() const
Definition: webfont.h:108
const StringPiece GetTypeName() const
Definition: webfont.h:84
void set_last_modified(client::Date value)
Definition: webfont.h:269
void clear_version()
Definition: webfont.h:361
const StringPiece get_version() const
Definition: webfont.h:369
Definition: webfont.cc:41
void clear_family()
Definition: webfont.h:137
client::JsonCppArray< string > mutable_subsets()
Definition: webfont.h:306
void clear_variants()
Definition: webfont.h:323
bool has_last_modified() const
Definition: webfont.h:242
bool has_subsets() const
Definition: webfont.h:279
const StringPiece get_kind() const
Definition: webfont.h:220
void clear_kind()
Definition: webfont.h:212
Definition: webfont.h:51
bool has_family() const
Definition: webfont.h:130
client::Date get_last_modified() const
Definition: webfont.h:257
void clear_files()
Definition: webfont.h:174
Definition: webfont.h:39
bool has_category() const
Definition: webfont.h:93
bool has_kind() const
Definition: webfont.h:205
const client::JsonCppAssociativeArray< string > get_files() const
Definition: webfont.h:182
void set_version(const StringPiece &value)
Definition: webfont.h:382
const client::JsonCppArray< string > get_subsets() const
Definition: webfont.h:294
client::JsonCppArray< string > mutable_variants()
Definition: webfont.h:344
void set_kind(const StringPiece &value)
Definition: webfont.h:233
void clear_subsets()
Definition: webfont.h:286
void set_category(const StringPiece &value)
Definition: webfont.h:121
const StringPiece get_family() const
Definition: webfont.h:145
bool has_files() const
Definition: webfont.h:167
void clear_last_modified()
Definition: webfont.h:249
bool has_variants() const
Definition: webfont.h:316
client::JsonCppAssociativeArray< string > mutable_files()
Definition: webfont.h:195
void set_family(const StringPiece &value)
Definition: webfont.h:158
const client::JsonCppArray< string > get_variants() const
Definition: webfont.h:331
void clear_category()
Definition: webfont.h:100
bool has_version() const
Definition: webfont.h:354