{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.AppsCalendar.Types.Product where
import Network.Google.AppsCalendar.Types.Sum
import Network.Google.Prelude
data CalendarListEntry = CalendarListEntry'
{ _cleSummary :: !(Maybe Text)
, _cleConferenceProperties :: !(Maybe ConferenceProperties)
, _cleEtag :: !(Maybe Text)
, _cleLocation :: !(Maybe Text)
, _cleKind :: !Text
, _cleNotificationSettings :: !(Maybe CalendarListEntryNotificationSettings)
, _cleBackgRoundColor :: !(Maybe Text)
, _cleForegRoundColor :: !(Maybe Text)
, _cleDefaultReminders :: !(Maybe [EventReminder])
, _cleSelected :: !Bool
, _clePrimary :: !Bool
, _cleHidden :: !Bool
, _cleId :: !(Maybe Text)
, _cleDeleted :: !Bool
, _cleAccessRole :: !(Maybe Text)
, _cleSummaryOverride :: !(Maybe Text)
, _cleColorId :: !(Maybe Text)
, _cleTimeZone :: !(Maybe Text)
, _cleDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
calendarListEntry
:: CalendarListEntry
calendarListEntry =
CalendarListEntry'
{ _cleSummary = Nothing
, _cleConferenceProperties = Nothing
, _cleEtag = Nothing
, _cleLocation = Nothing
, _cleKind = "calendar#calendarListEntry"
, _cleNotificationSettings = Nothing
, _cleBackgRoundColor = Nothing
, _cleForegRoundColor = Nothing
, _cleDefaultReminders = Nothing
, _cleSelected = False
, _clePrimary = False
, _cleHidden = False
, _cleId = Nothing
, _cleDeleted = False
, _cleAccessRole = Nothing
, _cleSummaryOverride = Nothing
, _cleColorId = Nothing
, _cleTimeZone = Nothing
, _cleDescription = Nothing
}
cleSummary :: Lens' CalendarListEntry (Maybe Text)
cleSummary
= lens _cleSummary (\ s a -> s{_cleSummary = a})
cleConferenceProperties :: Lens' CalendarListEntry (Maybe ConferenceProperties)
cleConferenceProperties
= lens _cleConferenceProperties
(\ s a -> s{_cleConferenceProperties = a})
cleEtag :: Lens' CalendarListEntry (Maybe Text)
cleEtag = lens _cleEtag (\ s a -> s{_cleEtag = a})
cleLocation :: Lens' CalendarListEntry (Maybe Text)
cleLocation
= lens _cleLocation (\ s a -> s{_cleLocation = a})
cleKind :: Lens' CalendarListEntry Text
cleKind = lens _cleKind (\ s a -> s{_cleKind = a})
cleNotificationSettings :: Lens' CalendarListEntry (Maybe CalendarListEntryNotificationSettings)
cleNotificationSettings
= lens _cleNotificationSettings
(\ s a -> s{_cleNotificationSettings = a})
cleBackgRoundColor :: Lens' CalendarListEntry (Maybe Text)
cleBackgRoundColor
= lens _cleBackgRoundColor
(\ s a -> s{_cleBackgRoundColor = a})
cleForegRoundColor :: Lens' CalendarListEntry (Maybe Text)
cleForegRoundColor
= lens _cleForegRoundColor
(\ s a -> s{_cleForegRoundColor = a})
cleDefaultReminders :: Lens' CalendarListEntry [EventReminder]
cleDefaultReminders
= lens _cleDefaultReminders
(\ s a -> s{_cleDefaultReminders = a})
. _Default
. _Coerce
cleSelected :: Lens' CalendarListEntry Bool
cleSelected
= lens _cleSelected (\ s a -> s{_cleSelected = a})
clePrimary :: Lens' CalendarListEntry Bool
clePrimary
= lens _clePrimary (\ s a -> s{_clePrimary = a})
cleHidden :: Lens' CalendarListEntry Bool
cleHidden
= lens _cleHidden (\ s a -> s{_cleHidden = a})
cleId :: Lens' CalendarListEntry (Maybe Text)
cleId = lens _cleId (\ s a -> s{_cleId = a})
cleDeleted :: Lens' CalendarListEntry Bool
cleDeleted
= lens _cleDeleted (\ s a -> s{_cleDeleted = a})
cleAccessRole :: Lens' CalendarListEntry (Maybe Text)
cleAccessRole
= lens _cleAccessRole
(\ s a -> s{_cleAccessRole = a})
cleSummaryOverride :: Lens' CalendarListEntry (Maybe Text)
cleSummaryOverride
= lens _cleSummaryOverride
(\ s a -> s{_cleSummaryOverride = a})
cleColorId :: Lens' CalendarListEntry (Maybe Text)
cleColorId
= lens _cleColorId (\ s a -> s{_cleColorId = a})
cleTimeZone :: Lens' CalendarListEntry (Maybe Text)
cleTimeZone
= lens _cleTimeZone (\ s a -> s{_cleTimeZone = a})
cleDescription :: Lens' CalendarListEntry (Maybe Text)
cleDescription
= lens _cleDescription
(\ s a -> s{_cleDescription = a})
instance FromJSON CalendarListEntry where
parseJSON
= withObject "CalendarListEntry"
(\ o ->
CalendarListEntry' <$>
(o .:? "summary") <*> (o .:? "conferenceProperties")
<*> (o .:? "etag")
<*> (o .:? "location")
<*> (o .:? "kind" .!= "calendar#calendarListEntry")
<*> (o .:? "notificationSettings")
<*> (o .:? "backgroundColor")
<*> (o .:? "foregroundColor")
<*> (o .:? "defaultReminders" .!= mempty)
<*> (o .:? "selected" .!= False)
<*> (o .:? "primary" .!= False)
<*> (o .:? "hidden" .!= False)
<*> (o .:? "id")
<*> (o .:? "deleted" .!= False)
<*> (o .:? "accessRole")
<*> (o .:? "summaryOverride")
<*> (o .:? "colorId")
<*> (o .:? "timeZone")
<*> (o .:? "description"))
instance ToJSON CalendarListEntry where
toJSON CalendarListEntry'{..}
= object
(catMaybes
[("summary" .=) <$> _cleSummary,
("conferenceProperties" .=) <$>
_cleConferenceProperties,
("etag" .=) <$> _cleEtag,
("location" .=) <$> _cleLocation,
Just ("kind" .= _cleKind),
("notificationSettings" .=) <$>
_cleNotificationSettings,
("backgroundColor" .=) <$> _cleBackgRoundColor,
("foregroundColor" .=) <$> _cleForegRoundColor,
("defaultReminders" .=) <$> _cleDefaultReminders,
Just ("selected" .= _cleSelected),
Just ("primary" .= _clePrimary),
Just ("hidden" .= _cleHidden), ("id" .=) <$> _cleId,
Just ("deleted" .= _cleDeleted),
("accessRole" .=) <$> _cleAccessRole,
("summaryOverride" .=) <$> _cleSummaryOverride,
("colorId" .=) <$> _cleColorId,
("timeZone" .=) <$> _cleTimeZone,
("description" .=) <$> _cleDescription])
newtype ConferenceParameters = ConferenceParameters'
{ _cpAddOnParameters :: Maybe ConferenceParametersAddOnParameters
} deriving (Eq,Show,Data,Typeable,Generic)
conferenceParameters
:: ConferenceParameters
conferenceParameters =
ConferenceParameters'
{ _cpAddOnParameters = Nothing
}
cpAddOnParameters :: Lens' ConferenceParameters (Maybe ConferenceParametersAddOnParameters)
cpAddOnParameters
= lens _cpAddOnParameters
(\ s a -> s{_cpAddOnParameters = a})
instance FromJSON ConferenceParameters where
parseJSON
= withObject "ConferenceParameters"
(\ o ->
ConferenceParameters' <$> (o .:? "addOnParameters"))
instance ToJSON ConferenceParameters where
toJSON ConferenceParameters'{..}
= object
(catMaybes
[("addOnParameters" .=) <$> _cpAddOnParameters])
data Event = Event'
{ _eSummary :: !(Maybe Text)
, _eOriginalStartTime :: !(Maybe EventDateTime)
, _eCreator :: !(Maybe EventCreator)
, _eStatus :: !(Maybe Text)
, _eGuestsCanModify :: !Bool
, _eEtag :: !(Maybe Text)
, _eAttachments :: !(Maybe [EventAttachment])
, _eLocked :: !Bool
, _eLocation :: !(Maybe Text)
, _eAttendees :: !(Maybe [EventAttendee])
, _eReminders :: !(Maybe EventReminders)
, _eKind :: !Text
, _eCreated :: !(Maybe DateTime')
, _eTransparency :: !Text
, _eRecurringEventId :: !(Maybe Text)
, _eStart :: !(Maybe EventDateTime)
, _ePrivateCopy :: !Bool
, _eEndTimeUnspecified :: !Bool
, _eConferenceData :: !(Maybe ConferenceData)
, _eExtendedProperties :: !(Maybe EventExtendedProperties)
, _eVisibility :: !Text
, _eGuestsCanInviteOthers :: !Bool
, _eRecurrence :: !(Maybe [Text])
, _eGadget :: !(Maybe EventGadget)
, _eSequence :: !(Maybe (Textual Int32))
, _eICalUId :: !(Maybe Text)
, _eEnd :: !(Maybe EventDateTime)
, _eAttendeesOmitted :: !Bool
, _eSource :: !(Maybe EventSource)
, _eId :: !(Maybe Text)
, _eHTMLLink :: !(Maybe Text)
, _eUpdated :: !(Maybe DateTime')
, _eColorId :: !(Maybe Text)
, _eAnyoneCanAddSelf :: !Bool
, _eGuestsCanSeeOtherGuests :: !Bool
, _eHangoutLink :: !(Maybe Text)
, _eDescription :: !(Maybe Text)
, _eOrganizer :: !(Maybe EventOrganizer)
} deriving (Eq,Show,Data,Typeable,Generic)
event
:: Event
event =
Event'
{ _eSummary = Nothing
, _eOriginalStartTime = Nothing
, _eCreator = Nothing
, _eStatus = Nothing
, _eGuestsCanModify = False
, _eEtag = Nothing
, _eAttachments = Nothing
, _eLocked = False
, _eLocation = Nothing
, _eAttendees = Nothing
, _eReminders = Nothing
, _eKind = "calendar#event"
, _eCreated = Nothing
, _eTransparency = "opaque"
, _eRecurringEventId = Nothing
, _eStart = Nothing
, _ePrivateCopy = False
, _eEndTimeUnspecified = False
, _eConferenceData = Nothing
, _eExtendedProperties = Nothing
, _eVisibility = "default"
, _eGuestsCanInviteOthers = True
, _eRecurrence = Nothing
, _eGadget = Nothing
, _eSequence = Nothing
, _eICalUId = Nothing
, _eEnd = Nothing
, _eAttendeesOmitted = False
, _eSource = Nothing
, _eId = Nothing
, _eHTMLLink = Nothing
, _eUpdated = Nothing
, _eColorId = Nothing
, _eAnyoneCanAddSelf = False
, _eGuestsCanSeeOtherGuests = True
, _eHangoutLink = Nothing
, _eDescription = Nothing
, _eOrganizer = Nothing
}
eSummary :: Lens' Event (Maybe Text)
eSummary = lens _eSummary (\ s a -> s{_eSummary = a})
eOriginalStartTime :: Lens' Event (Maybe EventDateTime)
eOriginalStartTime
= lens _eOriginalStartTime
(\ s a -> s{_eOriginalStartTime = a})
eCreator :: Lens' Event (Maybe EventCreator)
eCreator = lens _eCreator (\ s a -> s{_eCreator = a})
eStatus :: Lens' Event (Maybe Text)
eStatus = lens _eStatus (\ s a -> s{_eStatus = a})
eGuestsCanModify :: Lens' Event Bool
eGuestsCanModify
= lens _eGuestsCanModify
(\ s a -> s{_eGuestsCanModify = a})
eEtag :: Lens' Event (Maybe Text)
eEtag = lens _eEtag (\ s a -> s{_eEtag = a})
eAttachments :: Lens' Event [EventAttachment]
eAttachments
= lens _eAttachments (\ s a -> s{_eAttachments = a})
. _Default
. _Coerce
eLocked :: Lens' Event Bool
eLocked = lens _eLocked (\ s a -> s{_eLocked = a})
eLocation :: Lens' Event (Maybe Text)
eLocation
= lens _eLocation (\ s a -> s{_eLocation = a})
eAttendees :: Lens' Event [EventAttendee]
eAttendees
= lens _eAttendees (\ s a -> s{_eAttendees = a}) .
_Default
. _Coerce
eReminders :: Lens' Event (Maybe EventReminders)
eReminders
= lens _eReminders (\ s a -> s{_eReminders = a})
eKind :: Lens' Event Text
eKind = lens _eKind (\ s a -> s{_eKind = a})
eCreated :: Lens' Event (Maybe UTCTime)
eCreated
= lens _eCreated (\ s a -> s{_eCreated = a}) .
mapping _DateTime
eTransparency :: Lens' Event Text
eTransparency
= lens _eTransparency
(\ s a -> s{_eTransparency = a})
eRecurringEventId :: Lens' Event (Maybe Text)
eRecurringEventId
= lens _eRecurringEventId
(\ s a -> s{_eRecurringEventId = a})
eStart :: Lens' Event (Maybe EventDateTime)
eStart = lens _eStart (\ s a -> s{_eStart = a})
ePrivateCopy :: Lens' Event Bool
ePrivateCopy
= lens _ePrivateCopy (\ s a -> s{_ePrivateCopy = a})
eEndTimeUnspecified :: Lens' Event Bool
eEndTimeUnspecified
= lens _eEndTimeUnspecified
(\ s a -> s{_eEndTimeUnspecified = a})
eConferenceData :: Lens' Event (Maybe ConferenceData)
eConferenceData
= lens _eConferenceData
(\ s a -> s{_eConferenceData = a})
eExtendedProperties :: Lens' Event (Maybe EventExtendedProperties)
eExtendedProperties
= lens _eExtendedProperties
(\ s a -> s{_eExtendedProperties = a})
eVisibility :: Lens' Event Text
eVisibility
= lens _eVisibility (\ s a -> s{_eVisibility = a})
eGuestsCanInviteOthers :: Lens' Event Bool
eGuestsCanInviteOthers
= lens _eGuestsCanInviteOthers
(\ s a -> s{_eGuestsCanInviteOthers = a})
eRecurrence :: Lens' Event [Text]
eRecurrence
= lens _eRecurrence (\ s a -> s{_eRecurrence = a}) .
_Default
. _Coerce
eGadget :: Lens' Event (Maybe EventGadget)
eGadget = lens _eGadget (\ s a -> s{_eGadget = a})
eSequence :: Lens' Event (Maybe Int32)
eSequence
= lens _eSequence (\ s a -> s{_eSequence = a}) .
mapping _Coerce
eICalUId :: Lens' Event (Maybe Text)
eICalUId = lens _eICalUId (\ s a -> s{_eICalUId = a})
eEnd :: Lens' Event (Maybe EventDateTime)
eEnd = lens _eEnd (\ s a -> s{_eEnd = a})
eAttendeesOmitted :: Lens' Event Bool
eAttendeesOmitted
= lens _eAttendeesOmitted
(\ s a -> s{_eAttendeesOmitted = a})
eSource :: Lens' Event (Maybe EventSource)
eSource = lens _eSource (\ s a -> s{_eSource = a})
eId :: Lens' Event (Maybe Text)
eId = lens _eId (\ s a -> s{_eId = a})
eHTMLLink :: Lens' Event (Maybe Text)
eHTMLLink
= lens _eHTMLLink (\ s a -> s{_eHTMLLink = a})
eUpdated :: Lens' Event (Maybe UTCTime)
eUpdated
= lens _eUpdated (\ s a -> s{_eUpdated = a}) .
mapping _DateTime
eColorId :: Lens' Event (Maybe Text)
eColorId = lens _eColorId (\ s a -> s{_eColorId = a})
eAnyoneCanAddSelf :: Lens' Event Bool
eAnyoneCanAddSelf
= lens _eAnyoneCanAddSelf
(\ s a -> s{_eAnyoneCanAddSelf = a})
eGuestsCanSeeOtherGuests :: Lens' Event Bool
eGuestsCanSeeOtherGuests
= lens _eGuestsCanSeeOtherGuests
(\ s a -> s{_eGuestsCanSeeOtherGuests = a})
eHangoutLink :: Lens' Event (Maybe Text)
eHangoutLink
= lens _eHangoutLink (\ s a -> s{_eHangoutLink = a})
eDescription :: Lens' Event (Maybe Text)
eDescription
= lens _eDescription (\ s a -> s{_eDescription = a})
eOrganizer :: Lens' Event (Maybe EventOrganizer)
eOrganizer
= lens _eOrganizer (\ s a -> s{_eOrganizer = a})
instance FromJSON Event where
parseJSON
= withObject "Event"
(\ o ->
Event' <$>
(o .:? "summary") <*> (o .:? "originalStartTime") <*>
(o .:? "creator")
<*> (o .:? "status")
<*> (o .:? "guestsCanModify" .!= False)
<*> (o .:? "etag")
<*> (o .:? "attachments" .!= mempty)
<*> (o .:? "locked" .!= False)
<*> (o .:? "location")
<*> (o .:? "attendees" .!= mempty)
<*> (o .:? "reminders")
<*> (o .:? "kind" .!= "calendar#event")
<*> (o .:? "created")
<*> (o .:? "transparency" .!= "opaque")
<*> (o .:? "recurringEventId")
<*> (o .:? "start")
<*> (o .:? "privateCopy" .!= False)
<*> (o .:? "endTimeUnspecified" .!= False)
<*> (o .:? "conferenceData")
<*> (o .:? "extendedProperties")
<*> (o .:? "visibility" .!= "default")
<*> (o .:? "guestsCanInviteOthers" .!= True)
<*> (o .:? "recurrence" .!= mempty)
<*> (o .:? "gadget")
<*> (o .:? "sequence")
<*> (o .:? "iCalUID")
<*> (o .:? "end")
<*> (o .:? "attendeesOmitted" .!= False)
<*> (o .:? "source")
<*> (o .:? "id")
<*> (o .:? "htmlLink")
<*> (o .:? "updated")
<*> (o .:? "colorId")
<*> (o .:? "anyoneCanAddSelf" .!= False)
<*> (o .:? "guestsCanSeeOtherGuests" .!= True)
<*> (o .:? "hangoutLink")
<*> (o .:? "description")
<*> (o .:? "organizer"))
instance ToJSON Event where
toJSON Event'{..}
= object
(catMaybes
[("summary" .=) <$> _eSummary,
("originalStartTime" .=) <$> _eOriginalStartTime,
("creator" .=) <$> _eCreator,
("status" .=) <$> _eStatus,
Just ("guestsCanModify" .= _eGuestsCanModify),
("etag" .=) <$> _eEtag,
("attachments" .=) <$> _eAttachments,
Just ("locked" .= _eLocked),
("location" .=) <$> _eLocation,
("attendees" .=) <$> _eAttendees,
("reminders" .=) <$> _eReminders,
Just ("kind" .= _eKind),
("created" .=) <$> _eCreated,
Just ("transparency" .= _eTransparency),
("recurringEventId" .=) <$> _eRecurringEventId,
("start" .=) <$> _eStart,
Just ("privateCopy" .= _ePrivateCopy),
Just ("endTimeUnspecified" .= _eEndTimeUnspecified),
("conferenceData" .=) <$> _eConferenceData,
("extendedProperties" .=) <$> _eExtendedProperties,
Just ("visibility" .= _eVisibility),
Just
("guestsCanInviteOthers" .= _eGuestsCanInviteOthers),
("recurrence" .=) <$> _eRecurrence,
("gadget" .=) <$> _eGadget,
("sequence" .=) <$> _eSequence,
("iCalUID" .=) <$> _eICalUId, ("end" .=) <$> _eEnd,
Just ("attendeesOmitted" .= _eAttendeesOmitted),
("source" .=) <$> _eSource, ("id" .=) <$> _eId,
("htmlLink" .=) <$> _eHTMLLink,
("updated" .=) <$> _eUpdated,
("colorId" .=) <$> _eColorId,
Just ("anyoneCanAddSelf" .= _eAnyoneCanAddSelf),
Just
("guestsCanSeeOtherGuests" .=
_eGuestsCanSeeOtherGuests),
("hangoutLink" .=) <$> _eHangoutLink,
("description" .=) <$> _eDescription,
("organizer" .=) <$> _eOrganizer])
newtype CalendarListEntryNotificationSettings = CalendarListEntryNotificationSettings'
{ _clensNotifications :: Maybe [CalendarNotification]
} deriving (Eq,Show,Data,Typeable,Generic)
calendarListEntryNotificationSettings
:: CalendarListEntryNotificationSettings
calendarListEntryNotificationSettings =
CalendarListEntryNotificationSettings'
{ _clensNotifications = Nothing
}
clensNotifications :: Lens' CalendarListEntryNotificationSettings [CalendarNotification]
clensNotifications
= lens _clensNotifications
(\ s a -> s{_clensNotifications = a})
. _Default
. _Coerce
instance FromJSON
CalendarListEntryNotificationSettings where
parseJSON
= withObject "CalendarListEntryNotificationSettings"
(\ o ->
CalendarListEntryNotificationSettings' <$>
(o .:? "notifications" .!= mempty))
instance ToJSON CalendarListEntryNotificationSettings
where
toJSON CalendarListEntryNotificationSettings'{..}
= object
(catMaybes
[("notifications" .=) <$> _clensNotifications])
newtype ConferenceProperties = ConferenceProperties'
{ _cpAllowedConferenceSolutionTypes :: Maybe [Text]
} deriving (Eq,Show,Data,Typeable,Generic)
conferenceProperties
:: ConferenceProperties
conferenceProperties =
ConferenceProperties'
{ _cpAllowedConferenceSolutionTypes = Nothing
}
cpAllowedConferenceSolutionTypes :: Lens' ConferenceProperties [Text]
cpAllowedConferenceSolutionTypes
= lens _cpAllowedConferenceSolutionTypes
(\ s a -> s{_cpAllowedConferenceSolutionTypes = a})
. _Default
. _Coerce
instance FromJSON ConferenceProperties where
parseJSON
= withObject "ConferenceProperties"
(\ o ->
ConferenceProperties' <$>
(o .:? "allowedConferenceSolutionTypes" .!= mempty))
instance ToJSON ConferenceProperties where
toJSON ConferenceProperties'{..}
= object
(catMaybes
[("allowedConferenceSolutionTypes" .=) <$>
_cpAllowedConferenceSolutionTypes])
data ConferenceSolution = ConferenceSolution'
{ _csIconURI :: !(Maybe Text)
, _csKey :: !(Maybe ConferenceSolutionKey)
, _csName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
conferenceSolution
:: ConferenceSolution
conferenceSolution =
ConferenceSolution'
{ _csIconURI = Nothing
, _csKey = Nothing
, _csName = Nothing
}
csIconURI :: Lens' ConferenceSolution (Maybe Text)
csIconURI
= lens _csIconURI (\ s a -> s{_csIconURI = a})
csKey :: Lens' ConferenceSolution (Maybe ConferenceSolutionKey)
csKey = lens _csKey (\ s a -> s{_csKey = a})
csName :: Lens' ConferenceSolution (Maybe Text)
csName = lens _csName (\ s a -> s{_csName = a})
instance FromJSON ConferenceSolution where
parseJSON
= withObject "ConferenceSolution"
(\ o ->
ConferenceSolution' <$>
(o .:? "iconUri") <*> (o .:? "key") <*>
(o .:? "name"))
instance ToJSON ConferenceSolution where
toJSON ConferenceSolution'{..}
= object
(catMaybes
[("iconUri" .=) <$> _csIconURI,
("key" .=) <$> _csKey, ("name" .=) <$> _csName])
data ACLRuleScope = ACLRuleScope'
{ _arsValue :: !(Maybe Text)
, _arsType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
aclRuleScope
:: ACLRuleScope
aclRuleScope =
ACLRuleScope'
{ _arsValue = Nothing
, _arsType = Nothing
}
arsValue :: Lens' ACLRuleScope (Maybe Text)
arsValue = lens _arsValue (\ s a -> s{_arsValue = a})
arsType :: Lens' ACLRuleScope (Maybe Text)
arsType = lens _arsType (\ s a -> s{_arsType = a})
instance FromJSON ACLRuleScope where
parseJSON
= withObject "ACLRuleScope"
(\ o ->
ACLRuleScope' <$> (o .:? "value") <*> (o .:? "type"))
instance ToJSON ACLRuleScope where
toJSON ACLRuleScope'{..}
= object
(catMaybes
[("value" .=) <$> _arsValue,
("type" .=) <$> _arsType])
newtype ColorsEvent = ColorsEvent'
{ _ceAddtional :: HashMap Text ColorDefinition
} deriving (Eq,Show,Data,Typeable,Generic)
colorsEvent
:: HashMap Text ColorDefinition
-> ColorsEvent
colorsEvent pCeAddtional_ =
ColorsEvent'
{ _ceAddtional = _Coerce # pCeAddtional_
}
ceAddtional :: Lens' ColorsEvent (HashMap Text ColorDefinition)
ceAddtional
= lens _ceAddtional (\ s a -> s{_ceAddtional = a}) .
_Coerce
instance FromJSON ColorsEvent where
parseJSON
= withObject "ColorsEvent"
(\ o -> ColorsEvent' <$> (parseJSONObject o))
instance ToJSON ColorsEvent where
toJSON = toJSON . _ceAddtional
data Settings = Settings'
{ _sEtag :: !(Maybe Text)
, _sNextPageToken :: !(Maybe Text)
, _sKind :: !Text
, _sItems :: !(Maybe [Setting])
, _sNextSyncToken :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
settings
:: Settings
settings =
Settings'
{ _sEtag = Nothing
, _sNextPageToken = Nothing
, _sKind = "calendar#settings"
, _sItems = Nothing
, _sNextSyncToken = Nothing
}
sEtag :: Lens' Settings (Maybe Text)
sEtag = lens _sEtag (\ s a -> s{_sEtag = a})
sNextPageToken :: Lens' Settings (Maybe Text)
sNextPageToken
= lens _sNextPageToken
(\ s a -> s{_sNextPageToken = a})
sKind :: Lens' Settings Text
sKind = lens _sKind (\ s a -> s{_sKind = a})
sItems :: Lens' Settings [Setting]
sItems
= lens _sItems (\ s a -> s{_sItems = a}) . _Default .
_Coerce
sNextSyncToken :: Lens' Settings (Maybe Text)
sNextSyncToken
= lens _sNextSyncToken
(\ s a -> s{_sNextSyncToken = a})
instance FromJSON Settings where
parseJSON
= withObject "Settings"
(\ o ->
Settings' <$>
(o .:? "etag") <*> (o .:? "nextPageToken") <*>
(o .:? "kind" .!= "calendar#settings")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "nextSyncToken"))
instance ToJSON Settings where
toJSON Settings'{..}
= object
(catMaybes
[("etag" .=) <$> _sEtag,
("nextPageToken" .=) <$> _sNextPageToken,
Just ("kind" .= _sKind), ("items" .=) <$> _sItems,
("nextSyncToken" .=) <$> _sNextSyncToken])
newtype FreeBusyRequestItem = FreeBusyRequestItem'
{ _fbriId :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
freeBusyRequestItem
:: FreeBusyRequestItem
freeBusyRequestItem =
FreeBusyRequestItem'
{ _fbriId = Nothing
}
fbriId :: Lens' FreeBusyRequestItem (Maybe Text)
fbriId = lens _fbriId (\ s a -> s{_fbriId = a})
instance FromJSON FreeBusyRequestItem where
parseJSON
= withObject "FreeBusyRequestItem"
(\ o -> FreeBusyRequestItem' <$> (o .:? "id"))
instance ToJSON FreeBusyRequestItem where
toJSON FreeBusyRequestItem'{..}
= object (catMaybes [("id" .=) <$> _fbriId])
data EventAttachment = EventAttachment'
{ _eaFileURL :: !(Maybe Text)
, _eaIconLink :: !(Maybe Text)
, _eaMimeType :: !(Maybe Text)
, _eaTitle :: !(Maybe Text)
, _eaFileId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
eventAttachment
:: EventAttachment
eventAttachment =
EventAttachment'
{ _eaFileURL = Nothing
, _eaIconLink = Nothing
, _eaMimeType = Nothing
, _eaTitle = Nothing
, _eaFileId = Nothing
}
eaFileURL :: Lens' EventAttachment (Maybe Text)
eaFileURL
= lens _eaFileURL (\ s a -> s{_eaFileURL = a})
eaIconLink :: Lens' EventAttachment (Maybe Text)
eaIconLink
= lens _eaIconLink (\ s a -> s{_eaIconLink = a})
eaMimeType :: Lens' EventAttachment (Maybe Text)
eaMimeType
= lens _eaMimeType (\ s a -> s{_eaMimeType = a})
eaTitle :: Lens' EventAttachment (Maybe Text)
eaTitle = lens _eaTitle (\ s a -> s{_eaTitle = a})
eaFileId :: Lens' EventAttachment (Maybe Text)
eaFileId = lens _eaFileId (\ s a -> s{_eaFileId = a})
instance FromJSON EventAttachment where
parseJSON
= withObject "EventAttachment"
(\ o ->
EventAttachment' <$>
(o .:? "fileUrl") <*> (o .:? "iconLink") <*>
(o .:? "mimeType")
<*> (o .:? "title")
<*> (o .:? "fileId"))
instance ToJSON EventAttachment where
toJSON EventAttachment'{..}
= object
(catMaybes
[("fileUrl" .=) <$> _eaFileURL,
("iconLink" .=) <$> _eaIconLink,
("mimeType" .=) <$> _eaMimeType,
("title" .=) <$> _eaTitle,
("fileId" .=) <$> _eaFileId])
data EntryPoint = EntryPoint'
{ _epPasscode :: !(Maybe Text)
, _epRegionCode :: !(Maybe Text)
, _epURI :: !(Maybe Text)
, _epMeetingCode :: !(Maybe Text)
, _epPassword :: !(Maybe Text)
, _epPin :: !(Maybe Text)
, _epEntryPointFeatures :: !(Maybe [Text])
, _epEntryPointType :: !(Maybe Text)
, _epLabel :: !(Maybe Text)
, _epAccessCode :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
entryPoint
:: EntryPoint
entryPoint =
EntryPoint'
{ _epPasscode = Nothing
, _epRegionCode = Nothing
, _epURI = Nothing
, _epMeetingCode = Nothing
, _epPassword = Nothing
, _epPin = Nothing
, _epEntryPointFeatures = Nothing
, _epEntryPointType = Nothing
, _epLabel = Nothing
, _epAccessCode = Nothing
}
epPasscode :: Lens' EntryPoint (Maybe Text)
epPasscode
= lens _epPasscode (\ s a -> s{_epPasscode = a})
epRegionCode :: Lens' EntryPoint (Maybe Text)
epRegionCode
= lens _epRegionCode (\ s a -> s{_epRegionCode = a})
epURI :: Lens' EntryPoint (Maybe Text)
epURI = lens _epURI (\ s a -> s{_epURI = a})
epMeetingCode :: Lens' EntryPoint (Maybe Text)
epMeetingCode
= lens _epMeetingCode
(\ s a -> s{_epMeetingCode = a})
epPassword :: Lens' EntryPoint (Maybe Text)
epPassword
= lens _epPassword (\ s a -> s{_epPassword = a})
epPin :: Lens' EntryPoint (Maybe Text)
epPin = lens _epPin (\ s a -> s{_epPin = a})
epEntryPointFeatures :: Lens' EntryPoint [Text]
epEntryPointFeatures
= lens _epEntryPointFeatures
(\ s a -> s{_epEntryPointFeatures = a})
. _Default
. _Coerce
epEntryPointType :: Lens' EntryPoint (Maybe Text)
epEntryPointType
= lens _epEntryPointType
(\ s a -> s{_epEntryPointType = a})
epLabel :: Lens' EntryPoint (Maybe Text)
epLabel = lens _epLabel (\ s a -> s{_epLabel = a})
epAccessCode :: Lens' EntryPoint (Maybe Text)
epAccessCode
= lens _epAccessCode (\ s a -> s{_epAccessCode = a})
instance FromJSON EntryPoint where
parseJSON
= withObject "EntryPoint"
(\ o ->
EntryPoint' <$>
(o .:? "passcode") <*> (o .:? "regionCode") <*>
(o .:? "uri")
<*> (o .:? "meetingCode")
<*> (o .:? "password")
<*> (o .:? "pin")
<*> (o .:? "entryPointFeatures" .!= mempty)
<*> (o .:? "entryPointType")
<*> (o .:? "label")
<*> (o .:? "accessCode"))
instance ToJSON EntryPoint where
toJSON EntryPoint'{..}
= object
(catMaybes
[("passcode" .=) <$> _epPasscode,
("regionCode" .=) <$> _epRegionCode,
("uri" .=) <$> _epURI,
("meetingCode" .=) <$> _epMeetingCode,
("password" .=) <$> _epPassword,
("pin" .=) <$> _epPin,
("entryPointFeatures" .=) <$> _epEntryPointFeatures,
("entryPointType" .=) <$> _epEntryPointType,
("label" .=) <$> _epLabel,
("accessCode" .=) <$> _epAccessCode])
data TimePeriod = TimePeriod'
{ _tpStart :: !(Maybe DateTime')
, _tpEnd :: !(Maybe DateTime')
} deriving (Eq,Show,Data,Typeable,Generic)
timePeriod
:: TimePeriod
timePeriod =
TimePeriod'
{ _tpStart = Nothing
, _tpEnd = Nothing
}
tpStart :: Lens' TimePeriod (Maybe UTCTime)
tpStart
= lens _tpStart (\ s a -> s{_tpStart = a}) .
mapping _DateTime
tpEnd :: Lens' TimePeriod (Maybe UTCTime)
tpEnd
= lens _tpEnd (\ s a -> s{_tpEnd = a}) .
mapping _DateTime
instance FromJSON TimePeriod where
parseJSON
= withObject "TimePeriod"
(\ o ->
TimePeriod' <$> (o .:? "start") <*> (o .:? "end"))
instance ToJSON TimePeriod where
toJSON TimePeriod'{..}
= object
(catMaybes
[("start" .=) <$> _tpStart, ("end" .=) <$> _tpEnd])
newtype ConferenceSolutionKey = ConferenceSolutionKey'
{ _cskType :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
conferenceSolutionKey
:: ConferenceSolutionKey
conferenceSolutionKey =
ConferenceSolutionKey'
{ _cskType = Nothing
}
cskType :: Lens' ConferenceSolutionKey (Maybe Text)
cskType = lens _cskType (\ s a -> s{_cskType = a})
instance FromJSON ConferenceSolutionKey where
parseJSON
= withObject "ConferenceSolutionKey"
(\ o -> ConferenceSolutionKey' <$> (o .:? "type"))
instance ToJSON ConferenceSolutionKey where
toJSON ConferenceSolutionKey'{..}
= object (catMaybes [("type" .=) <$> _cskType])
data EventCreator = EventCreator'
{ _ecEmail :: !(Maybe Text)
, _ecSelf :: !Bool
, _ecDisplayName :: !(Maybe Text)
, _ecId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
eventCreator
:: EventCreator
eventCreator =
EventCreator'
{ _ecEmail = Nothing
, _ecSelf = False
, _ecDisplayName = Nothing
, _ecId = Nothing
}
ecEmail :: Lens' EventCreator (Maybe Text)
ecEmail = lens _ecEmail (\ s a -> s{_ecEmail = a})
ecSelf :: Lens' EventCreator Bool
ecSelf = lens _ecSelf (\ s a -> s{_ecSelf = a})
ecDisplayName :: Lens' EventCreator (Maybe Text)
ecDisplayName
= lens _ecDisplayName
(\ s a -> s{_ecDisplayName = a})
ecId :: Lens' EventCreator (Maybe Text)
ecId = lens _ecId (\ s a -> s{_ecId = a})
instance FromJSON EventCreator where
parseJSON
= withObject "EventCreator"
(\ o ->
EventCreator' <$>
(o .:? "email") <*> (o .:? "self" .!= False) <*>
(o .:? "displayName")
<*> (o .:? "id"))
instance ToJSON EventCreator where
toJSON EventCreator'{..}
= object
(catMaybes
[("email" .=) <$> _ecEmail, Just ("self" .= _ecSelf),
("displayName" .=) <$> _ecDisplayName,
("id" .=) <$> _ecId])
data Error' = Error''
{ _eDomain :: !(Maybe Text)
, _eReason :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
error'
:: Error'
error' =
Error''
{ _eDomain = Nothing
, _eReason = Nothing
}
eDomain :: Lens' Error' (Maybe Text)
eDomain = lens _eDomain (\ s a -> s{_eDomain = a})
eReason :: Lens' Error' (Maybe Text)
eReason = lens _eReason (\ s a -> s{_eReason = a})
instance FromJSON Error' where
parseJSON
= withObject "Error"
(\ o ->
Error'' <$> (o .:? "domain") <*> (o .:? "reason"))
instance ToJSON Error' where
toJSON Error''{..}
= object
(catMaybes
[("domain" .=) <$> _eDomain,
("reason" .=) <$> _eReason])
data ColorDefinition = ColorDefinition'
{ _cdForegRound :: !(Maybe Text)
, _cdBackgRound :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
colorDefinition
:: ColorDefinition
colorDefinition =
ColorDefinition'
{ _cdForegRound = Nothing
, _cdBackgRound = Nothing
}
cdForegRound :: Lens' ColorDefinition (Maybe Text)
cdForegRound
= lens _cdForegRound (\ s a -> s{_cdForegRound = a})
cdBackgRound :: Lens' ColorDefinition (Maybe Text)
cdBackgRound
= lens _cdBackgRound (\ s a -> s{_cdBackgRound = a})
instance FromJSON ColorDefinition where
parseJSON
= withObject "ColorDefinition"
(\ o ->
ColorDefinition' <$>
(o .:? "foreground") <*> (o .:? "background"))
instance ToJSON ColorDefinition where
toJSON ColorDefinition'{..}
= object
(catMaybes
[("foreground" .=) <$> _cdForegRound,
("background" .=) <$> _cdBackgRound])
data Channel = Channel'
{ _cResourceURI :: !(Maybe Text)
, _cResourceId :: !(Maybe Text)
, _cKind :: !Text
, _cExpiration :: !(Maybe (Textual Int64))
, _cToken :: !(Maybe Text)
, _cAddress :: !(Maybe Text)
, _cPayload :: !(Maybe Bool)
, _cParams :: !(Maybe ChannelParams)
, _cId :: !(Maybe Text)
, _cType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
channel
:: Channel
channel =
Channel'
{ _cResourceURI = Nothing
, _cResourceId = Nothing
, _cKind = "api#channel"
, _cExpiration = Nothing
, _cToken = Nothing
, _cAddress = Nothing
, _cPayload = Nothing
, _cParams = Nothing
, _cId = Nothing
, _cType = Nothing
}
cResourceURI :: Lens' Channel (Maybe Text)
cResourceURI
= lens _cResourceURI (\ s a -> s{_cResourceURI = a})
cResourceId :: Lens' Channel (Maybe Text)
cResourceId
= lens _cResourceId (\ s a -> s{_cResourceId = a})
cKind :: Lens' Channel Text
cKind = lens _cKind (\ s a -> s{_cKind = a})
cExpiration :: Lens' Channel (Maybe Int64)
cExpiration
= lens _cExpiration (\ s a -> s{_cExpiration = a}) .
mapping _Coerce
cToken :: Lens' Channel (Maybe Text)
cToken = lens _cToken (\ s a -> s{_cToken = a})
cAddress :: Lens' Channel (Maybe Text)
cAddress = lens _cAddress (\ s a -> s{_cAddress = a})
cPayload :: Lens' Channel (Maybe Bool)
cPayload = lens _cPayload (\ s a -> s{_cPayload = a})
cParams :: Lens' Channel (Maybe ChannelParams)
cParams = lens _cParams (\ s a -> s{_cParams = a})
cId :: Lens' Channel (Maybe Text)
cId = lens _cId (\ s a -> s{_cId = a})
cType :: Lens' Channel (Maybe Text)
cType = lens _cType (\ s a -> s{_cType = a})
instance FromJSON Channel where
parseJSON
= withObject "Channel"
(\ o ->
Channel' <$>
(o .:? "resourceUri") <*> (o .:? "resourceId") <*>
(o .:? "kind" .!= "api#channel")
<*> (o .:? "expiration")
<*> (o .:? "token")
<*> (o .:? "address")
<*> (o .:? "payload")
<*> (o .:? "params")
<*> (o .:? "id")
<*> (o .:? "type"))
instance ToJSON Channel where
toJSON Channel'{..}
= object
(catMaybes
[("resourceUri" .=) <$> _cResourceURI,
("resourceId" .=) <$> _cResourceId,
Just ("kind" .= _cKind),
("expiration" .=) <$> _cExpiration,
("token" .=) <$> _cToken,
("address" .=) <$> _cAddress,
("payload" .=) <$> _cPayload,
("params" .=) <$> _cParams, ("id" .=) <$> _cId,
("type" .=) <$> _cType])
newtype ConferenceRequestStatus = ConferenceRequestStatus'
{ _crsStatusCode :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
conferenceRequestStatus
:: ConferenceRequestStatus
conferenceRequestStatus =
ConferenceRequestStatus'
{ _crsStatusCode = Nothing
}
crsStatusCode :: Lens' ConferenceRequestStatus (Maybe Text)
crsStatusCode
= lens _crsStatusCode
(\ s a -> s{_crsStatusCode = a})
instance FromJSON ConferenceRequestStatus where
parseJSON
= withObject "ConferenceRequestStatus"
(\ o ->
ConferenceRequestStatus' <$> (o .:? "statusCode"))
instance ToJSON ConferenceRequestStatus where
toJSON ConferenceRequestStatus'{..}
= object
(catMaybes [("statusCode" .=) <$> _crsStatusCode])
data FreeBusyCalendar = FreeBusyCalendar'
{ _fbcBusy :: !(Maybe [TimePeriod])
, _fbcErrors :: !(Maybe [Error'])
} deriving (Eq,Show,Data,Typeable,Generic)
freeBusyCalendar
:: FreeBusyCalendar
freeBusyCalendar =
FreeBusyCalendar'
{ _fbcBusy = Nothing
, _fbcErrors = Nothing
}
fbcBusy :: Lens' FreeBusyCalendar [TimePeriod]
fbcBusy
= lens _fbcBusy (\ s a -> s{_fbcBusy = a}) . _Default
. _Coerce
fbcErrors :: Lens' FreeBusyCalendar [Error']
fbcErrors
= lens _fbcErrors (\ s a -> s{_fbcErrors = a}) .
_Default
. _Coerce
instance FromJSON FreeBusyCalendar where
parseJSON
= withObject "FreeBusyCalendar"
(\ o ->
FreeBusyCalendar' <$>
(o .:? "busy" .!= mempty) <*>
(o .:? "errors" .!= mempty))
instance ToJSON FreeBusyCalendar where
toJSON FreeBusyCalendar'{..}
= object
(catMaybes
[("busy" .=) <$> _fbcBusy,
("errors" .=) <$> _fbcErrors])
data ConferenceData = ConferenceData'
{ _cdSignature :: !(Maybe Text)
, _cdConferenceSolution :: !(Maybe ConferenceSolution)
, _cdCreateRequest :: !(Maybe CreateConferenceRequest)
, _cdConferenceId :: !(Maybe Text)
, _cdParameters :: !(Maybe ConferenceParameters)
, _cdNotes :: !(Maybe Text)
, _cdEntryPoints :: !(Maybe [EntryPoint])
} deriving (Eq,Show,Data,Typeable,Generic)
conferenceData
:: ConferenceData
conferenceData =
ConferenceData'
{ _cdSignature = Nothing
, _cdConferenceSolution = Nothing
, _cdCreateRequest = Nothing
, _cdConferenceId = Nothing
, _cdParameters = Nothing
, _cdNotes = Nothing
, _cdEntryPoints = Nothing
}
cdSignature :: Lens' ConferenceData (Maybe Text)
cdSignature
= lens _cdSignature (\ s a -> s{_cdSignature = a})
cdConferenceSolution :: Lens' ConferenceData (Maybe ConferenceSolution)
cdConferenceSolution
= lens _cdConferenceSolution
(\ s a -> s{_cdConferenceSolution = a})
cdCreateRequest :: Lens' ConferenceData (Maybe CreateConferenceRequest)
cdCreateRequest
= lens _cdCreateRequest
(\ s a -> s{_cdCreateRequest = a})
cdConferenceId :: Lens' ConferenceData (Maybe Text)
cdConferenceId
= lens _cdConferenceId
(\ s a -> s{_cdConferenceId = a})
cdParameters :: Lens' ConferenceData (Maybe ConferenceParameters)
cdParameters
= lens _cdParameters (\ s a -> s{_cdParameters = a})
cdNotes :: Lens' ConferenceData (Maybe Text)
cdNotes = lens _cdNotes (\ s a -> s{_cdNotes = a})
cdEntryPoints :: Lens' ConferenceData [EntryPoint]
cdEntryPoints
= lens _cdEntryPoints
(\ s a -> s{_cdEntryPoints = a})
. _Default
. _Coerce
instance FromJSON ConferenceData where
parseJSON
= withObject "ConferenceData"
(\ o ->
ConferenceData' <$>
(o .:? "signature") <*> (o .:? "conferenceSolution")
<*> (o .:? "createRequest")
<*> (o .:? "conferenceId")
<*> (o .:? "parameters")
<*> (o .:? "notes")
<*> (o .:? "entryPoints" .!= mempty))
instance ToJSON ConferenceData where
toJSON ConferenceData'{..}
= object
(catMaybes
[("signature" .=) <$> _cdSignature,
("conferenceSolution" .=) <$> _cdConferenceSolution,
("createRequest" .=) <$> _cdCreateRequest,
("conferenceId" .=) <$> _cdConferenceId,
("parameters" .=) <$> _cdParameters,
("notes" .=) <$> _cdNotes,
("entryPoints" .=) <$> _cdEntryPoints])
data Setting = Setting'
{ _setEtag :: !(Maybe Text)
, _setKind :: !Text
, _setValue :: !(Maybe Text)
, _setId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
setting
:: Setting
setting =
Setting'
{ _setEtag = Nothing
, _setKind = "calendar#setting"
, _setValue = Nothing
, _setId = Nothing
}
setEtag :: Lens' Setting (Maybe Text)
setEtag = lens _setEtag (\ s a -> s{_setEtag = a})
setKind :: Lens' Setting Text
setKind = lens _setKind (\ s a -> s{_setKind = a})
setValue :: Lens' Setting (Maybe Text)
setValue = lens _setValue (\ s a -> s{_setValue = a})
setId :: Lens' Setting (Maybe Text)
setId = lens _setId (\ s a -> s{_setId = a})
instance FromJSON Setting where
parseJSON
= withObject "Setting"
(\ o ->
Setting' <$>
(o .:? "etag") <*>
(o .:? "kind" .!= "calendar#setting")
<*> (o .:? "value")
<*> (o .:? "id"))
instance ToJSON Setting where
toJSON Setting'{..}
= object
(catMaybes
[("etag" .=) <$> _setEtag, Just ("kind" .= _setKind),
("value" .=) <$> _setValue, ("id" .=) <$> _setId])
newtype FreeBusyResponseGroups = FreeBusyResponseGroups'
{ _fbrgAddtional :: HashMap Text FreeBusyGroup
} deriving (Eq,Show,Data,Typeable,Generic)
freeBusyResponseGroups
:: HashMap Text FreeBusyGroup
-> FreeBusyResponseGroups
freeBusyResponseGroups pFbrgAddtional_ =
FreeBusyResponseGroups'
{ _fbrgAddtional = _Coerce # pFbrgAddtional_
}
fbrgAddtional :: Lens' FreeBusyResponseGroups (HashMap Text FreeBusyGroup)
fbrgAddtional
= lens _fbrgAddtional
(\ s a -> s{_fbrgAddtional = a})
. _Coerce
instance FromJSON FreeBusyResponseGroups where
parseJSON
= withObject "FreeBusyResponseGroups"
(\ o ->
FreeBusyResponseGroups' <$> (parseJSONObject o))
instance ToJSON FreeBusyResponseGroups where
toJSON = toJSON . _fbrgAddtional
data EventReminders = EventReminders'
{ _erOverrides :: !(Maybe [EventReminder])
, _erUseDefault :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
eventReminders
:: EventReminders
eventReminders =
EventReminders'
{ _erOverrides = Nothing
, _erUseDefault = Nothing
}
erOverrides :: Lens' EventReminders [EventReminder]
erOverrides
= lens _erOverrides (\ s a -> s{_erOverrides = a}) .
_Default
. _Coerce
erUseDefault :: Lens' EventReminders (Maybe Bool)
erUseDefault
= lens _erUseDefault (\ s a -> s{_erUseDefault = a})
instance FromJSON EventReminders where
parseJSON
= withObject "EventReminders"
(\ o ->
EventReminders' <$>
(o .:? "overrides" .!= mempty) <*>
(o .:? "useDefault"))
instance ToJSON EventReminders where
toJSON EventReminders'{..}
= object
(catMaybes
[("overrides" .=) <$> _erOverrides,
("useDefault" .=) <$> _erUseDefault])
newtype ColorsCalendar = ColorsCalendar'
{ _ccAddtional :: HashMap Text ColorDefinition
} deriving (Eq,Show,Data,Typeable,Generic)
colorsCalendar
:: HashMap Text ColorDefinition
-> ColorsCalendar
colorsCalendar pCcAddtional_ =
ColorsCalendar'
{ _ccAddtional = _Coerce # pCcAddtional_
}
ccAddtional :: Lens' ColorsCalendar (HashMap Text ColorDefinition)
ccAddtional
= lens _ccAddtional (\ s a -> s{_ccAddtional = a}) .
_Coerce
instance FromJSON ColorsCalendar where
parseJSON
= withObject "ColorsCalendar"
(\ o -> ColorsCalendar' <$> (parseJSONObject o))
instance ToJSON ColorsCalendar where
toJSON = toJSON . _ccAddtional
newtype ConferenceParametersAddOnParametersParameters = ConferenceParametersAddOnParametersParameters'
{ _cpaoppAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
conferenceParametersAddOnParametersParameters
:: HashMap Text Text
-> ConferenceParametersAddOnParametersParameters
conferenceParametersAddOnParametersParameters pCpaoppAddtional_ =
ConferenceParametersAddOnParametersParameters'
{ _cpaoppAddtional = _Coerce # pCpaoppAddtional_
}
cpaoppAddtional :: Lens' ConferenceParametersAddOnParametersParameters (HashMap Text Text)
cpaoppAddtional
= lens _cpaoppAddtional
(\ s a -> s{_cpaoppAddtional = a})
. _Coerce
instance FromJSON
ConferenceParametersAddOnParametersParameters where
parseJSON
= withObject
"ConferenceParametersAddOnParametersParameters"
(\ o ->
ConferenceParametersAddOnParametersParameters' <$>
(parseJSONObject o))
instance ToJSON
ConferenceParametersAddOnParametersParameters where
toJSON = toJSON . _cpaoppAddtional
data CalendarNotification = CalendarNotification'
{ _cnMethod :: !(Maybe Text)
, _cnType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
calendarNotification
:: CalendarNotification
calendarNotification =
CalendarNotification'
{ _cnMethod = Nothing
, _cnType = Nothing
}
cnMethod :: Lens' CalendarNotification (Maybe Text)
cnMethod = lens _cnMethod (\ s a -> s{_cnMethod = a})
cnType :: Lens' CalendarNotification (Maybe Text)
cnType = lens _cnType (\ s a -> s{_cnType = a})
instance FromJSON CalendarNotification where
parseJSON
= withObject "CalendarNotification"
(\ o ->
CalendarNotification' <$>
(o .:? "method") <*> (o .:? "type"))
instance ToJSON CalendarNotification where
toJSON CalendarNotification'{..}
= object
(catMaybes
[("method" .=) <$> _cnMethod,
("type" .=) <$> _cnType])
newtype EventExtendedPropertiesPrivate = EventExtendedPropertiesPrivate'
{ _eeppAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
eventExtendedPropertiesPrivate
:: HashMap Text Text
-> EventExtendedPropertiesPrivate
eventExtendedPropertiesPrivate pEeppAddtional_ =
EventExtendedPropertiesPrivate'
{ _eeppAddtional = _Coerce # pEeppAddtional_
}
eeppAddtional :: Lens' EventExtendedPropertiesPrivate (HashMap Text Text)
eeppAddtional
= lens _eeppAddtional
(\ s a -> s{_eeppAddtional = a})
. _Coerce
instance FromJSON EventExtendedPropertiesPrivate
where
parseJSON
= withObject "EventExtendedPropertiesPrivate"
(\ o ->
EventExtendedPropertiesPrivate' <$>
(parseJSONObject o))
instance ToJSON EventExtendedPropertiesPrivate where
toJSON = toJSON . _eeppAddtional
newtype ChannelParams = ChannelParams'
{ _cpAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
channelParams
:: HashMap Text Text
-> ChannelParams
channelParams pCpAddtional_ =
ChannelParams'
{ _cpAddtional = _Coerce # pCpAddtional_
}
cpAddtional :: Lens' ChannelParams (HashMap Text Text)
cpAddtional
= lens _cpAddtional (\ s a -> s{_cpAddtional = a}) .
_Coerce
instance FromJSON ChannelParams where
parseJSON
= withObject "ChannelParams"
(\ o -> ChannelParams' <$> (parseJSONObject o))
instance ToJSON ChannelParams where
toJSON = toJSON . _cpAddtional
data Events = Events'
{ _eveSummary :: !(Maybe Text)
, _eveEtag :: !(Maybe Text)
, _eveNextPageToken :: !(Maybe Text)
, _eveKind :: !Text
, _eveItems :: !(Maybe [Event])
, _eveDefaultReminders :: !(Maybe [EventReminder])
, _eveUpdated :: !(Maybe DateTime')
, _eveAccessRole :: !(Maybe Text)
, _eveTimeZone :: !(Maybe Text)
, _eveNextSyncToken :: !(Maybe Text)
, _eveDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
events
:: Events
events =
Events'
{ _eveSummary = Nothing
, _eveEtag = Nothing
, _eveNextPageToken = Nothing
, _eveKind = "calendar#events"
, _eveItems = Nothing
, _eveDefaultReminders = Nothing
, _eveUpdated = Nothing
, _eveAccessRole = Nothing
, _eveTimeZone = Nothing
, _eveNextSyncToken = Nothing
, _eveDescription = Nothing
}
eveSummary :: Lens' Events (Maybe Text)
eveSummary
= lens _eveSummary (\ s a -> s{_eveSummary = a})
eveEtag :: Lens' Events (Maybe Text)
eveEtag = lens _eveEtag (\ s a -> s{_eveEtag = a})
eveNextPageToken :: Lens' Events (Maybe Text)
eveNextPageToken
= lens _eveNextPageToken
(\ s a -> s{_eveNextPageToken = a})
eveKind :: Lens' Events Text
eveKind = lens _eveKind (\ s a -> s{_eveKind = a})
eveItems :: Lens' Events [Event]
eveItems
= lens _eveItems (\ s a -> s{_eveItems = a}) .
_Default
. _Coerce
eveDefaultReminders :: Lens' Events [EventReminder]
eveDefaultReminders
= lens _eveDefaultReminders
(\ s a -> s{_eveDefaultReminders = a})
. _Default
. _Coerce
eveUpdated :: Lens' Events (Maybe UTCTime)
eveUpdated
= lens _eveUpdated (\ s a -> s{_eveUpdated = a}) .
mapping _DateTime
eveAccessRole :: Lens' Events (Maybe Text)
eveAccessRole
= lens _eveAccessRole
(\ s a -> s{_eveAccessRole = a})
eveTimeZone :: Lens' Events (Maybe Text)
eveTimeZone
= lens _eveTimeZone (\ s a -> s{_eveTimeZone = a})
eveNextSyncToken :: Lens' Events (Maybe Text)
eveNextSyncToken
= lens _eveNextSyncToken
(\ s a -> s{_eveNextSyncToken = a})
eveDescription :: Lens' Events (Maybe Text)
eveDescription
= lens _eveDescription
(\ s a -> s{_eveDescription = a})
instance FromJSON Events where
parseJSON
= withObject "Events"
(\ o ->
Events' <$>
(o .:? "summary") <*> (o .:? "etag") <*>
(o .:? "nextPageToken")
<*> (o .:? "kind" .!= "calendar#events")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "defaultReminders" .!= mempty)
<*> (o .:? "updated")
<*> (o .:? "accessRole")
<*> (o .:? "timeZone")
<*> (o .:? "nextSyncToken")
<*> (o .:? "description"))
instance ToJSON Events where
toJSON Events'{..}
= object
(catMaybes
[("summary" .=) <$> _eveSummary,
("etag" .=) <$> _eveEtag,
("nextPageToken" .=) <$> _eveNextPageToken,
Just ("kind" .= _eveKind),
("items" .=) <$> _eveItems,
("defaultReminders" .=) <$> _eveDefaultReminders,
("updated" .=) <$> _eveUpdated,
("accessRole" .=) <$> _eveAccessRole,
("timeZone" .=) <$> _eveTimeZone,
("nextSyncToken" .=) <$> _eveNextSyncToken,
("description" .=) <$> _eveDescription])
data EventAttendee = EventAttendee'
{ _eaEmail :: !(Maybe Text)
, _eaResponseStatus :: !(Maybe Text)
, _eaSelf :: !Bool
, _eaResource :: !Bool
, _eaAdditionalGuests :: !(Textual Int32)
, _eaDisplayName :: !(Maybe Text)
, _eaId :: !(Maybe Text)
, _eaComment :: !(Maybe Text)
, _eaOptional :: !Bool
, _eaOrganizer :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
eventAttendee
:: EventAttendee
eventAttendee =
EventAttendee'
{ _eaEmail = Nothing
, _eaResponseStatus = Nothing
, _eaSelf = False
, _eaResource = False
, _eaAdditionalGuests = 0
, _eaDisplayName = Nothing
, _eaId = Nothing
, _eaComment = Nothing
, _eaOptional = False
, _eaOrganizer = Nothing
}
eaEmail :: Lens' EventAttendee (Maybe Text)
eaEmail = lens _eaEmail (\ s a -> s{_eaEmail = a})
eaResponseStatus :: Lens' EventAttendee (Maybe Text)
eaResponseStatus
= lens _eaResponseStatus
(\ s a -> s{_eaResponseStatus = a})
eaSelf :: Lens' EventAttendee Bool
eaSelf = lens _eaSelf (\ s a -> s{_eaSelf = a})
eaResource :: Lens' EventAttendee Bool
eaResource
= lens _eaResource (\ s a -> s{_eaResource = a})
eaAdditionalGuests :: Lens' EventAttendee Int32
eaAdditionalGuests
= lens _eaAdditionalGuests
(\ s a -> s{_eaAdditionalGuests = a})
. _Coerce
eaDisplayName :: Lens' EventAttendee (Maybe Text)
eaDisplayName
= lens _eaDisplayName
(\ s a -> s{_eaDisplayName = a})
eaId :: Lens' EventAttendee (Maybe Text)
eaId = lens _eaId (\ s a -> s{_eaId = a})
eaComment :: Lens' EventAttendee (Maybe Text)
eaComment
= lens _eaComment (\ s a -> s{_eaComment = a})
eaOptional :: Lens' EventAttendee Bool
eaOptional
= lens _eaOptional (\ s a -> s{_eaOptional = a})
eaOrganizer :: Lens' EventAttendee (Maybe Bool)
eaOrganizer
= lens _eaOrganizer (\ s a -> s{_eaOrganizer = a})
instance FromJSON EventAttendee where
parseJSON
= withObject "EventAttendee"
(\ o ->
EventAttendee' <$>
(o .:? "email") <*> (o .:? "responseStatus") <*>
(o .:? "self" .!= False)
<*> (o .:? "resource" .!= False)
<*> (o .:? "additionalGuests" .!= 0)
<*> (o .:? "displayName")
<*> (o .:? "id")
<*> (o .:? "comment")
<*> (o .:? "optional" .!= False)
<*> (o .:? "organizer"))
instance ToJSON EventAttendee where
toJSON EventAttendee'{..}
= object
(catMaybes
[("email" .=) <$> _eaEmail,
("responseStatus" .=) <$> _eaResponseStatus,
Just ("self" .= _eaSelf),
Just ("resource" .= _eaResource),
Just ("additionalGuests" .= _eaAdditionalGuests),
("displayName" .=) <$> _eaDisplayName,
("id" .=) <$> _eaId, ("comment" .=) <$> _eaComment,
Just ("optional" .= _eaOptional),
("organizer" .=) <$> _eaOrganizer])
data Calendar = Calendar'
{ _calSummary :: !(Maybe Text)
, _calConferenceProperties :: !(Maybe ConferenceProperties)
, _calEtag :: !(Maybe Text)
, _calLocation :: !(Maybe Text)
, _calKind :: !Text
, _calId :: !(Maybe Text)
, _calTimeZone :: !(Maybe Text)
, _calDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
calendar
:: Calendar
calendar =
Calendar'
{ _calSummary = Nothing
, _calConferenceProperties = Nothing
, _calEtag = Nothing
, _calLocation = Nothing
, _calKind = "calendar#calendar"
, _calId = Nothing
, _calTimeZone = Nothing
, _calDescription = Nothing
}
calSummary :: Lens' Calendar (Maybe Text)
calSummary
= lens _calSummary (\ s a -> s{_calSummary = a})
calConferenceProperties :: Lens' Calendar (Maybe ConferenceProperties)
calConferenceProperties
= lens _calConferenceProperties
(\ s a -> s{_calConferenceProperties = a})
calEtag :: Lens' Calendar (Maybe Text)
calEtag = lens _calEtag (\ s a -> s{_calEtag = a})
calLocation :: Lens' Calendar (Maybe Text)
calLocation
= lens _calLocation (\ s a -> s{_calLocation = a})
calKind :: Lens' Calendar Text
calKind = lens _calKind (\ s a -> s{_calKind = a})
calId :: Lens' Calendar (Maybe Text)
calId = lens _calId (\ s a -> s{_calId = a})
calTimeZone :: Lens' Calendar (Maybe Text)
calTimeZone
= lens _calTimeZone (\ s a -> s{_calTimeZone = a})
calDescription :: Lens' Calendar (Maybe Text)
calDescription
= lens _calDescription
(\ s a -> s{_calDescription = a})
instance FromJSON Calendar where
parseJSON
= withObject "Calendar"
(\ o ->
Calendar' <$>
(o .:? "summary") <*> (o .:? "conferenceProperties")
<*> (o .:? "etag")
<*> (o .:? "location")
<*> (o .:? "kind" .!= "calendar#calendar")
<*> (o .:? "id")
<*> (o .:? "timeZone")
<*> (o .:? "description"))
instance ToJSON Calendar where
toJSON Calendar'{..}
= object
(catMaybes
[("summary" .=) <$> _calSummary,
("conferenceProperties" .=) <$>
_calConferenceProperties,
("etag" .=) <$> _calEtag,
("location" .=) <$> _calLocation,
Just ("kind" .= _calKind), ("id" .=) <$> _calId,
("timeZone" .=) <$> _calTimeZone,
("description" .=) <$> _calDescription])
data FreeBusyResponse = FreeBusyResponse'
{ _fbrGroups :: !(Maybe FreeBusyResponseGroups)
, _fbrTimeMin :: !(Maybe DateTime')
, _fbrKind :: !Text
, _fbrCalendars :: !(Maybe FreeBusyResponseCalendars)
, _fbrTimeMax :: !(Maybe DateTime')
} deriving (Eq,Show,Data,Typeable,Generic)
freeBusyResponse
:: FreeBusyResponse
freeBusyResponse =
FreeBusyResponse'
{ _fbrGroups = Nothing
, _fbrTimeMin = Nothing
, _fbrKind = "calendar#freeBusy"
, _fbrCalendars = Nothing
, _fbrTimeMax = Nothing
}
fbrGroups :: Lens' FreeBusyResponse (Maybe FreeBusyResponseGroups)
fbrGroups
= lens _fbrGroups (\ s a -> s{_fbrGroups = a})
fbrTimeMin :: Lens' FreeBusyResponse (Maybe UTCTime)
fbrTimeMin
= lens _fbrTimeMin (\ s a -> s{_fbrTimeMin = a}) .
mapping _DateTime
fbrKind :: Lens' FreeBusyResponse Text
fbrKind = lens _fbrKind (\ s a -> s{_fbrKind = a})
fbrCalendars :: Lens' FreeBusyResponse (Maybe FreeBusyResponseCalendars)
fbrCalendars
= lens _fbrCalendars (\ s a -> s{_fbrCalendars = a})
fbrTimeMax :: Lens' FreeBusyResponse (Maybe UTCTime)
fbrTimeMax
= lens _fbrTimeMax (\ s a -> s{_fbrTimeMax = a}) .
mapping _DateTime
instance FromJSON FreeBusyResponse where
parseJSON
= withObject "FreeBusyResponse"
(\ o ->
FreeBusyResponse' <$>
(o .:? "groups") <*> (o .:? "timeMin") <*>
(o .:? "kind" .!= "calendar#freeBusy")
<*> (o .:? "calendars")
<*> (o .:? "timeMax"))
instance ToJSON FreeBusyResponse where
toJSON FreeBusyResponse'{..}
= object
(catMaybes
[("groups" .=) <$> _fbrGroups,
("timeMin" .=) <$> _fbrTimeMin,
Just ("kind" .= _fbrKind),
("calendars" .=) <$> _fbrCalendars,
("timeMax" .=) <$> _fbrTimeMax])
data EventReminder = EventReminder'
{ _erMethod :: !(Maybe Text)
, _erMinutes :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
eventReminder
:: EventReminder
eventReminder =
EventReminder'
{ _erMethod = Nothing
, _erMinutes = Nothing
}
erMethod :: Lens' EventReminder (Maybe Text)
erMethod = lens _erMethod (\ s a -> s{_erMethod = a})
erMinutes :: Lens' EventReminder (Maybe Int32)
erMinutes
= lens _erMinutes (\ s a -> s{_erMinutes = a}) .
mapping _Coerce
instance FromJSON EventReminder where
parseJSON
= withObject "EventReminder"
(\ o ->
EventReminder' <$>
(o .:? "method") <*> (o .:? "minutes"))
instance ToJSON EventReminder where
toJSON EventReminder'{..}
= object
(catMaybes
[("method" .=) <$> _erMethod,
("minutes" .=) <$> _erMinutes])
data EventExtendedProperties = EventExtendedProperties'
{ _eepPrivate :: !(Maybe EventExtendedPropertiesPrivate)
, _eepShared :: !(Maybe EventExtendedPropertiesShared)
} deriving (Eq,Show,Data,Typeable,Generic)
eventExtendedProperties
:: EventExtendedProperties
eventExtendedProperties =
EventExtendedProperties'
{ _eepPrivate = Nothing
, _eepShared = Nothing
}
eepPrivate :: Lens' EventExtendedProperties (Maybe EventExtendedPropertiesPrivate)
eepPrivate
= lens _eepPrivate (\ s a -> s{_eepPrivate = a})
eepShared :: Lens' EventExtendedProperties (Maybe EventExtendedPropertiesShared)
eepShared
= lens _eepShared (\ s a -> s{_eepShared = a})
instance FromJSON EventExtendedProperties where
parseJSON
= withObject "EventExtendedProperties"
(\ o ->
EventExtendedProperties' <$>
(o .:? "private") <*> (o .:? "shared"))
instance ToJSON EventExtendedProperties where
toJSON EventExtendedProperties'{..}
= object
(catMaybes
[("private" .=) <$> _eepPrivate,
("shared" .=) <$> _eepShared])
data EventDateTime = EventDateTime'
{ _edtDate :: !(Maybe Date')
, _edtTimeZone :: !(Maybe Text)
, _edtDateTime :: !(Maybe DateTime')
} deriving (Eq,Show,Data,Typeable,Generic)
eventDateTime
:: EventDateTime
eventDateTime =
EventDateTime'
{ _edtDate = Nothing
, _edtTimeZone = Nothing
, _edtDateTime = Nothing
}
edtDate :: Lens' EventDateTime (Maybe Day)
edtDate
= lens _edtDate (\ s a -> s{_edtDate = a}) .
mapping _Date
edtTimeZone :: Lens' EventDateTime (Maybe Text)
edtTimeZone
= lens _edtTimeZone (\ s a -> s{_edtTimeZone = a})
edtDateTime :: Lens' EventDateTime (Maybe UTCTime)
edtDateTime
= lens _edtDateTime (\ s a -> s{_edtDateTime = a}) .
mapping _DateTime
instance FromJSON EventDateTime where
parseJSON
= withObject "EventDateTime"
(\ o ->
EventDateTime' <$>
(o .:? "date") <*> (o .:? "timeZone") <*>
(o .:? "dateTime"))
instance ToJSON EventDateTime where
toJSON EventDateTime'{..}
= object
(catMaybes
[("date" .=) <$> _edtDate,
("timeZone" .=) <$> _edtTimeZone,
("dateTime" .=) <$> _edtDateTime])
data EventOrganizer = EventOrganizer'
{ _eoEmail :: !(Maybe Text)
, _eoSelf :: !Bool
, _eoDisplayName :: !(Maybe Text)
, _eoId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
eventOrganizer
:: EventOrganizer
eventOrganizer =
EventOrganizer'
{ _eoEmail = Nothing
, _eoSelf = False
, _eoDisplayName = Nothing
, _eoId = Nothing
}
eoEmail :: Lens' EventOrganizer (Maybe Text)
eoEmail = lens _eoEmail (\ s a -> s{_eoEmail = a})
eoSelf :: Lens' EventOrganizer Bool
eoSelf = lens _eoSelf (\ s a -> s{_eoSelf = a})
eoDisplayName :: Lens' EventOrganizer (Maybe Text)
eoDisplayName
= lens _eoDisplayName
(\ s a -> s{_eoDisplayName = a})
eoId :: Lens' EventOrganizer (Maybe Text)
eoId = lens _eoId (\ s a -> s{_eoId = a})
instance FromJSON EventOrganizer where
parseJSON
= withObject "EventOrganizer"
(\ o ->
EventOrganizer' <$>
(o .:? "email") <*> (o .:? "self" .!= False) <*>
(o .:? "displayName")
<*> (o .:? "id"))
instance ToJSON EventOrganizer where
toJSON EventOrganizer'{..}
= object
(catMaybes
[("email" .=) <$> _eoEmail, Just ("self" .= _eoSelf),
("displayName" .=) <$> _eoDisplayName,
("id" .=) <$> _eoId])
data CalendarList = CalendarList'
{ _clEtag :: !(Maybe Text)
, _clNextPageToken :: !(Maybe Text)
, _clKind :: !Text
, _clItems :: !(Maybe [CalendarListEntry])
, _clNextSyncToken :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
calendarList
:: CalendarList
calendarList =
CalendarList'
{ _clEtag = Nothing
, _clNextPageToken = Nothing
, _clKind = "calendar#calendarList"
, _clItems = Nothing
, _clNextSyncToken = Nothing
}
clEtag :: Lens' CalendarList (Maybe Text)
clEtag = lens _clEtag (\ s a -> s{_clEtag = a})
clNextPageToken :: Lens' CalendarList (Maybe Text)
clNextPageToken
= lens _clNextPageToken
(\ s a -> s{_clNextPageToken = a})
clKind :: Lens' CalendarList Text
clKind = lens _clKind (\ s a -> s{_clKind = a})
clItems :: Lens' CalendarList [CalendarListEntry]
clItems
= lens _clItems (\ s a -> s{_clItems = a}) . _Default
. _Coerce
clNextSyncToken :: Lens' CalendarList (Maybe Text)
clNextSyncToken
= lens _clNextSyncToken
(\ s a -> s{_clNextSyncToken = a})
instance FromJSON CalendarList where
parseJSON
= withObject "CalendarList"
(\ o ->
CalendarList' <$>
(o .:? "etag") <*> (o .:? "nextPageToken") <*>
(o .:? "kind" .!= "calendar#calendarList")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "nextSyncToken"))
instance ToJSON CalendarList where
toJSON CalendarList'{..}
= object
(catMaybes
[("etag" .=) <$> _clEtag,
("nextPageToken" .=) <$> _clNextPageToken,
Just ("kind" .= _clKind), ("items" .=) <$> _clItems,
("nextSyncToken" .=) <$> _clNextSyncToken])
data EventGadget = EventGadget'
{ _egHeight :: !(Maybe (Textual Int32))
, _egDisplay :: !(Maybe Text)
, _egPreferences :: !(Maybe EventGadgetPreferences)
, _egLink :: !(Maybe Text)
, _egIconLink :: !(Maybe Text)
, _egWidth :: !(Maybe (Textual Int32))
, _egTitle :: !(Maybe Text)
, _egType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
eventGadget
:: EventGadget
eventGadget =
EventGadget'
{ _egHeight = Nothing
, _egDisplay = Nothing
, _egPreferences = Nothing
, _egLink = Nothing
, _egIconLink = Nothing
, _egWidth = Nothing
, _egTitle = Nothing
, _egType = Nothing
}
egHeight :: Lens' EventGadget (Maybe Int32)
egHeight
= lens _egHeight (\ s a -> s{_egHeight = a}) .
mapping _Coerce
egDisplay :: Lens' EventGadget (Maybe Text)
egDisplay
= lens _egDisplay (\ s a -> s{_egDisplay = a})
egPreferences :: Lens' EventGadget (Maybe EventGadgetPreferences)
egPreferences
= lens _egPreferences
(\ s a -> s{_egPreferences = a})
egLink :: Lens' EventGadget (Maybe Text)
egLink = lens _egLink (\ s a -> s{_egLink = a})
egIconLink :: Lens' EventGadget (Maybe Text)
egIconLink
= lens _egIconLink (\ s a -> s{_egIconLink = a})
egWidth :: Lens' EventGadget (Maybe Int32)
egWidth
= lens _egWidth (\ s a -> s{_egWidth = a}) .
mapping _Coerce
egTitle :: Lens' EventGadget (Maybe Text)
egTitle = lens _egTitle (\ s a -> s{_egTitle = a})
egType :: Lens' EventGadget (Maybe Text)
egType = lens _egType (\ s a -> s{_egType = a})
instance FromJSON EventGadget where
parseJSON
= withObject "EventGadget"
(\ o ->
EventGadget' <$>
(o .:? "height") <*> (o .:? "display") <*>
(o .:? "preferences")
<*> (o .:? "link")
<*> (o .:? "iconLink")
<*> (o .:? "width")
<*> (o .:? "title")
<*> (o .:? "type"))
instance ToJSON EventGadget where
toJSON EventGadget'{..}
= object
(catMaybes
[("height" .=) <$> _egHeight,
("display" .=) <$> _egDisplay,
("preferences" .=) <$> _egPreferences,
("link" .=) <$> _egLink,
("iconLink" .=) <$> _egIconLink,
("width" .=) <$> _egWidth, ("title" .=) <$> _egTitle,
("type" .=) <$> _egType])
newtype EventGadgetPreferences = EventGadgetPreferences'
{ _egpAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
eventGadgetPreferences
:: HashMap Text Text
-> EventGadgetPreferences
eventGadgetPreferences pEgpAddtional_ =
EventGadgetPreferences'
{ _egpAddtional = _Coerce # pEgpAddtional_
}
egpAddtional :: Lens' EventGadgetPreferences (HashMap Text Text)
egpAddtional
= lens _egpAddtional (\ s a -> s{_egpAddtional = a})
. _Coerce
instance FromJSON EventGadgetPreferences where
parseJSON
= withObject "EventGadgetPreferences"
(\ o ->
EventGadgetPreferences' <$> (parseJSONObject o))
instance ToJSON EventGadgetPreferences where
toJSON = toJSON . _egpAddtional
data FreeBusyRequest = FreeBusyRequest'
{ _fCalendarExpansionMax :: !(Maybe (Textual Int32))
, _fTimeMin :: !(Maybe DateTime')
, _fItems :: !(Maybe [FreeBusyRequestItem])
, _fGroupExpansionMax :: !(Maybe (Textual Int32))
, _fTimeZone :: !Text
, _fTimeMax :: !(Maybe DateTime')
} deriving (Eq,Show,Data,Typeable,Generic)
freeBusyRequest
:: FreeBusyRequest
freeBusyRequest =
FreeBusyRequest'
{ _fCalendarExpansionMax = Nothing
, _fTimeMin = Nothing
, _fItems = Nothing
, _fGroupExpansionMax = Nothing
, _fTimeZone = "UTC"
, _fTimeMax = Nothing
}
fCalendarExpansionMax :: Lens' FreeBusyRequest (Maybe Int32)
fCalendarExpansionMax
= lens _fCalendarExpansionMax
(\ s a -> s{_fCalendarExpansionMax = a})
. mapping _Coerce
fTimeMin :: Lens' FreeBusyRequest (Maybe UTCTime)
fTimeMin
= lens _fTimeMin (\ s a -> s{_fTimeMin = a}) .
mapping _DateTime
fItems :: Lens' FreeBusyRequest [FreeBusyRequestItem]
fItems
= lens _fItems (\ s a -> s{_fItems = a}) . _Default .
_Coerce
fGroupExpansionMax :: Lens' FreeBusyRequest (Maybe Int32)
fGroupExpansionMax
= lens _fGroupExpansionMax
(\ s a -> s{_fGroupExpansionMax = a})
. mapping _Coerce
fTimeZone :: Lens' FreeBusyRequest Text
fTimeZone
= lens _fTimeZone (\ s a -> s{_fTimeZone = a})
fTimeMax :: Lens' FreeBusyRequest (Maybe UTCTime)
fTimeMax
= lens _fTimeMax (\ s a -> s{_fTimeMax = a}) .
mapping _DateTime
instance FromJSON FreeBusyRequest where
parseJSON
= withObject "FreeBusyRequest"
(\ o ->
FreeBusyRequest' <$>
(o .:? "calendarExpansionMax") <*> (o .:? "timeMin")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "groupExpansionMax")
<*> (o .:? "timeZone" .!= "UTC")
<*> (o .:? "timeMax"))
instance ToJSON FreeBusyRequest where
toJSON FreeBusyRequest'{..}
= object
(catMaybes
[("calendarExpansionMax" .=) <$>
_fCalendarExpansionMax,
("timeMin" .=) <$> _fTimeMin,
("items" .=) <$> _fItems,
("groupExpansionMax" .=) <$> _fGroupExpansionMax,
Just ("timeZone" .= _fTimeZone),
("timeMax" .=) <$> _fTimeMax])
data ACLRule = ACLRule'
{ _arEtag :: !(Maybe Text)
, _arKind :: !Text
, _arRole :: !(Maybe Text)
, _arScope :: !(Maybe ACLRuleScope)
, _arId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
aclRule
:: ACLRule
aclRule =
ACLRule'
{ _arEtag = Nothing
, _arKind = "calendar#aclRule"
, _arRole = Nothing
, _arScope = Nothing
, _arId = Nothing
}
arEtag :: Lens' ACLRule (Maybe Text)
arEtag = lens _arEtag (\ s a -> s{_arEtag = a})
arKind :: Lens' ACLRule Text
arKind = lens _arKind (\ s a -> s{_arKind = a})
arRole :: Lens' ACLRule (Maybe Text)
arRole = lens _arRole (\ s a -> s{_arRole = a})
arScope :: Lens' ACLRule (Maybe ACLRuleScope)
arScope = lens _arScope (\ s a -> s{_arScope = a})
arId :: Lens' ACLRule (Maybe Text)
arId = lens _arId (\ s a -> s{_arId = a})
instance FromJSON ACLRule where
parseJSON
= withObject "ACLRule"
(\ o ->
ACLRule' <$>
(o .:? "etag") <*>
(o .:? "kind" .!= "calendar#aclRule")
<*> (o .:? "role")
<*> (o .:? "scope")
<*> (o .:? "id"))
instance ToJSON ACLRule where
toJSON ACLRule'{..}
= object
(catMaybes
[("etag" .=) <$> _arEtag, Just ("kind" .= _arKind),
("role" .=) <$> _arRole, ("scope" .=) <$> _arScope,
("id" .=) <$> _arId])
data CreateConferenceRequest = CreateConferenceRequest'
{ _ccrStatus :: !(Maybe ConferenceRequestStatus)
, _ccrRequestId :: !(Maybe Text)
, _ccrConferenceSolutionKey :: !(Maybe ConferenceSolutionKey)
} deriving (Eq,Show,Data,Typeable,Generic)
createConferenceRequest
:: CreateConferenceRequest
createConferenceRequest =
CreateConferenceRequest'
{ _ccrStatus = Nothing
, _ccrRequestId = Nothing
, _ccrConferenceSolutionKey = Nothing
}
ccrStatus :: Lens' CreateConferenceRequest (Maybe ConferenceRequestStatus)
ccrStatus
= lens _ccrStatus (\ s a -> s{_ccrStatus = a})
ccrRequestId :: Lens' CreateConferenceRequest (Maybe Text)
ccrRequestId
= lens _ccrRequestId (\ s a -> s{_ccrRequestId = a})
ccrConferenceSolutionKey :: Lens' CreateConferenceRequest (Maybe ConferenceSolutionKey)
ccrConferenceSolutionKey
= lens _ccrConferenceSolutionKey
(\ s a -> s{_ccrConferenceSolutionKey = a})
instance FromJSON CreateConferenceRequest where
parseJSON
= withObject "CreateConferenceRequest"
(\ o ->
CreateConferenceRequest' <$>
(o .:? "status") <*> (o .:? "requestId") <*>
(o .:? "conferenceSolutionKey"))
instance ToJSON CreateConferenceRequest where
toJSON CreateConferenceRequest'{..}
= object
(catMaybes
[("status" .=) <$> _ccrStatus,
("requestId" .=) <$> _ccrRequestId,
("conferenceSolutionKey" .=) <$>
_ccrConferenceSolutionKey])
newtype EventExtendedPropertiesShared = EventExtendedPropertiesShared'
{ _eepsAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
eventExtendedPropertiesShared
:: HashMap Text Text
-> EventExtendedPropertiesShared
eventExtendedPropertiesShared pEepsAddtional_ =
EventExtendedPropertiesShared'
{ _eepsAddtional = _Coerce # pEepsAddtional_
}
eepsAddtional :: Lens' EventExtendedPropertiesShared (HashMap Text Text)
eepsAddtional
= lens _eepsAddtional
(\ s a -> s{_eepsAddtional = a})
. _Coerce
instance FromJSON EventExtendedPropertiesShared where
parseJSON
= withObject "EventExtendedPropertiesShared"
(\ o ->
EventExtendedPropertiesShared' <$>
(parseJSONObject o))
instance ToJSON EventExtendedPropertiesShared where
toJSON = toJSON . _eepsAddtional
newtype FreeBusyResponseCalendars = FreeBusyResponseCalendars'
{ _fbrcAddtional :: HashMap Text FreeBusyCalendar
} deriving (Eq,Show,Data,Typeable,Generic)
freeBusyResponseCalendars
:: HashMap Text FreeBusyCalendar
-> FreeBusyResponseCalendars
freeBusyResponseCalendars pFbrcAddtional_ =
FreeBusyResponseCalendars'
{ _fbrcAddtional = _Coerce # pFbrcAddtional_
}
fbrcAddtional :: Lens' FreeBusyResponseCalendars (HashMap Text FreeBusyCalendar)
fbrcAddtional
= lens _fbrcAddtional
(\ s a -> s{_fbrcAddtional = a})
. _Coerce
instance FromJSON FreeBusyResponseCalendars where
parseJSON
= withObject "FreeBusyResponseCalendars"
(\ o ->
FreeBusyResponseCalendars' <$> (parseJSONObject o))
instance ToJSON FreeBusyResponseCalendars where
toJSON = toJSON . _fbrcAddtional
data ACL = ACL'
{ _aEtag :: !(Maybe Text)
, _aNextPageToken :: !(Maybe Text)
, _aKind :: !Text
, _aItems :: !(Maybe [ACLRule])
, _aNextSyncToken :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
acl
:: ACL
acl =
ACL'
{ _aEtag = Nothing
, _aNextPageToken = Nothing
, _aKind = "calendar#acl"
, _aItems = Nothing
, _aNextSyncToken = Nothing
}
aEtag :: Lens' ACL (Maybe Text)
aEtag = lens _aEtag (\ s a -> s{_aEtag = a})
aNextPageToken :: Lens' ACL (Maybe Text)
aNextPageToken
= lens _aNextPageToken
(\ s a -> s{_aNextPageToken = a})
aKind :: Lens' ACL Text
aKind = lens _aKind (\ s a -> s{_aKind = a})
aItems :: Lens' ACL [ACLRule]
aItems
= lens _aItems (\ s a -> s{_aItems = a}) . _Default .
_Coerce
aNextSyncToken :: Lens' ACL (Maybe Text)
aNextSyncToken
= lens _aNextSyncToken
(\ s a -> s{_aNextSyncToken = a})
instance FromJSON ACL where
parseJSON
= withObject "ACL"
(\ o ->
ACL' <$>
(o .:? "etag") <*> (o .:? "nextPageToken") <*>
(o .:? "kind" .!= "calendar#acl")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "nextSyncToken"))
instance ToJSON ACL where
toJSON ACL'{..}
= object
(catMaybes
[("etag" .=) <$> _aEtag,
("nextPageToken" .=) <$> _aNextPageToken,
Just ("kind" .= _aKind), ("items" .=) <$> _aItems,
("nextSyncToken" .=) <$> _aNextSyncToken])
data Colors = Colors'
{ _colEvent :: !(Maybe ColorsEvent)
, _colKind :: !Text
, _colCalendar :: !(Maybe ColorsCalendar)
, _colUpdated :: !(Maybe DateTime')
} deriving (Eq,Show,Data,Typeable,Generic)
colors
:: Colors
colors =
Colors'
{ _colEvent = Nothing
, _colKind = "calendar#colors"
, _colCalendar = Nothing
, _colUpdated = Nothing
}
colEvent :: Lens' Colors (Maybe ColorsEvent)
colEvent = lens _colEvent (\ s a -> s{_colEvent = a})
colKind :: Lens' Colors Text
colKind = lens _colKind (\ s a -> s{_colKind = a})
colCalendar :: Lens' Colors (Maybe ColorsCalendar)
colCalendar
= lens _colCalendar (\ s a -> s{_colCalendar = a})
colUpdated :: Lens' Colors (Maybe UTCTime)
colUpdated
= lens _colUpdated (\ s a -> s{_colUpdated = a}) .
mapping _DateTime
instance FromJSON Colors where
parseJSON
= withObject "Colors"
(\ o ->
Colors' <$>
(o .:? "event") <*>
(o .:? "kind" .!= "calendar#colors")
<*> (o .:? "calendar")
<*> (o .:? "updated"))
instance ToJSON Colors where
toJSON Colors'{..}
= object
(catMaybes
[("event" .=) <$> _colEvent,
Just ("kind" .= _colKind),
("calendar" .=) <$> _colCalendar,
("updated" .=) <$> _colUpdated])
data FreeBusyGroup = FreeBusyGroup'
{ _fbgCalendars :: !(Maybe [Text])
, _fbgErrors :: !(Maybe [Error'])
} deriving (Eq,Show,Data,Typeable,Generic)
freeBusyGroup
:: FreeBusyGroup
freeBusyGroup =
FreeBusyGroup'
{ _fbgCalendars = Nothing
, _fbgErrors = Nothing
}
fbgCalendars :: Lens' FreeBusyGroup [Text]
fbgCalendars
= lens _fbgCalendars (\ s a -> s{_fbgCalendars = a})
. _Default
. _Coerce
fbgErrors :: Lens' FreeBusyGroup [Error']
fbgErrors
= lens _fbgErrors (\ s a -> s{_fbgErrors = a}) .
_Default
. _Coerce
instance FromJSON FreeBusyGroup where
parseJSON
= withObject "FreeBusyGroup"
(\ o ->
FreeBusyGroup' <$>
(o .:? "calendars" .!= mempty) <*>
(o .:? "errors" .!= mempty))
instance ToJSON FreeBusyGroup where
toJSON FreeBusyGroup'{..}
= object
(catMaybes
[("calendars" .=) <$> _fbgCalendars,
("errors" .=) <$> _fbgErrors])
newtype ConferenceParametersAddOnParameters = ConferenceParametersAddOnParameters'
{ _cpaopParameters :: Maybe ConferenceParametersAddOnParametersParameters
} deriving (Eq,Show,Data,Typeable,Generic)
conferenceParametersAddOnParameters
:: ConferenceParametersAddOnParameters
conferenceParametersAddOnParameters =
ConferenceParametersAddOnParameters'
{ _cpaopParameters = Nothing
}
cpaopParameters :: Lens' ConferenceParametersAddOnParameters (Maybe ConferenceParametersAddOnParametersParameters)
cpaopParameters
= lens _cpaopParameters
(\ s a -> s{_cpaopParameters = a})
instance FromJSON ConferenceParametersAddOnParameters
where
parseJSON
= withObject "ConferenceParametersAddOnParameters"
(\ o ->
ConferenceParametersAddOnParameters' <$>
(o .:? "parameters"))
instance ToJSON ConferenceParametersAddOnParameters
where
toJSON ConferenceParametersAddOnParameters'{..}
= object
(catMaybes [("parameters" .=) <$> _cpaopParameters])
data EventSource = EventSource'
{ _esURL :: !(Maybe Text)
, _esTitle :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
eventSource
:: EventSource
eventSource =
EventSource'
{ _esURL = Nothing
, _esTitle = Nothing
}
esURL :: Lens' EventSource (Maybe Text)
esURL = lens _esURL (\ s a -> s{_esURL = a})
esTitle :: Lens' EventSource (Maybe Text)
esTitle = lens _esTitle (\ s a -> s{_esTitle = a})
instance FromJSON EventSource where
parseJSON
= withObject "EventSource"
(\ o ->
EventSource' <$> (o .:? "url") <*> (o .:? "title"))
instance ToJSON EventSource where
toJSON EventSource'{..}
= object
(catMaybes
[("url" .=) <$> _esURL, ("title" .=) <$> _esTitle])