From 0238a4b3eee32c9b8a29a6966e67264ce6abb562 Mon Sep 17 00:00:00 2001 From: Jeffrey Rennie Date: Wed, 18 Oct 2017 09:13:02 -0700 Subject: [PATCH] Regenerate calendar api from latest apis-client-generator. Then update client_service.* to match. Calendar sample works again without error. --- .../google/calendar_api/CMakeLists.txt | 6 - .../calendar/google/calendar_api/acl.h | 8 +- .../calendar/google/calendar_api/acl_rule.h | 12 +- .../calendar/google/calendar_api/calendar.h | 8 +- .../google/calendar_api/calendar_api.h | 6 - .../google/calendar_api/calendar_list.h | 8 +- .../google/calendar_api/calendar_list_entry.h | 12 +- .../calendar_api/calendar_notification.h | 8 +- .../google/calendar_api/calendar_service.cc | 119 +++++--- .../google/calendar_api/calendar_service.h | 221 +++++++++++---- .../calendar/google/calendar_api/channel.h | 8 +- .../google/calendar_api/color_definition.h | 8 +- .../calendar/google/calendar_api/colors.h | 8 +- .../google/calendar_api/deep_link_data.cc | 71 ----- .../google/calendar_api/deep_link_data.h | 150 ---------- .../google/calendar_api/display_info.cc | 59 ---- .../google/calendar_api/display_info.h | 256 ------------------ .../calendar/google/calendar_api/error.h | 8 +- .../calendar/google/calendar_api/event.h | 38 +-- .../google/calendar_api/event_attachment.h | 8 +- .../google/calendar_api/event_attendee.h | 8 +- .../google/calendar_api/event_date_time.h | 8 +- .../calendar_api/event_habit_instance.cc | 71 ----- .../calendar_api/event_habit_instance.h | 156 ----------- .../google/calendar_api/event_reminder.h | 8 +- .../calendar/google/calendar_api/events.h | 8 +- .../google/calendar_api/free_busy_calendar.h | 8 +- .../google/calendar_api/free_busy_group.h | 8 +- .../google/calendar_api/free_busy_request.h | 8 +- .../calendar_api/free_busy_request_item.h | 8 +- .../google/calendar_api/free_busy_response.h | 8 +- .../calendar_api/habit_instance_data.cc | 59 ---- .../google/calendar_api/habit_instance_data.h | 188 ------------- .../google/calendar_api/launch_info.cc | 59 ---- .../google/calendar_api/launch_info.h | 222 --------------- .../calendar/google/calendar_api/link.cc | 82 ------ .../calendar/google/calendar_api/link.h | 249 ----------------- .../calendar/google/calendar_api/setting.h | 8 +- .../calendar/google/calendar_api/settings.h | 8 +- .../google/calendar_api/time_period.h | 8 +- .../client/service/client_service.cc | 2 +- .../client/service/client_service.h | 15 +- 42 files changed, 378 insertions(+), 1843 deletions(-) delete mode 100644 service_apis/calendar/google/calendar_api/deep_link_data.cc delete mode 100644 service_apis/calendar/google/calendar_api/deep_link_data.h delete mode 100644 service_apis/calendar/google/calendar_api/display_info.cc delete mode 100644 service_apis/calendar/google/calendar_api/display_info.h delete mode 100644 service_apis/calendar/google/calendar_api/event_habit_instance.cc delete mode 100644 service_apis/calendar/google/calendar_api/event_habit_instance.h delete mode 100644 service_apis/calendar/google/calendar_api/habit_instance_data.cc delete mode 100644 service_apis/calendar/google/calendar_api/habit_instance_data.h delete mode 100644 service_apis/calendar/google/calendar_api/launch_info.cc delete mode 100644 service_apis/calendar/google/calendar_api/launch_info.h delete mode 100644 service_apis/calendar/google/calendar_api/link.cc delete mode 100644 service_apis/calendar/google/calendar_api/link.h diff --git a/service_apis/calendar/google/calendar_api/CMakeLists.txt b/service_apis/calendar/google/calendar_api/CMakeLists.txt index 4572238..6053651 100644 --- a/service_apis/calendar/google/calendar_api/CMakeLists.txt +++ b/service_apis/calendar/google/calendar_api/CMakeLists.txt @@ -19,14 +19,11 @@ add_library(google_calendar_api STATIC channel.cc color_definition.cc colors.cc - deep_link_data.cc - display_info.cc error.cc event.cc event_attachment.cc event_attendee.cc event_date_time.cc - event_habit_instance.cc event_reminder.cc events.cc free_busy_calendar.cc @@ -34,9 +31,6 @@ add_library(google_calendar_api STATIC free_busy_request.cc free_busy_request_item.cc free_busy_response.cc - habit_instance_data.cc - launch_info.cc - link.cc setting.cc settings.cc time_period.cc diff --git a/service_apis/calendar/google/calendar_api/acl.h b/service_apis/calendar/google/calendar_api/acl.h index a026bff..b937ffb 100644 --- a/service_apis/calendar/google/calendar_api/acl.h +++ b/service_apis/calendar/google/calendar_api/acl.h @@ -18,10 +18,10 @@ // Calendar API (calendar/v3) // Generated from: // Version: v3 -// Revision: 20170507 +// Revision: 20171010 // Generated by: // Tool: google-apis-code-generator 1.5.1 -// C++: 0.1.4 +// C++: 0.1.5 #ifndef GOOGLE_CALENDAR_API_ACL_H_ #define GOOGLE_CALENDAR_API_ACL_H_ @@ -77,8 +77,8 @@ class Acl : public client::JsonCppData { * * @return google_calendar_api::Acl */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::Acl"); + const char* GetTypeName() const { + return "google_calendar_api::Acl"; } /** diff --git a/service_apis/calendar/google/calendar_api/acl_rule.h b/service_apis/calendar/google/calendar_api/acl_rule.h index f966b94..ffbe6bd 100644 --- a/service_apis/calendar/google/calendar_api/acl_rule.h +++ b/service_apis/calendar/google/calendar_api/acl_rule.h @@ -18,10 +18,10 @@ // Calendar API (calendar/v3) // Generated from: // Version: v3 -// Revision: 20170507 +// Revision: 20171010 // Generated by: // Tool: google-apis-code-generator 1.5.1 -// C++: 0.1.4 +// C++: 0.1.5 #ifndef GOOGLE_CALENDAR_API_ACL_RULE_H_ #define GOOGLE_CALENDAR_API_ACL_RULE_H_ @@ -82,8 +82,8 @@ class AclRule : public client::JsonCppData { * * @return google_calendar_api::AclRuleScope */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::AclRuleScope"); + const char* GetTypeName() const { + return "google_calendar_api::AclRuleScope"; } /** @@ -207,8 +207,8 @@ class AclRule : public client::JsonCppData { * * @return google_calendar_api::AclRule */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::AclRule"); + const char* GetTypeName() const { + return "google_calendar_api::AclRule"; } /** diff --git a/service_apis/calendar/google/calendar_api/calendar.h b/service_apis/calendar/google/calendar_api/calendar.h index aa388e7..fb60ae1 100644 --- a/service_apis/calendar/google/calendar_api/calendar.h +++ b/service_apis/calendar/google/calendar_api/calendar.h @@ -18,10 +18,10 @@ // Calendar API (calendar/v3) // Generated from: // Version: v3 -// Revision: 20170507 +// Revision: 20171010 // Generated by: // Tool: google-apis-code-generator 1.5.1 -// C++: 0.1.4 +// C++: 0.1.5 #ifndef GOOGLE_CALENDAR_API_CALENDAR_H_ #define GOOGLE_CALENDAR_API_CALENDAR_H_ @@ -75,8 +75,8 @@ class Calendar : public client::JsonCppData { * * @return google_calendar_api::Calendar */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::Calendar"); + const char* GetTypeName() const { + return "google_calendar_api::Calendar"; } /** diff --git a/service_apis/calendar/google/calendar_api/calendar_api.h b/service_apis/calendar/google/calendar_api/calendar_api.h index f88815e..67e5889 100644 --- a/service_apis/calendar/google/calendar_api/calendar_api.h +++ b/service_apis/calendar/google/calendar_api/calendar_api.h @@ -24,17 +24,11 @@ #include "google/calendar_api/channel.h" #include "google/calendar_api/color_definition.h" #include "google/calendar_api/colors.h" -#include "google/calendar_api/display_info.h" -#include "google/calendar_api/launch_info.h" -#include "google/calendar_api/link.h" -#include "google/calendar_api/deep_link_data.h" #include "google/calendar_api/error.h" #include "google/calendar_api/event_attachment.h" #include "google/calendar_api/event_attendee.h" #include "google/calendar_api/event_date_time.h" #include "google/calendar_api/event.h" -#include "google/calendar_api/habit_instance_data.h" -#include "google/calendar_api/event_habit_instance.h" #include "google/calendar_api/events.h" #include "google/calendar_api/time_period.h" #include "google/calendar_api/free_busy_calendar.h" diff --git a/service_apis/calendar/google/calendar_api/calendar_list.h b/service_apis/calendar/google/calendar_api/calendar_list.h index 5942b7e..06d6ffa 100644 --- a/service_apis/calendar/google/calendar_api/calendar_list.h +++ b/service_apis/calendar/google/calendar_api/calendar_list.h @@ -18,10 +18,10 @@ // Calendar API (calendar/v3) // Generated from: // Version: v3 -// Revision: 20170507 +// Revision: 20171010 // Generated by: // Tool: google-apis-code-generator 1.5.1 -// C++: 0.1.4 +// C++: 0.1.5 #ifndef GOOGLE_CALENDAR_API_CALENDAR_LIST_H_ #define GOOGLE_CALENDAR_API_CALENDAR_LIST_H_ @@ -77,8 +77,8 @@ class CalendarList : public client::JsonCppData { * * @return google_calendar_api::CalendarList */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::CalendarList"); + const char* GetTypeName() const { + return "google_calendar_api::CalendarList"; } /** diff --git a/service_apis/calendar/google/calendar_api/calendar_list_entry.h b/service_apis/calendar/google/calendar_api/calendar_list_entry.h index fc2efe3..cbad837 100644 --- a/service_apis/calendar/google/calendar_api/calendar_list_entry.h +++ b/service_apis/calendar/google/calendar_api/calendar_list_entry.h @@ -18,10 +18,10 @@ // Calendar API (calendar/v3) // Generated from: // Version: v3 -// Revision: 20170507 +// Revision: 20171010 // Generated by: // Tool: google-apis-code-generator 1.5.1 -// C++: 0.1.4 +// C++: 0.1.5 #ifndef GOOGLE_CALENDAR_API_CALENDAR_LIST_ENTRY_H_ #define GOOGLE_CALENDAR_API_CALENDAR_LIST_ENTRY_H_ @@ -87,8 +87,8 @@ class CalendarListEntry : public client::JsonCppData { * @return * google_calendar_api::CalendarListEntryNotificationSettings */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::CalendarListEntryNotificationSettings"); + const char* GetTypeName() const { + return "google_calendar_api::CalendarListEntryNotificationSettings"; } /** @@ -158,8 +158,8 @@ class CalendarListEntry : public client::JsonCppData { * * @return google_calendar_api::CalendarListEntry */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::CalendarListEntry"); + const char* GetTypeName() const { + return "google_calendar_api::CalendarListEntry"; } /** diff --git a/service_apis/calendar/google/calendar_api/calendar_notification.h b/service_apis/calendar/google/calendar_api/calendar_notification.h index 55c8e46..4c22984 100644 --- a/service_apis/calendar/google/calendar_api/calendar_notification.h +++ b/service_apis/calendar/google/calendar_api/calendar_notification.h @@ -18,10 +18,10 @@ // Calendar API (calendar/v3) // Generated from: // Version: v3 -// Revision: 20170507 +// Revision: 20171010 // Generated by: // Tool: google-apis-code-generator 1.5.1 -// C++: 0.1.4 +// C++: 0.1.5 #ifndef GOOGLE_CALENDAR_API_CALENDAR_NOTIFICATION_H_ #define GOOGLE_CALENDAR_API_CALENDAR_NOTIFICATION_H_ @@ -75,8 +75,8 @@ class CalendarNotification : public client::JsonCppData { * * @return google_calendar_api::CalendarNotification */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::CalendarNotification"); + const char* GetTypeName() const { + return "google_calendar_api::CalendarNotification"; } /** diff --git a/service_apis/calendar/google/calendar_api/calendar_service.cc b/service_apis/calendar/google/calendar_api/calendar_service.cc index 2dbad44..c316f51 100644 --- a/service_apis/calendar/google/calendar_api/calendar_service.cc +++ b/service_apis/calendar/google/calendar_api/calendar_service.cc @@ -48,12 +48,12 @@ namespace google_calendar_api { using namespace googleapis; -const char CalendarService::googleapis_API_NAME[] = {"calendar"}; +const char CalendarService::googleapis_API_NAME[] = { "calendar" }; -const char CalendarService::googleapis_API_VERSION[] = {"v3"}; +const char CalendarService::googleapis_API_VERSION[] = { "v3" }; const char CalendarService::googleapis_API_GENERATOR[] = { - "google-apis-code-generator 1.5.1 / 0.1.4"}; + "google-apis-code-generator 1.5.1 / 0.1.5"}; const char CalendarService::SCOPES::CALENDAR[] = {"https://www.googleapis.com/auth/calendar"}; @@ -63,7 +63,7 @@ CalendarServiceBaseRequest::CalendarServiceBaseRequest( const client::ClientService* service, client::AuthorizationCredential* credential, client::HttpRequest::HttpMethod method, - const StringPiece& uri_template) + const string& uri_template) : client::ClientServiceRequest( service, credential, method, uri_template), alt_("json"), @@ -81,7 +81,7 @@ CalendarServiceBaseRequest::~CalendarServiceBaseRequest() { } util::Status CalendarServiceBaseRequest::AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target) { return client::StatusInvalidArgument( @@ -165,7 +165,7 @@ AclResource_DeleteMethod::~AclResource_DeleteMethod() { util::Status AclResource_DeleteMethod::AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target) { if (variable_name == "calendarId") { @@ -200,7 +200,7 @@ AclResource_GetMethod::~AclResource_GetMethod() { util::Status AclResource_GetMethod::AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target) { if (variable_name == "calendarId") { @@ -225,7 +225,8 @@ AclResource_InsertMethod::AclResource_InsertMethod( _service_, _credential_, client::HttpRequest::POST, "calendars/{calendarId}/acl"), - calendar_id_(calendar_id.as_string()) { + calendar_id_(calendar_id.as_string()), + _have_send_notifications_(false) { AddJsonContentToRequest(&__request_content__); } @@ -233,9 +234,18 @@ AclResource_InsertMethod::AclResource_InsertMethod( AclResource_InsertMethod::~AclResource_InsertMethod() { } - +util::Status AclResource_InsertMethod::AppendOptionalQueryParameters(string* target) { + const char* sep = (target->find('?') == string::npos) ? "?" : "&"; + if (_have_send_notifications_) { + StrAppend(target, sep, "sendNotifications=", + client::CppValueToEscapedUrlValue( + send_notifications_)); + sep = "&"; + } + return CalendarServiceBaseRequest::AppendOptionalQueryParameters(target); +} util::Status AclResource_InsertMethod::AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target) { if (variable_name == "calendarId") { @@ -295,7 +305,7 @@ util::Status AclResource_ListMethod::AppendOptionalQueryParameters(string* targe return CalendarServiceBaseRequest::AppendOptionalQueryParameters(target); } util::Status AclResource_ListMethod::AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target) { if (variable_name == "calendarId") { @@ -316,7 +326,8 @@ AclResource_PatchMethod::AclResource_PatchMethod( client::HttpRequest::PATCH, "calendars/{calendarId}/acl/{ruleId}"), calendar_id_(calendar_id.as_string()), - rule_id_(rule_id.as_string()) { + rule_id_(rule_id.as_string()), + _have_send_notifications_(false) { AddJsonContentToRequest(&__request_content__); } @@ -324,9 +335,18 @@ AclResource_PatchMethod::AclResource_PatchMethod( AclResource_PatchMethod::~AclResource_PatchMethod() { } - +util::Status AclResource_PatchMethod::AppendOptionalQueryParameters(string* target) { + const char* sep = (target->find('?') == string::npos) ? "?" : "&"; + if (_have_send_notifications_) { + StrAppend(target, sep, "sendNotifications=", + client::CppValueToEscapedUrlValue( + send_notifications_)); + sep = "&"; + } + return CalendarServiceBaseRequest::AppendOptionalQueryParameters(target); +} util::Status AclResource_PatchMethod::AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target) { if (variable_name == "calendarId") { @@ -352,7 +372,8 @@ AclResource_UpdateMethod::AclResource_UpdateMethod( client::HttpRequest::PUT, "calendars/{calendarId}/acl/{ruleId}"), calendar_id_(calendar_id.as_string()), - rule_id_(rule_id.as_string()) { + rule_id_(rule_id.as_string()), + _have_send_notifications_(false) { AddJsonContentToRequest(&__request_content__); } @@ -360,9 +381,18 @@ AclResource_UpdateMethod::AclResource_UpdateMethod( AclResource_UpdateMethod::~AclResource_UpdateMethod() { } - +util::Status AclResource_UpdateMethod::AppendOptionalQueryParameters(string* target) { + const char* sep = (target->find('?') == string::npos) ? "?" : "&"; + if (_have_send_notifications_) { + StrAppend(target, sep, "sendNotifications=", + client::CppValueToEscapedUrlValue( + send_notifications_)); + sep = "&"; + } + return CalendarServiceBaseRequest::AppendOptionalQueryParameters(target); +} util::Status AclResource_UpdateMethod::AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target) { if (variable_name == "calendarId") { @@ -428,7 +458,7 @@ util::Status AclResource_WatchMethod::AppendOptionalQueryParameters(string* targ return CalendarServiceBaseRequest::AppendOptionalQueryParameters(target); } util::Status AclResource_WatchMethod::AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target) { if (variable_name == "calendarId") { @@ -457,7 +487,7 @@ CalendarListResource_DeleteMethod::~CalendarListResource_DeleteMethod() { util::Status CalendarListResource_DeleteMethod::AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target) { if (variable_name == "calendarId") { @@ -486,7 +516,7 @@ CalendarListResource_GetMethod::~CalendarListResource_GetMethod() { util::Status CalendarListResource_GetMethod::AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target) { if (variable_name == "calendarId") { @@ -525,7 +555,7 @@ util::Status CalendarListResource_InsertMethod::AppendOptionalQueryParameters(st return CalendarServiceBaseRequest::AppendOptionalQueryParameters(target); } util::Status CalendarListResource_InsertMethod::AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target) { return CalendarServiceBaseRequest::AppendVariable( @@ -593,7 +623,7 @@ util::Status CalendarListResource_ListMethod::AppendOptionalQueryParameters(stri return CalendarServiceBaseRequest::AppendOptionalQueryParameters(target); } util::Status CalendarListResource_ListMethod::AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target) { return CalendarServiceBaseRequest::AppendVariable( @@ -628,7 +658,7 @@ util::Status CalendarListResource_PatchMethod::AppendOptionalQueryParameters(str return CalendarServiceBaseRequest::AppendOptionalQueryParameters(target); } util::Status CalendarListResource_PatchMethod::AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target) { if (variable_name == "calendarId") { @@ -668,7 +698,7 @@ util::Status CalendarListResource_UpdateMethod::AppendOptionalQueryParameters(st return CalendarServiceBaseRequest::AppendOptionalQueryParameters(target); } util::Status CalendarListResource_UpdateMethod::AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target) { if (variable_name == "calendarId") { @@ -742,7 +772,7 @@ util::Status CalendarListResource_WatchMethod::AppendOptionalQueryParameters(str return CalendarServiceBaseRequest::AppendOptionalQueryParameters(target); } util::Status CalendarListResource_WatchMethod::AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target) { return CalendarServiceBaseRequest::AppendVariable( @@ -766,7 +796,7 @@ CalendarsResource_ClearMethod::~CalendarsResource_ClearMethod() { util::Status CalendarsResource_ClearMethod::AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target) { if (variable_name == "calendarId") { @@ -795,7 +825,7 @@ CalendarsResource_DeleteMethod::~CalendarsResource_DeleteMethod() { util::Status CalendarsResource_DeleteMethod::AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target) { if (variable_name == "calendarId") { @@ -824,7 +854,7 @@ CalendarsResource_GetMethod::~CalendarsResource_GetMethod() { util::Status CalendarsResource_GetMethod::AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target) { if (variable_name == "calendarId") { @@ -869,7 +899,7 @@ CalendarsResource_PatchMethod::~CalendarsResource_PatchMethod() { util::Status CalendarsResource_PatchMethod::AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target) { if (variable_name == "calendarId") { @@ -899,7 +929,7 @@ CalendarsResource_UpdateMethod::~CalendarsResource_UpdateMethod() { util::Status CalendarsResource_UpdateMethod::AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target) { if (variable_name == "calendarId") { @@ -968,7 +998,7 @@ util::Status EventsResource_DeleteMethod::AppendOptionalQueryParameters(string* return CalendarServiceBaseRequest::AppendOptionalQueryParameters(target); } util::Status EventsResource_DeleteMethod::AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target) { if (variable_name == "calendarId") { @@ -1027,7 +1057,7 @@ util::Status EventsResource_GetMethod::AppendOptionalQueryParameters(string* tar return CalendarServiceBaseRequest::AppendOptionalQueryParameters(target); } util::Status EventsResource_GetMethod::AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target) { if (variable_name == "calendarId") { @@ -1072,7 +1102,7 @@ util::Status EventsResource_ImportMethod::AppendOptionalQueryParameters(string* return CalendarServiceBaseRequest::AppendOptionalQueryParameters(target); } util::Status EventsResource_ImportMethod::AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target) { if (variable_name == "calendarId") { @@ -1126,7 +1156,7 @@ util::Status EventsResource_InsertMethod::AppendOptionalQueryParameters(string* return CalendarServiceBaseRequest::AppendOptionalQueryParameters(target); } util::Status EventsResource_InsertMethod::AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target) { if (variable_name == "calendarId") { @@ -1222,7 +1252,7 @@ util::Status EventsResource_InstancesMethod::AppendOptionalQueryParameters(strin return CalendarServiceBaseRequest::AppendOptionalQueryParameters(target); } util::Status EventsResource_InstancesMethod::AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target) { if (variable_name == "calendarId") { @@ -1385,7 +1415,7 @@ util::Status EventsResource_ListMethod::AppendOptionalQueryParameters(string* ta return CalendarServiceBaseRequest::AppendOptionalQueryParameters(target); } util::Status EventsResource_ListMethod::AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target) { if (variable_name == "calendarId") { @@ -1430,7 +1460,7 @@ util::Status EventsResource_MoveMethod::AppendOptionalQueryParameters(string* ta return CalendarServiceBaseRequest::AppendOptionalQueryParameters(target); } util::Status EventsResource_MoveMethod::AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target) { if (variable_name == "calendarId") { @@ -1497,7 +1527,7 @@ util::Status EventsResource_PatchMethod::AppendOptionalQueryParameters(string* t return CalendarServiceBaseRequest::AppendOptionalQueryParameters(target); } util::Status EventsResource_PatchMethod::AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target) { if (variable_name == "calendarId") { @@ -1546,7 +1576,7 @@ util::Status EventsResource_QuickAddMethod::AppendOptionalQueryParameters(string return CalendarServiceBaseRequest::AppendOptionalQueryParameters(target); } util::Status EventsResource_QuickAddMethod::AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target) { if (variable_name == "calendarId") { @@ -1608,7 +1638,7 @@ util::Status EventsResource_UpdateMethod::AppendOptionalQueryParameters(string* return CalendarServiceBaseRequest::AppendOptionalQueryParameters(target); } util::Status EventsResource_UpdateMethod::AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target) { if (variable_name == "calendarId") { @@ -1772,7 +1802,7 @@ util::Status EventsResource_WatchMethod::AppendOptionalQueryParameters(string* t return CalendarServiceBaseRequest::AppendOptionalQueryParameters(target); } util::Status EventsResource_WatchMethod::AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target) { if (variable_name == "calendarId") { @@ -1816,7 +1846,7 @@ SettingsResource_GetMethod::~SettingsResource_GetMethod() { util::Status SettingsResource_GetMethod::AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target) { if (variable_name == "setting") { @@ -1868,7 +1898,7 @@ util::Status SettingsResource_ListMethod::AppendOptionalQueryParameters(string* return CalendarServiceBaseRequest::AppendOptionalQueryParameters(target); } util::Status SettingsResource_ListMethod::AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target) { return CalendarServiceBaseRequest::AppendVariable( @@ -1916,7 +1946,7 @@ util::Status SettingsResource_WatchMethod::AppendOptionalQueryParameters(string* return CalendarServiceBaseRequest::AppendOptionalQueryParameters(target); } util::Status SettingsResource_WatchMethod::AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target) { return CalendarServiceBaseRequest::AppendVariable( @@ -1927,6 +1957,7 @@ util::Status SettingsResource_WatchMethod::AppendVariable( CalendarService::CalendarService(client::HttpTransport* transport) : ClientService("https://www.googleapis.com/", "calendar/v3/", transport), acl_(this), calendar_list_(this), calendars_(this), channels_(this), colors_(this), events_(this), freebusy_(this), settings_(this) { + this->SetBatchPath("batch/calendar/v3"); } CalendarService::~CalendarService() { diff --git a/service_apis/calendar/google/calendar_api/calendar_service.h b/service_apis/calendar/google/calendar_api/calendar_service.h index 81d6d2a..c31ebfe 100644 --- a/service_apis/calendar/google/calendar_api/calendar_service.h +++ b/service_apis/calendar/google/calendar_api/calendar_service.h @@ -54,7 +54,7 @@ using namespace googleapis; * API * Calendar API * API Versionv3 - * API Rev20170507 + * API Rev20171010 * API Docs * * https://developers.google.com/google-apps/calendar/firstapp @@ -107,7 +107,7 @@ class CalendarServiceBaseRequest const client::ClientService* service, client::AuthorizationCredential* credential, client::HttpRequest::HttpMethod method, - const StringPiece& uri_template); + const string& uri_template); /** * Standard destructor. @@ -392,7 +392,7 @@ class CalendarServiceBaseRequest * @param[in, out] target The string to append the value to. */ virtual util::Status AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target); @@ -480,7 +480,7 @@ class AclResource_DeleteMethod : public CalendarServiceBaseRequest { * @param[in, out] target The string to append the value to. */ virtual util::Status AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target); @@ -539,7 +539,7 @@ class AclResource_GetMethod : public CalendarServiceBaseRequest { * @param[in, out] target The string to append the value to. */ virtual util::Status AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target); @@ -602,6 +602,34 @@ class AclResource_InsertMethod : public CalendarServiceBaseRequest { virtual ~AclResource_InsertMethod(); + /** + * Clears the 'sendNotifications' attribute so it is no longer + * set. + */ + void clear_send_notifications() { + _have_send_notifications_ = false; + client::ClearCppValueHelper(&send_notifications_); + } + + + /** + * Gets the optional 'sendNotifications' attribute. + * + * If the value is not set then the default value will be returned. + */ + bool get_send_notifications() const { return send_notifications_; } + + /** + * Sets the 'sendNotifications' attribute. + * + * @param[in] value Whether to send notifications about the calendar sharing + * change. Optional. The default is True. + */ + void set_send_notifications(bool value) { + _have_send_notifications_ = true; + send_notifications_ = value; + } + /** * Appends variable value to the target string. * @@ -612,10 +640,17 @@ class AclResource_InsertMethod : public CalendarServiceBaseRequest { * @param[in, out] target The string to append the value to. */ virtual util::Status AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target); + /** + * Appends the optional query parameters to the target URL. + * + * @param[in, out] target The URL string to append to. + */ + virtual util::Status AppendOptionalQueryParameters(string* target); + /** * Executes the method and parses the response into a data object on success. @@ -633,7 +668,9 @@ class AclResource_InsertMethod : public CalendarServiceBaseRequest { } private: - string calendar_id_; string _content_; + string calendar_id_; + bool send_notifications_; + bool _have_send_notifications_ : 1; string _content_; DISALLOW_COPY_AND_ASSIGN(AclResource_InsertMethod); }; @@ -825,7 +862,7 @@ class AclResource_ListMethod : public CalendarServiceBaseRequest { * @param[in, out] target The string to append the value to. */ virtual util::Status AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target); @@ -909,6 +946,35 @@ class AclResource_PatchMethod : public CalendarServiceBaseRequest { virtual ~AclResource_PatchMethod(); + /** + * Clears the 'sendNotifications' attribute so it is no longer + * set. + */ + void clear_send_notifications() { + _have_send_notifications_ = false; + client::ClearCppValueHelper(&send_notifications_); + } + + + /** + * Gets the optional 'sendNotifications' attribute. + * + * If the value is not set then the default value will be returned. + */ + bool get_send_notifications() const { return send_notifications_; } + + /** + * Sets the 'sendNotifications' attribute. + * + * @param[in] value Whether to send notifications about the calendar sharing + * change. Note that there are no notifications on access removal. Optional. + * The default is True. + */ + void set_send_notifications(bool value) { + _have_send_notifications_ = true; + send_notifications_ = value; + } + /** * Appends variable value to the target string. * @@ -919,10 +985,17 @@ class AclResource_PatchMethod : public CalendarServiceBaseRequest { * @param[in, out] target The string to append the value to. */ virtual util::Status AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target); + /** + * Appends the optional query parameters to the target URL. + * + * @param[in, out] target The URL string to append to. + */ + virtual util::Status AppendOptionalQueryParameters(string* target); + /** * Executes the method and parses the response into a data object on success. @@ -941,7 +1014,9 @@ class AclResource_PatchMethod : public CalendarServiceBaseRequest { private: string calendar_id_; - string rule_id_; string _content_; + string rule_id_; + bool send_notifications_; + bool _have_send_notifications_ : 1; string _content_; DISALLOW_COPY_AND_ASSIGN(AclResource_PatchMethod); }; @@ -984,6 +1059,35 @@ class AclResource_UpdateMethod : public CalendarServiceBaseRequest { virtual ~AclResource_UpdateMethod(); + /** + * Clears the 'sendNotifications' attribute so it is no longer + * set. + */ + void clear_send_notifications() { + _have_send_notifications_ = false; + client::ClearCppValueHelper(&send_notifications_); + } + + + /** + * Gets the optional 'sendNotifications' attribute. + * + * If the value is not set then the default value will be returned. + */ + bool get_send_notifications() const { return send_notifications_; } + + /** + * Sets the 'sendNotifications' attribute. + * + * @param[in] value Whether to send notifications about the calendar sharing + * change. Note that there are no notifications on access removal. Optional. + * The default is True. + */ + void set_send_notifications(bool value) { + _have_send_notifications_ = true; + send_notifications_ = value; + } + /** * Appends variable value to the target string. * @@ -994,10 +1098,17 @@ class AclResource_UpdateMethod : public CalendarServiceBaseRequest { * @param[in, out] target The string to append the value to. */ virtual util::Status AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target); + /** + * Appends the optional query parameters to the target URL. + * + * @param[in, out] target The URL string to append to. + */ + virtual util::Status AppendOptionalQueryParameters(string* target); + /** * Executes the method and parses the response into a data object on success. @@ -1016,7 +1127,9 @@ class AclResource_UpdateMethod : public CalendarServiceBaseRequest { private: string calendar_id_; - string rule_id_; string _content_; + string rule_id_; + bool send_notifications_; + bool _have_send_notifications_ : 1; string _content_; DISALLOW_COPY_AND_ASSIGN(AclResource_UpdateMethod); }; @@ -1210,7 +1323,7 @@ class AclResource_WatchMethod : public CalendarServiceBaseRequest { * @param[in, out] target The string to append the value to. */ virtual util::Status AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target); @@ -1297,7 +1410,7 @@ class CalendarListResource_DeleteMethod : public CalendarServiceBaseRequest { * @param[in, out] target The string to append the value to. */ virtual util::Status AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target); @@ -1353,7 +1466,7 @@ class CalendarListResource_GetMethod : public CalendarServiceBaseRequest { * @param[in, out] target The string to append the value to. */ virtual util::Status AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target); @@ -1451,7 +1564,7 @@ class CalendarListResource_InsertMethod : public CalendarServiceBaseRequest { * @param[in, out] target The string to append the value to. */ virtual util::Status AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target); @@ -1740,7 +1853,7 @@ class CalendarListResource_ListMethod : public CalendarServiceBaseRequest { * @param[in, out] target The string to append the value to. */ virtual util::Status AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target); @@ -1865,7 +1978,7 @@ class CalendarListResource_PatchMethod : public CalendarServiceBaseRequest { * @param[in, out] target The string to append the value to. */ virtual util::Status AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target); @@ -1976,7 +2089,7 @@ class CalendarListResource_UpdateMethod : public CalendarServiceBaseRequest { * @param[in, out] target The string to append the value to. */ virtual util::Status AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target); @@ -2268,7 +2381,7 @@ class CalendarListResource_WatchMethod : public CalendarServiceBaseRequest { * @param[in, out] target The string to append the value to. */ virtual util::Status AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target); @@ -2358,7 +2471,7 @@ class CalendarsResource_ClearMethod : public CalendarServiceBaseRequest { * @param[in, out] target The string to append the value to. */ virtual util::Status AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target); @@ -2413,7 +2526,7 @@ class CalendarsResource_DeleteMethod : public CalendarServiceBaseRequest { * @param[in, out] target The string to append the value to. */ virtual util::Status AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target); @@ -2469,7 +2582,7 @@ class CalendarsResource_GetMethod : public CalendarServiceBaseRequest { * @param[in, out] target The string to append the value to. */ virtual util::Status AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target); @@ -2593,7 +2706,7 @@ class CalendarsResource_PatchMethod : public CalendarServiceBaseRequest { * @param[in, out] target The string to append the value to. */ virtual util::Status AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target); @@ -2665,7 +2778,7 @@ class CalendarsResource_UpdateMethod : public CalendarServiceBaseRequest { * @param[in, out] target The string to append the value to. */ virtual util::Status AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target); @@ -2859,7 +2972,7 @@ class EventsResource_DeleteMethod : public CalendarServiceBaseRequest { * @param[in, out] target The string to append the value to. */ virtual util::Status AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target); @@ -3026,7 +3139,7 @@ class EventsResource_GetMethod : public CalendarServiceBaseRequest { * @param[in, out] target The string to append the value to. */ virtual util::Status AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target); @@ -3140,7 +3253,7 @@ class EventsResource_ImportMethod : public CalendarServiceBaseRequest { * @param[in, out] target The string to append the value to. */ virtual util::Status AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target); @@ -3305,7 +3418,7 @@ class EventsResource_InsertMethod : public CalendarServiceBaseRequest { * @param[in, out] target The string to append the value to. */ virtual util::Status AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target); @@ -3684,7 +3797,7 @@ class EventsResource_InstancesMethod : public CalendarServiceBaseRequest { * @param[in, out] target The string to append the value to. */ virtual util::Status AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target); @@ -3896,9 +4009,12 @@ class EventsResource_ListMethod : public CalendarServiceBaseRequest { /** * Sets the 'maxResults' attribute. * - * @param[in] value Maximum number of events returned on one result page. By - * default the value is 250 events. The page size can never be larger than - * 2500 events. Optional. + * @param[in] value Maximum number of events returned on one result page. + * The number of events in the resulting page may be less than this value, + * or none at all, even if there are more events matching the query. + * Incomplete pages can be detected by a non-empty nextPageToken field in + * the response. By default the value is 250 events. The page size can never + * be larger than 2500 events. Optional. */ void set_max_results(int32 value) { _have_max_results_ = true; @@ -4257,7 +4373,8 @@ class EventsResource_ListMethod : public CalendarServiceBaseRequest { * filter by. Optional. The default is not to filter by start time. Must be * an RFC3339 timestamp with mandatory time zone offset, e.g., * 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be - * provided but will be ignored. + * provided but will be ignored. If timeMin is set, timeMax must be greater + * than timeMin. */ void set_time_max(client::DateTime value) { _have_time_max_ = true; @@ -4287,7 +4404,8 @@ class EventsResource_ListMethod : public CalendarServiceBaseRequest { * filter by. Optional. The default is not to filter by end time. Must be an * RFC3339 timestamp with mandatory time zone offset, e.g., * 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be - * provided but will be ignored. + * provided but will be ignored. If timeMax is set, timeMin must be smaller + * than timeMax. */ void set_time_min(client::DateTime value) { _have_time_min_ = true; @@ -4374,7 +4492,7 @@ class EventsResource_ListMethod : public CalendarServiceBaseRequest { * @param[in, out] target The string to append the value to. */ virtual util::Status AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target); @@ -4522,7 +4640,7 @@ class EventsResource_MoveMethod : public CalendarServiceBaseRequest { * @param[in, out] target The string to append the value to. */ virtual util::Status AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target); @@ -4724,7 +4842,7 @@ class EventsResource_PatchMethod : public CalendarServiceBaseRequest { * @param[in, out] target The string to append the value to. */ virtual util::Status AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target); @@ -4840,7 +4958,7 @@ class EventsResource_QuickAddMethod : public CalendarServiceBaseRequest { * @param[in, out] target The string to append the value to. */ virtual util::Status AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target); @@ -5041,7 +5159,7 @@ class EventsResource_UpdateMethod : public CalendarServiceBaseRequest { * @param[in, out] target The string to append the value to. */ virtual util::Status AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target); @@ -5240,9 +5358,12 @@ class EventsResource_WatchMethod : public CalendarServiceBaseRequest { /** * Sets the 'maxResults' attribute. * - * @param[in] value Maximum number of events returned on one result page. By - * default the value is 250 events. The page size can never be larger than - * 2500 events. Optional. + * @param[in] value Maximum number of events returned on one result page. + * The number of events in the resulting page may be less than this value, + * or none at all, even if there are more events matching the query. + * Incomplete pages can be detected by a non-empty nextPageToken field in + * the response. By default the value is 250 events. The page size can never + * be larger than 2500 events. Optional. */ void set_max_results(int32 value) { _have_max_results_ = true; @@ -5601,7 +5722,8 @@ class EventsResource_WatchMethod : public CalendarServiceBaseRequest { * filter by. Optional. The default is not to filter by start time. Must be * an RFC3339 timestamp with mandatory time zone offset, e.g., * 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be - * provided but will be ignored. + * provided but will be ignored. If timeMin is set, timeMax must be greater + * than timeMin. */ void set_time_max(client::DateTime value) { _have_time_max_ = true; @@ -5631,7 +5753,8 @@ class EventsResource_WatchMethod : public CalendarServiceBaseRequest { * filter by. Optional. The default is not to filter by end time. Must be an * RFC3339 timestamp with mandatory time zone offset, e.g., * 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be - * provided but will be ignored. + * provided but will be ignored. If timeMax is set, timeMin must be smaller + * than timeMax. */ void set_time_min(client::DateTime value) { _have_time_min_ = true; @@ -5718,7 +5841,7 @@ class EventsResource_WatchMethod : public CalendarServiceBaseRequest { * @param[in, out] target The string to append the value to. */ virtual util::Status AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target); @@ -5885,7 +6008,7 @@ class SettingsResource_GetMethod : public CalendarServiceBaseRequest { * @param[in, out] target The string to append the value to. */ virtual util::Status AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target); @@ -6066,7 +6189,7 @@ class SettingsResource_ListMethod : public CalendarServiceBaseRequest { * @param[in, out] target The string to append the value to. */ virtual util::Status AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target); @@ -6266,7 +6389,7 @@ class SettingsResource_WatchMethod : public CalendarServiceBaseRequest { * @param[in, out] target The string to append the value to. */ virtual util::Status AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const client::UriTemplateConfig& config, string* target); diff --git a/service_apis/calendar/google/calendar_api/channel.h b/service_apis/calendar/google/calendar_api/channel.h index 7f3cbe0..312a7be 100644 --- a/service_apis/calendar/google/calendar_api/channel.h +++ b/service_apis/calendar/google/calendar_api/channel.h @@ -18,10 +18,10 @@ // Calendar API (calendar/v3) // Generated from: // Version: v3 -// Revision: 20170507 +// Revision: 20171010 // Generated by: // Tool: google-apis-code-generator 1.5.1 -// C++: 0.1.4 +// C++: 0.1.5 #ifndef GOOGLE_CALENDAR_API_CHANNEL_H_ #define GOOGLE_CALENDAR_API_CHANNEL_H_ @@ -76,8 +76,8 @@ class Channel : public client::JsonCppData { * * @return google_calendar_api::Channel */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::Channel"); + const char* GetTypeName() const { + return "google_calendar_api::Channel"; } /** diff --git a/service_apis/calendar/google/calendar_api/color_definition.h b/service_apis/calendar/google/calendar_api/color_definition.h index edc1520..54baeda 100644 --- a/service_apis/calendar/google/calendar_api/color_definition.h +++ b/service_apis/calendar/google/calendar_api/color_definition.h @@ -18,10 +18,10 @@ // Calendar API (calendar/v3) // Generated from: // Version: v3 -// Revision: 20170507 +// Revision: 20171010 // Generated by: // Tool: google-apis-code-generator 1.5.1 -// C++: 0.1.4 +// C++: 0.1.5 #ifndef GOOGLE_CALENDAR_API_COLOR_DEFINITION_H_ #define GOOGLE_CALENDAR_API_COLOR_DEFINITION_H_ @@ -75,8 +75,8 @@ class ColorDefinition : public client::JsonCppData { * * @return google_calendar_api::ColorDefinition */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::ColorDefinition"); + const char* GetTypeName() const { + return "google_calendar_api::ColorDefinition"; } /** diff --git a/service_apis/calendar/google/calendar_api/colors.h b/service_apis/calendar/google/calendar_api/colors.h index 9971897..06cc575 100644 --- a/service_apis/calendar/google/calendar_api/colors.h +++ b/service_apis/calendar/google/calendar_api/colors.h @@ -18,10 +18,10 @@ // Calendar API (calendar/v3) // Generated from: // Version: v3 -// Revision: 20170507 +// Revision: 20171010 // Generated by: // Tool: google-apis-code-generator 1.5.1 -// C++: 0.1.4 +// C++: 0.1.5 #ifndef GOOGLE_CALENDAR_API_COLORS_H_ #define GOOGLE_CALENDAR_API_COLORS_H_ @@ -78,8 +78,8 @@ class Colors : public client::JsonCppData { * * @return google_calendar_api::Colors */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::Colors"); + const char* GetTypeName() const { + return "google_calendar_api::Colors"; } /** diff --git a/service_apis/calendar/google/calendar_api/deep_link_data.cc b/service_apis/calendar/google/calendar_api/deep_link_data.cc deleted file mode 100644 index 8047a59..0000000 --- a/service_apis/calendar/google/calendar_api/deep_link_data.cc +++ /dev/null @@ -1,71 +0,0 @@ -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy of -// the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. - -// This code was generated by google-apis-code-generator 1.5.1 - -// ---------------------------------------------------------------------------- -// NOTE: This file is generated from Google APIs Discovery Service. -// Service: -// Calendar API (calendar/v3) -// Description: -// Manipulates events and other calendar data. -// Classes: -// DeepLinkData -// Documentation: -// https://developers.google.com/google-apps/calendar/firstapp - -#include "google/calendar_api/deep_link_data.h" -#include -#include "googleapis/client/data/jsoncpp_data.h" -#include "googleapis/strings/stringpiece.h" - -#include "google/calendar_api/link.h" - - -#include -#include "googleapis/strings/strcat.h" - -namespace google_calendar_api { -using namespace googleapis; - - -// Object factory method (static). -DeepLinkData* DeepLinkData::New() { - return new client::JsonCppCapsule; -} - -// Standard immutable constructor. -DeepLinkData::DeepLinkData(const Json::Value& storage) - : client::JsonCppData(storage) { -} - -// Standard mutable constructor. -DeepLinkData::DeepLinkData(Json::Value* storage) - : client::JsonCppData(storage) { -} - -// Standard destructor. -DeepLinkData::~DeepLinkData() { -} - -// Properties. - -const client::JsonCppArray DeepLinkData::get_links() const { - const Json::Value& storage = Storage("links"); - return client::JsonValueToCppValueHelper >(storage); -} - -client::JsonCppArray DeepLinkData::mutable_links() { - Json::Value* storage = MutableStorage("links"); - return client::JsonValueToMutableCppValueHelper >(storage); -} -} // namespace google_calendar_api diff --git a/service_apis/calendar/google/calendar_api/deep_link_data.h b/service_apis/calendar/google/calendar_api/deep_link_data.h deleted file mode 100644 index 94aeee8..0000000 --- a/service_apis/calendar/google/calendar_api/deep_link_data.h +++ /dev/null @@ -1,150 +0,0 @@ -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy of -// the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. - -// This code was generated by google-apis-code-generator 1.5.1 - -// ---------------------------------------------------------------------------- -// NOTE: This file is generated from Google APIs Discovery Service. -// Service: -// Calendar API (calendar/v3) -// Generated from: -// Version: v3 -// Revision: 20170507 -// Generated by: -// Tool: google-apis-code-generator 1.5.1 -// C++: 0.1.4 -#ifndef GOOGLE_CALENDAR_API_DEEP_LINK_DATA_H_ -#define GOOGLE_CALENDAR_API_DEEP_LINK_DATA_H_ - -#include -#include "googleapis/base/macros.h" -#include "googleapis/client/data/jsoncpp_data.h" -#include "googleapis/strings/stringpiece.h" - -#include "google/calendar_api/link.h" - -namespace Json { -class Value; -} // namespace Json - -namespace google_calendar_api { -using namespace googleapis; - -/** - * No description provided. - * - * @ingroup DataObject - */ -class DeepLinkData : public client::JsonCppData { - public: - /** - * Creates a new default instance. - * - * @return Ownership is passed back to the caller. - */ - static DeepLinkData* New(); - - /** - * Standard constructor for an immutable data object instance. - * - * @param[in] storage The underlying data storage for this instance. - */ - explicit DeepLinkData(const Json::Value& storage); - - /** - * Standard constructor for a mutable data object instance. - * - * @param[in] storage The underlying data storage for this instance. - */ - explicit DeepLinkData(Json::Value* storage); - - /** - * Standard destructor. - */ - virtual ~DeepLinkData(); - - /** - * Returns a string denoting the type of this data object. - * - * @return google_calendar_api::DeepLinkData - */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::DeepLinkData"); - } - - /** - * Determine if the 'links' attribute was set. - * - * @return true if the 'links' attribute was set. - */ - bool has_links() const { - return Storage().isMember("links"); - } - - /** - * Clears the 'links' attribute. - */ - void clear_links() { - MutableStorage()->removeMember("links"); - } - - - /** - * Get a reference to the value of the 'links' attribute. - */ - const client::JsonCppArray get_links() const; - - /** - * Gets a reference to a mutable value of the 'links' property. - * @return The result can be modified to change the attribute value. - */ - client::JsonCppArray mutable_links(); - - /** - * Determine if the 'url' attribute was set. - * - * @return true if the 'url' attribute was set. - */ - bool has_url() const { - return Storage().isMember("url"); - } - - /** - * Clears the 'url' attribute. - */ - void clear_url() { - MutableStorage()->removeMember("url"); - } - - - /** - * Get the value of the 'url' attribute. - */ - const StringPiece get_url() const { - const Json::Value& v = Storage("url"); - if (v == Json::Value::null) return StringPiece(""); - return StringPiece(v.asCString()); - } - - /** - * Change the 'url' attribute. - * @param[in] value The new value. - */ - void set_url(const StringPiece& value) { - *MutableStorage("url") = value.data(); - } - - private: - void operator=(const DeepLinkData&); -}; // DeepLinkData -} // namespace google_calendar_api -#endif // GOOGLE_CALENDAR_API_DEEP_LINK_DATA_H_ diff --git a/service_apis/calendar/google/calendar_api/display_info.cc b/service_apis/calendar/google/calendar_api/display_info.cc deleted file mode 100644 index bcee2f9..0000000 --- a/service_apis/calendar/google/calendar_api/display_info.cc +++ /dev/null @@ -1,59 +0,0 @@ -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy of -// the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. - -// This code was generated by google-apis-code-generator 1.5.1 - -// ---------------------------------------------------------------------------- -// NOTE: This file is generated from Google APIs Discovery Service. -// Service: -// Calendar API (calendar/v3) -// Description: -// Manipulates events and other calendar data. -// Classes: -// DisplayInfo -// Documentation: -// https://developers.google.com/google-apps/calendar/firstapp - -#include "google/calendar_api/display_info.h" -#include -#include "googleapis/client/data/jsoncpp_data.h" -#include "googleapis/strings/stringpiece.h" - - -#include -#include "googleapis/strings/strcat.h" - -namespace google_calendar_api { -using namespace googleapis; - - -// Object factory method (static). -DisplayInfo* DisplayInfo::New() { - return new client::JsonCppCapsule; -} - -// Standard immutable constructor. -DisplayInfo::DisplayInfo(const Json::Value& storage) - : client::JsonCppData(storage) { -} - -// Standard mutable constructor. -DisplayInfo::DisplayInfo(Json::Value* storage) - : client::JsonCppData(storage) { -} - -// Standard destructor. -DisplayInfo::~DisplayInfo() { -} - -// Properties. -} // namespace google_calendar_api diff --git a/service_apis/calendar/google/calendar_api/display_info.h b/service_apis/calendar/google/calendar_api/display_info.h deleted file mode 100644 index c2b7f25..0000000 --- a/service_apis/calendar/google/calendar_api/display_info.h +++ /dev/null @@ -1,256 +0,0 @@ -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy of -// the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. - -// This code was generated by google-apis-code-generator 1.5.1 - -// ---------------------------------------------------------------------------- -// NOTE: This file is generated from Google APIs Discovery Service. -// Service: -// Calendar API (calendar/v3) -// Generated from: -// Version: v3 -// Revision: 20170507 -// Generated by: -// Tool: google-apis-code-generator 1.5.1 -// C++: 0.1.4 -#ifndef GOOGLE_CALENDAR_API_DISPLAY_INFO_H_ -#define GOOGLE_CALENDAR_API_DISPLAY_INFO_H_ - -#include -#include "googleapis/base/macros.h" -#include "googleapis/client/data/jsoncpp_data.h" -#include "googleapis/strings/stringpiece.h" - -namespace Json { -class Value; -} // namespace Json - -namespace google_calendar_api { -using namespace googleapis; - -/** - * No description provided. - * - * @ingroup DataObject - */ -class DisplayInfo : public client::JsonCppData { - public: - /** - * Creates a new default instance. - * - * @return Ownership is passed back to the caller. - */ - static DisplayInfo* New(); - - /** - * Standard constructor for an immutable data object instance. - * - * @param[in] storage The underlying data storage for this instance. - */ - explicit DisplayInfo(const Json::Value& storage); - - /** - * Standard constructor for a mutable data object instance. - * - * @param[in] storage The underlying data storage for this instance. - */ - explicit DisplayInfo(Json::Value* storage); - - /** - * Standard destructor. - */ - virtual ~DisplayInfo(); - - /** - * Returns a string denoting the type of this data object. - * - * @return google_calendar_api::DisplayInfo - */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::DisplayInfo"); - } - - /** - * Determine if the 'appIconUrl' attribute was set. - * - * @return true if the 'appIconUrl' attribute was set. - */ - bool has_app_icon_url() const { - return Storage().isMember("appIconUrl"); - } - - /** - * Clears the 'appIconUrl' attribute. - */ - void clear_app_icon_url() { - MutableStorage()->removeMember("appIconUrl"); - } - - - /** - * Get the value of the 'appIconUrl' attribute. - */ - const StringPiece get_app_icon_url() const { - const Json::Value& v = Storage("appIconUrl"); - if (v == Json::Value::null) return StringPiece(""); - return StringPiece(v.asCString()); - } - - /** - * Change the 'appIconUrl' attribute. - * @param[in] value The new value. - */ - void set_app_icon_url(const StringPiece& value) { - *MutableStorage("appIconUrl") = value.data(); - } - - /** - * Determine if the 'appShortTitle' attribute was set. - * - * @return true if the 'appShortTitle' attribute was set. - */ - bool has_app_short_title() const { - return Storage().isMember("appShortTitle"); - } - - /** - * Clears the 'appShortTitle' attribute. - */ - void clear_app_short_title() { - MutableStorage()->removeMember("appShortTitle"); - } - - - /** - * Get the value of the 'appShortTitle' attribute. - */ - const StringPiece get_app_short_title() const { - const Json::Value& v = Storage("appShortTitle"); - if (v == Json::Value::null) return StringPiece(""); - return StringPiece(v.asCString()); - } - - /** - * Change the 'appShortTitle' attribute. - * @param[in] value The new value. - */ - void set_app_short_title(const StringPiece& value) { - *MutableStorage("appShortTitle") = value.data(); - } - - /** - * Determine if the 'appTitle' attribute was set. - * - * @return true if the 'appTitle' attribute was set. - */ - bool has_app_title() const { - return Storage().isMember("appTitle"); - } - - /** - * Clears the 'appTitle' attribute. - */ - void clear_app_title() { - MutableStorage()->removeMember("appTitle"); - } - - - /** - * Get the value of the 'appTitle' attribute. - */ - const StringPiece get_app_title() const { - const Json::Value& v = Storage("appTitle"); - if (v == Json::Value::null) return StringPiece(""); - return StringPiece(v.asCString()); - } - - /** - * Change the 'appTitle' attribute. - * @param[in] value The new value. - */ - void set_app_title(const StringPiece& value) { - *MutableStorage("appTitle") = value.data(); - } - - /** - * Determine if the 'linkShortTitle' attribute was set. - * - * @return true if the 'linkShortTitle' attribute was set. - */ - bool has_link_short_title() const { - return Storage().isMember("linkShortTitle"); - } - - /** - * Clears the 'linkShortTitle' attribute. - */ - void clear_link_short_title() { - MutableStorage()->removeMember("linkShortTitle"); - } - - - /** - * Get the value of the 'linkShortTitle' attribute. - */ - const StringPiece get_link_short_title() const { - const Json::Value& v = Storage("linkShortTitle"); - if (v == Json::Value::null) return StringPiece(""); - return StringPiece(v.asCString()); - } - - /** - * Change the 'linkShortTitle' attribute. - * @param[in] value The new value. - */ - void set_link_short_title(const StringPiece& value) { - *MutableStorage("linkShortTitle") = value.data(); - } - - /** - * Determine if the 'linkTitle' attribute was set. - * - * @return true if the 'linkTitle' attribute was set. - */ - bool has_link_title() const { - return Storage().isMember("linkTitle"); - } - - /** - * Clears the 'linkTitle' attribute. - */ - void clear_link_title() { - MutableStorage()->removeMember("linkTitle"); - } - - - /** - * Get the value of the 'linkTitle' attribute. - */ - const StringPiece get_link_title() const { - const Json::Value& v = Storage("linkTitle"); - if (v == Json::Value::null) return StringPiece(""); - return StringPiece(v.asCString()); - } - - /** - * Change the 'linkTitle' attribute. - * @param[in] value The new value. - */ - void set_link_title(const StringPiece& value) { - *MutableStorage("linkTitle") = value.data(); - } - - private: - void operator=(const DisplayInfo&); -}; // DisplayInfo -} // namespace google_calendar_api -#endif // GOOGLE_CALENDAR_API_DISPLAY_INFO_H_ diff --git a/service_apis/calendar/google/calendar_api/error.h b/service_apis/calendar/google/calendar_api/error.h index fb4df82..dec52cc 100644 --- a/service_apis/calendar/google/calendar_api/error.h +++ b/service_apis/calendar/google/calendar_api/error.h @@ -18,10 +18,10 @@ // Calendar API (calendar/v3) // Generated from: // Version: v3 -// Revision: 20170507 +// Revision: 20171010 // Generated by: // Tool: google-apis-code-generator 1.5.1 -// C++: 0.1.4 +// C++: 0.1.5 #ifndef GOOGLE_CALENDAR_API_ERROR_H_ #define GOOGLE_CALENDAR_API_ERROR_H_ @@ -75,8 +75,8 @@ class Error : public client::JsonCppData { * * @return google_calendar_api::Error */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::Error"); + const char* GetTypeName() const { + return "google_calendar_api::Error"; } /** diff --git a/service_apis/calendar/google/calendar_api/event.h b/service_apis/calendar/google/calendar_api/event.h index eb7ee3c..cf1d86c 100644 --- a/service_apis/calendar/google/calendar_api/event.h +++ b/service_apis/calendar/google/calendar_api/event.h @@ -18,10 +18,10 @@ // Calendar API (calendar/v3) // Generated from: // Version: v3 -// Revision: 20170507 +// Revision: 20171010 // Generated by: // Tool: google-apis-code-generator 1.5.1 -// C++: 0.1.4 +// C++: 0.1.5 #ifndef GOOGLE_CALENDAR_API_EVENT_H_ #define GOOGLE_CALENDAR_API_EVENT_H_ @@ -89,8 +89,8 @@ class Event : public client::JsonCppData { * * @return google_calendar_api::EventCreator */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::EventCreator"); + const char* GetTypeName() const { + return "google_calendar_api::EventCreator"; } /** @@ -284,8 +284,8 @@ class Event : public client::JsonCppData { * * @return google_calendar_api::EventExtendedProperties */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::EventExtendedProperties"); + const char* GetTypeName() const { + return "google_calendar_api::EventExtendedProperties"; } /** @@ -407,8 +407,8 @@ class Event : public client::JsonCppData { * * @return google_calendar_api::EventGadget */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::EventGadget"); + const char* GetTypeName() const { + return "google_calendar_api::EventGadget"; } /** @@ -761,8 +761,8 @@ class Event : public client::JsonCppData { * * @return google_calendar_api::EventOrganizer */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::EventOrganizer"); + const char* GetTypeName() const { + return "google_calendar_api::EventOrganizer"; } /** @@ -957,8 +957,8 @@ class Event : public client::JsonCppData { * * @return google_calendar_api::EventReminders */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::EventReminders"); + const char* GetTypeName() const { + return "google_calendar_api::EventReminders"; } /** @@ -1075,8 +1075,8 @@ class Event : public client::JsonCppData { * * @return google_calendar_api::EventSource */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::EventSource"); + const char* GetTypeName() const { + return "google_calendar_api::EventSource"; } /** @@ -1189,8 +1189,8 @@ class Event : public client::JsonCppData { * * @return google_calendar_api::Event */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::Event"); + const char* GetTypeName() const { + return "google_calendar_api::Event"; } /** @@ -2527,9 +2527,11 @@ class Event : public client::JsonCppData { * are: *
*
"opaque" - *
The event blocks time on the calendar. This is the default value. + *
Default value. The event does block time on the calendar. This is + * equivalent to setting Show me as to Busy in the Calendar UI. *
"transparent" - *
The event does not block time on the calendar. + *
The event does not block time on the calendar. This is equivalent to + * setting Show me as to Available in the Calendar UI. *
* * diff --git a/service_apis/calendar/google/calendar_api/event_attachment.h b/service_apis/calendar/google/calendar_api/event_attachment.h index 86abd68..b743f94 100644 --- a/service_apis/calendar/google/calendar_api/event_attachment.h +++ b/service_apis/calendar/google/calendar_api/event_attachment.h @@ -18,10 +18,10 @@ // Calendar API (calendar/v3) // Generated from: // Version: v3 -// Revision: 20170507 +// Revision: 20171010 // Generated by: // Tool: google-apis-code-generator 1.5.1 -// C++: 0.1.4 +// C++: 0.1.5 #ifndef GOOGLE_CALENDAR_API_EVENT_ATTACHMENT_H_ #define GOOGLE_CALENDAR_API_EVENT_ATTACHMENT_H_ @@ -75,8 +75,8 @@ class EventAttachment : public client::JsonCppData { * * @return google_calendar_api::EventAttachment */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::EventAttachment"); + const char* GetTypeName() const { + return "google_calendar_api::EventAttachment"; } /** diff --git a/service_apis/calendar/google/calendar_api/event_attendee.h b/service_apis/calendar/google/calendar_api/event_attendee.h index bf15b00..d6c3165 100644 --- a/service_apis/calendar/google/calendar_api/event_attendee.h +++ b/service_apis/calendar/google/calendar_api/event_attendee.h @@ -18,10 +18,10 @@ // Calendar API (calendar/v3) // Generated from: // Version: v3 -// Revision: 20170507 +// Revision: 20171010 // Generated by: // Tool: google-apis-code-generator 1.5.1 -// C++: 0.1.4 +// C++: 0.1.5 #ifndef GOOGLE_CALENDAR_API_EVENT_ATTENDEE_H_ #define GOOGLE_CALENDAR_API_EVENT_ATTENDEE_H_ @@ -76,8 +76,8 @@ class EventAttendee : public client::JsonCppData { * * @return google_calendar_api::EventAttendee */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::EventAttendee"); + const char* GetTypeName() const { + return "google_calendar_api::EventAttendee"; } /** diff --git a/service_apis/calendar/google/calendar_api/event_date_time.h b/service_apis/calendar/google/calendar_api/event_date_time.h index 1e67605..5ec49f8 100644 --- a/service_apis/calendar/google/calendar_api/event_date_time.h +++ b/service_apis/calendar/google/calendar_api/event_date_time.h @@ -18,10 +18,10 @@ // Calendar API (calendar/v3) // Generated from: // Version: v3 -// Revision: 20170507 +// Revision: 20171010 // Generated by: // Tool: google-apis-code-generator 1.5.1 -// C++: 0.1.4 +// C++: 0.1.5 #ifndef GOOGLE_CALENDAR_API_EVENT_DATE_TIME_H_ #define GOOGLE_CALENDAR_API_EVENT_DATE_TIME_H_ @@ -76,8 +76,8 @@ class EventDateTime : public client::JsonCppData { * * @return google_calendar_api::EventDateTime */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::EventDateTime"); + const char* GetTypeName() const { + return "google_calendar_api::EventDateTime"; } /** diff --git a/service_apis/calendar/google/calendar_api/event_habit_instance.cc b/service_apis/calendar/google/calendar_api/event_habit_instance.cc deleted file mode 100644 index 8c607e8..0000000 --- a/service_apis/calendar/google/calendar_api/event_habit_instance.cc +++ /dev/null @@ -1,71 +0,0 @@ -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy of -// the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. - -// This code was generated by google-apis-code-generator 1.5.1 - -// ---------------------------------------------------------------------------- -// NOTE: This file is generated from Google APIs Discovery Service. -// Service: -// Calendar API (calendar/v3) -// Description: -// Manipulates events and other calendar data. -// Classes: -// EventHabitInstance -// Documentation: -// https://developers.google.com/google-apps/calendar/firstapp - -#include "google/calendar_api/event_habit_instance.h" -#include -#include "googleapis/client/data/jsoncpp_data.h" -#include "googleapis/strings/stringpiece.h" - -#include "google/calendar_api/habit_instance_data.h" - - -#include -#include "googleapis/strings/strcat.h" - -namespace google_calendar_api { -using namespace googleapis; - - -// Object factory method (static). -EventHabitInstance* EventHabitInstance::New() { - return new client::JsonCppCapsule; -} - -// Standard immutable constructor. -EventHabitInstance::EventHabitInstance(const Json::Value& storage) - : client::JsonCppData(storage) { -} - -// Standard mutable constructor. -EventHabitInstance::EventHabitInstance(Json::Value* storage) - : client::JsonCppData(storage) { -} - -// Standard destructor. -EventHabitInstance::~EventHabitInstance() { -} - -// Properties. - -const HabitInstanceData EventHabitInstance::get_data() const { - const Json::Value& storage = Storage("data"); - return client::JsonValueToCppValueHelper(storage); -} - -HabitInstanceData EventHabitInstance::mutable_data() { - Json::Value* storage = MutableStorage("data"); - return client::JsonValueToMutableCppValueHelper(storage); -} -} // namespace google_calendar_api diff --git a/service_apis/calendar/google/calendar_api/event_habit_instance.h b/service_apis/calendar/google/calendar_api/event_habit_instance.h deleted file mode 100644 index 0f686de..0000000 --- a/service_apis/calendar/google/calendar_api/event_habit_instance.h +++ /dev/null @@ -1,156 +0,0 @@ -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy of -// the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. - -// This code was generated by google-apis-code-generator 1.5.1 - -// ---------------------------------------------------------------------------- -// NOTE: This file is generated from Google APIs Discovery Service. -// Service: -// Calendar API (calendar/v3) -// Generated from: -// Version: v3 -// Revision: 20170507 -// Generated by: -// Tool: google-apis-code-generator 1.5.1 -// C++: 0.1.4 -#ifndef GOOGLE_CALENDAR_API_EVENT_HABIT_INSTANCE_H_ -#define GOOGLE_CALENDAR_API_EVENT_HABIT_INSTANCE_H_ - -#include -#include "googleapis/base/macros.h" -#include "googleapis/client/data/jsoncpp_data.h" -#include "googleapis/strings/stringpiece.h" - -#include "google/calendar_api/habit_instance_data.h" - -namespace Json { -class Value; -} // namespace Json - -namespace google_calendar_api { -using namespace googleapis; - -/** - * No description provided. - * - * @ingroup DataObject - */ -class EventHabitInstance : public client::JsonCppData { - public: - /** - * Creates a new default instance. - * - * @return Ownership is passed back to the caller. - */ - static EventHabitInstance* New(); - - /** - * Standard constructor for an immutable data object instance. - * - * @param[in] storage The underlying data storage for this instance. - */ - explicit EventHabitInstance(const Json::Value& storage); - - /** - * Standard constructor for a mutable data object instance. - * - * @param[in] storage The underlying data storage for this instance. - */ - explicit EventHabitInstance(Json::Value* storage); - - /** - * Standard destructor. - */ - virtual ~EventHabitInstance(); - - /** - * Returns a string denoting the type of this data object. - * - * @return google_calendar_api::EventHabitInstance - */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::EventHabitInstance"); - } - - /** - * Determine if the 'data' attribute was set. - * - * @return true if the 'data' attribute was set. - */ - bool has_data() const { - return Storage().isMember("data"); - } - - /** - * Clears the 'data' attribute. - */ - void clear_data() { - MutableStorage()->removeMember("data"); - } - - - /** - * Get a reference to the value of the 'data' attribute. - */ - const HabitInstanceData get_data() const; - - /** - * Gets a reference to a mutable value of the 'data' property. - * - * Metadata specific to this instance. - * - * @return The result can be modified to change the attribute value. - */ - HabitInstanceData mutable_data(); - - /** - * Determine if the 'parentId' attribute was set. - * - * @return true if the 'parentId' attribute was set. - */ - bool has_parent_id() const { - return Storage().isMember("parentId"); - } - - /** - * Clears the 'parentId' attribute. - */ - void clear_parent_id() { - MutableStorage()->removeMember("parentId"); - } - - - /** - * Get the value of the 'parentId' attribute. - */ - const StringPiece get_parent_id() const { - const Json::Value& v = Storage("parentId"); - if (v == Json::Value::null) return StringPiece(""); - return StringPiece(v.asCString()); - } - - /** - * Change the 'parentId' attribute. - * - * Id of the habit this instance belongs to. - * - * @param[in] value The new value. - */ - void set_parent_id(const StringPiece& value) { - *MutableStorage("parentId") = value.data(); - } - - private: - void operator=(const EventHabitInstance&); -}; // EventHabitInstance -} // namespace google_calendar_api -#endif // GOOGLE_CALENDAR_API_EVENT_HABIT_INSTANCE_H_ diff --git a/service_apis/calendar/google/calendar_api/event_reminder.h b/service_apis/calendar/google/calendar_api/event_reminder.h index 387ef09..3ccfe35 100644 --- a/service_apis/calendar/google/calendar_api/event_reminder.h +++ b/service_apis/calendar/google/calendar_api/event_reminder.h @@ -18,10 +18,10 @@ // Calendar API (calendar/v3) // Generated from: // Version: v3 -// Revision: 20170507 +// Revision: 20171010 // Generated by: // Tool: google-apis-code-generator 1.5.1 -// C++: 0.1.4 +// C++: 0.1.5 #ifndef GOOGLE_CALENDAR_API_EVENT_REMINDER_H_ #define GOOGLE_CALENDAR_API_EVENT_REMINDER_H_ @@ -76,8 +76,8 @@ class EventReminder : public client::JsonCppData { * * @return google_calendar_api::EventReminder */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::EventReminder"); + const char* GetTypeName() const { + return "google_calendar_api::EventReminder"; } /** diff --git a/service_apis/calendar/google/calendar_api/events.h b/service_apis/calendar/google/calendar_api/events.h index 592def5..ffd9ffd 100644 --- a/service_apis/calendar/google/calendar_api/events.h +++ b/service_apis/calendar/google/calendar_api/events.h @@ -18,10 +18,10 @@ // Calendar API (calendar/v3) // Generated from: // Version: v3 -// Revision: 20170507 +// Revision: 20171010 // Generated by: // Tool: google-apis-code-generator 1.5.1 -// C++: 0.1.4 +// C++: 0.1.5 #ifndef GOOGLE_CALENDAR_API_EVENTS_H_ #define GOOGLE_CALENDAR_API_EVENTS_H_ @@ -79,8 +79,8 @@ class Events : public client::JsonCppData { * * @return google_calendar_api::Events */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::Events"); + const char* GetTypeName() const { + return "google_calendar_api::Events"; } /** diff --git a/service_apis/calendar/google/calendar_api/free_busy_calendar.h b/service_apis/calendar/google/calendar_api/free_busy_calendar.h index f4c2741..35475b2 100644 --- a/service_apis/calendar/google/calendar_api/free_busy_calendar.h +++ b/service_apis/calendar/google/calendar_api/free_busy_calendar.h @@ -18,10 +18,10 @@ // Calendar API (calendar/v3) // Generated from: // Version: v3 -// Revision: 20170507 +// Revision: 20171010 // Generated by: // Tool: google-apis-code-generator 1.5.1 -// C++: 0.1.4 +// C++: 0.1.5 #ifndef GOOGLE_CALENDAR_API_FREE_BUSY_CALENDAR_H_ #define GOOGLE_CALENDAR_API_FREE_BUSY_CALENDAR_H_ @@ -77,8 +77,8 @@ class FreeBusyCalendar : public client::JsonCppData { * * @return google_calendar_api::FreeBusyCalendar */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::FreeBusyCalendar"); + const char* GetTypeName() const { + return "google_calendar_api::FreeBusyCalendar"; } /** diff --git a/service_apis/calendar/google/calendar_api/free_busy_group.h b/service_apis/calendar/google/calendar_api/free_busy_group.h index ea69df6..a9f2556 100644 --- a/service_apis/calendar/google/calendar_api/free_busy_group.h +++ b/service_apis/calendar/google/calendar_api/free_busy_group.h @@ -18,10 +18,10 @@ // Calendar API (calendar/v3) // Generated from: // Version: v3 -// Revision: 20170507 +// Revision: 20171010 // Generated by: // Tool: google-apis-code-generator 1.5.1 -// C++: 0.1.4 +// C++: 0.1.5 #ifndef GOOGLE_CALENDAR_API_FREE_BUSY_GROUP_H_ #define GOOGLE_CALENDAR_API_FREE_BUSY_GROUP_H_ @@ -77,8 +77,8 @@ class FreeBusyGroup : public client::JsonCppData { * * @return google_calendar_api::FreeBusyGroup */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::FreeBusyGroup"); + const char* GetTypeName() const { + return "google_calendar_api::FreeBusyGroup"; } /** diff --git a/service_apis/calendar/google/calendar_api/free_busy_request.h b/service_apis/calendar/google/calendar_api/free_busy_request.h index 0668634..fa0f793 100644 --- a/service_apis/calendar/google/calendar_api/free_busy_request.h +++ b/service_apis/calendar/google/calendar_api/free_busy_request.h @@ -18,10 +18,10 @@ // Calendar API (calendar/v3) // Generated from: // Version: v3 -// Revision: 20170507 +// Revision: 20171010 // Generated by: // Tool: google-apis-code-generator 1.5.1 -// C++: 0.1.4 +// C++: 0.1.5 #ifndef GOOGLE_CALENDAR_API_FREE_BUSY_REQUEST_H_ #define GOOGLE_CALENDAR_API_FREE_BUSY_REQUEST_H_ @@ -79,8 +79,8 @@ class FreeBusyRequest : public client::JsonCppData { * * @return google_calendar_api::FreeBusyRequest */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::FreeBusyRequest"); + const char* GetTypeName() const { + return "google_calendar_api::FreeBusyRequest"; } /** diff --git a/service_apis/calendar/google/calendar_api/free_busy_request_item.h b/service_apis/calendar/google/calendar_api/free_busy_request_item.h index b30651f..ab113b4 100644 --- a/service_apis/calendar/google/calendar_api/free_busy_request_item.h +++ b/service_apis/calendar/google/calendar_api/free_busy_request_item.h @@ -18,10 +18,10 @@ // Calendar API (calendar/v3) // Generated from: // Version: v3 -// Revision: 20170507 +// Revision: 20171010 // Generated by: // Tool: google-apis-code-generator 1.5.1 -// C++: 0.1.4 +// C++: 0.1.5 #ifndef GOOGLE_CALENDAR_API_FREE_BUSY_REQUEST_ITEM_H_ #define GOOGLE_CALENDAR_API_FREE_BUSY_REQUEST_ITEM_H_ @@ -75,8 +75,8 @@ class FreeBusyRequestItem : public client::JsonCppData { * * @return google_calendar_api::FreeBusyRequestItem */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::FreeBusyRequestItem"); + const char* GetTypeName() const { + return "google_calendar_api::FreeBusyRequestItem"; } /** diff --git a/service_apis/calendar/google/calendar_api/free_busy_response.h b/service_apis/calendar/google/calendar_api/free_busy_response.h index b7271b9..5c21639 100644 --- a/service_apis/calendar/google/calendar_api/free_busy_response.h +++ b/service_apis/calendar/google/calendar_api/free_busy_response.h @@ -18,10 +18,10 @@ // Calendar API (calendar/v3) // Generated from: // Version: v3 -// Revision: 20170507 +// Revision: 20171010 // Generated by: // Tool: google-apis-code-generator 1.5.1 -// C++: 0.1.4 +// C++: 0.1.5 #ifndef GOOGLE_CALENDAR_API_FREE_BUSY_RESPONSE_H_ #define GOOGLE_CALENDAR_API_FREE_BUSY_RESPONSE_H_ @@ -79,8 +79,8 @@ class FreeBusyResponse : public client::JsonCppData { * * @return google_calendar_api::FreeBusyResponse */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::FreeBusyResponse"); + const char* GetTypeName() const { + return "google_calendar_api::FreeBusyResponse"; } /** diff --git a/service_apis/calendar/google/calendar_api/habit_instance_data.cc b/service_apis/calendar/google/calendar_api/habit_instance_data.cc deleted file mode 100644 index 37a1d4f..0000000 --- a/service_apis/calendar/google/calendar_api/habit_instance_data.cc +++ /dev/null @@ -1,59 +0,0 @@ -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy of -// the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. - -// This code was generated by google-apis-code-generator 1.5.1 - -// ---------------------------------------------------------------------------- -// NOTE: This file is generated from Google APIs Discovery Service. -// Service: -// Calendar API (calendar/v3) -// Description: -// Manipulates events and other calendar data. -// Classes: -// HabitInstanceData -// Documentation: -// https://developers.google.com/google-apps/calendar/firstapp - -#include "google/calendar_api/habit_instance_data.h" -#include -#include "googleapis/client/data/jsoncpp_data.h" -#include "googleapis/strings/stringpiece.h" - - -#include -#include "googleapis/strings/strcat.h" - -namespace google_calendar_api { -using namespace googleapis; - - -// Object factory method (static). -HabitInstanceData* HabitInstanceData::New() { - return new client::JsonCppCapsule; -} - -// Standard immutable constructor. -HabitInstanceData::HabitInstanceData(const Json::Value& storage) - : client::JsonCppData(storage) { -} - -// Standard mutable constructor. -HabitInstanceData::HabitInstanceData(Json::Value* storage) - : client::JsonCppData(storage) { -} - -// Standard destructor. -HabitInstanceData::~HabitInstanceData() { -} - -// Properties. -} // namespace google_calendar_api diff --git a/service_apis/calendar/google/calendar_api/habit_instance_data.h b/service_apis/calendar/google/calendar_api/habit_instance_data.h deleted file mode 100644 index 4ee84a6..0000000 --- a/service_apis/calendar/google/calendar_api/habit_instance_data.h +++ /dev/null @@ -1,188 +0,0 @@ -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy of -// the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. - -// This code was generated by google-apis-code-generator 1.5.1 - -// ---------------------------------------------------------------------------- -// NOTE: This file is generated from Google APIs Discovery Service. -// Service: -// Calendar API (calendar/v3) -// Generated from: -// Version: v3 -// Revision: 20170507 -// Generated by: -// Tool: google-apis-code-generator 1.5.1 -// C++: 0.1.4 -#ifndef GOOGLE_CALENDAR_API_HABIT_INSTANCE_DATA_H_ -#define GOOGLE_CALENDAR_API_HABIT_INSTANCE_DATA_H_ - -#include -#include "googleapis/base/macros.h" -#include "googleapis/client/data/jsoncpp_data.h" -#include "googleapis/strings/stringpiece.h" - -namespace Json { -class Value; -} // namespace Json - -namespace google_calendar_api { -using namespace googleapis; - -/** - * No description provided. - * - * @ingroup DataObject - */ -class HabitInstanceData : public client::JsonCppData { - public: - /** - * Creates a new default instance. - * - * @return Ownership is passed back to the caller. - */ - static HabitInstanceData* New(); - - /** - * Standard constructor for an immutable data object instance. - * - * @param[in] storage The underlying data storage for this instance. - */ - explicit HabitInstanceData(const Json::Value& storage); - - /** - * Standard constructor for a mutable data object instance. - * - * @param[in] storage The underlying data storage for this instance. - */ - explicit HabitInstanceData(Json::Value* storage); - - /** - * Standard destructor. - */ - virtual ~HabitInstanceData(); - - /** - * Returns a string denoting the type of this data object. - * - * @return google_calendar_api::HabitInstanceData - */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::HabitInstanceData"); - } - - /** - * Determine if the 'status' attribute was set. - * - * @return true if the 'status' attribute was set. - */ - bool has_status() const { - return Storage().isMember("status"); - } - - /** - * Clears the 'status' attribute. - */ - void clear_status() { - MutableStorage()->removeMember("status"); - } - - - /** - * Get the value of the 'status' attribute. - */ - const StringPiece get_status() const { - const Json::Value& v = Storage("status"); - if (v == Json::Value::null) return StringPiece(""); - return StringPiece(v.asCString()); - } - - /** - * Change the 'status' attribute. - * @param[in] value The new value. - */ - void set_status(const StringPiece& value) { - *MutableStorage("status") = value.data(); - } - - /** - * Determine if the 'statusInferred' attribute was set. - * - * @return true if the 'statusInferred' attribute was set. - */ - bool has_status_inferred() const { - return Storage().isMember("statusInferred"); - } - - /** - * Clears the 'statusInferred' attribute. - */ - void clear_status_inferred() { - MutableStorage()->removeMember("statusInferred"); - } - - - /** - * Get the value of the 'statusInferred' attribute. - */ - bool get_status_inferred() const { - const Json::Value& storage = Storage("statusInferred"); - return client::JsonValueToCppValueHelper(storage); - } - - /** - * Change the 'statusInferred' attribute. - * @param[in] value The new value. - */ - void set_status_inferred(bool value) { - client::SetJsonValueFromCppValueHelper( - value, MutableStorage("statusInferred")); - } - - /** - * Determine if the 'type' attribute was set. - * - * @return true if the 'type' attribute was set. - */ - bool has_type() const { - return Storage().isMember("type"); - } - - /** - * Clears the 'type' attribute. - */ - void clear_type() { - MutableStorage()->removeMember("type"); - } - - - /** - * Get the value of the 'type' attribute. - */ - const StringPiece get_type() const { - const Json::Value& v = Storage("type"); - if (v == Json::Value::null) return StringPiece(""); - return StringPiece(v.asCString()); - } - - /** - * Change the 'type' attribute. - * @param[in] value The new value. - */ - void set_type(const StringPiece& value) { - *MutableStorage("type") = value.data(); - } - - private: - void operator=(const HabitInstanceData&); -}; // HabitInstanceData -} // namespace google_calendar_api -#endif // GOOGLE_CALENDAR_API_HABIT_INSTANCE_DATA_H_ diff --git a/service_apis/calendar/google/calendar_api/launch_info.cc b/service_apis/calendar/google/calendar_api/launch_info.cc deleted file mode 100644 index a439797..0000000 --- a/service_apis/calendar/google/calendar_api/launch_info.cc +++ /dev/null @@ -1,59 +0,0 @@ -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy of -// the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. - -// This code was generated by google-apis-code-generator 1.5.1 - -// ---------------------------------------------------------------------------- -// NOTE: This file is generated from Google APIs Discovery Service. -// Service: -// Calendar API (calendar/v3) -// Description: -// Manipulates events and other calendar data. -// Classes: -// LaunchInfo -// Documentation: -// https://developers.google.com/google-apps/calendar/firstapp - -#include "google/calendar_api/launch_info.h" -#include -#include "googleapis/client/data/jsoncpp_data.h" -#include "googleapis/strings/stringpiece.h" - - -#include -#include "googleapis/strings/strcat.h" - -namespace google_calendar_api { -using namespace googleapis; - - -// Object factory method (static). -LaunchInfo* LaunchInfo::New() { - return new client::JsonCppCapsule; -} - -// Standard immutable constructor. -LaunchInfo::LaunchInfo(const Json::Value& storage) - : client::JsonCppData(storage) { -} - -// Standard mutable constructor. -LaunchInfo::LaunchInfo(Json::Value* storage) - : client::JsonCppData(storage) { -} - -// Standard destructor. -LaunchInfo::~LaunchInfo() { -} - -// Properties. -} // namespace google_calendar_api diff --git a/service_apis/calendar/google/calendar_api/launch_info.h b/service_apis/calendar/google/calendar_api/launch_info.h deleted file mode 100644 index 09adb00..0000000 --- a/service_apis/calendar/google/calendar_api/launch_info.h +++ /dev/null @@ -1,222 +0,0 @@ -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy of -// the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. - -// This code was generated by google-apis-code-generator 1.5.1 - -// ---------------------------------------------------------------------------- -// NOTE: This file is generated from Google APIs Discovery Service. -// Service: -// Calendar API (calendar/v3) -// Generated from: -// Version: v3 -// Revision: 20170507 -// Generated by: -// Tool: google-apis-code-generator 1.5.1 -// C++: 0.1.4 -#ifndef GOOGLE_CALENDAR_API_LAUNCH_INFO_H_ -#define GOOGLE_CALENDAR_API_LAUNCH_INFO_H_ - -#include -#include "googleapis/base/macros.h" -#include "googleapis/client/data/jsoncpp_data.h" -#include "googleapis/strings/stringpiece.h" - -namespace Json { -class Value; -} // namespace Json - -namespace google_calendar_api { -using namespace googleapis; - -/** - * No description provided. - * - * @ingroup DataObject - */ -class LaunchInfo : public client::JsonCppData { - public: - /** - * Creates a new default instance. - * - * @return Ownership is passed back to the caller. - */ - static LaunchInfo* New(); - - /** - * Standard constructor for an immutable data object instance. - * - * @param[in] storage The underlying data storage for this instance. - */ - explicit LaunchInfo(const Json::Value& storage); - - /** - * Standard constructor for a mutable data object instance. - * - * @param[in] storage The underlying data storage for this instance. - */ - explicit LaunchInfo(Json::Value* storage); - - /** - * Standard destructor. - */ - virtual ~LaunchInfo(); - - /** - * Returns a string denoting the type of this data object. - * - * @return google_calendar_api::LaunchInfo - */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::LaunchInfo"); - } - - /** - * Determine if the 'appId' attribute was set. - * - * @return true if the 'appId' attribute was set. - */ - bool has_app_id() const { - return Storage().isMember("appId"); - } - - /** - * Clears the 'appId' attribute. - */ - void clear_app_id() { - MutableStorage()->removeMember("appId"); - } - - - /** - * Get the value of the 'appId' attribute. - */ - const StringPiece get_app_id() const { - const Json::Value& v = Storage("appId"); - if (v == Json::Value::null) return StringPiece(""); - return StringPiece(v.asCString()); - } - - /** - * Change the 'appId' attribute. - * @param[in] value The new value. - */ - void set_app_id(const StringPiece& value) { - *MutableStorage("appId") = value.data(); - } - - /** - * Determine if the 'installUrl' attribute was set. - * - * @return true if the 'installUrl' attribute was set. - */ - bool has_install_url() const { - return Storage().isMember("installUrl"); - } - - /** - * Clears the 'installUrl' attribute. - */ - void clear_install_url() { - MutableStorage()->removeMember("installUrl"); - } - - - /** - * Get the value of the 'installUrl' attribute. - */ - const StringPiece get_install_url() const { - const Json::Value& v = Storage("installUrl"); - if (v == Json::Value::null) return StringPiece(""); - return StringPiece(v.asCString()); - } - - /** - * Change the 'installUrl' attribute. - * @param[in] value The new value. - */ - void set_install_url(const StringPiece& value) { - *MutableStorage("installUrl") = value.data(); - } - - /** - * Determine if the 'intentAction' attribute was set. - * - * @return true if the 'intentAction' attribute was set. - */ - bool has_intent_action() const { - return Storage().isMember("intentAction"); - } - - /** - * Clears the 'intentAction' attribute. - */ - void clear_intent_action() { - MutableStorage()->removeMember("intentAction"); - } - - - /** - * Get the value of the 'intentAction' attribute. - */ - const StringPiece get_intent_action() const { - const Json::Value& v = Storage("intentAction"); - if (v == Json::Value::null) return StringPiece(""); - return StringPiece(v.asCString()); - } - - /** - * Change the 'intentAction' attribute. - * @param[in] value The new value. - */ - void set_intent_action(const StringPiece& value) { - *MutableStorage("intentAction") = value.data(); - } - - /** - * Determine if the 'uri' attribute was set. - * - * @return true if the 'uri' attribute was set. - */ - bool has_uri() const { - return Storage().isMember("uri"); - } - - /** - * Clears the 'uri' attribute. - */ - void clear_uri() { - MutableStorage()->removeMember("uri"); - } - - - /** - * Get the value of the 'uri' attribute. - */ - const StringPiece get_uri() const { - const Json::Value& v = Storage("uri"); - if (v == Json::Value::null) return StringPiece(""); - return StringPiece(v.asCString()); - } - - /** - * Change the 'uri' attribute. - * @param[in] value The new value. - */ - void set_uri(const StringPiece& value) { - *MutableStorage("uri") = value.data(); - } - - private: - void operator=(const LaunchInfo&); -}; // LaunchInfo -} // namespace google_calendar_api -#endif // GOOGLE_CALENDAR_API_LAUNCH_INFO_H_ diff --git a/service_apis/calendar/google/calendar_api/link.cc b/service_apis/calendar/google/calendar_api/link.cc deleted file mode 100644 index 062e0b2..0000000 --- a/service_apis/calendar/google/calendar_api/link.cc +++ /dev/null @@ -1,82 +0,0 @@ -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy of -// the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. - -// This code was generated by google-apis-code-generator 1.5.1 - -// ---------------------------------------------------------------------------- -// NOTE: This file is generated from Google APIs Discovery Service. -// Service: -// Calendar API (calendar/v3) -// Description: -// Manipulates events and other calendar data. -// Classes: -// Link -// Documentation: -// https://developers.google.com/google-apps/calendar/firstapp - -#include "google/calendar_api/link.h" -#include -#include "googleapis/client/data/jsoncpp_data.h" -#include "googleapis/strings/stringpiece.h" - -#include "google/calendar_api/display_info.h" -#include "google/calendar_api/launch_info.h" - - -#include -#include "googleapis/strings/strcat.h" - -namespace google_calendar_api { -using namespace googleapis; - - -// Object factory method (static). -Link* Link::New() { - return new client::JsonCppCapsule; -} - -// Standard immutable constructor. -Link::Link(const Json::Value& storage) - : client::JsonCppData(storage) { -} - -// Standard mutable constructor. -Link::Link(Json::Value* storage) - : client::JsonCppData(storage) { -} - -// Standard destructor. -Link::~Link() { -} - -// Properties. - -const DisplayInfo Link::get_display_info() const { - const Json::Value& storage = Storage("displayInfo"); - return client::JsonValueToCppValueHelper(storage); -} - -DisplayInfo Link::mutable_displayInfo() { - Json::Value* storage = MutableStorage("displayInfo"); - return client::JsonValueToMutableCppValueHelper(storage); -} - -const LaunchInfo Link::get_launch_info() const { - const Json::Value& storage = Storage("launchInfo"); - return client::JsonValueToCppValueHelper(storage); -} - -LaunchInfo Link::mutable_launchInfo() { - Json::Value* storage = MutableStorage("launchInfo"); - return client::JsonValueToMutableCppValueHelper(storage); -} -} // namespace google_calendar_api diff --git a/service_apis/calendar/google/calendar_api/link.h b/service_apis/calendar/google/calendar_api/link.h deleted file mode 100644 index 108ab12..0000000 --- a/service_apis/calendar/google/calendar_api/link.h +++ /dev/null @@ -1,249 +0,0 @@ -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy of -// the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. - -// This code was generated by google-apis-code-generator 1.5.1 - -// ---------------------------------------------------------------------------- -// NOTE: This file is generated from Google APIs Discovery Service. -// Service: -// Calendar API (calendar/v3) -// Generated from: -// Version: v3 -// Revision: 20170507 -// Generated by: -// Tool: google-apis-code-generator 1.5.1 -// C++: 0.1.4 -#ifndef GOOGLE_CALENDAR_API_LINK_H_ -#define GOOGLE_CALENDAR_API_LINK_H_ - -#include -#include "googleapis/base/macros.h" -#include "googleapis/client/data/jsoncpp_data.h" -#include "googleapis/strings/stringpiece.h" - -#include "google/calendar_api/display_info.h" -#include "google/calendar_api/launch_info.h" - -namespace Json { -class Value; -} // namespace Json - -namespace google_calendar_api { -using namespace googleapis; - -/** - * No description provided. - * - * @ingroup DataObject - */ -class Link : public client::JsonCppData { - public: - /** - * Creates a new default instance. - * - * @return Ownership is passed back to the caller. - */ - static Link* New(); - - /** - * Standard constructor for an immutable data object instance. - * - * @param[in] storage The underlying data storage for this instance. - */ - explicit Link(const Json::Value& storage); - - /** - * Standard constructor for a mutable data object instance. - * - * @param[in] storage The underlying data storage for this instance. - */ - explicit Link(Json::Value* storage); - - /** - * Standard destructor. - */ - virtual ~Link(); - - /** - * Returns a string denoting the type of this data object. - * - * @return google_calendar_api::Link - */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::Link"); - } - - /** - * Determine if the 'applinkingSource' attribute was set. - * - * @return true if the 'applinkingSource' attribute was set. - */ - bool has_applinking_source() const { - return Storage().isMember("applinkingSource"); - } - - /** - * Clears the 'applinkingSource' attribute. - */ - void clear_applinking_source() { - MutableStorage()->removeMember("applinkingSource"); - } - - - /** - * Get the value of the 'applinkingSource' attribute. - */ - const StringPiece get_applinking_source() const { - const Json::Value& v = Storage("applinkingSource"); - if (v == Json::Value::null) return StringPiece(""); - return StringPiece(v.asCString()); - } - - /** - * Change the 'applinkingSource' attribute. - * @param[in] value The new value. - */ - void set_applinking_source(const StringPiece& value) { - *MutableStorage("applinkingSource") = value.data(); - } - - /** - * Determine if the 'displayInfo' attribute was set. - * - * @return true if the 'displayInfo' attribute was set. - */ - bool has_display_info() const { - return Storage().isMember("displayInfo"); - } - - /** - * Clears the 'displayInfo' attribute. - */ - void clear_display_info() { - MutableStorage()->removeMember("displayInfo"); - } - - - /** - * Get a reference to the value of the 'displayInfo' attribute. - */ - const DisplayInfo get_display_info() const; - - /** - * Gets a reference to a mutable value of the 'displayInfo' - * property. - * @return The result can be modified to change the attribute value. - */ - DisplayInfo mutable_displayInfo(); - - /** - * Determine if the 'launchInfo' attribute was set. - * - * @return true if the 'launchInfo' attribute was set. - */ - bool has_launch_info() const { - return Storage().isMember("launchInfo"); - } - - /** - * Clears the 'launchInfo' attribute. - */ - void clear_launch_info() { - MutableStorage()->removeMember("launchInfo"); - } - - - /** - * Get a reference to the value of the 'launchInfo' attribute. - */ - const LaunchInfo get_launch_info() const; - - /** - * Gets a reference to a mutable value of the 'launchInfo' - * property. - * @return The result can be modified to change the attribute value. - */ - LaunchInfo mutable_launchInfo(); - - /** - * Determine if the 'platform' attribute was set. - * - * @return true if the 'platform' attribute was set. - */ - bool has_platform() const { - return Storage().isMember("platform"); - } - - /** - * Clears the 'platform' attribute. - */ - void clear_platform() { - MutableStorage()->removeMember("platform"); - } - - - /** - * Get the value of the 'platform' attribute. - */ - const StringPiece get_platform() const { - const Json::Value& v = Storage("platform"); - if (v == Json::Value::null) return StringPiece(""); - return StringPiece(v.asCString()); - } - - /** - * Change the 'platform' attribute. - * @param[in] value The new value. - */ - void set_platform(const StringPiece& value) { - *MutableStorage("platform") = value.data(); - } - - /** - * Determine if the 'url' attribute was set. - * - * @return true if the 'url' attribute was set. - */ - bool has_url() const { - return Storage().isMember("url"); - } - - /** - * Clears the 'url' attribute. - */ - void clear_url() { - MutableStorage()->removeMember("url"); - } - - - /** - * Get the value of the 'url' attribute. - */ - const StringPiece get_url() const { - const Json::Value& v = Storage("url"); - if (v == Json::Value::null) return StringPiece(""); - return StringPiece(v.asCString()); - } - - /** - * Change the 'url' attribute. - * @param[in] value The new value. - */ - void set_url(const StringPiece& value) { - *MutableStorage("url") = value.data(); - } - - private: - void operator=(const Link&); -}; // Link -} // namespace google_calendar_api -#endif // GOOGLE_CALENDAR_API_LINK_H_ diff --git a/service_apis/calendar/google/calendar_api/setting.h b/service_apis/calendar/google/calendar_api/setting.h index 8633b14..4d93a63 100644 --- a/service_apis/calendar/google/calendar_api/setting.h +++ b/service_apis/calendar/google/calendar_api/setting.h @@ -18,10 +18,10 @@ // Calendar API (calendar/v3) // Generated from: // Version: v3 -// Revision: 20170507 +// Revision: 20171010 // Generated by: // Tool: google-apis-code-generator 1.5.1 -// C++: 0.1.4 +// C++: 0.1.5 #ifndef GOOGLE_CALENDAR_API_SETTING_H_ #define GOOGLE_CALENDAR_API_SETTING_H_ @@ -75,8 +75,8 @@ class Setting : public client::JsonCppData { * * @return google_calendar_api::Setting */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::Setting"); + const char* GetTypeName() const { + return "google_calendar_api::Setting"; } /** diff --git a/service_apis/calendar/google/calendar_api/settings.h b/service_apis/calendar/google/calendar_api/settings.h index ef93e49..947907a 100644 --- a/service_apis/calendar/google/calendar_api/settings.h +++ b/service_apis/calendar/google/calendar_api/settings.h @@ -18,10 +18,10 @@ // Calendar API (calendar/v3) // Generated from: // Version: v3 -// Revision: 20170507 +// Revision: 20171010 // Generated by: // Tool: google-apis-code-generator 1.5.1 -// C++: 0.1.4 +// C++: 0.1.5 #ifndef GOOGLE_CALENDAR_API_SETTINGS_H_ #define GOOGLE_CALENDAR_API_SETTINGS_H_ @@ -77,8 +77,8 @@ class Settings : public client::JsonCppData { * * @return google_calendar_api::Settings */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::Settings"); + const char* GetTypeName() const { + return "google_calendar_api::Settings"; } /** diff --git a/service_apis/calendar/google/calendar_api/time_period.h b/service_apis/calendar/google/calendar_api/time_period.h index 4313446..483d6f3 100644 --- a/service_apis/calendar/google/calendar_api/time_period.h +++ b/service_apis/calendar/google/calendar_api/time_period.h @@ -18,10 +18,10 @@ // Calendar API (calendar/v3) // Generated from: // Version: v3 -// Revision: 20170507 +// Revision: 20171010 // Generated by: // Tool: google-apis-code-generator 1.5.1 -// C++: 0.1.4 +// C++: 0.1.5 #ifndef GOOGLE_CALENDAR_API_TIME_PERIOD_H_ #define GOOGLE_CALENDAR_API_TIME_PERIOD_H_ @@ -75,8 +75,8 @@ class TimePeriod : public client::JsonCppData { * * @return google_calendar_api::TimePeriod */ - const StringPiece GetTypeName() const { - return StringPiece("google_calendar_api::TimePeriod"); + const char* GetTypeName() const { + return "google_calendar_api::TimePeriod"; } /** diff --git a/src/googleapis/client/service/client_service.cc b/src/googleapis/client/service/client_service.cc index 04e7733..9b4390d 100644 --- a/src/googleapis/client/service/client_service.cc +++ b/src/googleapis/client/service/client_service.cc @@ -252,7 +252,7 @@ util::Status ClientServiceRequest::ParseResponse( } util::Status ClientServiceRequest::AppendVariable( - const StringPiece& variable_name, const UriTemplateConfig& config, + const string& variable_name, const UriTemplateConfig& config, string* target) { LOG(FATAL) << "Either override AppendVariable or PrepareHttpRequest"; return StatusUnimplemented("Internal error"); diff --git a/src/googleapis/client/service/client_service.h b/src/googleapis/client/service/client_service.h index 9c5cbd9..9f2a12b 100644 --- a/src/googleapis/client/service/client_service.h +++ b/src/googleapis/client/service/client_service.h @@ -302,7 +302,7 @@ class ClientServiceRequest { * @param[out] target The string to append to. */ virtual googleapis::util::Status AppendVariable( - const StringPiece& variable_name, + const string& variable_name, const UriTemplateConfig& config, string* target); @@ -523,6 +523,19 @@ class ClientService { void ChangeServiceUrl( const StringPiece& url_root, const StringPiece& url_path); + /* + * Allows you to change the URL used for batch operations. + * + * If you are going to change the URL, you should do so before you start + * creating requests to send to it. + * + * @param[in] batch_path A path to append to url_root to form the URL for the + * service's batch endpoint. + */ + void SetBatchPath(StringPiece batch_path) { + batch_path_.assign(batch_path.begin(), batch_path.end()); + } + /* * Returns the transport instance bound in the constructor. */