webfonts  v1
webfonts_service.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 //------------------------------------------------------------------------------
16 // This code was generated by google-apis-code-generator 1.5.1
17 // Build date: 2018-10-08 17:45:39 UTC
18 // on: 2020-03-07, 05:09:15 UTC
19 // C++ generator version: 0.1.4
20 //
21 // Changes to this file may cause incorrect behavior and will be lost if
22 // the code is regenerated.
23 //------------------------------------------------------------------------------
24 #ifndef GOOGLE_WEBFONTS_API_WEBFONTS_SERVICE_H_
25 #define GOOGLE_WEBFONTS_API_WEBFONTS_SERVICE_H_
26 
27 #include <string>
28 #include "googleapis/base/macros.h"
29 #include "googleapis/client/service/client_service.h"
30 #include "googleapis/client/util/status.h"
31 #include "googleapis/client/util/uri_template.h"
32 
33 #include "google/webfonts_api/webfont_list.h"
34 
35 
36 namespace google_webfonts_api {
37 using namespace googleapis;
68 class WebfontsService;
69 
78  : public client::ClientServiceRequest {
79  public:
102  const client::ClientService* service,
103  client::AuthorizationCredential* credential,
104  client::HttpRequest::HttpMethod method,
105  const StringPiece& uri_template);
106 
110  virtual ~WebfontsServiceBaseRequest();
111 
112 
116  void clear_alt() {
117  _have_alt_ = false;
118  client::ClearCppValueHelper(&alt_);
119  }
120 
121 
127  const string& get_alt() const { return alt_; }
128 
134  string* mutable_alt() {
135  _have_alt_ = true;
136  return &alt_;
137  }
138 
139 
145  void set_alt(const string& value) {
146  _have_alt_ = true;
147  alt_ = value;
148  }
149 
150 
151 
155  void clear_fields() {
156  _have_fields_ = false;
157  client::ClearCppValueHelper(&fields_);
158  }
159 
160 
166  const string& get_fields() const { return fields_; }
167 
173  string* mutable_fields() {
174  _have_fields_ = true;
175  return &fields_;
176  }
177 
178 
185  void set_fields(const string& value) {
186  _have_fields_ = true;
187  fields_ = value;
188  }
189 
190 
191 
195  void clear_key() {
196  _have_key_ = false;
197  client::ClearCppValueHelper(&key_);
198  }
199 
200 
206  const string& get_key() const { return key_; }
207 
213  string* mutable_key() {
214  _have_key_ = true;
215  return &key_;
216  }
217 
218 
226  void set_key(const string& value) {
227  _have_key_ = true;
228  key_ = value;
229  }
230 
231 
232 
237  _have_oauth_token_ = false;
238  client::ClearCppValueHelper(&oauth_token_);
239  }
240 
241 
247  const string& get_oauth_token() const { return oauth_token_; }
248 
255  string* mutable_oauthToken() {
256  _have_oauth_token_ = true;
257  return &oauth_token_;
258  }
259 
260 
266  void set_oauth_token(const string& value) {
267  _have_oauth_token_ = true;
268  oauth_token_ = value;
269  }
270 
271 
272 
277  _have_pretty_print_ = false;
278  client::ClearCppValueHelper(&pretty_print_);
279  }
280 
281 
287  bool get_pretty_print() const { return pretty_print_; }
288 
294  void set_pretty_print(bool value) {
295  _have_pretty_print_ = true;
296  pretty_print_ = value;
297  }
298 
303  _have_quota_user_ = false;
304  client::ClearCppValueHelper(&quota_user_);
305  }
306 
307 
313  const string& get_quota_user() const { return quota_user_; }
314 
321  string* mutable_quotaUser() {
322  _have_quota_user_ = true;
323  return &quota_user_;
324  }
325 
326 
333  void set_quota_user(const string& value) {
334  _have_quota_user_ = true;
335  quota_user_ = value;
336  }
337 
338 
339 
343  void clear_user_ip() {
344  _have_user_ip_ = false;
345  client::ClearCppValueHelper(&user_ip_);
346  }
347 
348 
354  const string& get_user_ip() const { return user_ip_; }
355 
361  string* mutable_userIp() {
362  _have_user_ip_ = true;
363  return &user_ip_;
364  }
365 
366 
373  void set_user_ip(const string& value) {
374  _have_user_ip_ = true;
375  user_ip_ = value;
376  }
377 
388  virtual util::Status AppendVariable(
389  const StringPiece& variable_name,
390  const client::UriTemplateConfig& config,
391  string* target);
392 
398  virtual util::Status AppendOptionalQueryParameters(string* target);
399 
400 
401  protected:
407  void AddJsonContentToRequest(const client::JsonCppData *content);
408 
409  private:
410  string alt_;
411  string fields_;
412  string key_;
413  string oauth_token_;
414  bool pretty_print_;
415  string quota_user_;
416  string user_ip_;
417  bool _have_alt_ : 1;
418  bool _have_fields_ : 1;
419  bool _have_key_ : 1;
420  bool _have_oauth_token_ : 1;
421  bool _have_pretty_print_ : 1;
422  bool _have_quota_user_ : 1;
423  bool _have_user_ip_ : 1;
424 
425  DISALLOW_COPY_AND_ASSIGN(WebfontsServiceBaseRequest);
426 };
427 
428 
429 
442  public:
451  const WebfontsService* _service_,
452  client::AuthorizationCredential* _credential_);
453 
457  virtual ~WebfontsResource_ListMethod();
458 
459 
463  void clear_sort() {
464  _have_sort_ = false;
465  client::ClearCppValueHelper(&sort_);
466  }
467 
468 
474  const string& get_sort() const { return sort_; }
475 
481  string* mutable_sort() {
482  _have_sort_ = true;
483  return &sort_;
484  }
485 
486 
492  void set_sort(const string& value) {
493  _have_sort_ = true;
494  sort_ = value;
495  }
496 
506  virtual util::Status AppendVariable(
507  const StringPiece& variable_name,
508  const client::UriTemplateConfig& config,
509  string* target);
510 
516  virtual util::Status AppendOptionalQueryParameters(string* target);
517 
518 
530  WebfontList* data) {
531  return WebfontsServiceBaseRequest::ExecuteAndParseResponse(data);
532  }
533 
534  private:
535  string sort_;
536  bool _have_sort_ : 1;
537  DISALLOW_COPY_AND_ASSIGN(WebfontsResource_ListMethod);
538 };
539 
540 
541 
550 class WebfontsService : public client::ClientService {
551  public:
555  static const char googleapis_API_NAME[];
556 
560  static const char googleapis_API_VERSION[];
561 
565  static const char googleapis_API_GENERATOR[];
566 
567 
574  public:
582  explicit WebfontsResource(WebfontsService* service);
583 
588 
589 
598  WebfontsResource_ListMethod* NewListMethod(
599  client::AuthorizationCredential* _credential_) const;
600 
601  private:
602  WebfontsService* service_;
603 
604  DISALLOW_COPY_AND_ASSIGN(WebfontsResource);
605  };
606 
607 
608 
615  explicit WebfontsService(client::HttpTransport* transport);
616 
620  virtual ~WebfontsService();
621 
628  return webfonts_;
629  }
630 
631 
632 
633  private:
634  WebfontsResource webfonts_;
635 
636  DISALLOW_COPY_AND_ASSIGN(WebfontsService);
637 };
638 
639 
670 } // namespace google_webfonts_api
671 #endif // GOOGLE_WEBFONTS_API_WEBFONTS_SERVICE_H_
void clear_user_ip()
Definition: webfonts_service.h:343
string * mutable_sort()
Definition: webfonts_service.h:481
string * mutable_key()
Definition: webfonts_service.h:213
const string & get_alt() const
Definition: webfonts_service.h:127
void clear_fields()
Definition: webfonts_service.h:155
Definition: webfont.cc:41
void set_oauth_token(const string &value)
Definition: webfonts_service.h:266
string * mutable_quotaUser()
Definition: webfonts_service.h:321
void set_alt(const string &value)
Definition: webfonts_service.h:145
void clear_alt()
Definition: webfonts_service.h:116
const string & get_oauth_token() const
Definition: webfonts_service.h:247
void set_user_ip(const string &value)
Definition: webfonts_service.h:373
const string & get_sort() const
Definition: webfonts_service.h:474
void set_quota_user(const string &value)
Definition: webfonts_service.h:333
const string & get_user_ip() const
Definition: webfonts_service.h:354
void clear_quota_user()
Definition: webfonts_service.h:302
void set_fields(const string &value)
Definition: webfonts_service.h:185
bool get_pretty_print() const
Definition: webfonts_service.h:287
const WebfontsResource & get_webfonts() const
Definition: webfonts_service.h:627
Definition: webfonts_service.h:550
void clear_pretty_print()
Definition: webfonts_service.h:276
string * mutable_userIp()
Definition: webfonts_service.h:361
void set_pretty_print(bool value)
Definition: webfonts_service.h:294
string * mutable_oauthToken()
Definition: webfonts_service.h:255
Definition: webfonts_service.h:441
Definition: webfont_list.h:52
util::Status ExecuteAndParseResponse(WebfontList *data)
Definition: webfonts_service.h:529
void clear_oauth_token()
Definition: webfonts_service.h:236
~WebfontsResource()
Definition: webfonts_service.h:587
void set_sort(const string &value)
Definition: webfonts_service.h:492
Definition: webfonts_service.h:77
string * mutable_fields()
Definition: webfonts_service.h:173
void clear_sort()
Definition: webfonts_service.h:463
string * mutable_alt()
Definition: webfonts_service.h:134
const string & get_fields() const
Definition: webfonts_service.h:166
void clear_key()
Definition: webfonts_service.h:195
const string & get_key() const
Definition: webfonts_service.h:206
void set_key(const string &value)
Definition: webfonts_service.h:226
const string & get_quota_user() const
Definition: webfonts_service.h:313