module Network.Google.Directory.Types.Product where
import Network.Google.Directory.Types.Sum
import Network.Google.Prelude
data VerificationCode = VerificationCode'
{ _vcVerificationCode :: !(Maybe Text)
, _vcEtag :: !(Maybe Text)
, _vcKind :: !Text
, _vcUserId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
verificationCode
:: VerificationCode
verificationCode =
VerificationCode'
{ _vcVerificationCode = Nothing
, _vcEtag = Nothing
, _vcKind = "admin#directory#verificationCode"
, _vcUserId = Nothing
}
vcVerificationCode :: Lens' VerificationCode (Maybe Text)
vcVerificationCode
= lens _vcVerificationCode
(\ s a -> s{_vcVerificationCode = a})
vcEtag :: Lens' VerificationCode (Maybe Text)
vcEtag = lens _vcEtag (\ s a -> s{_vcEtag = a})
vcKind :: Lens' VerificationCode Text
vcKind = lens _vcKind (\ s a -> s{_vcKind = a})
vcUserId :: Lens' VerificationCode (Maybe Text)
vcUserId = lens _vcUserId (\ s a -> s{_vcUserId = a})
instance FromJSON VerificationCode where
parseJSON
= withObject "VerificationCode"
(\ o ->
VerificationCode' <$>
(o .:? "verificationCode") <*> (o .:? "etag") <*>
(o .:? "kind" .!= "admin#directory#verificationCode")
<*> (o .:? "userId"))
instance ToJSON VerificationCode where
toJSON VerificationCode'{..}
= object
(catMaybes
[("verificationCode" .=) <$> _vcVerificationCode,
("etag" .=) <$> _vcEtag, Just ("kind" .= _vcKind),
("userId" .=) <$> _vcUserId])
data OrgUnit = OrgUnit'
{ _ouEtag :: !(Maybe Text)
, _ouParentOrgUnitPath :: !(Maybe Text)
, _ouKind :: !Text
, _ouOrgUnitPath :: !(Maybe Text)
, _ouName :: !(Maybe Text)
, _ouBlockInheritance :: !(Maybe Bool)
, _ouParentOrgUnitId :: !(Maybe Text)
, _ouDescription :: !(Maybe Text)
, _ouOrgUnitId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
orgUnit
:: OrgUnit
orgUnit =
OrgUnit'
{ _ouEtag = Nothing
, _ouParentOrgUnitPath = Nothing
, _ouKind = "admin#directory#orgUnit"
, _ouOrgUnitPath = Nothing
, _ouName = Nothing
, _ouBlockInheritance = Nothing
, _ouParentOrgUnitId = Nothing
, _ouDescription = Nothing
, _ouOrgUnitId = Nothing
}
ouEtag :: Lens' OrgUnit (Maybe Text)
ouEtag = lens _ouEtag (\ s a -> s{_ouEtag = a})
ouParentOrgUnitPath :: Lens' OrgUnit (Maybe Text)
ouParentOrgUnitPath
= lens _ouParentOrgUnitPath
(\ s a -> s{_ouParentOrgUnitPath = a})
ouKind :: Lens' OrgUnit Text
ouKind = lens _ouKind (\ s a -> s{_ouKind = a})
ouOrgUnitPath :: Lens' OrgUnit (Maybe Text)
ouOrgUnitPath
= lens _ouOrgUnitPath
(\ s a -> s{_ouOrgUnitPath = a})
ouName :: Lens' OrgUnit (Maybe Text)
ouName = lens _ouName (\ s a -> s{_ouName = a})
ouBlockInheritance :: Lens' OrgUnit (Maybe Bool)
ouBlockInheritance
= lens _ouBlockInheritance
(\ s a -> s{_ouBlockInheritance = a})
ouParentOrgUnitId :: Lens' OrgUnit (Maybe Text)
ouParentOrgUnitId
= lens _ouParentOrgUnitId
(\ s a -> s{_ouParentOrgUnitId = a})
ouDescription :: Lens' OrgUnit (Maybe Text)
ouDescription
= lens _ouDescription
(\ s a -> s{_ouDescription = a})
ouOrgUnitId :: Lens' OrgUnit (Maybe Text)
ouOrgUnitId
= lens _ouOrgUnitId (\ s a -> s{_ouOrgUnitId = a})
instance FromJSON OrgUnit where
parseJSON
= withObject "OrgUnit"
(\ o ->
OrgUnit' <$>
(o .:? "etag") <*> (o .:? "parentOrgUnitPath") <*>
(o .:? "kind" .!= "admin#directory#orgUnit")
<*> (o .:? "orgUnitPath")
<*> (o .:? "name")
<*> (o .:? "blockInheritance")
<*> (o .:? "parentOrgUnitId")
<*> (o .:? "description")
<*> (o .:? "orgUnitId"))
instance ToJSON OrgUnit where
toJSON OrgUnit'{..}
= object
(catMaybes
[("etag" .=) <$> _ouEtag,
("parentOrgUnitPath" .=) <$> _ouParentOrgUnitPath,
Just ("kind" .= _ouKind),
("orgUnitPath" .=) <$> _ouOrgUnitPath,
("name" .=) <$> _ouName,
("blockInheritance" .=) <$> _ouBlockInheritance,
("parentOrgUnitId" .=) <$> _ouParentOrgUnitId,
("description" .=) <$> _ouDescription,
("orgUnitId" .=) <$> _ouOrgUnitId])
newtype UserMakeAdmin = UserMakeAdmin'
{ _umaStatus :: Maybe Bool
} deriving (Eq,Show,Data,Typeable,Generic)
userMakeAdmin
:: UserMakeAdmin
userMakeAdmin =
UserMakeAdmin'
{ _umaStatus = Nothing
}
umaStatus :: Lens' UserMakeAdmin (Maybe Bool)
umaStatus
= lens _umaStatus (\ s a -> s{_umaStatus = a})
instance FromJSON UserMakeAdmin where
parseJSON
= withObject "UserMakeAdmin"
(\ o -> UserMakeAdmin' <$> (o .:? "status"))
instance ToJSON UserMakeAdmin where
toJSON UserMakeAdmin'{..}
= object (catMaybes [("status" .=) <$> _umaStatus])
data UserAbout = UserAbout'
{ _uaValue :: !(Maybe Text)
, _uaContentType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
userAbout
:: UserAbout
userAbout =
UserAbout'
{ _uaValue = Nothing
, _uaContentType = Nothing
}
uaValue :: Lens' UserAbout (Maybe Text)
uaValue = lens _uaValue (\ s a -> s{_uaValue = a})
uaContentType :: Lens' UserAbout (Maybe Text)
uaContentType
= lens _uaContentType
(\ s a -> s{_uaContentType = a})
instance FromJSON UserAbout where
parseJSON
= withObject "UserAbout"
(\ o ->
UserAbout' <$>
(o .:? "value") <*> (o .:? "contentType"))
instance ToJSON UserAbout where
toJSON UserAbout'{..}
= object
(catMaybes
[("value" .=) <$> _uaValue,
("contentType" .=) <$> _uaContentType])
data Privileges = Privileges'
{ _pEtag :: !(Maybe Text)
, _pKind :: !Text
, _pItems :: !(Maybe [Privilege])
} deriving (Eq,Show,Data,Typeable,Generic)
privileges
:: Privileges
privileges =
Privileges'
{ _pEtag = Nothing
, _pKind = "admin#directory#privileges"
, _pItems = Nothing
}
pEtag :: Lens' Privileges (Maybe Text)
pEtag = lens _pEtag (\ s a -> s{_pEtag = a})
pKind :: Lens' Privileges Text
pKind = lens _pKind (\ s a -> s{_pKind = a})
pItems :: Lens' Privileges [Privilege]
pItems
= lens _pItems (\ s a -> s{_pItems = a}) . _Default .
_Coerce
instance FromJSON Privileges where
parseJSON
= withObject "Privileges"
(\ o ->
Privileges' <$>
(o .:? "etag") <*>
(o .:? "kind" .!= "admin#directory#privileges")
<*> (o .:? "items" .!= mempty))
instance ToJSON Privileges where
toJSON Privileges'{..}
= object
(catMaybes
[("etag" .=) <$> _pEtag, Just ("kind" .= _pKind),
("items" .=) <$> _pItems])
data Groups = Groups'
{ _gGroups :: !(Maybe [Group])
, _gEtag :: !(Maybe Text)
, _gNextPageToken :: !(Maybe Text)
, _gKind :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
groups
:: Groups
groups =
Groups'
{ _gGroups = Nothing
, _gEtag = Nothing
, _gNextPageToken = Nothing
, _gKind = "admin#directory#groups"
}
gGroups :: Lens' Groups [Group]
gGroups
= lens _gGroups (\ s a -> s{_gGroups = a}) . _Default
. _Coerce
gEtag :: Lens' Groups (Maybe Text)
gEtag = lens _gEtag (\ s a -> s{_gEtag = a})
gNextPageToken :: Lens' Groups (Maybe Text)
gNextPageToken
= lens _gNextPageToken
(\ s a -> s{_gNextPageToken = a})
gKind :: Lens' Groups Text
gKind = lens _gKind (\ s a -> s{_gKind = a})
instance FromJSON Groups where
parseJSON
= withObject "Groups"
(\ o ->
Groups' <$>
(o .:? "groups" .!= mempty) <*> (o .:? "etag") <*>
(o .:? "nextPageToken")
<*> (o .:? "kind" .!= "admin#directory#groups"))
instance ToJSON Groups where
toJSON Groups'{..}
= object
(catMaybes
[("groups" .=) <$> _gGroups, ("etag" .=) <$> _gEtag,
("nextPageToken" .=) <$> _gNextPageToken,
Just ("kind" .= _gKind)])
data RoleAssignments = RoleAssignments'
{ _raEtag :: !(Maybe Text)
, _raNextPageToken :: !(Maybe Text)
, _raKind :: !Text
, _raItems :: !(Maybe [RoleAssignment])
} deriving (Eq,Show,Data,Typeable,Generic)
roleAssignments
:: RoleAssignments
roleAssignments =
RoleAssignments'
{ _raEtag = Nothing
, _raNextPageToken = Nothing
, _raKind = "admin#directory#roleAssignments"
, _raItems = Nothing
}
raEtag :: Lens' RoleAssignments (Maybe Text)
raEtag = lens _raEtag (\ s a -> s{_raEtag = a})
raNextPageToken :: Lens' RoleAssignments (Maybe Text)
raNextPageToken
= lens _raNextPageToken
(\ s a -> s{_raNextPageToken = a})
raKind :: Lens' RoleAssignments Text
raKind = lens _raKind (\ s a -> s{_raKind = a})
raItems :: Lens' RoleAssignments [RoleAssignment]
raItems
= lens _raItems (\ s a -> s{_raItems = a}) . _Default
. _Coerce
instance FromJSON RoleAssignments where
parseJSON
= withObject "RoleAssignments"
(\ o ->
RoleAssignments' <$>
(o .:? "etag") <*> (o .:? "nextPageToken") <*>
(o .:? "kind" .!= "admin#directory#roleAssignments")
<*> (o .:? "items" .!= mempty))
instance ToJSON RoleAssignments where
toJSON RoleAssignments'{..}
= object
(catMaybes
[("etag" .=) <$> _raEtag,
("nextPageToken" .=) <$> _raNextPageToken,
Just ("kind" .= _raKind), ("items" .=) <$> _raItems])
data Privilege = Privilege'
{ _priEtag :: !(Maybe Text)
, _priIsOuScopable :: !(Maybe Bool)
, _priKind :: !Text
, _priServiceName :: !(Maybe Text)
, _priServiceId :: !(Maybe Text)
, _priPrivilegeName :: !(Maybe Text)
, _priChildPrivileges :: !(Maybe [Privilege])
} deriving (Eq,Show,Data,Typeable,Generic)
privilege
:: Privilege
privilege =
Privilege'
{ _priEtag = Nothing
, _priIsOuScopable = Nothing
, _priKind = "admin#directory#privilege"
, _priServiceName = Nothing
, _priServiceId = Nothing
, _priPrivilegeName = Nothing
, _priChildPrivileges = Nothing
}
priEtag :: Lens' Privilege (Maybe Text)
priEtag = lens _priEtag (\ s a -> s{_priEtag = a})
priIsOuScopable :: Lens' Privilege (Maybe Bool)
priIsOuScopable
= lens _priIsOuScopable
(\ s a -> s{_priIsOuScopable = a})
priKind :: Lens' Privilege Text
priKind = lens _priKind (\ s a -> s{_priKind = a})
priServiceName :: Lens' Privilege (Maybe Text)
priServiceName
= lens _priServiceName
(\ s a -> s{_priServiceName = a})
priServiceId :: Lens' Privilege (Maybe Text)
priServiceId
= lens _priServiceId (\ s a -> s{_priServiceId = a})
priPrivilegeName :: Lens' Privilege (Maybe Text)
priPrivilegeName
= lens _priPrivilegeName
(\ s a -> s{_priPrivilegeName = a})
priChildPrivileges :: Lens' Privilege [Privilege]
priChildPrivileges
= lens _priChildPrivileges
(\ s a -> s{_priChildPrivileges = a})
. _Default
. _Coerce
instance FromJSON Privilege where
parseJSON
= withObject "Privilege"
(\ o ->
Privilege' <$>
(o .:? "etag") <*> (o .:? "isOuScopable") <*>
(o .:? "kind" .!= "admin#directory#privilege")
<*> (o .:? "serviceName")
<*> (o .:? "serviceId")
<*> (o .:? "privilegeName")
<*> (o .:? "childPrivileges" .!= mempty))
instance ToJSON Privilege where
toJSON Privilege'{..}
= object
(catMaybes
[("etag" .=) <$> _priEtag,
("isOuScopable" .=) <$> _priIsOuScopable,
Just ("kind" .= _priKind),
("serviceName" .=) <$> _priServiceName,
("serviceId" .=) <$> _priServiceId,
("privilegeName" .=) <$> _priPrivilegeName,
("childPrivileges" .=) <$> _priChildPrivileges])
data Roles = Roles'
{ _rEtag :: !(Maybe Text)
, _rNextPageToken :: !(Maybe Text)
, _rKind :: !Text
, _rItems :: !(Maybe [Role])
} deriving (Eq,Show,Data,Typeable,Generic)
roles
:: Roles
roles =
Roles'
{ _rEtag = Nothing
, _rNextPageToken = Nothing
, _rKind = "admin#directory#roles"
, _rItems = Nothing
}
rEtag :: Lens' Roles (Maybe Text)
rEtag = lens _rEtag (\ s a -> s{_rEtag = a})
rNextPageToken :: Lens' Roles (Maybe Text)
rNextPageToken
= lens _rNextPageToken
(\ s a -> s{_rNextPageToken = a})
rKind :: Lens' Roles Text
rKind = lens _rKind (\ s a -> s{_rKind = a})
rItems :: Lens' Roles [Role]
rItems
= lens _rItems (\ s a -> s{_rItems = a}) . _Default .
_Coerce
instance FromJSON Roles where
parseJSON
= withObject "Roles"
(\ o ->
Roles' <$>
(o .:? "etag") <*> (o .:? "nextPageToken") <*>
(o .:? "kind" .!= "admin#directory#roles")
<*> (o .:? "items" .!= mempty))
instance ToJSON Roles where
toJSON Roles'{..}
= object
(catMaybes
[("etag" .=) <$> _rEtag,
("nextPageToken" .=) <$> _rNextPageToken,
Just ("kind" .= _rKind), ("items" .=) <$> _rItems])
data UserAddress = UserAddress'
{ _uaStreetAddress :: !(Maybe Text)
, _uaPoBox :: !(Maybe Text)
, _uaCountry :: !(Maybe Text)
, _uaPostalCode :: !(Maybe Text)
, _uaFormatted :: !(Maybe Text)
, _uaExtendedAddress :: !(Maybe Text)
, _uaLocality :: !(Maybe Text)
, _uaPrimary :: !(Maybe Bool)
, _uaCountryCode :: !(Maybe Text)
, _uaRegion :: !(Maybe Text)
, _uaType :: !(Maybe Text)
, _uaCustomType :: !(Maybe Text)
, _uaSourceIsStructured :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
userAddress
:: UserAddress
userAddress =
UserAddress'
{ _uaStreetAddress = Nothing
, _uaPoBox = Nothing
, _uaCountry = Nothing
, _uaPostalCode = Nothing
, _uaFormatted = Nothing
, _uaExtendedAddress = Nothing
, _uaLocality = Nothing
, _uaPrimary = Nothing
, _uaCountryCode = Nothing
, _uaRegion = Nothing
, _uaType = Nothing
, _uaCustomType = Nothing
, _uaSourceIsStructured = Nothing
}
uaStreetAddress :: Lens' UserAddress (Maybe Text)
uaStreetAddress
= lens _uaStreetAddress
(\ s a -> s{_uaStreetAddress = a})
uaPoBox :: Lens' UserAddress (Maybe Text)
uaPoBox = lens _uaPoBox (\ s a -> s{_uaPoBox = a})
uaCountry :: Lens' UserAddress (Maybe Text)
uaCountry
= lens _uaCountry (\ s a -> s{_uaCountry = a})
uaPostalCode :: Lens' UserAddress (Maybe Text)
uaPostalCode
= lens _uaPostalCode (\ s a -> s{_uaPostalCode = a})
uaFormatted :: Lens' UserAddress (Maybe Text)
uaFormatted
= lens _uaFormatted (\ s a -> s{_uaFormatted = a})
uaExtendedAddress :: Lens' UserAddress (Maybe Text)
uaExtendedAddress
= lens _uaExtendedAddress
(\ s a -> s{_uaExtendedAddress = a})
uaLocality :: Lens' UserAddress (Maybe Text)
uaLocality
= lens _uaLocality (\ s a -> s{_uaLocality = a})
uaPrimary :: Lens' UserAddress (Maybe Bool)
uaPrimary
= lens _uaPrimary (\ s a -> s{_uaPrimary = a})
uaCountryCode :: Lens' UserAddress (Maybe Text)
uaCountryCode
= lens _uaCountryCode
(\ s a -> s{_uaCountryCode = a})
uaRegion :: Lens' UserAddress (Maybe Text)
uaRegion = lens _uaRegion (\ s a -> s{_uaRegion = a})
uaType :: Lens' UserAddress (Maybe Text)
uaType = lens _uaType (\ s a -> s{_uaType = a})
uaCustomType :: Lens' UserAddress (Maybe Text)
uaCustomType
= lens _uaCustomType (\ s a -> s{_uaCustomType = a})
uaSourceIsStructured :: Lens' UserAddress (Maybe Bool)
uaSourceIsStructured
= lens _uaSourceIsStructured
(\ s a -> s{_uaSourceIsStructured = a})
instance FromJSON UserAddress where
parseJSON
= withObject "UserAddress"
(\ o ->
UserAddress' <$>
(o .:? "streetAddress") <*> (o .:? "poBox") <*>
(o .:? "country")
<*> (o .:? "postalCode")
<*> (o .:? "formatted")
<*> (o .:? "extendedAddress")
<*> (o .:? "locality")
<*> (o .:? "primary")
<*> (o .:? "countryCode")
<*> (o .:? "region")
<*> (o .:? "type")
<*> (o .:? "customType")
<*> (o .:? "sourceIsStructured"))
instance ToJSON UserAddress where
toJSON UserAddress'{..}
= object
(catMaybes
[("streetAddress" .=) <$> _uaStreetAddress,
("poBox" .=) <$> _uaPoBox,
("country" .=) <$> _uaCountry,
("postalCode" .=) <$> _uaPostalCode,
("formatted" .=) <$> _uaFormatted,
("extendedAddress" .=) <$> _uaExtendedAddress,
("locality" .=) <$> _uaLocality,
("primary" .=) <$> _uaPrimary,
("countryCode" .=) <$> _uaCountryCode,
("region" .=) <$> _uaRegion, ("type" .=) <$> _uaType,
("customType" .=) <$> _uaCustomType,
("sourceIsStructured" .=) <$> _uaSourceIsStructured])
data CustomerPostalAddress = CustomerPostalAddress'
{ _cpaOrganizationName :: !(Maybe Text)
, _cpaPostalCode :: !(Maybe Text)
, _cpaAddressLine1 :: !(Maybe Text)
, _cpaLocality :: !(Maybe Text)
, _cpaContactName :: !(Maybe Text)
, _cpaAddressLine2 :: !(Maybe Text)
, _cpaCountryCode :: !(Maybe Text)
, _cpaRegion :: !(Maybe Text)
, _cpaAddressLine3 :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
customerPostalAddress
:: CustomerPostalAddress
customerPostalAddress =
CustomerPostalAddress'
{ _cpaOrganizationName = Nothing
, _cpaPostalCode = Nothing
, _cpaAddressLine1 = Nothing
, _cpaLocality = Nothing
, _cpaContactName = Nothing
, _cpaAddressLine2 = Nothing
, _cpaCountryCode = Nothing
, _cpaRegion = Nothing
, _cpaAddressLine3 = Nothing
}
cpaOrganizationName :: Lens' CustomerPostalAddress (Maybe Text)
cpaOrganizationName
= lens _cpaOrganizationName
(\ s a -> s{_cpaOrganizationName = a})
cpaPostalCode :: Lens' CustomerPostalAddress (Maybe Text)
cpaPostalCode
= lens _cpaPostalCode
(\ s a -> s{_cpaPostalCode = a})
cpaAddressLine1 :: Lens' CustomerPostalAddress (Maybe Text)
cpaAddressLine1
= lens _cpaAddressLine1
(\ s a -> s{_cpaAddressLine1 = a})
cpaLocality :: Lens' CustomerPostalAddress (Maybe Text)
cpaLocality
= lens _cpaLocality (\ s a -> s{_cpaLocality = a})
cpaContactName :: Lens' CustomerPostalAddress (Maybe Text)
cpaContactName
= lens _cpaContactName
(\ s a -> s{_cpaContactName = a})
cpaAddressLine2 :: Lens' CustomerPostalAddress (Maybe Text)
cpaAddressLine2
= lens _cpaAddressLine2
(\ s a -> s{_cpaAddressLine2 = a})
cpaCountryCode :: Lens' CustomerPostalAddress (Maybe Text)
cpaCountryCode
= lens _cpaCountryCode
(\ s a -> s{_cpaCountryCode = a})
cpaRegion :: Lens' CustomerPostalAddress (Maybe Text)
cpaRegion
= lens _cpaRegion (\ s a -> s{_cpaRegion = a})
cpaAddressLine3 :: Lens' CustomerPostalAddress (Maybe Text)
cpaAddressLine3
= lens _cpaAddressLine3
(\ s a -> s{_cpaAddressLine3 = a})
instance FromJSON CustomerPostalAddress where
parseJSON
= withObject "CustomerPostalAddress"
(\ o ->
CustomerPostalAddress' <$>
(o .:? "organizationName") <*> (o .:? "postalCode")
<*> (o .:? "addressLine1")
<*> (o .:? "locality")
<*> (o .:? "contactName")
<*> (o .:? "addressLine2")
<*> (o .:? "countryCode")
<*> (o .:? "region")
<*> (o .:? "addressLine3"))
instance ToJSON CustomerPostalAddress where
toJSON CustomerPostalAddress'{..}
= object
(catMaybes
[("organizationName" .=) <$> _cpaOrganizationName,
("postalCode" .=) <$> _cpaPostalCode,
("addressLine1" .=) <$> _cpaAddressLine1,
("locality" .=) <$> _cpaLocality,
("contactName" .=) <$> _cpaContactName,
("addressLine2" .=) <$> _cpaAddressLine2,
("countryCode" .=) <$> _cpaCountryCode,
("region" .=) <$> _cpaRegion,
("addressLine3" .=) <$> _cpaAddressLine3])
data RoleAssignment = RoleAssignment'
{ _rolEtag :: !(Maybe Text)
, _rolScopeType :: !(Maybe Text)
, _rolKind :: !Text
, _rolAssignedTo :: !(Maybe Text)
, _rolRoleId :: !(Maybe (Textual Int64))
, _rolRoleAssignmentId :: !(Maybe (Textual Int64))
, _rolOrgUnitId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
roleAssignment
:: RoleAssignment
roleAssignment =
RoleAssignment'
{ _rolEtag = Nothing
, _rolScopeType = Nothing
, _rolKind = "admin#directory#roleAssignment"
, _rolAssignedTo = Nothing
, _rolRoleId = Nothing
, _rolRoleAssignmentId = Nothing
, _rolOrgUnitId = Nothing
}
rolEtag :: Lens' RoleAssignment (Maybe Text)
rolEtag = lens _rolEtag (\ s a -> s{_rolEtag = a})
rolScopeType :: Lens' RoleAssignment (Maybe Text)
rolScopeType
= lens _rolScopeType (\ s a -> s{_rolScopeType = a})
rolKind :: Lens' RoleAssignment Text
rolKind = lens _rolKind (\ s a -> s{_rolKind = a})
rolAssignedTo :: Lens' RoleAssignment (Maybe Text)
rolAssignedTo
= lens _rolAssignedTo
(\ s a -> s{_rolAssignedTo = a})
rolRoleId :: Lens' RoleAssignment (Maybe Int64)
rolRoleId
= lens _rolRoleId (\ s a -> s{_rolRoleId = a}) .
mapping _Coerce
rolRoleAssignmentId :: Lens' RoleAssignment (Maybe Int64)
rolRoleAssignmentId
= lens _rolRoleAssignmentId
(\ s a -> s{_rolRoleAssignmentId = a})
. mapping _Coerce
rolOrgUnitId :: Lens' RoleAssignment (Maybe Text)
rolOrgUnitId
= lens _rolOrgUnitId (\ s a -> s{_rolOrgUnitId = a})
instance FromJSON RoleAssignment where
parseJSON
= withObject "RoleAssignment"
(\ o ->
RoleAssignment' <$>
(o .:? "etag") <*> (o .:? "scopeType") <*>
(o .:? "kind" .!= "admin#directory#roleAssignment")
<*> (o .:? "assignedTo")
<*> (o .:? "roleId")
<*> (o .:? "roleAssignmentId")
<*> (o .:? "orgUnitId"))
instance ToJSON RoleAssignment where
toJSON RoleAssignment'{..}
= object
(catMaybes
[("etag" .=) <$> _rolEtag,
("scopeType" .=) <$> _rolScopeType,
Just ("kind" .= _rolKind),
("assignedTo" .=) <$> _rolAssignedTo,
("roleId" .=) <$> _rolRoleId,
("roleAssignmentId" .=) <$> _rolRoleAssignmentId,
("orgUnitId" .=) <$> _rolOrgUnitId])
data Group = Group'
{ _groEmail :: !(Maybe Text)
, _groEtag :: !(Maybe Text)
, _groDirectMembersCount :: !(Maybe (Textual Int64))
, _groKind :: !Text
, _groAliases :: !(Maybe [Text])
, _groNonEditableAliases :: !(Maybe [Text])
, _groName :: !(Maybe Text)
, _groAdminCreated :: !(Maybe Bool)
, _groId :: !(Maybe Text)
, _groDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
group'
:: Group
group' =
Group'
{ _groEmail = Nothing
, _groEtag = Nothing
, _groDirectMembersCount = Nothing
, _groKind = "admin#directory#group"
, _groAliases = Nothing
, _groNonEditableAliases = Nothing
, _groName = Nothing
, _groAdminCreated = Nothing
, _groId = Nothing
, _groDescription = Nothing
}
groEmail :: Lens' Group (Maybe Text)
groEmail = lens _groEmail (\ s a -> s{_groEmail = a})
groEtag :: Lens' Group (Maybe Text)
groEtag = lens _groEtag (\ s a -> s{_groEtag = a})
groDirectMembersCount :: Lens' Group (Maybe Int64)
groDirectMembersCount
= lens _groDirectMembersCount
(\ s a -> s{_groDirectMembersCount = a})
. mapping _Coerce
groKind :: Lens' Group Text
groKind = lens _groKind (\ s a -> s{_groKind = a})
groAliases :: Lens' Group [Text]
groAliases
= lens _groAliases (\ s a -> s{_groAliases = a}) .
_Default
. _Coerce
groNonEditableAliases :: Lens' Group [Text]
groNonEditableAliases
= lens _groNonEditableAliases
(\ s a -> s{_groNonEditableAliases = a})
. _Default
. _Coerce
groName :: Lens' Group (Maybe Text)
groName = lens _groName (\ s a -> s{_groName = a})
groAdminCreated :: Lens' Group (Maybe Bool)
groAdminCreated
= lens _groAdminCreated
(\ s a -> s{_groAdminCreated = a})
groId :: Lens' Group (Maybe Text)
groId = lens _groId (\ s a -> s{_groId = a})
groDescription :: Lens' Group (Maybe Text)
groDescription
= lens _groDescription
(\ s a -> s{_groDescription = a})
instance FromJSON Group where
parseJSON
= withObject "Group"
(\ o ->
Group' <$>
(o .:? "email") <*> (o .:? "etag") <*>
(o .:? "directMembersCount")
<*> (o .:? "kind" .!= "admin#directory#group")
<*> (o .:? "aliases" .!= mempty)
<*> (o .:? "nonEditableAliases" .!= mempty)
<*> (o .:? "name")
<*> (o .:? "adminCreated")
<*> (o .:? "id")
<*> (o .:? "description"))
instance ToJSON Group where
toJSON Group'{..}
= object
(catMaybes
[("email" .=) <$> _groEmail,
("etag" .=) <$> _groEtag,
("directMembersCount" .=) <$> _groDirectMembersCount,
Just ("kind" .= _groKind),
("aliases" .=) <$> _groAliases,
("nonEditableAliases" .=) <$> _groNonEditableAliases,
("name" .=) <$> _groName,
("adminCreated" .=) <$> _groAdminCreated,
("id" .=) <$> _groId,
("description" .=) <$> _groDescription])
data ChromeOSDevice = ChromeOSDevice'
{ _codStatus :: !(Maybe Text)
, _codEtag :: !(Maybe Text)
, _codAnnotatedUser :: !(Maybe Text)
, _codPlatformVersion :: !(Maybe Text)
, _codLastSync :: !(Maybe DateTime')
, _codActiveTimeRanges :: !(Maybe [ChromeOSDeviceActiveTimeRangesItem])
, _codKind :: !Text
, _codEthernetMACAddress :: !(Maybe Text)
, _codLastEnrollmentTime :: !(Maybe DateTime')
, _codAnnotatedLocation :: !(Maybe Text)
, _codMACAddress :: !(Maybe Text)
, _codOrgUnitPath :: !(Maybe Text)
, _codRecentUsers :: !(Maybe [ChromeOSDeviceRecentUsersItem])
, _codSupportEndDate :: !(Maybe DateTime')
, _codModel :: !(Maybe Text)
, _codWillAutoRenew :: !(Maybe Bool)
, _codMeid :: !(Maybe Text)
, _codDeviceId :: !(Maybe Text)
, _codBootMode :: !(Maybe Text)
, _codOrderNumber :: !(Maybe Text)
, _codAnnotatedAssetId :: !(Maybe Text)
, _codNotes :: !(Maybe Text)
, _codSerialNumber :: !(Maybe Text)
, _codFirmwareVersion :: !(Maybe Text)
, _codOSVersion :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
chromeOSDevice
:: ChromeOSDevice
chromeOSDevice =
ChromeOSDevice'
{ _codStatus = Nothing
, _codEtag = Nothing
, _codAnnotatedUser = Nothing
, _codPlatformVersion = Nothing
, _codLastSync = Nothing
, _codActiveTimeRanges = Nothing
, _codKind = "admin#directory#chromeosdevice"
, _codEthernetMACAddress = Nothing
, _codLastEnrollmentTime = Nothing
, _codAnnotatedLocation = Nothing
, _codMACAddress = Nothing
, _codOrgUnitPath = Nothing
, _codRecentUsers = Nothing
, _codSupportEndDate = Nothing
, _codModel = Nothing
, _codWillAutoRenew = Nothing
, _codMeid = Nothing
, _codDeviceId = Nothing
, _codBootMode = Nothing
, _codOrderNumber = Nothing
, _codAnnotatedAssetId = Nothing
, _codNotes = Nothing
, _codSerialNumber = Nothing
, _codFirmwareVersion = Nothing
, _codOSVersion = Nothing
}
codStatus :: Lens' ChromeOSDevice (Maybe Text)
codStatus
= lens _codStatus (\ s a -> s{_codStatus = a})
codEtag :: Lens' ChromeOSDevice (Maybe Text)
codEtag = lens _codEtag (\ s a -> s{_codEtag = a})
codAnnotatedUser :: Lens' ChromeOSDevice (Maybe Text)
codAnnotatedUser
= lens _codAnnotatedUser
(\ s a -> s{_codAnnotatedUser = a})
codPlatformVersion :: Lens' ChromeOSDevice (Maybe Text)
codPlatformVersion
= lens _codPlatformVersion
(\ s a -> s{_codPlatformVersion = a})
codLastSync :: Lens' ChromeOSDevice (Maybe UTCTime)
codLastSync
= lens _codLastSync (\ s a -> s{_codLastSync = a}) .
mapping _DateTime
codActiveTimeRanges :: Lens' ChromeOSDevice [ChromeOSDeviceActiveTimeRangesItem]
codActiveTimeRanges
= lens _codActiveTimeRanges
(\ s a -> s{_codActiveTimeRanges = a})
. _Default
. _Coerce
codKind :: Lens' ChromeOSDevice Text
codKind = lens _codKind (\ s a -> s{_codKind = a})
codEthernetMACAddress :: Lens' ChromeOSDevice (Maybe Text)
codEthernetMACAddress
= lens _codEthernetMACAddress
(\ s a -> s{_codEthernetMACAddress = a})
codLastEnrollmentTime :: Lens' ChromeOSDevice (Maybe UTCTime)
codLastEnrollmentTime
= lens _codLastEnrollmentTime
(\ s a -> s{_codLastEnrollmentTime = a})
. mapping _DateTime
codAnnotatedLocation :: Lens' ChromeOSDevice (Maybe Text)
codAnnotatedLocation
= lens _codAnnotatedLocation
(\ s a -> s{_codAnnotatedLocation = a})
codMACAddress :: Lens' ChromeOSDevice (Maybe Text)
codMACAddress
= lens _codMACAddress
(\ s a -> s{_codMACAddress = a})
codOrgUnitPath :: Lens' ChromeOSDevice (Maybe Text)
codOrgUnitPath
= lens _codOrgUnitPath
(\ s a -> s{_codOrgUnitPath = a})
codRecentUsers :: Lens' ChromeOSDevice [ChromeOSDeviceRecentUsersItem]
codRecentUsers
= lens _codRecentUsers
(\ s a -> s{_codRecentUsers = a})
. _Default
. _Coerce
codSupportEndDate :: Lens' ChromeOSDevice (Maybe UTCTime)
codSupportEndDate
= lens _codSupportEndDate
(\ s a -> s{_codSupportEndDate = a})
. mapping _DateTime
codModel :: Lens' ChromeOSDevice (Maybe Text)
codModel = lens _codModel (\ s a -> s{_codModel = a})
codWillAutoRenew :: Lens' ChromeOSDevice (Maybe Bool)
codWillAutoRenew
= lens _codWillAutoRenew
(\ s a -> s{_codWillAutoRenew = a})
codMeid :: Lens' ChromeOSDevice (Maybe Text)
codMeid = lens _codMeid (\ s a -> s{_codMeid = a})
codDeviceId :: Lens' ChromeOSDevice (Maybe Text)
codDeviceId
= lens _codDeviceId (\ s a -> s{_codDeviceId = a})
codBootMode :: Lens' ChromeOSDevice (Maybe Text)
codBootMode
= lens _codBootMode (\ s a -> s{_codBootMode = a})
codOrderNumber :: Lens' ChromeOSDevice (Maybe Text)
codOrderNumber
= lens _codOrderNumber
(\ s a -> s{_codOrderNumber = a})
codAnnotatedAssetId :: Lens' ChromeOSDevice (Maybe Text)
codAnnotatedAssetId
= lens _codAnnotatedAssetId
(\ s a -> s{_codAnnotatedAssetId = a})
codNotes :: Lens' ChromeOSDevice (Maybe Text)
codNotes = lens _codNotes (\ s a -> s{_codNotes = a})
codSerialNumber :: Lens' ChromeOSDevice (Maybe Text)
codSerialNumber
= lens _codSerialNumber
(\ s a -> s{_codSerialNumber = a})
codFirmwareVersion :: Lens' ChromeOSDevice (Maybe Text)
codFirmwareVersion
= lens _codFirmwareVersion
(\ s a -> s{_codFirmwareVersion = a})
codOSVersion :: Lens' ChromeOSDevice (Maybe Text)
codOSVersion
= lens _codOSVersion (\ s a -> s{_codOSVersion = a})
instance FromJSON ChromeOSDevice where
parseJSON
= withObject "ChromeOSDevice"
(\ o ->
ChromeOSDevice' <$>
(o .:? "status") <*> (o .:? "etag") <*>
(o .:? "annotatedUser")
<*> (o .:? "platformVersion")
<*> (o .:? "lastSync")
<*> (o .:? "activeTimeRanges" .!= mempty)
<*>
(o .:? "kind" .!= "admin#directory#chromeosdevice")
<*> (o .:? "ethernetMacAddress")
<*> (o .:? "lastEnrollmentTime")
<*> (o .:? "annotatedLocation")
<*> (o .:? "macAddress")
<*> (o .:? "orgUnitPath")
<*> (o .:? "recentUsers" .!= mempty)
<*> (o .:? "supportEndDate")
<*> (o .:? "model")
<*> (o .:? "willAutoRenew")
<*> (o .:? "meid")
<*> (o .:? "deviceId")
<*> (o .:? "bootMode")
<*> (o .:? "orderNumber")
<*> (o .:? "annotatedAssetId")
<*> (o .:? "notes")
<*> (o .:? "serialNumber")
<*> (o .:? "firmwareVersion")
<*> (o .:? "osVersion"))
instance ToJSON ChromeOSDevice where
toJSON ChromeOSDevice'{..}
= object
(catMaybes
[("status" .=) <$> _codStatus,
("etag" .=) <$> _codEtag,
("annotatedUser" .=) <$> _codAnnotatedUser,
("platformVersion" .=) <$> _codPlatformVersion,
("lastSync" .=) <$> _codLastSync,
("activeTimeRanges" .=) <$> _codActiveTimeRanges,
Just ("kind" .= _codKind),
("ethernetMacAddress" .=) <$> _codEthernetMACAddress,
("lastEnrollmentTime" .=) <$> _codLastEnrollmentTime,
("annotatedLocation" .=) <$> _codAnnotatedLocation,
("macAddress" .=) <$> _codMACAddress,
("orgUnitPath" .=) <$> _codOrgUnitPath,
("recentUsers" .=) <$> _codRecentUsers,
("supportEndDate" .=) <$> _codSupportEndDate,
("model" .=) <$> _codModel,
("willAutoRenew" .=) <$> _codWillAutoRenew,
("meid" .=) <$> _codMeid,
("deviceId" .=) <$> _codDeviceId,
("bootMode" .=) <$> _codBootMode,
("orderNumber" .=) <$> _codOrderNumber,
("annotatedAssetId" .=) <$> _codAnnotatedAssetId,
("notes" .=) <$> _codNotes,
("serialNumber" .=) <$> _codSerialNumber,
("firmwareVersion" .=) <$> _codFirmwareVersion,
("osVersion" .=) <$> _codOSVersion])
data Users = Users'
{ _uEtag :: !(Maybe Text)
, _uNextPageToken :: !(Maybe Text)
, _uUsers :: !(Maybe [User])
, _uKind :: !Text
, _uTriggerEvent :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
users
:: Users
users =
Users'
{ _uEtag = Nothing
, _uNextPageToken = Nothing
, _uUsers = Nothing
, _uKind = "admin#directory#users"
, _uTriggerEvent = Nothing
}
uEtag :: Lens' Users (Maybe Text)
uEtag = lens _uEtag (\ s a -> s{_uEtag = a})
uNextPageToken :: Lens' Users (Maybe Text)
uNextPageToken
= lens _uNextPageToken
(\ s a -> s{_uNextPageToken = a})
uUsers :: Lens' Users [User]
uUsers
= lens _uUsers (\ s a -> s{_uUsers = a}) . _Default .
_Coerce
uKind :: Lens' Users Text
uKind = lens _uKind (\ s a -> s{_uKind = a})
uTriggerEvent :: Lens' Users (Maybe Text)
uTriggerEvent
= lens _uTriggerEvent
(\ s a -> s{_uTriggerEvent = a})
instance FromJSON Users where
parseJSON
= withObject "Users"
(\ o ->
Users' <$>
(o .:? "etag") <*> (o .:? "nextPageToken") <*>
(o .:? "users" .!= mempty)
<*> (o .:? "kind" .!= "admin#directory#users")
<*> (o .:? "trigger_event"))
instance ToJSON Users where
toJSON Users'{..}
= object
(catMaybes
[("etag" .=) <$> _uEtag,
("nextPageToken" .=) <$> _uNextPageToken,
("users" .=) <$> _uUsers, Just ("kind" .= _uKind),
("trigger_event" .=) <$> _uTriggerEvent])
data Asp = Asp'
{ _aCreationTime :: !(Maybe (Textual Int64))
, _aEtag :: !(Maybe Text)
, _aCodeId :: !(Maybe (Textual Int32))
, _aKind :: !Text
, _aName :: !(Maybe Text)
, _aLastTimeUsed :: !(Maybe (Textual Int64))
, _aUserKey :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
asp
:: Asp
asp =
Asp'
{ _aCreationTime = Nothing
, _aEtag = Nothing
, _aCodeId = Nothing
, _aKind = "admin#directory#asp"
, _aName = Nothing
, _aLastTimeUsed = Nothing
, _aUserKey = Nothing
}
aCreationTime :: Lens' Asp (Maybe Int64)
aCreationTime
= lens _aCreationTime
(\ s a -> s{_aCreationTime = a})
. mapping _Coerce
aEtag :: Lens' Asp (Maybe Text)
aEtag = lens _aEtag (\ s a -> s{_aEtag = a})
aCodeId :: Lens' Asp (Maybe Int32)
aCodeId
= lens _aCodeId (\ s a -> s{_aCodeId = a}) .
mapping _Coerce
aKind :: Lens' Asp Text
aKind = lens _aKind (\ s a -> s{_aKind = a})
aName :: Lens' Asp (Maybe Text)
aName = lens _aName (\ s a -> s{_aName = a})
aLastTimeUsed :: Lens' Asp (Maybe Int64)
aLastTimeUsed
= lens _aLastTimeUsed
(\ s a -> s{_aLastTimeUsed = a})
. mapping _Coerce
aUserKey :: Lens' Asp (Maybe Text)
aUserKey = lens _aUserKey (\ s a -> s{_aUserKey = a})
instance FromJSON Asp where
parseJSON
= withObject "Asp"
(\ o ->
Asp' <$>
(o .:? "creationTime") <*> (o .:? "etag") <*>
(o .:? "codeId")
<*> (o .:? "kind" .!= "admin#directory#asp")
<*> (o .:? "name")
<*> (o .:? "lastTimeUsed")
<*> (o .:? "userKey"))
instance ToJSON Asp where
toJSON Asp'{..}
= object
(catMaybes
[("creationTime" .=) <$> _aCreationTime,
("etag" .=) <$> _aEtag, ("codeId" .=) <$> _aCodeId,
Just ("kind" .= _aKind), ("name" .=) <$> _aName,
("lastTimeUsed" .=) <$> _aLastTimeUsed,
("userKey" .=) <$> _aUserKey])
data Schemas = Schemas'
{ _sEtag :: !(Maybe Text)
, _sSchemas :: !(Maybe [Schema])
, _sKind :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
schemas
:: Schemas
schemas =
Schemas'
{ _sEtag = Nothing
, _sSchemas = Nothing
, _sKind = "admin#directory#schemas"
}
sEtag :: Lens' Schemas (Maybe Text)
sEtag = lens _sEtag (\ s a -> s{_sEtag = a})
sSchemas :: Lens' Schemas [Schema]
sSchemas
= lens _sSchemas (\ s a -> s{_sSchemas = a}) .
_Default
. _Coerce
sKind :: Lens' Schemas Text
sKind = lens _sKind (\ s a -> s{_sKind = a})
instance FromJSON Schemas where
parseJSON
= withObject "Schemas"
(\ o ->
Schemas' <$>
(o .:? "etag") <*> (o .:? "schemas" .!= mempty) <*>
(o .:? "kind" .!= "admin#directory#schemas"))
instance ToJSON Schemas where
toJSON Schemas'{..}
= object
(catMaybes
[("etag" .=) <$> _sEtag,
("schemas" .=) <$> _sSchemas,
Just ("kind" .= _sKind)])
data Notification = Notification'
{ _nSubject :: !(Maybe Text)
, _nEtag :: !(Maybe Text)
, _nKind :: !Text
, _nBody :: !(Maybe Text)
, _nFromAddress :: !(Maybe Text)
, _nIsUnread :: !(Maybe Bool)
, _nNotificationId :: !(Maybe Text)
, _nSendTime :: !(Maybe DateTime')
} deriving (Eq,Show,Data,Typeable,Generic)
notification
:: Notification
notification =
Notification'
{ _nSubject = Nothing
, _nEtag = Nothing
, _nKind = "admin#directory#notification"
, _nBody = Nothing
, _nFromAddress = Nothing
, _nIsUnread = Nothing
, _nNotificationId = Nothing
, _nSendTime = Nothing
}
nSubject :: Lens' Notification (Maybe Text)
nSubject = lens _nSubject (\ s a -> s{_nSubject = a})
nEtag :: Lens' Notification (Maybe Text)
nEtag = lens _nEtag (\ s a -> s{_nEtag = a})
nKind :: Lens' Notification Text
nKind = lens _nKind (\ s a -> s{_nKind = a})
nBody :: Lens' Notification (Maybe Text)
nBody = lens _nBody (\ s a -> s{_nBody = a})
nFromAddress :: Lens' Notification (Maybe Text)
nFromAddress
= lens _nFromAddress (\ s a -> s{_nFromAddress = a})
nIsUnread :: Lens' Notification (Maybe Bool)
nIsUnread
= lens _nIsUnread (\ s a -> s{_nIsUnread = a})
nNotificationId :: Lens' Notification (Maybe Text)
nNotificationId
= lens _nNotificationId
(\ s a -> s{_nNotificationId = a})
nSendTime :: Lens' Notification (Maybe UTCTime)
nSendTime
= lens _nSendTime (\ s a -> s{_nSendTime = a}) .
mapping _DateTime
instance FromJSON Notification where
parseJSON
= withObject "Notification"
(\ o ->
Notification' <$>
(o .:? "subject") <*> (o .:? "etag") <*>
(o .:? "kind" .!= "admin#directory#notification")
<*> (o .:? "body")
<*> (o .:? "fromAddress")
<*> (o .:? "isUnread")
<*> (o .:? "notificationId")
<*> (o .:? "sendTime"))
instance ToJSON Notification where
toJSON Notification'{..}
= object
(catMaybes
[("subject" .=) <$> _nSubject,
("etag" .=) <$> _nEtag, Just ("kind" .= _nKind),
("body" .=) <$> _nBody,
("fromAddress" .=) <$> _nFromAddress,
("isUnread" .=) <$> _nIsUnread,
("notificationId" .=) <$> _nNotificationId,
("sendTime" .=) <$> _nSendTime])
data UserIm = UserIm'
{ _uiIm :: !(Maybe Text)
, _uiProtocol :: !(Maybe Text)
, _uiPrimary :: !(Maybe Bool)
, _uiCustomProtocol :: !(Maybe Text)
, _uiType :: !(Maybe Text)
, _uiCustomType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
userIm
:: UserIm
userIm =
UserIm'
{ _uiIm = Nothing
, _uiProtocol = Nothing
, _uiPrimary = Nothing
, _uiCustomProtocol = Nothing
, _uiType = Nothing
, _uiCustomType = Nothing
}
uiIm :: Lens' UserIm (Maybe Text)
uiIm = lens _uiIm (\ s a -> s{_uiIm = a})
uiProtocol :: Lens' UserIm (Maybe Text)
uiProtocol
= lens _uiProtocol (\ s a -> s{_uiProtocol = a})
uiPrimary :: Lens' UserIm (Maybe Bool)
uiPrimary
= lens _uiPrimary (\ s a -> s{_uiPrimary = a})
uiCustomProtocol :: Lens' UserIm (Maybe Text)
uiCustomProtocol
= lens _uiCustomProtocol
(\ s a -> s{_uiCustomProtocol = a})
uiType :: Lens' UserIm (Maybe Text)
uiType = lens _uiType (\ s a -> s{_uiType = a})
uiCustomType :: Lens' UserIm (Maybe Text)
uiCustomType
= lens _uiCustomType (\ s a -> s{_uiCustomType = a})
instance FromJSON UserIm where
parseJSON
= withObject "UserIm"
(\ o ->
UserIm' <$>
(o .:? "im") <*> (o .:? "protocol") <*>
(o .:? "primary")
<*> (o .:? "customProtocol")
<*> (o .:? "type")
<*> (o .:? "customType"))
instance ToJSON UserIm where
toJSON UserIm'{..}
= object
(catMaybes
[("im" .=) <$> _uiIm,
("protocol" .=) <$> _uiProtocol,
("primary" .=) <$> _uiPrimary,
("customProtocol" .=) <$> _uiCustomProtocol,
("type" .=) <$> _uiType,
("customType" .=) <$> _uiCustomType])
data Tokens = Tokens'
{ _tEtag :: !(Maybe Text)
, _tKind :: !Text
, _tItems :: !(Maybe [Token])
} deriving (Eq,Show,Data,Typeable,Generic)
tokens
:: Tokens
tokens =
Tokens'
{ _tEtag = Nothing
, _tKind = "admin#directory#tokenList"
, _tItems = Nothing
}
tEtag :: Lens' Tokens (Maybe Text)
tEtag = lens _tEtag (\ s a -> s{_tEtag = a})
tKind :: Lens' Tokens Text
tKind = lens _tKind (\ s a -> s{_tKind = a})
tItems :: Lens' Tokens [Token]
tItems
= lens _tItems (\ s a -> s{_tItems = a}) . _Default .
_Coerce
instance FromJSON Tokens where
parseJSON
= withObject "Tokens"
(\ o ->
Tokens' <$>
(o .:? "etag") <*>
(o .:? "kind" .!= "admin#directory#tokenList")
<*> (o .:? "items" .!= mempty))
instance ToJSON Tokens where
toJSON Tokens'{..}
= object
(catMaybes
[("etag" .=) <$> _tEtag, Just ("kind" .= _tKind),
("items" .=) <$> _tItems])
newtype UserCustomSchemas = UserCustomSchemas'
{ _ucsAddtional :: HashMap Text UserCustomProperties
} deriving (Eq,Show,Data,Typeable,Generic)
userCustomSchemas
:: HashMap Text UserCustomProperties
-> UserCustomSchemas
userCustomSchemas pUcsAddtional_ =
UserCustomSchemas'
{ _ucsAddtional = _Coerce # pUcsAddtional_
}
ucsAddtional :: Lens' UserCustomSchemas (HashMap Text UserCustomProperties)
ucsAddtional
= lens _ucsAddtional (\ s a -> s{_ucsAddtional = a})
. _Coerce
instance FromJSON UserCustomSchemas where
parseJSON
= withObject "UserCustomSchemas"
(\ o -> UserCustomSchemas' <$> (parseJSONObject o))
instance ToJSON UserCustomSchemas where
toJSON = toJSON . _ucsAddtional
data DomainAliases = DomainAliases'
{ _daEtag :: !(Maybe Text)
, _daKind :: !Text
, _daDomainAliases :: !(Maybe [DomainAlias])
} deriving (Eq,Show,Data,Typeable,Generic)
domainAliases
:: DomainAliases
domainAliases =
DomainAliases'
{ _daEtag = Nothing
, _daKind = "admin#directory#domainAliases"
, _daDomainAliases = Nothing
}
daEtag :: Lens' DomainAliases (Maybe Text)
daEtag = lens _daEtag (\ s a -> s{_daEtag = a})
daKind :: Lens' DomainAliases Text
daKind = lens _daKind (\ s a -> s{_daKind = a})
daDomainAliases :: Lens' DomainAliases [DomainAlias]
daDomainAliases
= lens _daDomainAliases
(\ s a -> s{_daDomainAliases = a})
. _Default
. _Coerce
instance FromJSON DomainAliases where
parseJSON
= withObject "DomainAliases"
(\ o ->
DomainAliases' <$>
(o .:? "etag") <*>
(o .:? "kind" .!= "admin#directory#domainAliases")
<*> (o .:? "domainAliases" .!= mempty))
instance ToJSON DomainAliases where
toJSON DomainAliases'{..}
= object
(catMaybes
[("etag" .=) <$> _daEtag, Just ("kind" .= _daKind),
("domainAliases" .=) <$> _daDomainAliases])
data Aliases = Aliases'
{ _aliEtag :: !(Maybe Text)
, _aliKind :: !Text
, _aliAliases :: !(Maybe [JSONValue])
} deriving (Eq,Show,Data,Typeable,Generic)
aliases
:: Aliases
aliases =
Aliases'
{ _aliEtag = Nothing
, _aliKind = "admin#directory#aliases"
, _aliAliases = Nothing
}
aliEtag :: Lens' Aliases (Maybe Text)
aliEtag = lens _aliEtag (\ s a -> s{_aliEtag = a})
aliKind :: Lens' Aliases Text
aliKind = lens _aliKind (\ s a -> s{_aliKind = a})
aliAliases :: Lens' Aliases [JSONValue]
aliAliases
= lens _aliAliases (\ s a -> s{_aliAliases = a}) .
_Default
. _Coerce
instance FromJSON Aliases where
parseJSON
= withObject "Aliases"
(\ o ->
Aliases' <$>
(o .:? "etag") <*>
(o .:? "kind" .!= "admin#directory#aliases")
<*> (o .:? "aliases" .!= mempty))
instance ToJSON Aliases where
toJSON Aliases'{..}
= object
(catMaybes
[("etag" .=) <$> _aliEtag, Just ("kind" .= _aliKind),
("aliases" .=) <$> _aliAliases])
data CalendarResource = CalendarResource'
{ _crEtags :: !(Maybe Text)
, _crResourceId :: !(Maybe Text)
, _crResourceType :: !(Maybe Text)
, _crResourceName :: !(Maybe Text)
, _crKind :: !Text
, _crResourceEmail :: !(Maybe Text)
, _crResourceDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
calendarResource
:: CalendarResource
calendarResource =
CalendarResource'
{ _crEtags = Nothing
, _crResourceId = Nothing
, _crResourceType = Nothing
, _crResourceName = Nothing
, _crKind = "admin#directory#resources#calendars#CalendarResource"
, _crResourceEmail = Nothing
, _crResourceDescription = Nothing
}
crEtags :: Lens' CalendarResource (Maybe Text)
crEtags = lens _crEtags (\ s a -> s{_crEtags = a})
crResourceId :: Lens' CalendarResource (Maybe Text)
crResourceId
= lens _crResourceId (\ s a -> s{_crResourceId = a})
crResourceType :: Lens' CalendarResource (Maybe Text)
crResourceType
= lens _crResourceType
(\ s a -> s{_crResourceType = a})
crResourceName :: Lens' CalendarResource (Maybe Text)
crResourceName
= lens _crResourceName
(\ s a -> s{_crResourceName = a})
crKind :: Lens' CalendarResource Text
crKind = lens _crKind (\ s a -> s{_crKind = a})
crResourceEmail :: Lens' CalendarResource (Maybe Text)
crResourceEmail
= lens _crResourceEmail
(\ s a -> s{_crResourceEmail = a})
crResourceDescription :: Lens' CalendarResource (Maybe Text)
crResourceDescription
= lens _crResourceDescription
(\ s a -> s{_crResourceDescription = a})
instance FromJSON CalendarResource where
parseJSON
= withObject "CalendarResource"
(\ o ->
CalendarResource' <$>
(o .:? "etags") <*> (o .:? "resourceId") <*>
(o .:? "resourceType")
<*> (o .:? "resourceName")
<*>
(o .:? "kind" .!=
"admin#directory#resources#calendars#CalendarResource")
<*> (o .:? "resourceEmail")
<*> (o .:? "resourceDescription"))
instance ToJSON CalendarResource where
toJSON CalendarResource'{..}
= object
(catMaybes
[("etags" .=) <$> _crEtags,
("resourceId" .=) <$> _crResourceId,
("resourceType" .=) <$> _crResourceType,
("resourceName" .=) <$> _crResourceName,
Just ("kind" .= _crKind),
("resourceEmail" .=) <$> _crResourceEmail,
("resourceDescription" .=) <$>
_crResourceDescription])
newtype UserUndelete = UserUndelete'
{ _uuOrgUnitPath :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
userUndelete
:: UserUndelete
userUndelete =
UserUndelete'
{ _uuOrgUnitPath = Nothing
}
uuOrgUnitPath :: Lens' UserUndelete (Maybe Text)
uuOrgUnitPath
= lens _uuOrgUnitPath
(\ s a -> s{_uuOrgUnitPath = a})
instance FromJSON UserUndelete where
parseJSON
= withObject "UserUndelete"
(\ o -> UserUndelete' <$> (o .:? "orgUnitPath"))
instance ToJSON UserUndelete where
toJSON UserUndelete'{..}
= object
(catMaybes [("orgUnitPath" .=) <$> _uuOrgUnitPath])
data Members = Members'
{ _mEtag :: !(Maybe Text)
, _mNextPageToken :: !(Maybe Text)
, _mKind :: !Text
, _mMembers :: !(Maybe [Member])
} deriving (Eq,Show,Data,Typeable,Generic)
members
:: Members
members =
Members'
{ _mEtag = Nothing
, _mNextPageToken = Nothing
, _mKind = "admin#directory#members"
, _mMembers = Nothing
}
mEtag :: Lens' Members (Maybe Text)
mEtag = lens _mEtag (\ s a -> s{_mEtag = a})
mNextPageToken :: Lens' Members (Maybe Text)
mNextPageToken
= lens _mNextPageToken
(\ s a -> s{_mNextPageToken = a})
mKind :: Lens' Members Text
mKind = lens _mKind (\ s a -> s{_mKind = a})
mMembers :: Lens' Members [Member]
mMembers
= lens _mMembers (\ s a -> s{_mMembers = a}) .
_Default
. _Coerce
instance FromJSON Members where
parseJSON
= withObject "Members"
(\ o ->
Members' <$>
(o .:? "etag") <*> (o .:? "nextPageToken") <*>
(o .:? "kind" .!= "admin#directory#members")
<*> (o .:? "members" .!= mempty))
instance ToJSON Members where
toJSON Members'{..}
= object
(catMaybes
[("etag" .=) <$> _mEtag,
("nextPageToken" .=) <$> _mNextPageToken,
Just ("kind" .= _mKind),
("members" .=) <$> _mMembers])
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])
data MobileDevices = MobileDevices'
{ _mdEtag :: !(Maybe Text)
, _mdNextPageToken :: !(Maybe Text)
, _mdKind :: !Text
, _mdMobileDevices :: !(Maybe [MobileDevice])
} deriving (Eq,Show,Data,Typeable,Generic)
mobileDevices
:: MobileDevices
mobileDevices =
MobileDevices'
{ _mdEtag = Nothing
, _mdNextPageToken = Nothing
, _mdKind = "admin#directory#mobiledevices"
, _mdMobileDevices = Nothing
}
mdEtag :: Lens' MobileDevices (Maybe Text)
mdEtag = lens _mdEtag (\ s a -> s{_mdEtag = a})
mdNextPageToken :: Lens' MobileDevices (Maybe Text)
mdNextPageToken
= lens _mdNextPageToken
(\ s a -> s{_mdNextPageToken = a})
mdKind :: Lens' MobileDevices Text
mdKind = lens _mdKind (\ s a -> s{_mdKind = a})
mdMobileDevices :: Lens' MobileDevices [MobileDevice]
mdMobileDevices
= lens _mdMobileDevices
(\ s a -> s{_mdMobileDevices = a})
. _Default
. _Coerce
instance FromJSON MobileDevices where
parseJSON
= withObject "MobileDevices"
(\ o ->
MobileDevices' <$>
(o .:? "etag") <*> (o .:? "nextPageToken") <*>
(o .:? "kind" .!= "admin#directory#mobiledevices")
<*> (o .:? "mobiledevices" .!= mempty))
instance ToJSON MobileDevices where
toJSON MobileDevices'{..}
= object
(catMaybes
[("etag" .=) <$> _mdEtag,
("nextPageToken" .=) <$> _mdNextPageToken,
Just ("kind" .= _mdKind),
("mobiledevices" .=) <$> _mdMobileDevices])
data Token = Token'
{ _tokClientId :: !(Maybe Text)
, _tokEtag :: !(Maybe Text)
, _tokDisplayText :: !(Maybe Text)
, _tokKind :: !Text
, _tokScopes :: !(Maybe [Text])
, _tokNATiveApp :: !(Maybe Bool)
, _tokAnonymous :: !(Maybe Bool)
, _tokUserKey :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
token
:: Token
token =
Token'
{ _tokClientId = Nothing
, _tokEtag = Nothing
, _tokDisplayText = Nothing
, _tokKind = "admin#directory#token"
, _tokScopes = Nothing
, _tokNATiveApp = Nothing
, _tokAnonymous = Nothing
, _tokUserKey = Nothing
}
tokClientId :: Lens' Token (Maybe Text)
tokClientId
= lens _tokClientId (\ s a -> s{_tokClientId = a})
tokEtag :: Lens' Token (Maybe Text)
tokEtag = lens _tokEtag (\ s a -> s{_tokEtag = a})
tokDisplayText :: Lens' Token (Maybe Text)
tokDisplayText
= lens _tokDisplayText
(\ s a -> s{_tokDisplayText = a})
tokKind :: Lens' Token Text
tokKind = lens _tokKind (\ s a -> s{_tokKind = a})
tokScopes :: Lens' Token [Text]
tokScopes
= lens _tokScopes (\ s a -> s{_tokScopes = a}) .
_Default
. _Coerce
tokNATiveApp :: Lens' Token (Maybe Bool)
tokNATiveApp
= lens _tokNATiveApp (\ s a -> s{_tokNATiveApp = a})
tokAnonymous :: Lens' Token (Maybe Bool)
tokAnonymous
= lens _tokAnonymous (\ s a -> s{_tokAnonymous = a})
tokUserKey :: Lens' Token (Maybe Text)
tokUserKey
= lens _tokUserKey (\ s a -> s{_tokUserKey = a})
instance FromJSON Token where
parseJSON
= withObject "Token"
(\ o ->
Token' <$>
(o .:? "clientId") <*> (o .:? "etag") <*>
(o .:? "displayText")
<*> (o .:? "kind" .!= "admin#directory#token")
<*> (o .:? "scopes" .!= mempty)
<*> (o .:? "nativeApp")
<*> (o .:? "anonymous")
<*> (o .:? "userKey"))
instance ToJSON Token where
toJSON Token'{..}
= object
(catMaybes
[("clientId" .=) <$> _tokClientId,
("etag" .=) <$> _tokEtag,
("displayText" .=) <$> _tokDisplayText,
Just ("kind" .= _tokKind),
("scopes" .=) <$> _tokScopes,
("nativeApp" .=) <$> _tokNATiveApp,
("anonymous" .=) <$> _tokAnonymous,
("userKey" .=) <$> _tokUserKey])
data UserName = UserName'
{ _unGivenName :: !(Maybe Text)
, _unFullName :: !(Maybe Text)
, _unFamilyName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
userName
:: UserName
userName =
UserName'
{ _unGivenName = Nothing
, _unFullName = Nothing
, _unFamilyName = Nothing
}
unGivenName :: Lens' UserName (Maybe Text)
unGivenName
= lens _unGivenName (\ s a -> s{_unGivenName = a})
unFullName :: Lens' UserName (Maybe Text)
unFullName
= lens _unFullName (\ s a -> s{_unFullName = a})
unFamilyName :: Lens' UserName (Maybe Text)
unFamilyName
= lens _unFamilyName (\ s a -> s{_unFamilyName = a})
instance FromJSON UserName where
parseJSON
= withObject "UserName"
(\ o ->
UserName' <$>
(o .:? "givenName") <*> (o .:? "fullName") <*>
(o .:? "familyName"))
instance ToJSON UserName where
toJSON UserName'{..}
= object
(catMaybes
[("givenName" .=) <$> _unGivenName,
("fullName" .=) <$> _unFullName,
("familyName" .=) <$> _unFamilyName])
data ChromeOSDeviceRecentUsersItem = ChromeOSDeviceRecentUsersItem'
{ _codruiEmail :: !(Maybe Text)
, _codruiType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
chromeOSDeviceRecentUsersItem
:: ChromeOSDeviceRecentUsersItem
chromeOSDeviceRecentUsersItem =
ChromeOSDeviceRecentUsersItem'
{ _codruiEmail = Nothing
, _codruiType = Nothing
}
codruiEmail :: Lens' ChromeOSDeviceRecentUsersItem (Maybe Text)
codruiEmail
= lens _codruiEmail (\ s a -> s{_codruiEmail = a})
codruiType :: Lens' ChromeOSDeviceRecentUsersItem (Maybe Text)
codruiType
= lens _codruiType (\ s a -> s{_codruiType = a})
instance FromJSON ChromeOSDeviceRecentUsersItem where
parseJSON
= withObject "ChromeOSDeviceRecentUsersItem"
(\ o ->
ChromeOSDeviceRecentUsersItem' <$>
(o .:? "email") <*> (o .:? "type"))
instance ToJSON ChromeOSDeviceRecentUsersItem where
toJSON ChromeOSDeviceRecentUsersItem'{..}
= object
(catMaybes
[("email" .=) <$> _codruiEmail,
("type" .=) <$> _codruiType])
data DomainAlias = DomainAlias'
{ _dCreationTime :: !(Maybe (Textual Int64))
, _dEtag :: !(Maybe Text)
, _dKind :: !Text
, _dVerified :: !(Maybe Bool)
, _dDomainAliasName :: !(Maybe Text)
, _dParentDomainName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
domainAlias
:: DomainAlias
domainAlias =
DomainAlias'
{ _dCreationTime = Nothing
, _dEtag = Nothing
, _dKind = "admin#directory#domainAlias"
, _dVerified = Nothing
, _dDomainAliasName = Nothing
, _dParentDomainName = Nothing
}
dCreationTime :: Lens' DomainAlias (Maybe Int64)
dCreationTime
= lens _dCreationTime
(\ s a -> s{_dCreationTime = a})
. mapping _Coerce
dEtag :: Lens' DomainAlias (Maybe Text)
dEtag = lens _dEtag (\ s a -> s{_dEtag = a})
dKind :: Lens' DomainAlias Text
dKind = lens _dKind (\ s a -> s{_dKind = a})
dVerified :: Lens' DomainAlias (Maybe Bool)
dVerified
= lens _dVerified (\ s a -> s{_dVerified = a})
dDomainAliasName :: Lens' DomainAlias (Maybe Text)
dDomainAliasName
= lens _dDomainAliasName
(\ s a -> s{_dDomainAliasName = a})
dParentDomainName :: Lens' DomainAlias (Maybe Text)
dParentDomainName
= lens _dParentDomainName
(\ s a -> s{_dParentDomainName = a})
instance FromJSON DomainAlias where
parseJSON
= withObject "DomainAlias"
(\ o ->
DomainAlias' <$>
(o .:? "creationTime") <*> (o .:? "etag") <*>
(o .:? "kind" .!= "admin#directory#domainAlias")
<*> (o .:? "verified")
<*> (o .:? "domainAliasName")
<*> (o .:? "parentDomainName"))
instance ToJSON DomainAlias where
toJSON DomainAlias'{..}
= object
(catMaybes
[("creationTime" .=) <$> _dCreationTime,
("etag" .=) <$> _dEtag, Just ("kind" .= _dKind),
("verified" .=) <$> _dVerified,
("domainAliasName" .=) <$> _dDomainAliasName,
("parentDomainName" .=) <$> _dParentDomainName])
data Alias = Alias'
{ _aaEtag :: !(Maybe Text)
, _aaKind :: !Text
, _aaAlias :: !(Maybe Text)
, _aaId :: !(Maybe Text)
, _aaPrimaryEmail :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
alias
:: Alias
alias =
Alias'
{ _aaEtag = Nothing
, _aaKind = "admin#directory#alias"
, _aaAlias = Nothing
, _aaId = Nothing
, _aaPrimaryEmail = Nothing
}
aaEtag :: Lens' Alias (Maybe Text)
aaEtag = lens _aaEtag (\ s a -> s{_aaEtag = a})
aaKind :: Lens' Alias Text
aaKind = lens _aaKind (\ s a -> s{_aaKind = a})
aaAlias :: Lens' Alias (Maybe Text)
aaAlias = lens _aaAlias (\ s a -> s{_aaAlias = a})
aaId :: Lens' Alias (Maybe Text)
aaId = lens _aaId (\ s a -> s{_aaId = a})
aaPrimaryEmail :: Lens' Alias (Maybe Text)
aaPrimaryEmail
= lens _aaPrimaryEmail
(\ s a -> s{_aaPrimaryEmail = a})
instance FromJSON Alias where
parseJSON
= withObject "Alias"
(\ o ->
Alias' <$>
(o .:? "etag") <*>
(o .:? "kind" .!= "admin#directory#alias")
<*> (o .:? "alias")
<*> (o .:? "id")
<*> (o .:? "primaryEmail"))
instance ToJSON Alias where
toJSON Alias'{..}
= object
(catMaybes
[("etag" .=) <$> _aaEtag, Just ("kind" .= _aaKind),
("alias" .=) <$> _aaAlias, ("id" .=) <$> _aaId,
("primaryEmail" .=) <$> _aaPrimaryEmail])
data Schema = Schema'
{ _schEtag :: !(Maybe Text)
, _schKind :: !Text
, _schSchemaName :: !(Maybe Text)
, _schSchemaId :: !(Maybe Text)
, _schFields :: !(Maybe [SchemaFieldSpec])
} deriving (Eq,Show,Data,Typeable,Generic)
schema
:: Schema
schema =
Schema'
{ _schEtag = Nothing
, _schKind = "admin#directory#schema"
, _schSchemaName = Nothing
, _schSchemaId = Nothing
, _schFields = Nothing
}
schEtag :: Lens' Schema (Maybe Text)
schEtag = lens _schEtag (\ s a -> s{_schEtag = a})
schKind :: Lens' Schema Text
schKind = lens _schKind (\ s a -> s{_schKind = a})
schSchemaName :: Lens' Schema (Maybe Text)
schSchemaName
= lens _schSchemaName
(\ s a -> s{_schSchemaName = a})
schSchemaId :: Lens' Schema (Maybe Text)
schSchemaId
= lens _schSchemaId (\ s a -> s{_schSchemaId = a})
schFields :: Lens' Schema [SchemaFieldSpec]
schFields
= lens _schFields (\ s a -> s{_schFields = a}) .
_Default
. _Coerce
instance FromJSON Schema where
parseJSON
= withObject "Schema"
(\ o ->
Schema' <$>
(o .:? "etag") <*>
(o .:? "kind" .!= "admin#directory#schema")
<*> (o .:? "schemaName")
<*> (o .:? "schemaId")
<*> (o .:? "fields" .!= mempty))
instance ToJSON Schema where
toJSON Schema'{..}
= object
(catMaybes
[("etag" .=) <$> _schEtag, Just ("kind" .= _schKind),
("schemaName" .=) <$> _schSchemaName,
("schemaId" .=) <$> _schSchemaId,
("fields" .=) <$> _schFields])
data User = User'
{ _useCreationTime :: !(Maybe DateTime')
, _useLastLoginTime :: !(Maybe DateTime')
, _useThumbnailPhotoEtag :: !(Maybe Text)
, _useEtag :: !(Maybe Text)
, _useIPWhiteListed :: !(Maybe Bool)
, _useRelations :: !(Maybe JSONValue)
, _useHashFunction :: !(Maybe Text)
, _useKind :: !Text
, _useChangePasswordAtNextLogin :: !(Maybe Bool)
, _useWebsites :: !(Maybe JSONValue)
, _useAddresses :: !(Maybe JSONValue)
, _useAliases :: !(Maybe [Text])
, _useThumbnailPhotoURL :: !(Maybe Text)
, _useExternalIds :: !(Maybe JSONValue)
, _useSuspended :: !(Maybe Bool)
, _useAgreedToTerms :: !(Maybe Bool)
, _useDeletionTime :: !(Maybe DateTime')
, _useNonEditableAliases :: !(Maybe [Text])
, _useOrgUnitPath :: !(Maybe Text)
, _useCustomerId :: !(Maybe Text)
, _useIncludeInGlobalAddressList :: !(Maybe Bool)
, _usePhones :: !(Maybe JSONValue)
, _useName :: !(Maybe UserName)
, _usePassword :: !(Maybe Text)
, _useEmails :: !(Maybe JSONValue)
, _useIms :: !(Maybe JSONValue)
, _useIsAdmin :: !(Maybe Bool)
, _useIsEnrolledIn2Sv :: !(Maybe Bool)
, _useId :: !(Maybe Text)
, _useOrganizations :: !(Maybe JSONValue)
, _usePrimaryEmail :: !(Maybe Text)
, _useIsEnforcedIn2Sv :: !(Maybe Bool)
, _useNotes :: !(Maybe JSONValue)
, _useIsDelegatedAdmin :: !(Maybe Bool)
, _useIsMailboxSetup :: !(Maybe Bool)
, _useCustomSchemas :: !(Maybe UserCustomSchemas)
, _useSuspensionReason :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
user
:: User
user =
User'
{ _useCreationTime = Nothing
, _useLastLoginTime = Nothing
, _useThumbnailPhotoEtag = Nothing
, _useEtag = Nothing
, _useIPWhiteListed = Nothing
, _useRelations = Nothing
, _useHashFunction = Nothing
, _useKind = "admin#directory#user"
, _useChangePasswordAtNextLogin = Nothing
, _useWebsites = Nothing
, _useAddresses = Nothing
, _useAliases = Nothing
, _useThumbnailPhotoURL = Nothing
, _useExternalIds = Nothing
, _useSuspended = Nothing
, _useAgreedToTerms = Nothing
, _useDeletionTime = Nothing
, _useNonEditableAliases = Nothing
, _useOrgUnitPath = Nothing
, _useCustomerId = Nothing
, _useIncludeInGlobalAddressList = Nothing
, _usePhones = Nothing
, _useName = Nothing
, _usePassword = Nothing
, _useEmails = Nothing
, _useIms = Nothing
, _useIsAdmin = Nothing
, _useIsEnrolledIn2Sv = Nothing
, _useId = Nothing
, _useOrganizations = Nothing
, _usePrimaryEmail = Nothing
, _useIsEnforcedIn2Sv = Nothing
, _useNotes = Nothing
, _useIsDelegatedAdmin = Nothing
, _useIsMailboxSetup = Nothing
, _useCustomSchemas = Nothing
, _useSuspensionReason = Nothing
}
useCreationTime :: Lens' User (Maybe UTCTime)
useCreationTime
= lens _useCreationTime
(\ s a -> s{_useCreationTime = a})
. mapping _DateTime
useLastLoginTime :: Lens' User (Maybe UTCTime)
useLastLoginTime
= lens _useLastLoginTime
(\ s a -> s{_useLastLoginTime = a})
. mapping _DateTime
useThumbnailPhotoEtag :: Lens' User (Maybe Text)
useThumbnailPhotoEtag
= lens _useThumbnailPhotoEtag
(\ s a -> s{_useThumbnailPhotoEtag = a})
useEtag :: Lens' User (Maybe Text)
useEtag = lens _useEtag (\ s a -> s{_useEtag = a})
useIPWhiteListed :: Lens' User (Maybe Bool)
useIPWhiteListed
= lens _useIPWhiteListed
(\ s a -> s{_useIPWhiteListed = a})
useRelations :: Lens' User (Maybe JSONValue)
useRelations
= lens _useRelations (\ s a -> s{_useRelations = a})
useHashFunction :: Lens' User (Maybe Text)
useHashFunction
= lens _useHashFunction
(\ s a -> s{_useHashFunction = a})
useKind :: Lens' User Text
useKind = lens _useKind (\ s a -> s{_useKind = a})
useChangePasswordAtNextLogin :: Lens' User (Maybe Bool)
useChangePasswordAtNextLogin
= lens _useChangePasswordAtNextLogin
(\ s a -> s{_useChangePasswordAtNextLogin = a})
useWebsites :: Lens' User (Maybe JSONValue)
useWebsites
= lens _useWebsites (\ s a -> s{_useWebsites = a})
useAddresses :: Lens' User (Maybe JSONValue)
useAddresses
= lens _useAddresses (\ s a -> s{_useAddresses = a})
useAliases :: Lens' User [Text]
useAliases
= lens _useAliases (\ s a -> s{_useAliases = a}) .
_Default
. _Coerce
useThumbnailPhotoURL :: Lens' User (Maybe Text)
useThumbnailPhotoURL
= lens _useThumbnailPhotoURL
(\ s a -> s{_useThumbnailPhotoURL = a})
useExternalIds :: Lens' User (Maybe JSONValue)
useExternalIds
= lens _useExternalIds
(\ s a -> s{_useExternalIds = a})
useSuspended :: Lens' User (Maybe Bool)
useSuspended
= lens _useSuspended (\ s a -> s{_useSuspended = a})
useAgreedToTerms :: Lens' User (Maybe Bool)
useAgreedToTerms
= lens _useAgreedToTerms
(\ s a -> s{_useAgreedToTerms = a})
useDeletionTime :: Lens' User (Maybe UTCTime)
useDeletionTime
= lens _useDeletionTime
(\ s a -> s{_useDeletionTime = a})
. mapping _DateTime
useNonEditableAliases :: Lens' User [Text]
useNonEditableAliases
= lens _useNonEditableAliases
(\ s a -> s{_useNonEditableAliases = a})
. _Default
. _Coerce
useOrgUnitPath :: Lens' User (Maybe Text)
useOrgUnitPath
= lens _useOrgUnitPath
(\ s a -> s{_useOrgUnitPath = a})
useCustomerId :: Lens' User (Maybe Text)
useCustomerId
= lens _useCustomerId
(\ s a -> s{_useCustomerId = a})
useIncludeInGlobalAddressList :: Lens' User (Maybe Bool)
useIncludeInGlobalAddressList
= lens _useIncludeInGlobalAddressList
(\ s a -> s{_useIncludeInGlobalAddressList = a})
usePhones :: Lens' User (Maybe JSONValue)
usePhones
= lens _usePhones (\ s a -> s{_usePhones = a})
useName :: Lens' User (Maybe UserName)
useName = lens _useName (\ s a -> s{_useName = a})
usePassword :: Lens' User (Maybe Text)
usePassword
= lens _usePassword (\ s a -> s{_usePassword = a})
useEmails :: Lens' User (Maybe JSONValue)
useEmails
= lens _useEmails (\ s a -> s{_useEmails = a})
useIms :: Lens' User (Maybe JSONValue)
useIms = lens _useIms (\ s a -> s{_useIms = a})
useIsAdmin :: Lens' User (Maybe Bool)
useIsAdmin
= lens _useIsAdmin (\ s a -> s{_useIsAdmin = a})
useIsEnrolledIn2Sv :: Lens' User (Maybe Bool)
useIsEnrolledIn2Sv
= lens _useIsEnrolledIn2Sv
(\ s a -> s{_useIsEnrolledIn2Sv = a})
useId :: Lens' User (Maybe Text)
useId = lens _useId (\ s a -> s{_useId = a})
useOrganizations :: Lens' User (Maybe JSONValue)
useOrganizations
= lens _useOrganizations
(\ s a -> s{_useOrganizations = a})
usePrimaryEmail :: Lens' User (Maybe Text)
usePrimaryEmail
= lens _usePrimaryEmail
(\ s a -> s{_usePrimaryEmail = a})
useIsEnforcedIn2Sv :: Lens' User (Maybe Bool)
useIsEnforcedIn2Sv
= lens _useIsEnforcedIn2Sv
(\ s a -> s{_useIsEnforcedIn2Sv = a})
useNotes :: Lens' User (Maybe JSONValue)
useNotes = lens _useNotes (\ s a -> s{_useNotes = a})
useIsDelegatedAdmin :: Lens' User (Maybe Bool)
useIsDelegatedAdmin
= lens _useIsDelegatedAdmin
(\ s a -> s{_useIsDelegatedAdmin = a})
useIsMailboxSetup :: Lens' User (Maybe Bool)
useIsMailboxSetup
= lens _useIsMailboxSetup
(\ s a -> s{_useIsMailboxSetup = a})
useCustomSchemas :: Lens' User (Maybe UserCustomSchemas)
useCustomSchemas
= lens _useCustomSchemas
(\ s a -> s{_useCustomSchemas = a})
useSuspensionReason :: Lens' User (Maybe Text)
useSuspensionReason
= lens _useSuspensionReason
(\ s a -> s{_useSuspensionReason = a})
instance FromJSON User where
parseJSON
= withObject "User"
(\ o ->
User' <$>
(o .:? "creationTime") <*> (o .:? "lastLoginTime")
<*> (o .:? "thumbnailPhotoEtag")
<*> (o .:? "etag")
<*> (o .:? "ipWhitelisted")
<*> (o .:? "relations")
<*> (o .:? "hashFunction")
<*> (o .:? "kind" .!= "admin#directory#user")
<*> (o .:? "changePasswordAtNextLogin")
<*> (o .:? "websites")
<*> (o .:? "addresses")
<*> (o .:? "aliases" .!= mempty)
<*> (o .:? "thumbnailPhotoUrl")
<*> (o .:? "externalIds")
<*> (o .:? "suspended")
<*> (o .:? "agreedToTerms")
<*> (o .:? "deletionTime")
<*> (o .:? "nonEditableAliases" .!= mempty)
<*> (o .:? "orgUnitPath")
<*> (o .:? "customerId")
<*> (o .:? "includeInGlobalAddressList")
<*> (o .:? "phones")
<*> (o .:? "name")
<*> (o .:? "password")
<*> (o .:? "emails")
<*> (o .:? "ims")
<*> (o .:? "isAdmin")
<*> (o .:? "isEnrolledIn2Sv")
<*> (o .:? "id")
<*> (o .:? "organizations")
<*> (o .:? "primaryEmail")
<*> (o .:? "isEnforcedIn2Sv")
<*> (o .:? "notes")
<*> (o .:? "isDelegatedAdmin")
<*> (o .:? "isMailboxSetup")
<*> (o .:? "customSchemas")
<*> (o .:? "suspensionReason"))
instance ToJSON User where
toJSON User'{..}
= object
(catMaybes
[("creationTime" .=) <$> _useCreationTime,
("lastLoginTime" .=) <$> _useLastLoginTime,
("thumbnailPhotoEtag" .=) <$> _useThumbnailPhotoEtag,
("etag" .=) <$> _useEtag,
("ipWhitelisted" .=) <$> _useIPWhiteListed,
("relations" .=) <$> _useRelations,
("hashFunction" .=) <$> _useHashFunction,
Just ("kind" .= _useKind),
("changePasswordAtNextLogin" .=) <$>
_useChangePasswordAtNextLogin,
("websites" .=) <$> _useWebsites,
("addresses" .=) <$> _useAddresses,
("aliases" .=) <$> _useAliases,
("thumbnailPhotoUrl" .=) <$> _useThumbnailPhotoURL,
("externalIds" .=) <$> _useExternalIds,
("suspended" .=) <$> _useSuspended,
("agreedToTerms" .=) <$> _useAgreedToTerms,
("deletionTime" .=) <$> _useDeletionTime,
("nonEditableAliases" .=) <$> _useNonEditableAliases,
("orgUnitPath" .=) <$> _useOrgUnitPath,
("customerId" .=) <$> _useCustomerId,
("includeInGlobalAddressList" .=) <$>
_useIncludeInGlobalAddressList,
("phones" .=) <$> _usePhones,
("name" .=) <$> _useName,
("password" .=) <$> _usePassword,
("emails" .=) <$> _useEmails, ("ims" .=) <$> _useIms,
("isAdmin" .=) <$> _useIsAdmin,
("isEnrolledIn2Sv" .=) <$> _useIsEnrolledIn2Sv,
("id" .=) <$> _useId,
("organizations" .=) <$> _useOrganizations,
("primaryEmail" .=) <$> _usePrimaryEmail,
("isEnforcedIn2Sv" .=) <$> _useIsEnforcedIn2Sv,
("notes" .=) <$> _useNotes,
("isDelegatedAdmin" .=) <$> _useIsDelegatedAdmin,
("isMailboxSetup" .=) <$> _useIsMailboxSetup,
("customSchemas" .=) <$> _useCustomSchemas,
("suspensionReason" .=) <$> _useSuspensionReason])
data ChromeOSDeviceAction = ChromeOSDeviceAction'
{ _codaAction :: !(Maybe Text)
, _codaDeprovisionReason :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
chromeOSDeviceAction
:: ChromeOSDeviceAction
chromeOSDeviceAction =
ChromeOSDeviceAction'
{ _codaAction = Nothing
, _codaDeprovisionReason = Nothing
}
codaAction :: Lens' ChromeOSDeviceAction (Maybe Text)
codaAction
= lens _codaAction (\ s a -> s{_codaAction = a})
codaDeprovisionReason :: Lens' ChromeOSDeviceAction (Maybe Text)
codaDeprovisionReason
= lens _codaDeprovisionReason
(\ s a -> s{_codaDeprovisionReason = a})
instance FromJSON ChromeOSDeviceAction where
parseJSON
= withObject "ChromeOSDeviceAction"
(\ o ->
ChromeOSDeviceAction' <$>
(o .:? "action") <*> (o .:? "deprovisionReason"))
instance ToJSON ChromeOSDeviceAction where
toJSON ChromeOSDeviceAction'{..}
= object
(catMaybes
[("action" .=) <$> _codaAction,
("deprovisionReason" .=) <$> _codaDeprovisionReason])
data Role = Role'
{ _rrEtag :: !(Maybe Text)
, _rrKind :: !Text
, _rrRoleName :: !(Maybe Text)
, _rrIsSystemRole :: !(Maybe Bool)
, _rrRoleId :: !(Maybe (Textual Int64))
, _rrRoleDescription :: !(Maybe Text)
, _rrIsSuperAdminRole :: !(Maybe Bool)
, _rrRolePrivileges :: !(Maybe [RoleRolePrivilegesItem])
} deriving (Eq,Show,Data,Typeable,Generic)
role'
:: Role
role' =
Role'
{ _rrEtag = Nothing
, _rrKind = "admin#directory#role"
, _rrRoleName = Nothing
, _rrIsSystemRole = Nothing
, _rrRoleId = Nothing
, _rrRoleDescription = Nothing
, _rrIsSuperAdminRole = Nothing
, _rrRolePrivileges = Nothing
}
rrEtag :: Lens' Role (Maybe Text)
rrEtag = lens _rrEtag (\ s a -> s{_rrEtag = a})
rrKind :: Lens' Role Text
rrKind = lens _rrKind (\ s a -> s{_rrKind = a})
rrRoleName :: Lens' Role (Maybe Text)
rrRoleName
= lens _rrRoleName (\ s a -> s{_rrRoleName = a})
rrIsSystemRole :: Lens' Role (Maybe Bool)
rrIsSystemRole
= lens _rrIsSystemRole
(\ s a -> s{_rrIsSystemRole = a})
rrRoleId :: Lens' Role (Maybe Int64)
rrRoleId
= lens _rrRoleId (\ s a -> s{_rrRoleId = a}) .
mapping _Coerce
rrRoleDescription :: Lens' Role (Maybe Text)
rrRoleDescription
= lens _rrRoleDescription
(\ s a -> s{_rrRoleDescription = a})
rrIsSuperAdminRole :: Lens' Role (Maybe Bool)
rrIsSuperAdminRole
= lens _rrIsSuperAdminRole
(\ s a -> s{_rrIsSuperAdminRole = a})
rrRolePrivileges :: Lens' Role [RoleRolePrivilegesItem]
rrRolePrivileges
= lens _rrRolePrivileges
(\ s a -> s{_rrRolePrivileges = a})
. _Default
. _Coerce
instance FromJSON Role where
parseJSON
= withObject "Role"
(\ o ->
Role' <$>
(o .:? "etag") <*>
(o .:? "kind" .!= "admin#directory#role")
<*> (o .:? "roleName")
<*> (o .:? "isSystemRole")
<*> (o .:? "roleId")
<*> (o .:? "roleDescription")
<*> (o .:? "isSuperAdminRole")
<*> (o .:? "rolePrivileges" .!= mempty))
instance ToJSON Role where
toJSON Role'{..}
= object
(catMaybes
[("etag" .=) <$> _rrEtag, Just ("kind" .= _rrKind),
("roleName" .=) <$> _rrRoleName,
("isSystemRole" .=) <$> _rrIsSystemRole,
("roleId" .=) <$> _rrRoleId,
("roleDescription" .=) <$> _rrRoleDescription,
("isSuperAdminRole" .=) <$> _rrIsSuperAdminRole,
("rolePrivileges" .=) <$> _rrRolePrivileges])
data Customer = Customer'
{ _cusEtag :: !(Maybe Text)
, _cusKind :: !Text
, _cusAlternateEmail :: !(Maybe Text)
, _cusCustomerDomain :: !(Maybe Text)
, _cusPhoneNumber :: !(Maybe Text)
, _cusLanguage :: !(Maybe Text)
, _cusId :: !(Maybe Text)
, _cusCustomerCreationTime :: !(Maybe DateTime')
, _cusPostalAddress :: !(Maybe CustomerPostalAddress)
} deriving (Eq,Show,Data,Typeable,Generic)
customer
:: Customer
customer =
Customer'
{ _cusEtag = Nothing
, _cusKind = "admin#directory#customer"
, _cusAlternateEmail = Nothing
, _cusCustomerDomain = Nothing
, _cusPhoneNumber = Nothing
, _cusLanguage = Nothing
, _cusId = Nothing
, _cusCustomerCreationTime = Nothing
, _cusPostalAddress = Nothing
}
cusEtag :: Lens' Customer (Maybe Text)
cusEtag = lens _cusEtag (\ s a -> s{_cusEtag = a})
cusKind :: Lens' Customer Text
cusKind = lens _cusKind (\ s a -> s{_cusKind = a})
cusAlternateEmail :: Lens' Customer (Maybe Text)
cusAlternateEmail
= lens _cusAlternateEmail
(\ s a -> s{_cusAlternateEmail = a})
cusCustomerDomain :: Lens' Customer (Maybe Text)
cusCustomerDomain
= lens _cusCustomerDomain
(\ s a -> s{_cusCustomerDomain = a})
cusPhoneNumber :: Lens' Customer (Maybe Text)
cusPhoneNumber
= lens _cusPhoneNumber
(\ s a -> s{_cusPhoneNumber = a})
cusLanguage :: Lens' Customer (Maybe Text)
cusLanguage
= lens _cusLanguage (\ s a -> s{_cusLanguage = a})
cusId :: Lens' Customer (Maybe Text)
cusId = lens _cusId (\ s a -> s{_cusId = a})
cusCustomerCreationTime :: Lens' Customer (Maybe UTCTime)
cusCustomerCreationTime
= lens _cusCustomerCreationTime
(\ s a -> s{_cusCustomerCreationTime = a})
. mapping _DateTime
cusPostalAddress :: Lens' Customer (Maybe CustomerPostalAddress)
cusPostalAddress
= lens _cusPostalAddress
(\ s a -> s{_cusPostalAddress = a})
instance FromJSON Customer where
parseJSON
= withObject "Customer"
(\ o ->
Customer' <$>
(o .:? "etag") <*>
(o .:? "kind" .!= "admin#directory#customer")
<*> (o .:? "alternateEmail")
<*> (o .:? "customerDomain")
<*> (o .:? "phoneNumber")
<*> (o .:? "language")
<*> (o .:? "id")
<*> (o .:? "customerCreationTime")
<*> (o .:? "postalAddress"))
instance ToJSON Customer where
toJSON Customer'{..}
= object
(catMaybes
[("etag" .=) <$> _cusEtag, Just ("kind" .= _cusKind),
("alternateEmail" .=) <$> _cusAlternateEmail,
("customerDomain" .=) <$> _cusCustomerDomain,
("phoneNumber" .=) <$> _cusPhoneNumber,
("language" .=) <$> _cusLanguage,
("id" .=) <$> _cusId,
("customerCreationTime" .=) <$>
_cusCustomerCreationTime,
("postalAddress" .=) <$> _cusPostalAddress])
data MobileDeviceApplicationsItem = MobileDeviceApplicationsItem'
{ _mdaiVersionCode :: !(Maybe (Textual Int32))
, _mdaiVersionName :: !(Maybe Text)
, _mdaiPackageName :: !(Maybe Text)
, _mdaiDisplayName :: !(Maybe Text)
, _mdaiPermission :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
mobileDeviceApplicationsItem
:: MobileDeviceApplicationsItem
mobileDeviceApplicationsItem =
MobileDeviceApplicationsItem'
{ _mdaiVersionCode = Nothing
, _mdaiVersionName = Nothing
, _mdaiPackageName = Nothing
, _mdaiDisplayName = Nothing
, _mdaiPermission = Nothing
}
mdaiVersionCode :: Lens' MobileDeviceApplicationsItem (Maybe Int32)
mdaiVersionCode
= lens _mdaiVersionCode
(\ s a -> s{_mdaiVersionCode = a})
. mapping _Coerce
mdaiVersionName :: Lens' MobileDeviceApplicationsItem (Maybe Text)
mdaiVersionName
= lens _mdaiVersionName
(\ s a -> s{_mdaiVersionName = a})
mdaiPackageName :: Lens' MobileDeviceApplicationsItem (Maybe Text)
mdaiPackageName
= lens _mdaiPackageName
(\ s a -> s{_mdaiPackageName = a})
mdaiDisplayName :: Lens' MobileDeviceApplicationsItem (Maybe Text)
mdaiDisplayName
= lens _mdaiDisplayName
(\ s a -> s{_mdaiDisplayName = a})
mdaiPermission :: Lens' MobileDeviceApplicationsItem [Text]
mdaiPermission
= lens _mdaiPermission
(\ s a -> s{_mdaiPermission = a})
. _Default
. _Coerce
instance FromJSON MobileDeviceApplicationsItem where
parseJSON
= withObject "MobileDeviceApplicationsItem"
(\ o ->
MobileDeviceApplicationsItem' <$>
(o .:? "versionCode") <*> (o .:? "versionName") <*>
(o .:? "packageName")
<*> (o .:? "displayName")
<*> (o .:? "permission" .!= mempty))
instance ToJSON MobileDeviceApplicationsItem where
toJSON MobileDeviceApplicationsItem'{..}
= object
(catMaybes
[("versionCode" .=) <$> _mdaiVersionCode,
("versionName" .=) <$> _mdaiVersionName,
("packageName" .=) <$> _mdaiPackageName,
("displayName" .=) <$> _mdaiDisplayName,
("permission" .=) <$> _mdaiPermission])
data OrgUnits = OrgUnits'
{ _oEtag :: !(Maybe Text)
, _oKind :: !Text
, _oOrganizationUnits :: !(Maybe [OrgUnit])
} deriving (Eq,Show,Data,Typeable,Generic)
orgUnits
:: OrgUnits
orgUnits =
OrgUnits'
{ _oEtag = Nothing
, _oKind = "admin#directory#orgUnits"
, _oOrganizationUnits = Nothing
}
oEtag :: Lens' OrgUnits (Maybe Text)
oEtag = lens _oEtag (\ s a -> s{_oEtag = a})
oKind :: Lens' OrgUnits Text
oKind = lens _oKind (\ s a -> s{_oKind = a})
oOrganizationUnits :: Lens' OrgUnits [OrgUnit]
oOrganizationUnits
= lens _oOrganizationUnits
(\ s a -> s{_oOrganizationUnits = a})
. _Default
. _Coerce
instance FromJSON OrgUnits where
parseJSON
= withObject "OrgUnits"
(\ o ->
OrgUnits' <$>
(o .:? "etag") <*>
(o .:? "kind" .!= "admin#directory#orgUnits")
<*> (o .:? "organizationUnits" .!= mempty))
instance ToJSON OrgUnits where
toJSON OrgUnits'{..}
= object
(catMaybes
[("etag" .=) <$> _oEtag, Just ("kind" .= _oKind),
("organizationUnits" .=) <$> _oOrganizationUnits])
data VerificationCodes = VerificationCodes'
{ _vEtag :: !(Maybe Text)
, _vKind :: !Text
, _vItems :: !(Maybe [VerificationCode])
} deriving (Eq,Show,Data,Typeable,Generic)
verificationCodes
:: VerificationCodes
verificationCodes =
VerificationCodes'
{ _vEtag = Nothing
, _vKind = "admin#directory#verificationCodesList"
, _vItems = Nothing
}
vEtag :: Lens' VerificationCodes (Maybe Text)
vEtag = lens _vEtag (\ s a -> s{_vEtag = a})
vKind :: Lens' VerificationCodes Text
vKind = lens _vKind (\ s a -> s{_vKind = a})
vItems :: Lens' VerificationCodes [VerificationCode]
vItems
= lens _vItems (\ s a -> s{_vItems = a}) . _Default .
_Coerce
instance FromJSON VerificationCodes where
parseJSON
= withObject "VerificationCodes"
(\ o ->
VerificationCodes' <$>
(o .:? "etag") <*>
(o .:? "kind" .!=
"admin#directory#verificationCodesList")
<*> (o .:? "items" .!= mempty))
instance ToJSON VerificationCodes where
toJSON VerificationCodes'{..}
= object
(catMaybes
[("etag" .=) <$> _vEtag, Just ("kind" .= _vKind),
("items" .=) <$> _vItems])
data UserRelation = UserRelation'
{ _urValue :: !(Maybe Text)
, _urType :: !(Maybe Text)
, _urCustomType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
userRelation
:: UserRelation
userRelation =
UserRelation'
{ _urValue = Nothing
, _urType = Nothing
, _urCustomType = Nothing
}
urValue :: Lens' UserRelation (Maybe Text)
urValue = lens _urValue (\ s a -> s{_urValue = a})
urType :: Lens' UserRelation (Maybe Text)
urType = lens _urType (\ s a -> s{_urType = a})
urCustomType :: Lens' UserRelation (Maybe Text)
urCustomType
= lens _urCustomType (\ s a -> s{_urCustomType = a})
instance FromJSON UserRelation where
parseJSON
= withObject "UserRelation"
(\ o ->
UserRelation' <$>
(o .:? "value") <*> (o .:? "type") <*>
(o .:? "customType"))
instance ToJSON UserRelation where
toJSON UserRelation'{..}
= object
(catMaybes
[("value" .=) <$> _urValue, ("type" .=) <$> _urType,
("customType" .=) <$> _urCustomType])
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 UserOrganization = UserOrganization'
{ _uoDePartment :: !(Maybe Text)
, _uoLocation :: !(Maybe Text)
, _uoCostCenter :: !(Maybe Text)
, _uoDomain :: !(Maybe Text)
, _uoSymbol :: !(Maybe Text)
, _uoPrimary :: !(Maybe Bool)
, _uoName :: !(Maybe Text)
, _uoTitle :: !(Maybe Text)
, _uoType :: !(Maybe Text)
, _uoCustomType :: !(Maybe Text)
, _uoDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
userOrganization
:: UserOrganization
userOrganization =
UserOrganization'
{ _uoDePartment = Nothing
, _uoLocation = Nothing
, _uoCostCenter = Nothing
, _uoDomain = Nothing
, _uoSymbol = Nothing
, _uoPrimary = Nothing
, _uoName = Nothing
, _uoTitle = Nothing
, _uoType = Nothing
, _uoCustomType = Nothing
, _uoDescription = Nothing
}
uoDePartment :: Lens' UserOrganization (Maybe Text)
uoDePartment
= lens _uoDePartment (\ s a -> s{_uoDePartment = a})
uoLocation :: Lens' UserOrganization (Maybe Text)
uoLocation
= lens _uoLocation (\ s a -> s{_uoLocation = a})
uoCostCenter :: Lens' UserOrganization (Maybe Text)
uoCostCenter
= lens _uoCostCenter (\ s a -> s{_uoCostCenter = a})
uoDomain :: Lens' UserOrganization (Maybe Text)
uoDomain = lens _uoDomain (\ s a -> s{_uoDomain = a})
uoSymbol :: Lens' UserOrganization (Maybe Text)
uoSymbol = lens _uoSymbol (\ s a -> s{_uoSymbol = a})
uoPrimary :: Lens' UserOrganization (Maybe Bool)
uoPrimary
= lens _uoPrimary (\ s a -> s{_uoPrimary = a})
uoName :: Lens' UserOrganization (Maybe Text)
uoName = lens _uoName (\ s a -> s{_uoName = a})
uoTitle :: Lens' UserOrganization (Maybe Text)
uoTitle = lens _uoTitle (\ s a -> s{_uoTitle = a})
uoType :: Lens' UserOrganization (Maybe Text)
uoType = lens _uoType (\ s a -> s{_uoType = a})
uoCustomType :: Lens' UserOrganization (Maybe Text)
uoCustomType
= lens _uoCustomType (\ s a -> s{_uoCustomType = a})
uoDescription :: Lens' UserOrganization (Maybe Text)
uoDescription
= lens _uoDescription
(\ s a -> s{_uoDescription = a})
instance FromJSON UserOrganization where
parseJSON
= withObject "UserOrganization"
(\ o ->
UserOrganization' <$>
(o .:? "department") <*> (o .:? "location") <*>
(o .:? "costCenter")
<*> (o .:? "domain")
<*> (o .:? "symbol")
<*> (o .:? "primary")
<*> (o .:? "name")
<*> (o .:? "title")
<*> (o .:? "type")
<*> (o .:? "customType")
<*> (o .:? "description"))
instance ToJSON UserOrganization where
toJSON UserOrganization'{..}
= object
(catMaybes
[("department" .=) <$> _uoDePartment,
("location" .=) <$> _uoLocation,
("costCenter" .=) <$> _uoCostCenter,
("domain" .=) <$> _uoDomain,
("symbol" .=) <$> _uoSymbol,
("primary" .=) <$> _uoPrimary,
("name" .=) <$> _uoName, ("title" .=) <$> _uoTitle,
("type" .=) <$> _uoType,
("customType" .=) <$> _uoCustomType,
("description" .=) <$> _uoDescription])
data UserWebsite = UserWebsite'
{ _uwValue :: !(Maybe Text)
, _uwPrimary :: !(Maybe Bool)
, _uwType :: !(Maybe Text)
, _uwCustomType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
userWebsite
:: UserWebsite
userWebsite =
UserWebsite'
{ _uwValue = Nothing
, _uwPrimary = Nothing
, _uwType = Nothing
, _uwCustomType = Nothing
}
uwValue :: Lens' UserWebsite (Maybe Text)
uwValue = lens _uwValue (\ s a -> s{_uwValue = a})
uwPrimary :: Lens' UserWebsite (Maybe Bool)
uwPrimary
= lens _uwPrimary (\ s a -> s{_uwPrimary = a})
uwType :: Lens' UserWebsite (Maybe Text)
uwType = lens _uwType (\ s a -> s{_uwType = a})
uwCustomType :: Lens' UserWebsite (Maybe Text)
uwCustomType
= lens _uwCustomType (\ s a -> s{_uwCustomType = a})
instance FromJSON UserWebsite where
parseJSON
= withObject "UserWebsite"
(\ o ->
UserWebsite' <$>
(o .:? "value") <*> (o .:? "primary") <*>
(o .:? "type")
<*> (o .:? "customType"))
instance ToJSON UserWebsite where
toJSON UserWebsite'{..}
= object
(catMaybes
[("value" .=) <$> _uwValue,
("primary" .=) <$> _uwPrimary,
("type" .=) <$> _uwType,
("customType" .=) <$> _uwCustomType])
data ChromeOSDeviceActiveTimeRangesItem = ChromeOSDeviceActiveTimeRangesItem'
{ _codatriDate :: !(Maybe Date')
, _codatriActiveTime :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
chromeOSDeviceActiveTimeRangesItem
:: ChromeOSDeviceActiveTimeRangesItem
chromeOSDeviceActiveTimeRangesItem =
ChromeOSDeviceActiveTimeRangesItem'
{ _codatriDate = Nothing
, _codatriActiveTime = Nothing
}
codatriDate :: Lens' ChromeOSDeviceActiveTimeRangesItem (Maybe Day)
codatriDate
= lens _codatriDate (\ s a -> s{_codatriDate = a}) .
mapping _Date
codatriActiveTime :: Lens' ChromeOSDeviceActiveTimeRangesItem (Maybe Int32)
codatriActiveTime
= lens _codatriActiveTime
(\ s a -> s{_codatriActiveTime = a})
. mapping _Coerce
instance FromJSON ChromeOSDeviceActiveTimeRangesItem
where
parseJSON
= withObject "ChromeOSDeviceActiveTimeRangesItem"
(\ o ->
ChromeOSDeviceActiveTimeRangesItem' <$>
(o .:? "date") <*> (o .:? "activeTime"))
instance ToJSON ChromeOSDeviceActiveTimeRangesItem
where
toJSON ChromeOSDeviceActiveTimeRangesItem'{..}
= object
(catMaybes
[("date" .=) <$> _codatriDate,
("activeTime" .=) <$> _codatriActiveTime])
data UserEmail = UserEmail'
{ _ueAddress :: !(Maybe Text)
, _uePrimary :: !(Maybe Bool)
, _ueType :: !(Maybe Text)
, _ueCustomType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
userEmail
:: UserEmail
userEmail =
UserEmail'
{ _ueAddress = Nothing
, _uePrimary = Nothing
, _ueType = Nothing
, _ueCustomType = Nothing
}
ueAddress :: Lens' UserEmail (Maybe Text)
ueAddress
= lens _ueAddress (\ s a -> s{_ueAddress = a})
uePrimary :: Lens' UserEmail (Maybe Bool)
uePrimary
= lens _uePrimary (\ s a -> s{_uePrimary = a})
ueType :: Lens' UserEmail (Maybe Text)
ueType = lens _ueType (\ s a -> s{_ueType = a})
ueCustomType :: Lens' UserEmail (Maybe Text)
ueCustomType
= lens _ueCustomType (\ s a -> s{_ueCustomType = a})
instance FromJSON UserEmail where
parseJSON
= withObject "UserEmail"
(\ o ->
UserEmail' <$>
(o .:? "address") <*> (o .:? "primary") <*>
(o .:? "type")
<*> (o .:? "customType"))
instance ToJSON UserEmail where
toJSON UserEmail'{..}
= object
(catMaybes
[("address" .=) <$> _ueAddress,
("primary" .=) <$> _uePrimary,
("type" .=) <$> _ueType,
("customType" .=) <$> _ueCustomType])
data UserPhone = UserPhone'
{ _upValue :: !(Maybe Text)
, _upPrimary :: !(Maybe Bool)
, _upType :: !(Maybe Text)
, _upCustomType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
userPhone
:: UserPhone
userPhone =
UserPhone'
{ _upValue = Nothing
, _upPrimary = Nothing
, _upType = Nothing
, _upCustomType = Nothing
}
upValue :: Lens' UserPhone (Maybe Text)
upValue = lens _upValue (\ s a -> s{_upValue = a})
upPrimary :: Lens' UserPhone (Maybe Bool)
upPrimary
= lens _upPrimary (\ s a -> s{_upPrimary = a})
upType :: Lens' UserPhone (Maybe Text)
upType = lens _upType (\ s a -> s{_upType = a})
upCustomType :: Lens' UserPhone (Maybe Text)
upCustomType
= lens _upCustomType (\ s a -> s{_upCustomType = a})
instance FromJSON UserPhone where
parseJSON
= withObject "UserPhone"
(\ o ->
UserPhone' <$>
(o .:? "value") <*> (o .:? "primary") <*>
(o .:? "type")
<*> (o .:? "customType"))
instance ToJSON UserPhone where
toJSON UserPhone'{..}
= object
(catMaybes
[("value" .=) <$> _upValue,
("primary" .=) <$> _upPrimary,
("type" .=) <$> _upType,
("customType" .=) <$> _upCustomType])
data UserPhoto = UserPhoto'
{ _upPhotoData :: !(Maybe Bytes)
, _upEtag :: !(Maybe Text)
, _upHeight :: !(Maybe (Textual Int32))
, _upKind :: !Text
, _upWidth :: !(Maybe (Textual Int32))
, _upMimeType :: !(Maybe Text)
, _upId :: !(Maybe Text)
, _upPrimaryEmail :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
userPhoto
:: UserPhoto
userPhoto =
UserPhoto'
{ _upPhotoData = Nothing
, _upEtag = Nothing
, _upHeight = Nothing
, _upKind = "admin#directory#user#photo"
, _upWidth = Nothing
, _upMimeType = Nothing
, _upId = Nothing
, _upPrimaryEmail = Nothing
}
upPhotoData :: Lens' UserPhoto (Maybe ByteString)
upPhotoData
= lens _upPhotoData (\ s a -> s{_upPhotoData = a}) .
mapping _Bytes
upEtag :: Lens' UserPhoto (Maybe Text)
upEtag = lens _upEtag (\ s a -> s{_upEtag = a})
upHeight :: Lens' UserPhoto (Maybe Int32)
upHeight
= lens _upHeight (\ s a -> s{_upHeight = a}) .
mapping _Coerce
upKind :: Lens' UserPhoto Text
upKind = lens _upKind (\ s a -> s{_upKind = a})
upWidth :: Lens' UserPhoto (Maybe Int32)
upWidth
= lens _upWidth (\ s a -> s{_upWidth = a}) .
mapping _Coerce
upMimeType :: Lens' UserPhoto (Maybe Text)
upMimeType
= lens _upMimeType (\ s a -> s{_upMimeType = a})
upId :: Lens' UserPhoto (Maybe Text)
upId = lens _upId (\ s a -> s{_upId = a})
upPrimaryEmail :: Lens' UserPhoto (Maybe Text)
upPrimaryEmail
= lens _upPrimaryEmail
(\ s a -> s{_upPrimaryEmail = a})
instance FromJSON UserPhoto where
parseJSON
= withObject "UserPhoto"
(\ o ->
UserPhoto' <$>
(o .:? "photoData") <*> (o .:? "etag") <*>
(o .:? "height")
<*> (o .:? "kind" .!= "admin#directory#user#photo")
<*> (o .:? "width")
<*> (o .:? "mimeType")
<*> (o .:? "id")
<*> (o .:? "primaryEmail"))
instance ToJSON UserPhoto where
toJSON UserPhoto'{..}
= object
(catMaybes
[("photoData" .=) <$> _upPhotoData,
("etag" .=) <$> _upEtag, ("height" .=) <$> _upHeight,
Just ("kind" .= _upKind), ("width" .=) <$> _upWidth,
("mimeType" .=) <$> _upMimeType, ("id" .=) <$> _upId,
("primaryEmail" .=) <$> _upPrimaryEmail])
data MobileDevice = MobileDevice'
{ _mobEmail :: !(Maybe [Text])
, _mobStatus :: !(Maybe Text)
, _mobPrivilege :: !(Maybe Text)
, _mobEtag :: !(Maybe Text)
, _mobResourceId :: !(Maybe Text)
, _mobManufacturer :: !(Maybe Text)
, _mobBuildNumber :: !(Maybe Text)
, _mobManagedAccountIsOnOwnerProFile :: !(Maybe Bool)
, _mobLastSync :: !(Maybe DateTime')
, _mobOtherAccountsInfo :: !(Maybe [Text])
, _mobKind :: !Text
, _mobAdbStatus :: !(Maybe Bool)
, _mobReleaseVersion :: !(Maybe Text)
, _mobBrand :: !(Maybe Text)
, _mobSecurityPatchLevel :: !(Maybe (Textual Int64))
, _mobNetworkOperator :: !(Maybe Text)
, _mobKernelVersion :: !(Maybe Text)
, _mobOS :: !(Maybe Text)
, _mobName :: !(Maybe [Text])
, _mobModel :: !(Maybe Text)
, _mobDeveloperOptionsStatus :: !(Maybe Bool)
, _mobUnknownSourcesStatus :: !(Maybe Bool)
, _mobMeid :: !(Maybe Text)
, _mobBootLoaderVersion :: !(Maybe Text)
, _mobDeviceId :: !(Maybe Text)
, _mobFirstSync :: !(Maybe DateTime')
, _mobUserAgent :: !(Maybe Text)
, _mobImei :: !(Maybe Text)
, _mobType :: !(Maybe Text)
, _mobWifiMACAddress :: !(Maybe Text)
, _mobEncryptionStatus :: !(Maybe Text)
, _mobSerialNumber :: !(Maybe Text)
, _mobDevicePasswordStatus :: !(Maybe Text)
, _mobHardwareId :: !(Maybe Text)
, _mobBasebandVersion :: !(Maybe Text)
, _mobSupportsWorkProFile :: !(Maybe Bool)
, _mobHardware :: !(Maybe Text)
, _mobDeviceCompromisedStatus :: !(Maybe Text)
, _mobApplications :: !(Maybe [MobileDeviceApplicationsItem])
, _mobDefaultLanguage :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
mobileDevice
:: MobileDevice
mobileDevice =
MobileDevice'
{ _mobEmail = Nothing
, _mobStatus = Nothing
, _mobPrivilege = Nothing
, _mobEtag = Nothing
, _mobResourceId = Nothing
, _mobManufacturer = Nothing
, _mobBuildNumber = Nothing
, _mobManagedAccountIsOnOwnerProFile = Nothing
, _mobLastSync = Nothing
, _mobOtherAccountsInfo = Nothing
, _mobKind = "admin#directory#mobiledevice"
, _mobAdbStatus = Nothing
, _mobReleaseVersion = Nothing
, _mobBrand = Nothing
, _mobSecurityPatchLevel = Nothing
, _mobNetworkOperator = Nothing
, _mobKernelVersion = Nothing
, _mobOS = Nothing
, _mobName = Nothing
, _mobModel = Nothing
, _mobDeveloperOptionsStatus = Nothing
, _mobUnknownSourcesStatus = Nothing
, _mobMeid = Nothing
, _mobBootLoaderVersion = Nothing
, _mobDeviceId = Nothing
, _mobFirstSync = Nothing
, _mobUserAgent = Nothing
, _mobImei = Nothing
, _mobType = Nothing
, _mobWifiMACAddress = Nothing
, _mobEncryptionStatus = Nothing
, _mobSerialNumber = Nothing
, _mobDevicePasswordStatus = Nothing
, _mobHardwareId = Nothing
, _mobBasebandVersion = Nothing
, _mobSupportsWorkProFile = Nothing
, _mobHardware = Nothing
, _mobDeviceCompromisedStatus = Nothing
, _mobApplications = Nothing
, _mobDefaultLanguage = Nothing
}
mobEmail :: Lens' MobileDevice [Text]
mobEmail
= lens _mobEmail (\ s a -> s{_mobEmail = a}) .
_Default
. _Coerce
mobStatus :: Lens' MobileDevice (Maybe Text)
mobStatus
= lens _mobStatus (\ s a -> s{_mobStatus = a})
mobPrivilege :: Lens' MobileDevice (Maybe Text)
mobPrivilege
= lens _mobPrivilege (\ s a -> s{_mobPrivilege = a})
mobEtag :: Lens' MobileDevice (Maybe Text)
mobEtag = lens _mobEtag (\ s a -> s{_mobEtag = a})
mobResourceId :: Lens' MobileDevice (Maybe Text)
mobResourceId
= lens _mobResourceId
(\ s a -> s{_mobResourceId = a})
mobManufacturer :: Lens' MobileDevice (Maybe Text)
mobManufacturer
= lens _mobManufacturer
(\ s a -> s{_mobManufacturer = a})
mobBuildNumber :: Lens' MobileDevice (Maybe Text)
mobBuildNumber
= lens _mobBuildNumber
(\ s a -> s{_mobBuildNumber = a})
mobManagedAccountIsOnOwnerProFile :: Lens' MobileDevice (Maybe Bool)
mobManagedAccountIsOnOwnerProFile
= lens _mobManagedAccountIsOnOwnerProFile
(\ s a -> s{_mobManagedAccountIsOnOwnerProFile = a})
mobLastSync :: Lens' MobileDevice (Maybe UTCTime)
mobLastSync
= lens _mobLastSync (\ s a -> s{_mobLastSync = a}) .
mapping _DateTime
mobOtherAccountsInfo :: Lens' MobileDevice [Text]
mobOtherAccountsInfo
= lens _mobOtherAccountsInfo
(\ s a -> s{_mobOtherAccountsInfo = a})
. _Default
. _Coerce
mobKind :: Lens' MobileDevice Text
mobKind = lens _mobKind (\ s a -> s{_mobKind = a})
mobAdbStatus :: Lens' MobileDevice (Maybe Bool)
mobAdbStatus
= lens _mobAdbStatus (\ s a -> s{_mobAdbStatus = a})
mobReleaseVersion :: Lens' MobileDevice (Maybe Text)
mobReleaseVersion
= lens _mobReleaseVersion
(\ s a -> s{_mobReleaseVersion = a})
mobBrand :: Lens' MobileDevice (Maybe Text)
mobBrand = lens _mobBrand (\ s a -> s{_mobBrand = a})
mobSecurityPatchLevel :: Lens' MobileDevice (Maybe Int64)
mobSecurityPatchLevel
= lens _mobSecurityPatchLevel
(\ s a -> s{_mobSecurityPatchLevel = a})
. mapping _Coerce
mobNetworkOperator :: Lens' MobileDevice (Maybe Text)
mobNetworkOperator
= lens _mobNetworkOperator
(\ s a -> s{_mobNetworkOperator = a})
mobKernelVersion :: Lens' MobileDevice (Maybe Text)
mobKernelVersion
= lens _mobKernelVersion
(\ s a -> s{_mobKernelVersion = a})
mobOS :: Lens' MobileDevice (Maybe Text)
mobOS = lens _mobOS (\ s a -> s{_mobOS = a})
mobName :: Lens' MobileDevice [Text]
mobName
= lens _mobName (\ s a -> s{_mobName = a}) . _Default
. _Coerce
mobModel :: Lens' MobileDevice (Maybe Text)
mobModel = lens _mobModel (\ s a -> s{_mobModel = a})
mobDeveloperOptionsStatus :: Lens' MobileDevice (Maybe Bool)
mobDeveloperOptionsStatus
= lens _mobDeveloperOptionsStatus
(\ s a -> s{_mobDeveloperOptionsStatus = a})
mobUnknownSourcesStatus :: Lens' MobileDevice (Maybe Bool)
mobUnknownSourcesStatus
= lens _mobUnknownSourcesStatus
(\ s a -> s{_mobUnknownSourcesStatus = a})
mobMeid :: Lens' MobileDevice (Maybe Text)
mobMeid = lens _mobMeid (\ s a -> s{_mobMeid = a})
mobBootLoaderVersion :: Lens' MobileDevice (Maybe Text)
mobBootLoaderVersion
= lens _mobBootLoaderVersion
(\ s a -> s{_mobBootLoaderVersion = a})
mobDeviceId :: Lens' MobileDevice (Maybe Text)
mobDeviceId
= lens _mobDeviceId (\ s a -> s{_mobDeviceId = a})
mobFirstSync :: Lens' MobileDevice (Maybe UTCTime)
mobFirstSync
= lens _mobFirstSync (\ s a -> s{_mobFirstSync = a})
. mapping _DateTime
mobUserAgent :: Lens' MobileDevice (Maybe Text)
mobUserAgent
= lens _mobUserAgent (\ s a -> s{_mobUserAgent = a})
mobImei :: Lens' MobileDevice (Maybe Text)
mobImei = lens _mobImei (\ s a -> s{_mobImei = a})
mobType :: Lens' MobileDevice (Maybe Text)
mobType = lens _mobType (\ s a -> s{_mobType = a})
mobWifiMACAddress :: Lens' MobileDevice (Maybe Text)
mobWifiMACAddress
= lens _mobWifiMACAddress
(\ s a -> s{_mobWifiMACAddress = a})
mobEncryptionStatus :: Lens' MobileDevice (Maybe Text)
mobEncryptionStatus
= lens _mobEncryptionStatus
(\ s a -> s{_mobEncryptionStatus = a})
mobSerialNumber :: Lens' MobileDevice (Maybe Text)
mobSerialNumber
= lens _mobSerialNumber
(\ s a -> s{_mobSerialNumber = a})
mobDevicePasswordStatus :: Lens' MobileDevice (Maybe Text)
mobDevicePasswordStatus
= lens _mobDevicePasswordStatus
(\ s a -> s{_mobDevicePasswordStatus = a})
mobHardwareId :: Lens' MobileDevice (Maybe Text)
mobHardwareId
= lens _mobHardwareId
(\ s a -> s{_mobHardwareId = a})
mobBasebandVersion :: Lens' MobileDevice (Maybe Text)
mobBasebandVersion
= lens _mobBasebandVersion
(\ s a -> s{_mobBasebandVersion = a})
mobSupportsWorkProFile :: Lens' MobileDevice (Maybe Bool)
mobSupportsWorkProFile
= lens _mobSupportsWorkProFile
(\ s a -> s{_mobSupportsWorkProFile = a})
mobHardware :: Lens' MobileDevice (Maybe Text)
mobHardware
= lens _mobHardware (\ s a -> s{_mobHardware = a})
mobDeviceCompromisedStatus :: Lens' MobileDevice (Maybe Text)
mobDeviceCompromisedStatus
= lens _mobDeviceCompromisedStatus
(\ s a -> s{_mobDeviceCompromisedStatus = a})
mobApplications :: Lens' MobileDevice [MobileDeviceApplicationsItem]
mobApplications
= lens _mobApplications
(\ s a -> s{_mobApplications = a})
. _Default
. _Coerce
mobDefaultLanguage :: Lens' MobileDevice (Maybe Text)
mobDefaultLanguage
= lens _mobDefaultLanguage
(\ s a -> s{_mobDefaultLanguage = a})
instance FromJSON MobileDevice where
parseJSON
= withObject "MobileDevice"
(\ o ->
MobileDevice' <$>
(o .:? "email" .!= mempty) <*> (o .:? "status") <*>
(o .:? "privilege")
<*> (o .:? "etag")
<*> (o .:? "resourceId")
<*> (o .:? "manufacturer")
<*> (o .:? "buildNumber")
<*> (o .:? "managedAccountIsOnOwnerProfile")
<*> (o .:? "lastSync")
<*> (o .:? "otherAccountsInfo" .!= mempty)
<*> (o .:? "kind" .!= "admin#directory#mobiledevice")
<*> (o .:? "adbStatus")
<*> (o .:? "releaseVersion")
<*> (o .:? "brand")
<*> (o .:? "securityPatchLevel")
<*> (o .:? "networkOperator")
<*> (o .:? "kernelVersion")
<*> (o .:? "os")
<*> (o .:? "name" .!= mempty)
<*> (o .:? "model")
<*> (o .:? "developerOptionsStatus")
<*> (o .:? "unknownSourcesStatus")
<*> (o .:? "meid")
<*> (o .:? "bootloaderVersion")
<*> (o .:? "deviceId")
<*> (o .:? "firstSync")
<*> (o .:? "userAgent")
<*> (o .:? "imei")
<*> (o .:? "type")
<*> (o .:? "wifiMacAddress")
<*> (o .:? "encryptionStatus")
<*> (o .:? "serialNumber")
<*> (o .:? "devicePasswordStatus")
<*> (o .:? "hardwareId")
<*> (o .:? "basebandVersion")
<*> (o .:? "supportsWorkProfile")
<*> (o .:? "hardware")
<*> (o .:? "deviceCompromisedStatus")
<*> (o .:? "applications" .!= mempty)
<*> (o .:? "defaultLanguage"))
instance ToJSON MobileDevice where
toJSON MobileDevice'{..}
= object
(catMaybes
[("email" .=) <$> _mobEmail,
("status" .=) <$> _mobStatus,
("privilege" .=) <$> _mobPrivilege,
("etag" .=) <$> _mobEtag,
("resourceId" .=) <$> _mobResourceId,
("manufacturer" .=) <$> _mobManufacturer,
("buildNumber" .=) <$> _mobBuildNumber,
("managedAccountIsOnOwnerProfile" .=) <$>
_mobManagedAccountIsOnOwnerProFile,
("lastSync" .=) <$> _mobLastSync,
("otherAccountsInfo" .=) <$> _mobOtherAccountsInfo,
Just ("kind" .= _mobKind),
("adbStatus" .=) <$> _mobAdbStatus,
("releaseVersion" .=) <$> _mobReleaseVersion,
("brand" .=) <$> _mobBrand,
("securityPatchLevel" .=) <$> _mobSecurityPatchLevel,
("networkOperator" .=) <$> _mobNetworkOperator,
("kernelVersion" .=) <$> _mobKernelVersion,
("os" .=) <$> _mobOS, ("name" .=) <$> _mobName,
("model" .=) <$> _mobModel,
("developerOptionsStatus" .=) <$>
_mobDeveloperOptionsStatus,
("unknownSourcesStatus" .=) <$>
_mobUnknownSourcesStatus,
("meid" .=) <$> _mobMeid,
("bootloaderVersion" .=) <$> _mobBootLoaderVersion,
("deviceId" .=) <$> _mobDeviceId,
("firstSync" .=) <$> _mobFirstSync,
("userAgent" .=) <$> _mobUserAgent,
("imei" .=) <$> _mobImei, ("type" .=) <$> _mobType,
("wifiMacAddress" .=) <$> _mobWifiMACAddress,
("encryptionStatus" .=) <$> _mobEncryptionStatus,
("serialNumber" .=) <$> _mobSerialNumber,
("devicePasswordStatus" .=) <$>
_mobDevicePasswordStatus,
("hardwareId" .=) <$> _mobHardwareId,
("basebandVersion" .=) <$> _mobBasebandVersion,
("supportsWorkProfile" .=) <$>
_mobSupportsWorkProFile,
("hardware" .=) <$> _mobHardware,
("deviceCompromisedStatus" .=) <$>
_mobDeviceCompromisedStatus,
("applications" .=) <$> _mobApplications,
("defaultLanguage" .=) <$> _mobDefaultLanguage])
data Member = Member'
{ _memEmail :: !(Maybe Text)
, _memStatus :: !(Maybe Text)
, _memEtag :: !(Maybe Text)
, _memKind :: !Text
, _memRole :: !(Maybe Text)
, _memId :: !(Maybe Text)
, _memType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
member
:: Member
member =
Member'
{ _memEmail = Nothing
, _memStatus = Nothing
, _memEtag = Nothing
, _memKind = "admin#directory#member"
, _memRole = Nothing
, _memId = Nothing
, _memType = Nothing
}
memEmail :: Lens' Member (Maybe Text)
memEmail = lens _memEmail (\ s a -> s{_memEmail = a})
memStatus :: Lens' Member (Maybe Text)
memStatus
= lens _memStatus (\ s a -> s{_memStatus = a})
memEtag :: Lens' Member (Maybe Text)
memEtag = lens _memEtag (\ s a -> s{_memEtag = a})
memKind :: Lens' Member Text
memKind = lens _memKind (\ s a -> s{_memKind = a})
memRole :: Lens' Member (Maybe Text)
memRole = lens _memRole (\ s a -> s{_memRole = a})
memId :: Lens' Member (Maybe Text)
memId = lens _memId (\ s a -> s{_memId = a})
memType :: Lens' Member (Maybe Text)
memType = lens _memType (\ s a -> s{_memType = a})
instance FromJSON Member where
parseJSON
= withObject "Member"
(\ o ->
Member' <$>
(o .:? "email") <*> (o .:? "status") <*>
(o .:? "etag")
<*> (o .:? "kind" .!= "admin#directory#member")
<*> (o .:? "role")
<*> (o .:? "id")
<*> (o .:? "type"))
instance ToJSON Member where
toJSON Member'{..}
= object
(catMaybes
[("email" .=) <$> _memEmail,
("status" .=) <$> _memStatus,
("etag" .=) <$> _memEtag, Just ("kind" .= _memKind),
("role" .=) <$> _memRole, ("id" .=) <$> _memId,
("type" .=) <$> _memType])
newtype UserCustomProperties = UserCustomProperties'
{ _ucpAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
userCustomProperties
:: HashMap Text JSONValue
-> UserCustomProperties
userCustomProperties pUcpAddtional_ =
UserCustomProperties'
{ _ucpAddtional = _Coerce # pUcpAddtional_
}
ucpAddtional :: Lens' UserCustomProperties (HashMap Text JSONValue)
ucpAddtional
= lens _ucpAddtional (\ s a -> s{_ucpAddtional = a})
. _Coerce
instance FromJSON UserCustomProperties where
parseJSON
= withObject "UserCustomProperties"
(\ o ->
UserCustomProperties' <$> (parseJSONObject o))
instance ToJSON UserCustomProperties where
toJSON = toJSON . _ucpAddtional
data Domains = Domains'
{ _domCreationTime :: !(Maybe (Textual Int64))
, _domEtag :: !(Maybe Text)
, _domKind :: !Text
, _domDomainAliases :: !(Maybe [DomainAlias])
, _domVerified :: !(Maybe Bool)
, _domDomainName :: !(Maybe Text)
, _domIsPrimary :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
domains
:: Domains
domains =
Domains'
{ _domCreationTime = Nothing
, _domEtag = Nothing
, _domKind = "admin#directory#domain"
, _domDomainAliases = Nothing
, _domVerified = Nothing
, _domDomainName = Nothing
, _domIsPrimary = Nothing
}
domCreationTime :: Lens' Domains (Maybe Int64)
domCreationTime
= lens _domCreationTime
(\ s a -> s{_domCreationTime = a})
. mapping _Coerce
domEtag :: Lens' Domains (Maybe Text)
domEtag = lens _domEtag (\ s a -> s{_domEtag = a})
domKind :: Lens' Domains Text
domKind = lens _domKind (\ s a -> s{_domKind = a})
domDomainAliases :: Lens' Domains [DomainAlias]
domDomainAliases
= lens _domDomainAliases
(\ s a -> s{_domDomainAliases = a})
. _Default
. _Coerce
domVerified :: Lens' Domains (Maybe Bool)
domVerified
= lens _domVerified (\ s a -> s{_domVerified = a})
domDomainName :: Lens' Domains (Maybe Text)
domDomainName
= lens _domDomainName
(\ s a -> s{_domDomainName = a})
domIsPrimary :: Lens' Domains (Maybe Bool)
domIsPrimary
= lens _domIsPrimary (\ s a -> s{_domIsPrimary = a})
instance FromJSON Domains where
parseJSON
= withObject "Domains"
(\ o ->
Domains' <$>
(o .:? "creationTime") <*> (o .:? "etag") <*>
(o .:? "kind" .!= "admin#directory#domain")
<*> (o .:? "domainAliases" .!= mempty)
<*> (o .:? "verified")
<*> (o .:? "domainName")
<*> (o .:? "isPrimary"))
instance ToJSON Domains where
toJSON Domains'{..}
= object
(catMaybes
[("creationTime" .=) <$> _domCreationTime,
("etag" .=) <$> _domEtag, Just ("kind" .= _domKind),
("domainAliases" .=) <$> _domDomainAliases,
("verified" .=) <$> _domVerified,
("domainName" .=) <$> _domDomainName,
("isPrimary" .=) <$> _domIsPrimary])
data CalendarResources = CalendarResources'
{ _crsEtag :: !(Maybe Text)
, _crsNextPageToken :: !(Maybe Text)
, _crsKind :: !Text
, _crsItems :: !(Maybe [CalendarResource])
} deriving (Eq,Show,Data,Typeable,Generic)
calendarResources
:: CalendarResources
calendarResources =
CalendarResources'
{ _crsEtag = Nothing
, _crsNextPageToken = Nothing
, _crsKind = "admin#directory#resources#calendars#calendarResourcesList"
, _crsItems = Nothing
}
crsEtag :: Lens' CalendarResources (Maybe Text)
crsEtag = lens _crsEtag (\ s a -> s{_crsEtag = a})
crsNextPageToken :: Lens' CalendarResources (Maybe Text)
crsNextPageToken
= lens _crsNextPageToken
(\ s a -> s{_crsNextPageToken = a})
crsKind :: Lens' CalendarResources Text
crsKind = lens _crsKind (\ s a -> s{_crsKind = a})
crsItems :: Lens' CalendarResources [CalendarResource]
crsItems
= lens _crsItems (\ s a -> s{_crsItems = a}) .
_Default
. _Coerce
instance FromJSON CalendarResources where
parseJSON
= withObject "CalendarResources"
(\ o ->
CalendarResources' <$>
(o .:? "etag") <*> (o .:? "nextPageToken") <*>
(o .:? "kind" .!=
"admin#directory#resources#calendars#calendarResourcesList")
<*> (o .:? "items" .!= mempty))
instance ToJSON CalendarResources where
toJSON CalendarResources'{..}
= object
(catMaybes
[("etag" .=) <$> _crsEtag,
("nextPageToken" .=) <$> _crsNextPageToken,
Just ("kind" .= _crsKind),
("items" .=) <$> _crsItems])
data Notifications = Notifications'
{ _notEtag :: !(Maybe Text)
, _notNextPageToken :: !(Maybe Text)
, _notKind :: !Text
, _notItems :: !(Maybe [Notification])
, _notUnreadNotificationsCount :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
notifications
:: Notifications
notifications =
Notifications'
{ _notEtag = Nothing
, _notNextPageToken = Nothing
, _notKind = "admin#directory#notifications"
, _notItems = Nothing
, _notUnreadNotificationsCount = Nothing
}
notEtag :: Lens' Notifications (Maybe Text)
notEtag = lens _notEtag (\ s a -> s{_notEtag = a})
notNextPageToken :: Lens' Notifications (Maybe Text)
notNextPageToken
= lens _notNextPageToken
(\ s a -> s{_notNextPageToken = a})
notKind :: Lens' Notifications Text
notKind = lens _notKind (\ s a -> s{_notKind = a})
notItems :: Lens' Notifications [Notification]
notItems
= lens _notItems (\ s a -> s{_notItems = a}) .
_Default
. _Coerce
notUnreadNotificationsCount :: Lens' Notifications (Maybe Int32)
notUnreadNotificationsCount
= lens _notUnreadNotificationsCount
(\ s a -> s{_notUnreadNotificationsCount = a})
. mapping _Coerce
instance FromJSON Notifications where
parseJSON
= withObject "Notifications"
(\ o ->
Notifications' <$>
(o .:? "etag") <*> (o .:? "nextPageToken") <*>
(o .:? "kind" .!= "admin#directory#notifications")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "unreadNotificationsCount"))
instance ToJSON Notifications where
toJSON Notifications'{..}
= object
(catMaybes
[("etag" .=) <$> _notEtag,
("nextPageToken" .=) <$> _notNextPageToken,
Just ("kind" .= _notKind),
("items" .=) <$> _notItems,
("unreadNotificationsCount" .=) <$>
_notUnreadNotificationsCount])
data SchemaFieldSpecNumericIndexingSpec = SchemaFieldSpecNumericIndexingSpec'
{ _sfsnisMaxValue :: !(Maybe (Textual Double))
, _sfsnisMinValue :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
schemaFieldSpecNumericIndexingSpec
:: SchemaFieldSpecNumericIndexingSpec
schemaFieldSpecNumericIndexingSpec =
SchemaFieldSpecNumericIndexingSpec'
{ _sfsnisMaxValue = Nothing
, _sfsnisMinValue = Nothing
}
sfsnisMaxValue :: Lens' SchemaFieldSpecNumericIndexingSpec (Maybe Double)
sfsnisMaxValue
= lens _sfsnisMaxValue
(\ s a -> s{_sfsnisMaxValue = a})
. mapping _Coerce
sfsnisMinValue :: Lens' SchemaFieldSpecNumericIndexingSpec (Maybe Double)
sfsnisMinValue
= lens _sfsnisMinValue
(\ s a -> s{_sfsnisMinValue = a})
. mapping _Coerce
instance FromJSON SchemaFieldSpecNumericIndexingSpec
where
parseJSON
= withObject "SchemaFieldSpecNumericIndexingSpec"
(\ o ->
SchemaFieldSpecNumericIndexingSpec' <$>
(o .:? "maxValue") <*> (o .:? "minValue"))
instance ToJSON SchemaFieldSpecNumericIndexingSpec
where
toJSON SchemaFieldSpecNumericIndexingSpec'{..}
= object
(catMaybes
[("maxValue" .=) <$> _sfsnisMaxValue,
("minValue" .=) <$> _sfsnisMinValue])
newtype MobileDeviceAction = MobileDeviceAction'
{ _mdaAction :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
mobileDeviceAction
:: MobileDeviceAction
mobileDeviceAction =
MobileDeviceAction'
{ _mdaAction = Nothing
}
mdaAction :: Lens' MobileDeviceAction (Maybe Text)
mdaAction
= lens _mdaAction (\ s a -> s{_mdaAction = a})
instance FromJSON MobileDeviceAction where
parseJSON
= withObject "MobileDeviceAction"
(\ o -> MobileDeviceAction' <$> (o .:? "action"))
instance ToJSON MobileDeviceAction where
toJSON MobileDeviceAction'{..}
= object (catMaybes [("action" .=) <$> _mdaAction])
data SchemaFieldSpec = SchemaFieldSpec'
{ _sfsEtag :: !(Maybe Text)
, _sfsKind :: !Text
, _sfsNumericIndexingSpec :: !(Maybe SchemaFieldSpecNumericIndexingSpec)
, _sfsReadAccessType :: !Text
, _sfsFieldId :: !(Maybe Text)
, _sfsIndexed :: !Bool
, _sfsFieldType :: !(Maybe Text)
, _sfsFieldName :: !(Maybe Text)
, _sfsMultiValued :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
schemaFieldSpec
:: SchemaFieldSpec
schemaFieldSpec =
SchemaFieldSpec'
{ _sfsEtag = Nothing
, _sfsKind = "admin#directory#schema#fieldspec"
, _sfsNumericIndexingSpec = Nothing
, _sfsReadAccessType = "ALL_DOMAIN_USERS"
, _sfsFieldId = Nothing
, _sfsIndexed = True
, _sfsFieldType = Nothing
, _sfsFieldName = Nothing
, _sfsMultiValued = Nothing
}
sfsEtag :: Lens' SchemaFieldSpec (Maybe Text)
sfsEtag = lens _sfsEtag (\ s a -> s{_sfsEtag = a})
sfsKind :: Lens' SchemaFieldSpec Text
sfsKind = lens _sfsKind (\ s a -> s{_sfsKind = a})
sfsNumericIndexingSpec :: Lens' SchemaFieldSpec (Maybe SchemaFieldSpecNumericIndexingSpec)
sfsNumericIndexingSpec
= lens _sfsNumericIndexingSpec
(\ s a -> s{_sfsNumericIndexingSpec = a})
sfsReadAccessType :: Lens' SchemaFieldSpec Text
sfsReadAccessType
= lens _sfsReadAccessType
(\ s a -> s{_sfsReadAccessType = a})
sfsFieldId :: Lens' SchemaFieldSpec (Maybe Text)
sfsFieldId
= lens _sfsFieldId (\ s a -> s{_sfsFieldId = a})
sfsIndexed :: Lens' SchemaFieldSpec Bool
sfsIndexed
= lens _sfsIndexed (\ s a -> s{_sfsIndexed = a})
sfsFieldType :: Lens' SchemaFieldSpec (Maybe Text)
sfsFieldType
= lens _sfsFieldType (\ s a -> s{_sfsFieldType = a})
sfsFieldName :: Lens' SchemaFieldSpec (Maybe Text)
sfsFieldName
= lens _sfsFieldName (\ s a -> s{_sfsFieldName = a})
sfsMultiValued :: Lens' SchemaFieldSpec (Maybe Bool)
sfsMultiValued
= lens _sfsMultiValued
(\ s a -> s{_sfsMultiValued = a})
instance FromJSON SchemaFieldSpec where
parseJSON
= withObject "SchemaFieldSpec"
(\ o ->
SchemaFieldSpec' <$>
(o .:? "etag") <*>
(o .:? "kind" .!= "admin#directory#schema#fieldspec")
<*> (o .:? "numericIndexingSpec")
<*> (o .:? "readAccessType" .!= "ALL_DOMAIN_USERS")
<*> (o .:? "fieldId")
<*> (o .:? "indexed" .!= True)
<*> (o .:? "fieldType")
<*> (o .:? "fieldName")
<*> (o .:? "multiValued"))
instance ToJSON SchemaFieldSpec where
toJSON SchemaFieldSpec'{..}
= object
(catMaybes
[("etag" .=) <$> _sfsEtag, Just ("kind" .= _sfsKind),
("numericIndexingSpec" .=) <$>
_sfsNumericIndexingSpec,
Just ("readAccessType" .= _sfsReadAccessType),
("fieldId" .=) <$> _sfsFieldId,
Just ("indexed" .= _sfsIndexed),
("fieldType" .=) <$> _sfsFieldType,
("fieldName" .=) <$> _sfsFieldName,
("multiValued" .=) <$> _sfsMultiValued])
data ChromeOSDevices = ChromeOSDevices'
{ _cosdEtag :: !(Maybe Text)
, _cosdNextPageToken :: !(Maybe Text)
, _cosdKind :: !Text
, _cosdChromeosDevices :: !(Maybe [ChromeOSDevice])
} deriving (Eq,Show,Data,Typeable,Generic)
chromeOSDevices
:: ChromeOSDevices
chromeOSDevices =
ChromeOSDevices'
{ _cosdEtag = Nothing
, _cosdNextPageToken = Nothing
, _cosdKind = "admin#directory#chromeosdevices"
, _cosdChromeosDevices = Nothing
}
cosdEtag :: Lens' ChromeOSDevices (Maybe Text)
cosdEtag = lens _cosdEtag (\ s a -> s{_cosdEtag = a})
cosdNextPageToken :: Lens' ChromeOSDevices (Maybe Text)
cosdNextPageToken
= lens _cosdNextPageToken
(\ s a -> s{_cosdNextPageToken = a})
cosdKind :: Lens' ChromeOSDevices Text
cosdKind = lens _cosdKind (\ s a -> s{_cosdKind = a})
cosdChromeosDevices :: Lens' ChromeOSDevices [ChromeOSDevice]
cosdChromeosDevices
= lens _cosdChromeosDevices
(\ s a -> s{_cosdChromeosDevices = a})
. _Default
. _Coerce
instance FromJSON ChromeOSDevices where
parseJSON
= withObject "ChromeOSDevices"
(\ o ->
ChromeOSDevices' <$>
(o .:? "etag") <*> (o .:? "nextPageToken") <*>
(o .:? "kind" .!= "admin#directory#chromeosdevices")
<*> (o .:? "chromeosdevices" .!= mempty))
instance ToJSON ChromeOSDevices where
toJSON ChromeOSDevices'{..}
= object
(catMaybes
[("etag" .=) <$> _cosdEtag,
("nextPageToken" .=) <$> _cosdNextPageToken,
Just ("kind" .= _cosdKind),
("chromeosdevices" .=) <$> _cosdChromeosDevices])
data UserExternalId = UserExternalId'
{ _ueiValue :: !(Maybe Text)
, _ueiType :: !(Maybe Text)
, _ueiCustomType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
userExternalId
:: UserExternalId
userExternalId =
UserExternalId'
{ _ueiValue = Nothing
, _ueiType = Nothing
, _ueiCustomType = Nothing
}
ueiValue :: Lens' UserExternalId (Maybe Text)
ueiValue = lens _ueiValue (\ s a -> s{_ueiValue = a})
ueiType :: Lens' UserExternalId (Maybe Text)
ueiType = lens _ueiType (\ s a -> s{_ueiType = a})
ueiCustomType :: Lens' UserExternalId (Maybe Text)
ueiCustomType
= lens _ueiCustomType
(\ s a -> s{_ueiCustomType = a})
instance FromJSON UserExternalId where
parseJSON
= withObject "UserExternalId"
(\ o ->
UserExternalId' <$>
(o .:? "value") <*> (o .:? "type") <*>
(o .:? "customType"))
instance ToJSON UserExternalId where
toJSON UserExternalId'{..}
= object
(catMaybes
[("value" .=) <$> _ueiValue,
("type" .=) <$> _ueiType,
("customType" .=) <$> _ueiCustomType])
data Asps = Asps'
{ _aspEtag :: !(Maybe Text)
, _aspKind :: !Text
, _aspItems :: !(Maybe [Asp])
} deriving (Eq,Show,Data,Typeable,Generic)
asps
:: Asps
asps =
Asps'
{ _aspEtag = Nothing
, _aspKind = "admin#directory#aspList"
, _aspItems = Nothing
}
aspEtag :: Lens' Asps (Maybe Text)
aspEtag = lens _aspEtag (\ s a -> s{_aspEtag = a})
aspKind :: Lens' Asps Text
aspKind = lens _aspKind (\ s a -> s{_aspKind = a})
aspItems :: Lens' Asps [Asp]
aspItems
= lens _aspItems (\ s a -> s{_aspItems = a}) .
_Default
. _Coerce
instance FromJSON Asps where
parseJSON
= withObject "Asps"
(\ o ->
Asps' <$>
(o .:? "etag") <*>
(o .:? "kind" .!= "admin#directory#aspList")
<*> (o .:? "items" .!= mempty))
instance ToJSON Asps where
toJSON Asps'{..}
= object
(catMaybes
[("etag" .=) <$> _aspEtag, Just ("kind" .= _aspKind),
("items" .=) <$> _aspItems])
data RoleRolePrivilegesItem = RoleRolePrivilegesItem'
{ _rrpiServiceId :: !(Maybe Text)
, _rrpiPrivilegeName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
roleRolePrivilegesItem
:: RoleRolePrivilegesItem
roleRolePrivilegesItem =
RoleRolePrivilegesItem'
{ _rrpiServiceId = Nothing
, _rrpiPrivilegeName = Nothing
}
rrpiServiceId :: Lens' RoleRolePrivilegesItem (Maybe Text)
rrpiServiceId
= lens _rrpiServiceId
(\ s a -> s{_rrpiServiceId = a})
rrpiPrivilegeName :: Lens' RoleRolePrivilegesItem (Maybe Text)
rrpiPrivilegeName
= lens _rrpiPrivilegeName
(\ s a -> s{_rrpiPrivilegeName = a})
instance FromJSON RoleRolePrivilegesItem where
parseJSON
= withObject "RoleRolePrivilegesItem"
(\ o ->
RoleRolePrivilegesItem' <$>
(o .:? "serviceId") <*> (o .:? "privilegeName"))
instance ToJSON RoleRolePrivilegesItem where
toJSON RoleRolePrivilegesItem'{..}
= object
(catMaybes
[("serviceId" .=) <$> _rrpiServiceId,
("privilegeName" .=) <$> _rrpiPrivilegeName])
data Domains2 = Domains2'
{ _ddEtag :: !(Maybe Text)
, _ddKind :: !Text
, _ddDomains :: !(Maybe [Domains])
} deriving (Eq,Show,Data,Typeable,Generic)
domains2
:: Domains2
domains2 =
Domains2'
{ _ddEtag = Nothing
, _ddKind = "admin#directory#domains"
, _ddDomains = Nothing
}
ddEtag :: Lens' Domains2 (Maybe Text)
ddEtag = lens _ddEtag (\ s a -> s{_ddEtag = a})
ddKind :: Lens' Domains2 Text
ddKind = lens _ddKind (\ s a -> s{_ddKind = a})
ddDomains :: Lens' Domains2 [Domains]
ddDomains
= lens _ddDomains (\ s a -> s{_ddDomains = a}) .
_Default
. _Coerce
instance FromJSON Domains2 where
parseJSON
= withObject "Domains2"
(\ o ->
Domains2' <$>
(o .:? "etag") <*>
(o .:? "kind" .!= "admin#directory#domains")
<*> (o .:? "domains" .!= mempty))
instance ToJSON Domains2 where
toJSON Domains2'{..}
= object
(catMaybes
[("etag" .=) <$> _ddEtag, Just ("kind" .= _ddKind),
("domains" .=) <$> _ddDomains])