30 #ifndef GOOGLE_DISCOVERY_API_REST_METHOD_H_ 31 #define GOOGLE_DISCOVERY_API_REST_METHOD_H_ 34 #include "googleapis/base/macros.h" 35 #include "googleapis/client/data/jsoncpp_data.h" 36 #include "googleapis/strings/stringpiece.h" 38 #include "google/discovery_api/json_schema.h" 108 return StringPiece(
"google_discovery_api::RestMethodMediaUploadProtocolsResumable");
117 return Storage().isMember(
"multipart");
124 MutableStorage()->removeMember(
"multipart");
132 const Json::Value& storage = Storage(
"multipart");
133 return client::JsonValueToCppValueHelper<bool >(storage);
144 client::SetJsonValueFromCppValueHelper<bool >(
145 value, MutableStorage(
"multipart"));
154 return Storage().isMember(
"path");
161 MutableStorage()->removeMember(
"path");
169 const Json::Value& v = Storage(
"path");
170 if (v == Json::Value::null)
return StringPiece(
"");
171 return StringPiece(v.asCString());
183 *MutableStorage(
"path") = value.data();
229 return StringPiece(
"google_discovery_api::RestMethodMediaUploadProtocolsSimple");
238 return Storage().isMember(
"multipart");
245 MutableStorage()->removeMember(
"multipart");
253 const Json::Value& storage = Storage(
"multipart");
254 return client::JsonValueToCppValueHelper<bool >(storage);
265 client::SetJsonValueFromCppValueHelper<bool >(
266 value, MutableStorage(
"multipart"));
275 return Storage().isMember(
"path");
282 MutableStorage()->removeMember(
"path");
290 const Json::Value& v = Storage(
"path");
291 if (v == Json::Value::null)
return StringPiece(
"");
292 return StringPiece(v.asCString());
304 *MutableStorage(
"path") = value.data();
343 return StringPiece(
"google_discovery_api::RestMethodMediaUploadProtocols");
352 return Storage().isMember(
"resumable");
359 MutableStorage()->removeMember(
"resumable");
367 const Json::Value& storage = Storage(
"resumable");
368 return client::JsonValueToCppValueHelper<RestMethodMediaUploadProtocolsResumable >(storage);
380 Json::Value* storage = MutableStorage(
"resumable");
381 return client::JsonValueToMutableCppValueHelper<RestMethodMediaUploadProtocolsResumable >(storage);
390 return Storage().isMember(
"simple");
397 MutableStorage()->removeMember(
"simple");
405 const Json::Value& storage = Storage(
"simple");
406 return client::JsonValueToCppValueHelper<RestMethodMediaUploadProtocolsSimple >(storage);
418 Json::Value* storage = MutableStorage(
"simple");
419 return client::JsonValueToMutableCppValueHelper<RestMethodMediaUploadProtocolsSimple >(storage);
457 return StringPiece(
"google_discovery_api::RestMethodMediaUpload");
466 return Storage().isMember(
"accept");
473 MutableStorage()->removeMember(
"accept");
481 const Json::Value& storage = Storage(
"accept");
482 return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
494 Json::Value* storage = MutableStorage(
"accept");
495 return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
504 return Storage().isMember(
"maxSize");
511 MutableStorage()->removeMember(
"maxSize");
519 const Json::Value& v = Storage(
"maxSize");
520 if (v == Json::Value::null)
return StringPiece(
"");
521 return StringPiece(v.asCString());
532 *MutableStorage(
"maxSize") = value.data();
541 return Storage().isMember(
"protocols");
548 MutableStorage()->removeMember(
"protocols");
556 const Json::Value& storage = Storage(
"protocols");
557 return client::JsonValueToCppValueHelper<RestMethodMediaUploadProtocols >(storage);
569 Json::Value* storage = MutableStorage(
"protocols");
570 return client::JsonValueToMutableCppValueHelper<RestMethodMediaUploadProtocols >(storage);
615 return StringPiece(
"google_discovery_api::RestMethodRequest");
624 return Storage().isMember(
"$ref");
631 MutableStorage()->removeMember(
"$ref");
639 const Json::Value& v = Storage(
"$ref");
640 if (v == Json::Value::null)
return StringPiece(
"");
641 return StringPiece(v.asCString());
652 *MutableStorage(
"$ref") = value.data();
661 return Storage().isMember(
"parameterName");
668 MutableStorage()->removeMember(
"parameterName");
676 const Json::Value& v = Storage(
"parameterName");
677 if (v == Json::Value::null)
return StringPiece(
"");
678 return StringPiece(v.asCString());
689 *MutableStorage(
"parameterName") = value.data();
734 return StringPiece(
"google_discovery_api::RestMethodResponse");
743 return Storage().isMember(
"$ref");
750 MutableStorage()->removeMember(
"$ref");
758 const Json::Value& v = Storage(
"$ref");
759 if (v == Json::Value::null)
return StringPiece(
"");
760 return StringPiece(v.asCString());
771 *MutableStorage(
"$ref") = value.data();
789 explicit RestMethod(
const Json::Value& storage);
809 return StringPiece(
"google_discovery_api::RestMethod");
818 return Storage().isMember(
"description");
825 MutableStorage()->removeMember(
"description");
833 const Json::Value& v = Storage(
"description");
834 if (v == Json::Value::null)
return StringPiece(
"");
835 return StringPiece(v.asCString());
846 *MutableStorage(
"description") = value.data();
855 return Storage().isMember(
"etagRequired");
862 MutableStorage()->removeMember(
"etagRequired");
870 const Json::Value& storage = Storage(
"etagRequired");
871 return client::JsonValueToCppValueHelper<bool >(storage);
883 client::SetJsonValueFromCppValueHelper<bool >(
884 value, MutableStorage(
"etagRequired"));
893 return Storage().isMember(
"httpMethod");
900 MutableStorage()->removeMember(
"httpMethod");
908 const Json::Value& v = Storage(
"httpMethod");
909 if (v == Json::Value::null)
return StringPiece(
"");
910 return StringPiece(v.asCString());
921 *MutableStorage(
"httpMethod") = value.data();
930 return Storage().isMember(
"id");
937 MutableStorage()->removeMember(
"id");
945 const Json::Value& v = Storage(
"id");
946 if (v == Json::Value::null)
return StringPiece(
"");
947 return StringPiece(v.asCString());
959 *MutableStorage(
"id") = value.data();
968 return Storage().isMember(
"mediaUpload");
975 MutableStorage()->removeMember(
"mediaUpload");
983 const Json::Value& storage = Storage(
"mediaUpload");
984 return client::JsonValueToCppValueHelper<RestMethodMediaUpload >(storage);
996 Json::Value* storage = MutableStorage(
"mediaUpload");
997 return client::JsonValueToMutableCppValueHelper<RestMethodMediaUpload >(storage);
1006 return Storage().isMember(
"parameterOrder");
1013 MutableStorage()->removeMember(
"parameterOrder");
1022 const Json::Value& storage = Storage(
"parameterOrder");
1023 return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
1037 Json::Value* storage = MutableStorage(
"parameterOrder");
1038 return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
1047 return Storage().isMember(
"parameters");
1054 MutableStorage()->removeMember(
"parameters");
1061 const client::JsonCppAssociativeArray<JsonSchema > get_parameters()
const;
1071 client::JsonCppAssociativeArray<JsonSchema > mutable_parameters();
1079 return Storage().isMember(
"path");
1086 MutableStorage()->removeMember(
"path");
1094 const Json::Value& v = Storage(
"path");
1095 if (v == Json::Value::null)
return StringPiece(
"");
1096 return StringPiece(v.asCString());
1108 *MutableStorage(
"path") = value.data();
1117 return Storage().isMember(
"request");
1124 MutableStorage()->removeMember(
"request");
1132 const Json::Value& storage = Storage(
"request");
1133 return client::JsonValueToCppValueHelper<RestMethodRequest >(storage);
1144 Json::Value* storage = MutableStorage(
"request");
1145 return client::JsonValueToMutableCppValueHelper<RestMethodRequest >(storage);
1154 return Storage().isMember(
"response");
1161 MutableStorage()->removeMember(
"response");
1169 const Json::Value& storage = Storage(
"response");
1170 return client::JsonValueToCppValueHelper<RestMethodResponse >(storage);
1182 Json::Value* storage = MutableStorage(
"response");
1183 return client::JsonValueToMutableCppValueHelper<RestMethodResponse >(storage);
1192 return Storage().isMember(
"scopes");
1199 MutableStorage()->removeMember(
"scopes");
1207 const Json::Value& storage = Storage(
"scopes");
1208 return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
1219 Json::Value* storage = MutableStorage(
"scopes");
1220 return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
1229 return Storage().isMember(
"supportsMediaDownload");
1236 MutableStorage()->removeMember(
"supportsMediaDownload");
1244 const Json::Value& storage = Storage(
"supportsMediaDownload");
1245 return client::JsonValueToCppValueHelper<bool >(storage);
1256 client::SetJsonValueFromCppValueHelper<bool >(
1257 value, MutableStorage(
"supportsMediaDownload"));
1266 return Storage().isMember(
"supportsMediaUpload");
1273 MutableStorage()->removeMember(
"supportsMediaUpload");
1281 const Json::Value& storage = Storage(
"supportsMediaUpload");
1282 return client::JsonValueToCppValueHelper<bool >(storage);
1293 client::SetJsonValueFromCppValueHelper<bool >(
1294 value, MutableStorage(
"supportsMediaUpload"));
1303 return Storage().isMember(
"supportsSubscription");
1310 MutableStorage()->removeMember(
"supportsSubscription");
1318 const Json::Value& storage = Storage(
"supportsSubscription");
1319 return client::JsonValueToCppValueHelper<bool >(storage);
1330 client::SetJsonValueFromCppValueHelper<bool >(
1331 value, MutableStorage(
"supportsSubscription"));
1341 return Storage().isMember(
"useMediaDownloadService");
1348 MutableStorage()->removeMember(
"useMediaDownloadService");
1356 const Json::Value& storage = Storage(
"useMediaDownloadService");
1357 return client::JsonValueToCppValueHelper<bool >(storage);
1369 client::SetJsonValueFromCppValueHelper<bool >(
1370 value, MutableStorage(
"useMediaDownloadService"));
1377 #endif // GOOGLE_DISCOVERY_API_REST_METHOD_H_
bool has_use_media_download_service() const
Definition: rest_method.h:1340
const StringPiece get_path() const
Definition: rest_method.h:1093
bool has_description() const
Definition: rest_method.h:817
Definition: rest_method.h:52
bool has_request() const
Definition: rest_method.h:1116
const RestMethodMediaUpload get_media_upload() const
Definition: rest_method.h:982
const StringPiece get_parameter_name() const
Definition: rest_method.h:675
RestMethodMediaUpload mutable_mediaUpload()
Definition: rest_method.h:995
bool has_media_upload() const
Definition: rest_method.h:967
void clear_request()
Definition: rest_method.h:1123
void set_parameter_name(const StringPiece &value)
Definition: rest_method.h:688
const StringPiece GetTypeName() const
Definition: rest_method.h:808
const StringPiece get_id() const
Definition: rest_method.h:944
bool has_scopes() const
Definition: rest_method.h:1191
bool has_supports_media_upload() const
Definition: rest_method.h:1265
void clear_parameter_order()
Definition: rest_method.h:1012
const RestMethodRequest get_request() const
Definition: rest_method.h:1131
void clear_description()
Definition: rest_method.h:824
const RestMethodResponse get_response() const
Definition: rest_method.h:1168
void set_supports_media_download(bool value)
Definition: rest_method.h:1255
void set_description(const StringPiece &value)
Definition: rest_method.h:845
bool has_response() const
Definition: rest_method.h:1153
Definition: rest_method.h:581
bool has_ref() const
Definition: rest_method.h:623
void set_path(const StringPiece &value)
Definition: rest_method.h:1107
RestMethodResponse mutable_response()
Definition: rest_method.h:1181
void set_supports_media_upload(bool value)
Definition: rest_method.h:1292
const StringPiece get_http_method() const
Definition: rest_method.h:907
const StringPiece get_ref() const
Definition: rest_method.h:757
client::JsonCppArray< string > mutable_scopes()
Definition: rest_method.h:1218
void set_supports_subscription(bool value)
Definition: rest_method.h:1329
void set_etag_required(bool value)
Definition: rest_method.h:882
bool has_id() const
Definition: rest_method.h:929
RestMethodRequest mutable_request()
Definition: rest_method.h:1143
void clear_path()
Definition: rest_method.h:1085
bool has_path() const
Definition: rest_method.h:1078
void set_ref(const StringPiece &value)
Definition: rest_method.h:651
void clear_http_method()
Definition: rest_method.h:899
bool get_etag_required() const
Definition: rest_method.h:869
bool has_supports_subscription() const
Definition: rest_method.h:1302
Definition: directory_list.h:38
bool has_http_method() const
Definition: rest_method.h:892
void clear_ref()
Definition: rest_method.h:749
void set_id(const StringPiece &value)
Definition: rest_method.h:958
bool has_etag_required() const
Definition: rest_method.h:854
void set_use_media_download_service(bool value)
Definition: rest_method.h:1368
bool get_supports_media_download() const
Definition: rest_method.h:1243
void clear_supports_media_download()
Definition: rest_method.h:1235
Definition: directory_list.cc:40
const client::JsonCppArray< string > get_scopes() const
Definition: rest_method.h:1206
void clear_parameter_name()
Definition: rest_method.h:667
void set_ref(const StringPiece &value)
Definition: rest_method.h:770
bool has_parameters() const
Definition: rest_method.h:1046
bool has_supports_media_download() const
Definition: rest_method.h:1228
void set_http_method(const StringPiece &value)
Definition: rest_method.h:920
bool get_use_media_download_service() const
Definition: rest_method.h:1355
bool has_parameter_name() const
Definition: rest_method.h:660
bool has_ref() const
Definition: rest_method.h:742
bool has_parameter_order() const
Definition: rest_method.h:1005
const StringPiece get_ref() const
Definition: rest_method.h:638
void clear_scopes()
Definition: rest_method.h:1198
void clear_media_upload()
Definition: rest_method.h:974
void clear_use_media_download_service()
Definition: rest_method.h:1347
void clear_parameters()
Definition: rest_method.h:1053
const StringPiece get_description() const
Definition: rest_method.h:832
void clear_id()
Definition: rest_method.h:936
void clear_response()
Definition: rest_method.h:1160
bool get_supports_subscription() const
Definition: rest_method.h:1317
void clear_supports_media_upload()
Definition: rest_method.h:1272
const StringPiece GetTypeName() const
Definition: rest_method.h:733
void clear_ref()
Definition: rest_method.h:630
void clear_supports_subscription()
Definition: rest_method.h:1309
const client::JsonCppArray< string > get_parameter_order() const
Definition: rest_method.h:1021
void clear_etag_required()
Definition: rest_method.h:861
bool get_supports_media_upload() const
Definition: rest_method.h:1280
Definition: rest_method.h:700
const StringPiece GetTypeName() const
Definition: rest_method.h:614
client::JsonCppArray< string > mutable_parameterOrder()
Definition: rest_method.h:1036