#include "google_apis/calendar/calendar_api_response_types.h"
#include <stddef.h>
#include <map>
#include <memory>
#include <optional>
#include <string>
#include <string_view>
#include <vector>
#include "base/containers/fixed_flat_map.h"
#include "base/json/json_value_converter.h"
#include "base/ranges/algorithm.h"
#include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/values.h"
#include "google_apis/common/parser_util.h"
#include "google_apis/common/time_util.h"
namespace google_apis {
namespace calendar {
namespace {
constexpr char kCalendarListKind[] = …;
constexpr char kCalendarColorId[] = …;
constexpr char kPrimary[] = …;
constexpr char kSelected[] = …;
constexpr char kSingleCalendarKind[] = …;
constexpr char kCalendarEventListKind[] = …;
constexpr char kTimeZone[] = …;
constexpr char kDateTime[] = …;
constexpr char kDate[] = …;
constexpr char kAttendees[] = …;
constexpr char kAttendeesOmitted[] = …;
constexpr char kAttendeesResource[] = …;
constexpr char kAttendeesResponseStatus[] = …;
constexpr char kAttendeesSelf[] = …;
constexpr char kCalendarEventKind[] = …;
constexpr char kColorId[] = …;
constexpr char kEnd[] = …;
constexpr char kHtmlLink[] = …;
constexpr char kLocation[] = …;
constexpr char kStart[] = …;
constexpr char kStatus[] = …;
constexpr char kSummary[] = …;
constexpr char kAttachments[] = …;
constexpr char kAttachmentTitle[] = …;
constexpr char kAttachmentFileUrl[] = …;
constexpr char kAttachmentIconLink[] = …;
constexpr char kAttachmentFileId[] = …;
constexpr auto kEventStatuses = …;
constexpr auto kAttendeesResponseStatuses = …;
constexpr char kConferenceDataEntryPoints[] = …;
constexpr char kEntryPointType[] = …;
constexpr char kVideoConferenceValue[] = …;
constexpr char kEntryPointUri[] = …;
bool ConvertEventStatus(const base::Value* value,
CalendarEvent::EventStatus* result) { … }
std::optional<CalendarEvent::ResponseStatus> CalculateSelfResponseStatus(
const base::Value& value) { … }
bool CalculateHasOtherAttendee(const base::Value& value) { … }
GURL GetConferenceDataUri(const base::Value::Dict& dict) { … }
std::vector<Attachment> GetAttachments(const base::Value::Dict& dict) { … }
bool ConvertResponseItems(const base::Value* value, CalendarEvent* event) { … }
bool IsAllDayEvent(const base::Value* value, bool* result) { … }
bool ConvertCalendarListResponseItems(const base::Value* value,
SingleCalendar* calendar) { … }
}
DateTime::DateTime() = default;
DateTime::DateTime(const DateTime& src) = default;
DateTime& DateTime::operator=(const DateTime& src) = default;
DateTime::~DateTime() = default;
void DateTime::RegisterJSONConverter(
base::JSONValueConverter<DateTime>* converter) { … }
bool DateTime::CreateDateTimeFromValue(const base::Value* value,
DateTime* time) { … }
Attachment::Attachment() = default;
Attachment::Attachment(const Attachment&) = default;
Attachment& Attachment::operator=(const Attachment&) = default;
Attachment::Attachment(Attachment&&) noexcept = default;
Attachment& Attachment::operator=(Attachment&&) noexcept = default;
Attachment::~Attachment() = default;
CalendarEvent::CalendarEvent() = default;
CalendarEvent::~CalendarEvent() = default;
CalendarEvent::CalendarEvent(const CalendarEvent&) = default;
CalendarEvent& CalendarEvent::operator=(const CalendarEvent&) = default;
void CalendarEvent::RegisterJSONConverter(
base::JSONValueConverter<CalendarEvent>* converter) { … }
int CalendarEvent::GetApproximateSizeInBytes() const { … }
EventList::EventList() = default;
EventList::~EventList() = default;
void EventList::RegisterJSONConverter(
base::JSONValueConverter<EventList>* converter) { … }
std::unique_ptr<EventList> EventList::CreateFrom(const base::Value& value) { … }
void EventList::InjectItemForTesting(std::unique_ptr<CalendarEvent> item) { … }
SingleCalendar::SingleCalendar() = default;
SingleCalendar::~SingleCalendar() = default;
SingleCalendar::SingleCalendar(const SingleCalendar&) = default;
SingleCalendar& SingleCalendar::operator=(const SingleCalendar&) = default;
void SingleCalendar::RegisterJSONConverter(
base::JSONValueConverter<SingleCalendar>* converter) { … }
int SingleCalendar::GetApproximateSizeInBytes() const { … }
CalendarList::CalendarList() = default;
CalendarList::~CalendarList() = default;
void CalendarList::RegisterJSONConverter(
base::JSONValueConverter<CalendarList>* converter) { … }
std::unique_ptr<CalendarList> CalendarList::CreateFrom(
const base::Value& value) { … }
void CalendarList::InjectItemForTesting(std::unique_ptr<SingleCalendar> item) { … }
}
}