module Network.Google.UserAccounts.Types.Product where
import Network.Google.Prelude
import Network.Google.UserAccounts.Types.Sum
data OperationWarningsItemDataItem = OperationWarningsItemDataItem'
{ _owidiValue :: !(Maybe Text)
, _owidiKey :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
operationWarningsItemDataItem
:: OperationWarningsItemDataItem
operationWarningsItemDataItem =
OperationWarningsItemDataItem'
{ _owidiValue = Nothing
, _owidiKey = Nothing
}
owidiValue :: Lens' OperationWarningsItemDataItem (Maybe Text)
owidiValue
= lens _owidiValue (\ s a -> s{_owidiValue = a})
owidiKey :: Lens' OperationWarningsItemDataItem (Maybe Text)
owidiKey = lens _owidiKey (\ s a -> s{_owidiKey = a})
instance FromJSON OperationWarningsItemDataItem where
parseJSON
= withObject "OperationWarningsItemDataItem"
(\ o ->
OperationWarningsItemDataItem' <$>
(o .:? "value") <*> (o .:? "key"))
instance ToJSON OperationWarningsItemDataItem where
toJSON OperationWarningsItemDataItem'{..}
= object
(catMaybes
[("value" .=) <$> _owidiValue,
("key" .=) <$> _owidiKey])
data OperationList = OperationList'
{ _olNextPageToken :: !(Maybe Text)
, _olKind :: !Text
, _olItems :: !(Maybe [Operation])
, _olSelfLink :: !(Maybe Text)
, _olId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
operationList
:: OperationList
operationList =
OperationList'
{ _olNextPageToken = Nothing
, _olKind = "clouduseraccounts#operationList"
, _olItems = Nothing
, _olSelfLink = Nothing
, _olId = Nothing
}
olNextPageToken :: Lens' OperationList (Maybe Text)
olNextPageToken
= lens _olNextPageToken
(\ s a -> s{_olNextPageToken = a})
olKind :: Lens' OperationList Text
olKind = lens _olKind (\ s a -> s{_olKind = a})
olItems :: Lens' OperationList [Operation]
olItems
= lens _olItems (\ s a -> s{_olItems = a}) . _Default
. _Coerce
olSelfLink :: Lens' OperationList (Maybe Text)
olSelfLink
= lens _olSelfLink (\ s a -> s{_olSelfLink = a})
olId :: Lens' OperationList (Maybe Text)
olId = lens _olId (\ s a -> s{_olId = a})
instance FromJSON OperationList where
parseJSON
= withObject "OperationList"
(\ o ->
OperationList' <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!= "clouduseraccounts#operationList")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "selfLink")
<*> (o .:? "id"))
instance ToJSON OperationList where
toJSON OperationList'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _olNextPageToken,
Just ("kind" .= _olKind), ("items" .=) <$> _olItems,
("selfLink" .=) <$> _olSelfLink,
("id" .=) <$> _olId])
data Group = Group'
{ _gKind :: !Text
, _gMembers :: !(Maybe [Text])
, _gSelfLink :: !(Maybe Text)
, _gName :: !(Maybe Text)
, _gCreationTimestamp :: !(Maybe Text)
, _gId :: !(Maybe (Textual Word64))
, _gDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
group'
:: Group
group' =
Group'
{ _gKind = "clouduseraccounts#group"
, _gMembers = Nothing
, _gSelfLink = Nothing
, _gName = Nothing
, _gCreationTimestamp = Nothing
, _gId = Nothing
, _gDescription = Nothing
}
gKind :: Lens' Group Text
gKind = lens _gKind (\ s a -> s{_gKind = a})
gMembers :: Lens' Group [Text]
gMembers
= lens _gMembers (\ s a -> s{_gMembers = a}) .
_Default
. _Coerce
gSelfLink :: Lens' Group (Maybe Text)
gSelfLink
= lens _gSelfLink (\ s a -> s{_gSelfLink = a})
gName :: Lens' Group (Maybe Text)
gName = lens _gName (\ s a -> s{_gName = a})
gCreationTimestamp :: Lens' Group (Maybe Text)
gCreationTimestamp
= lens _gCreationTimestamp
(\ s a -> s{_gCreationTimestamp = a})
gId :: Lens' Group (Maybe Word64)
gId
= lens _gId (\ s a -> s{_gId = a}) . mapping _Coerce
gDescription :: Lens' Group (Maybe Text)
gDescription
= lens _gDescription (\ s a -> s{_gDescription = a})
instance FromJSON Group where
parseJSON
= withObject "Group"
(\ o ->
Group' <$>
(o .:? "kind" .!= "clouduseraccounts#group") <*>
(o .:? "members" .!= mempty)
<*> (o .:? "selfLink")
<*> (o .:? "name")
<*> (o .:? "creationTimestamp")
<*> (o .:? "id")
<*> (o .:? "description"))
instance ToJSON Group where
toJSON Group'{..}
= object
(catMaybes
[Just ("kind" .= _gKind),
("members" .=) <$> _gMembers,
("selfLink" .=) <$> _gSelfLink,
("name" .=) <$> _gName,
("creationTimestamp" .=) <$> _gCreationTimestamp,
("id" .=) <$> _gId,
("description" .=) <$> _gDescription])
data GroupList = GroupList'
{ _glNextPageToken :: !(Maybe Text)
, _glKind :: !Text
, _glItems :: !(Maybe [Group])
, _glSelfLink :: !(Maybe Text)
, _glId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
groupList
:: GroupList
groupList =
GroupList'
{ _glNextPageToken = Nothing
, _glKind = "clouduseraccounts#groupList"
, _glItems = Nothing
, _glSelfLink = Nothing
, _glId = Nothing
}
glNextPageToken :: Lens' GroupList (Maybe Text)
glNextPageToken
= lens _glNextPageToken
(\ s a -> s{_glNextPageToken = a})
glKind :: Lens' GroupList Text
glKind = lens _glKind (\ s a -> s{_glKind = a})
glItems :: Lens' GroupList [Group]
glItems
= lens _glItems (\ s a -> s{_glItems = a}) . _Default
. _Coerce
glSelfLink :: Lens' GroupList (Maybe Text)
glSelfLink
= lens _glSelfLink (\ s a -> s{_glSelfLink = a})
glId :: Lens' GroupList (Maybe Text)
glId = lens _glId (\ s a -> s{_glId = a})
instance FromJSON GroupList where
parseJSON
= withObject "GroupList"
(\ o ->
GroupList' <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!= "clouduseraccounts#groupList")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "selfLink")
<*> (o .:? "id"))
instance ToJSON GroupList where
toJSON GroupList'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _glNextPageToken,
Just ("kind" .= _glKind), ("items" .=) <$> _glItems,
("selfLink" .=) <$> _glSelfLink,
("id" .=) <$> _glId])
data Operation = Operation'
{ _oTargetId :: !(Maybe (Textual Word64))
, _oStatus :: !(Maybe OperationStatus)
, _oInsertTime :: !(Maybe Text)
, _oProgress :: !(Maybe (Textual Int32))
, _oStartTime :: !(Maybe Text)
, _oKind :: !Text
, _oError :: !(Maybe OperationError)
, _oHTTPErrorMessage :: !(Maybe Text)
, _oZone :: !(Maybe Text)
, _oWarnings :: !(Maybe [OperationWarningsItem])
, _oHTTPErrorStatusCode :: !(Maybe (Textual Int32))
, _oUser :: !(Maybe Text)
, _oSelfLink :: !(Maybe Text)
, _oName :: !(Maybe Text)
, _oStatusMessage :: !(Maybe Text)
, _oCreationTimestamp :: !(Maybe Text)
, _oEndTime :: !(Maybe Text)
, _oId :: !(Maybe (Textual Word64))
, _oOperationType :: !(Maybe Text)
, _oRegion :: !(Maybe Text)
, _oDescription :: !(Maybe Text)
, _oTargetLink :: !(Maybe Text)
, _oClientOperationId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
operation
:: Operation
operation =
Operation'
{ _oTargetId = Nothing
, _oStatus = Nothing
, _oInsertTime = Nothing
, _oProgress = Nothing
, _oStartTime = Nothing
, _oKind = "clouduseraccounts#operation"
, _oError = Nothing
, _oHTTPErrorMessage = Nothing
, _oZone = Nothing
, _oWarnings = Nothing
, _oHTTPErrorStatusCode = Nothing
, _oUser = Nothing
, _oSelfLink = Nothing
, _oName = Nothing
, _oStatusMessage = Nothing
, _oCreationTimestamp = Nothing
, _oEndTime = Nothing
, _oId = Nothing
, _oOperationType = Nothing
, _oRegion = Nothing
, _oDescription = Nothing
, _oTargetLink = Nothing
, _oClientOperationId = Nothing
}
oTargetId :: Lens' Operation (Maybe Word64)
oTargetId
= lens _oTargetId (\ s a -> s{_oTargetId = a}) .
mapping _Coerce
oStatus :: Lens' Operation (Maybe OperationStatus)
oStatus = lens _oStatus (\ s a -> s{_oStatus = a})
oInsertTime :: Lens' Operation (Maybe Text)
oInsertTime
= lens _oInsertTime (\ s a -> s{_oInsertTime = a})
oProgress :: Lens' Operation (Maybe Int32)
oProgress
= lens _oProgress (\ s a -> s{_oProgress = a}) .
mapping _Coerce
oStartTime :: Lens' Operation (Maybe Text)
oStartTime
= lens _oStartTime (\ s a -> s{_oStartTime = a})
oKind :: Lens' Operation Text
oKind = lens _oKind (\ s a -> s{_oKind = a})
oError :: Lens' Operation (Maybe OperationError)
oError = lens _oError (\ s a -> s{_oError = a})
oHTTPErrorMessage :: Lens' Operation (Maybe Text)
oHTTPErrorMessage
= lens _oHTTPErrorMessage
(\ s a -> s{_oHTTPErrorMessage = a})
oZone :: Lens' Operation (Maybe Text)
oZone = lens _oZone (\ s a -> s{_oZone = a})
oWarnings :: Lens' Operation [OperationWarningsItem]
oWarnings
= lens _oWarnings (\ s a -> s{_oWarnings = a}) .
_Default
. _Coerce
oHTTPErrorStatusCode :: Lens' Operation (Maybe Int32)
oHTTPErrorStatusCode
= lens _oHTTPErrorStatusCode
(\ s a -> s{_oHTTPErrorStatusCode = a})
. mapping _Coerce
oUser :: Lens' Operation (Maybe Text)
oUser = lens _oUser (\ s a -> s{_oUser = a})
oSelfLink :: Lens' Operation (Maybe Text)
oSelfLink
= lens _oSelfLink (\ s a -> s{_oSelfLink = a})
oName :: Lens' Operation (Maybe Text)
oName = lens _oName (\ s a -> s{_oName = a})
oStatusMessage :: Lens' Operation (Maybe Text)
oStatusMessage
= lens _oStatusMessage
(\ s a -> s{_oStatusMessage = a})
oCreationTimestamp :: Lens' Operation (Maybe Text)
oCreationTimestamp
= lens _oCreationTimestamp
(\ s a -> s{_oCreationTimestamp = a})
oEndTime :: Lens' Operation (Maybe Text)
oEndTime = lens _oEndTime (\ s a -> s{_oEndTime = a})
oId :: Lens' Operation (Maybe Word64)
oId
= lens _oId (\ s a -> s{_oId = a}) . mapping _Coerce
oOperationType :: Lens' Operation (Maybe Text)
oOperationType
= lens _oOperationType
(\ s a -> s{_oOperationType = a})
oRegion :: Lens' Operation (Maybe Text)
oRegion = lens _oRegion (\ s a -> s{_oRegion = a})
oDescription :: Lens' Operation (Maybe Text)
oDescription
= lens _oDescription (\ s a -> s{_oDescription = a})
oTargetLink :: Lens' Operation (Maybe Text)
oTargetLink
= lens _oTargetLink (\ s a -> s{_oTargetLink = a})
oClientOperationId :: Lens' Operation (Maybe Text)
oClientOperationId
= lens _oClientOperationId
(\ s a -> s{_oClientOperationId = a})
instance FromJSON Operation where
parseJSON
= withObject "Operation"
(\ o ->
Operation' <$>
(o .:? "targetId") <*> (o .:? "status") <*>
(o .:? "insertTime")
<*> (o .:? "progress")
<*> (o .:? "startTime")
<*> (o .:? "kind" .!= "clouduseraccounts#operation")
<*> (o .:? "error")
<*> (o .:? "httpErrorMessage")
<*> (o .:? "zone")
<*> (o .:? "warnings" .!= mempty)
<*> (o .:? "httpErrorStatusCode")
<*> (o .:? "user")
<*> (o .:? "selfLink")
<*> (o .:? "name")
<*> (o .:? "statusMessage")
<*> (o .:? "creationTimestamp")
<*> (o .:? "endTime")
<*> (o .:? "id")
<*> (o .:? "operationType")
<*> (o .:? "region")
<*> (o .:? "description")
<*> (o .:? "targetLink")
<*> (o .:? "clientOperationId"))
instance ToJSON Operation where
toJSON Operation'{..}
= object
(catMaybes
[("targetId" .=) <$> _oTargetId,
("status" .=) <$> _oStatus,
("insertTime" .=) <$> _oInsertTime,
("progress" .=) <$> _oProgress,
("startTime" .=) <$> _oStartTime,
Just ("kind" .= _oKind), ("error" .=) <$> _oError,
("httpErrorMessage" .=) <$> _oHTTPErrorMessage,
("zone" .=) <$> _oZone,
("warnings" .=) <$> _oWarnings,
("httpErrorStatusCode" .=) <$> _oHTTPErrorStatusCode,
("user" .=) <$> _oUser,
("selfLink" .=) <$> _oSelfLink,
("name" .=) <$> _oName,
("statusMessage" .=) <$> _oStatusMessage,
("creationTimestamp" .=) <$> _oCreationTimestamp,
("endTime" .=) <$> _oEndTime, ("id" .=) <$> _oId,
("operationType" .=) <$> _oOperationType,
("region" .=) <$> _oRegion,
("description" .=) <$> _oDescription,
("targetLink" .=) <$> _oTargetLink,
("clientOperationId" .=) <$> _oClientOperationId])
data UserList = UserList'
{ _ulNextPageToken :: !(Maybe Text)
, _ulKind :: !Text
, _ulItems :: !(Maybe [User])
, _ulSelfLink :: !(Maybe Text)
, _ulId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
userList
:: UserList
userList =
UserList'
{ _ulNextPageToken = Nothing
, _ulKind = "clouduseraccounts#userList"
, _ulItems = Nothing
, _ulSelfLink = Nothing
, _ulId = Nothing
}
ulNextPageToken :: Lens' UserList (Maybe Text)
ulNextPageToken
= lens _ulNextPageToken
(\ s a -> s{_ulNextPageToken = a})
ulKind :: Lens' UserList Text
ulKind = lens _ulKind (\ s a -> s{_ulKind = a})
ulItems :: Lens' UserList [User]
ulItems
= lens _ulItems (\ s a -> s{_ulItems = a}) . _Default
. _Coerce
ulSelfLink :: Lens' UserList (Maybe Text)
ulSelfLink
= lens _ulSelfLink (\ s a -> s{_ulSelfLink = a})
ulId :: Lens' UserList (Maybe Text)
ulId = lens _ulId (\ s a -> s{_ulId = a})
instance FromJSON UserList where
parseJSON
= withObject "UserList"
(\ o ->
UserList' <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!= "clouduseraccounts#userList")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "selfLink")
<*> (o .:? "id"))
instance ToJSON UserList where
toJSON UserList'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _ulNextPageToken,
Just ("kind" .= _ulKind), ("items" .=) <$> _ulItems,
("selfLink" .=) <$> _ulSelfLink,
("id" .=) <$> _ulId])
data PublicKey = PublicKey'
{ _pkFingerprint :: !(Maybe Text)
, _pkKey :: !(Maybe Text)
, _pkCreationTimestamp :: !(Maybe Text)
, _pkExpirationTimestamp :: !(Maybe Text)
, _pkDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
publicKey
:: PublicKey
publicKey =
PublicKey'
{ _pkFingerprint = Nothing
, _pkKey = Nothing
, _pkCreationTimestamp = Nothing
, _pkExpirationTimestamp = Nothing
, _pkDescription = Nothing
}
pkFingerprint :: Lens' PublicKey (Maybe Text)
pkFingerprint
= lens _pkFingerprint
(\ s a -> s{_pkFingerprint = a})
pkKey :: Lens' PublicKey (Maybe Text)
pkKey = lens _pkKey (\ s a -> s{_pkKey = a})
pkCreationTimestamp :: Lens' PublicKey (Maybe Text)
pkCreationTimestamp
= lens _pkCreationTimestamp
(\ s a -> s{_pkCreationTimestamp = a})
pkExpirationTimestamp :: Lens' PublicKey (Maybe Text)
pkExpirationTimestamp
= lens _pkExpirationTimestamp
(\ s a -> s{_pkExpirationTimestamp = a})
pkDescription :: Lens' PublicKey (Maybe Text)
pkDescription
= lens _pkDescription
(\ s a -> s{_pkDescription = a})
instance FromJSON PublicKey where
parseJSON
= withObject "PublicKey"
(\ o ->
PublicKey' <$>
(o .:? "fingerprint") <*> (o .:? "key") <*>
(o .:? "creationTimestamp")
<*> (o .:? "expirationTimestamp")
<*> (o .:? "description"))
instance ToJSON PublicKey where
toJSON PublicKey'{..}
= object
(catMaybes
[("fingerprint" .=) <$> _pkFingerprint,
("key" .=) <$> _pkKey,
("creationTimestamp" .=) <$> _pkCreationTimestamp,
("expirationTimestamp" .=) <$>
_pkExpirationTimestamp,
("description" .=) <$> _pkDescription])
data LinuxAccountViews = LinuxAccountViews'
{ _lavUserViews :: !(Maybe [LinuxUserView])
, _lavKind :: !Text
, _lavGroupViews :: !(Maybe [LinuxGroupView])
} deriving (Eq,Show,Data,Typeable,Generic)
linuxAccountViews
:: LinuxAccountViews
linuxAccountViews =
LinuxAccountViews'
{ _lavUserViews = Nothing
, _lavKind = "clouduseraccounts#linuxAccountViews"
, _lavGroupViews = Nothing
}
lavUserViews :: Lens' LinuxAccountViews [LinuxUserView]
lavUserViews
= lens _lavUserViews (\ s a -> s{_lavUserViews = a})
. _Default
. _Coerce
lavKind :: Lens' LinuxAccountViews Text
lavKind = lens _lavKind (\ s a -> s{_lavKind = a})
lavGroupViews :: Lens' LinuxAccountViews [LinuxGroupView]
lavGroupViews
= lens _lavGroupViews
(\ s a -> s{_lavGroupViews = a})
. _Default
. _Coerce
instance FromJSON LinuxAccountViews where
parseJSON
= withObject "LinuxAccountViews"
(\ o ->
LinuxAccountViews' <$>
(o .:? "userViews" .!= mempty) <*>
(o .:? "kind" .!=
"clouduseraccounts#linuxAccountViews")
<*> (o .:? "groupViews" .!= mempty))
instance ToJSON LinuxAccountViews where
toJSON LinuxAccountViews'{..}
= object
(catMaybes
[("userViews" .=) <$> _lavUserViews,
Just ("kind" .= _lavKind),
("groupViews" .=) <$> _lavGroupViews])
data User = User'
{ _uGroups :: !(Maybe [Text])
, _uPublicKeys :: !(Maybe [PublicKey])
, _uKind :: !Text
, _uOwner :: !(Maybe Text)
, _uSelfLink :: !(Maybe Text)
, _uName :: !(Maybe Text)
, _uCreationTimestamp :: !(Maybe Text)
, _uId :: !(Maybe (Textual Word64))
, _uDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
user
:: User
user =
User'
{ _uGroups = Nothing
, _uPublicKeys = Nothing
, _uKind = "clouduseraccounts#user"
, _uOwner = Nothing
, _uSelfLink = Nothing
, _uName = Nothing
, _uCreationTimestamp = Nothing
, _uId = Nothing
, _uDescription = Nothing
}
uGroups :: Lens' User [Text]
uGroups
= lens _uGroups (\ s a -> s{_uGroups = a}) . _Default
. _Coerce
uPublicKeys :: Lens' User [PublicKey]
uPublicKeys
= lens _uPublicKeys (\ s a -> s{_uPublicKeys = a}) .
_Default
. _Coerce
uKind :: Lens' User Text
uKind = lens _uKind (\ s a -> s{_uKind = a})
uOwner :: Lens' User (Maybe Text)
uOwner = lens _uOwner (\ s a -> s{_uOwner = a})
uSelfLink :: Lens' User (Maybe Text)
uSelfLink
= lens _uSelfLink (\ s a -> s{_uSelfLink = a})
uName :: Lens' User (Maybe Text)
uName = lens _uName (\ s a -> s{_uName = a})
uCreationTimestamp :: Lens' User (Maybe Text)
uCreationTimestamp
= lens _uCreationTimestamp
(\ s a -> s{_uCreationTimestamp = a})
uId :: Lens' User (Maybe Word64)
uId
= lens _uId (\ s a -> s{_uId = a}) . mapping _Coerce
uDescription :: Lens' User (Maybe Text)
uDescription
= lens _uDescription (\ s a -> s{_uDescription = a})
instance FromJSON User where
parseJSON
= withObject "User"
(\ o ->
User' <$>
(o .:? "groups" .!= mempty) <*>
(o .:? "publicKeys" .!= mempty)
<*> (o .:? "kind" .!= "clouduseraccounts#user")
<*> (o .:? "owner")
<*> (o .:? "selfLink")
<*> (o .:? "name")
<*> (o .:? "creationTimestamp")
<*> (o .:? "id")
<*> (o .:? "description"))
instance ToJSON User where
toJSON User'{..}
= object
(catMaybes
[("groups" .=) <$> _uGroups,
("publicKeys" .=) <$> _uPublicKeys,
Just ("kind" .= _uKind), ("owner" .=) <$> _uOwner,
("selfLink" .=) <$> _uSelfLink,
("name" .=) <$> _uName,
("creationTimestamp" .=) <$> _uCreationTimestamp,
("id" .=) <$> _uId,
("description" .=) <$> _uDescription])
newtype GroupsAddMemberRequest = GroupsAddMemberRequest'
{ _gamrUsers :: Maybe [Text]
} deriving (Eq,Show,Data,Typeable,Generic)
groupsAddMemberRequest
:: GroupsAddMemberRequest
groupsAddMemberRequest =
GroupsAddMemberRequest'
{ _gamrUsers = Nothing
}
gamrUsers :: Lens' GroupsAddMemberRequest [Text]
gamrUsers
= lens _gamrUsers (\ s a -> s{_gamrUsers = a}) .
_Default
. _Coerce
instance FromJSON GroupsAddMemberRequest where
parseJSON
= withObject "GroupsAddMemberRequest"
(\ o ->
GroupsAddMemberRequest' <$>
(o .:? "users" .!= mempty))
instance ToJSON GroupsAddMemberRequest where
toJSON GroupsAddMemberRequest'{..}
= object (catMaybes [("users" .=) <$> _gamrUsers])
data LinuxGroupView = LinuxGroupView'
{ _lgvMembers :: !(Maybe [Text])
, _lgvGid :: !(Maybe (Textual Word32))
, _lgvGroupName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
linuxGroupView
:: LinuxGroupView
linuxGroupView =
LinuxGroupView'
{ _lgvMembers = Nothing
, _lgvGid = Nothing
, _lgvGroupName = Nothing
}
lgvMembers :: Lens' LinuxGroupView [Text]
lgvMembers
= lens _lgvMembers (\ s a -> s{_lgvMembers = a}) .
_Default
. _Coerce
lgvGid :: Lens' LinuxGroupView (Maybe Word32)
lgvGid
= lens _lgvGid (\ s a -> s{_lgvGid = a}) .
mapping _Coerce
lgvGroupName :: Lens' LinuxGroupView (Maybe Text)
lgvGroupName
= lens _lgvGroupName (\ s a -> s{_lgvGroupName = a})
instance FromJSON LinuxGroupView where
parseJSON
= withObject "LinuxGroupView"
(\ o ->
LinuxGroupView' <$>
(o .:? "members" .!= mempty) <*> (o .:? "gid") <*>
(o .:? "groupName"))
instance ToJSON LinuxGroupView where
toJSON LinuxGroupView'{..}
= object
(catMaybes
[("members" .=) <$> _lgvMembers,
("gid" .=) <$> _lgvGid,
("groupName" .=) <$> _lgvGroupName])
data LinuxUserView = LinuxUserView'
{ _luvGecos :: !(Maybe Text)
, _luvUid :: !(Maybe (Textual Word32))
, _luvUsername :: !(Maybe Text)
, _luvShell :: !(Maybe Text)
, _luvGid :: !(Maybe (Textual Word32))
, _luvHomeDirectory :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
linuxUserView
:: LinuxUserView
linuxUserView =
LinuxUserView'
{ _luvGecos = Nothing
, _luvUid = Nothing
, _luvUsername = Nothing
, _luvShell = Nothing
, _luvGid = Nothing
, _luvHomeDirectory = Nothing
}
luvGecos :: Lens' LinuxUserView (Maybe Text)
luvGecos = lens _luvGecos (\ s a -> s{_luvGecos = a})
luvUid :: Lens' LinuxUserView (Maybe Word32)
luvUid
= lens _luvUid (\ s a -> s{_luvUid = a}) .
mapping _Coerce
luvUsername :: Lens' LinuxUserView (Maybe Text)
luvUsername
= lens _luvUsername (\ s a -> s{_luvUsername = a})
luvShell :: Lens' LinuxUserView (Maybe Text)
luvShell = lens _luvShell (\ s a -> s{_luvShell = a})
luvGid :: Lens' LinuxUserView (Maybe Word32)
luvGid
= lens _luvGid (\ s a -> s{_luvGid = a}) .
mapping _Coerce
luvHomeDirectory :: Lens' LinuxUserView (Maybe Text)
luvHomeDirectory
= lens _luvHomeDirectory
(\ s a -> s{_luvHomeDirectory = a})
instance FromJSON LinuxUserView where
parseJSON
= withObject "LinuxUserView"
(\ o ->
LinuxUserView' <$>
(o .:? "gecos") <*> (o .:? "uid") <*>
(o .:? "username")
<*> (o .:? "shell")
<*> (o .:? "gid")
<*> (o .:? "homeDirectory"))
instance ToJSON LinuxUserView where
toJSON LinuxUserView'{..}
= object
(catMaybes
[("gecos" .=) <$> _luvGecos, ("uid" .=) <$> _luvUid,
("username" .=) <$> _luvUsername,
("shell" .=) <$> _luvShell, ("gid" .=) <$> _luvGid,
("homeDirectory" .=) <$> _luvHomeDirectory])
newtype LinuxGetLinuxAccountViewsResponse = LinuxGetLinuxAccountViewsResponse'
{ _lglavrResource :: Maybe LinuxAccountViews
} deriving (Eq,Show,Data,Typeable,Generic)
linuxGetLinuxAccountViewsResponse
:: LinuxGetLinuxAccountViewsResponse
linuxGetLinuxAccountViewsResponse =
LinuxGetLinuxAccountViewsResponse'
{ _lglavrResource = Nothing
}
lglavrResource :: Lens' LinuxGetLinuxAccountViewsResponse (Maybe LinuxAccountViews)
lglavrResource
= lens _lglavrResource
(\ s a -> s{_lglavrResource = a})
instance FromJSON LinuxGetLinuxAccountViewsResponse
where
parseJSON
= withObject "LinuxGetLinuxAccountViewsResponse"
(\ o ->
LinuxGetLinuxAccountViewsResponse' <$>
(o .:? "resource"))
instance ToJSON LinuxGetLinuxAccountViewsResponse
where
toJSON LinuxGetLinuxAccountViewsResponse'{..}
= object
(catMaybes [("resource" .=) <$> _lglavrResource])
newtype OperationError = OperationError'
{ _oeErrors :: Maybe [OperationErrorErrorsItem]
} deriving (Eq,Show,Data,Typeable,Generic)
operationError
:: OperationError
operationError =
OperationError'
{ _oeErrors = Nothing
}
oeErrors :: Lens' OperationError [OperationErrorErrorsItem]
oeErrors
= lens _oeErrors (\ s a -> s{_oeErrors = a}) .
_Default
. _Coerce
instance FromJSON OperationError where
parseJSON
= withObject "OperationError"
(\ o ->
OperationError' <$> (o .:? "errors" .!= mempty))
instance ToJSON OperationError where
toJSON OperationError'{..}
= object (catMaybes [("errors" .=) <$> _oeErrors])
newtype LinuxGetAuthorizedKeysViewResponse = LinuxGetAuthorizedKeysViewResponse'
{ _lgakvrResource :: Maybe AuthorizedKeysView
} deriving (Eq,Show,Data,Typeable,Generic)
linuxGetAuthorizedKeysViewResponse
:: LinuxGetAuthorizedKeysViewResponse
linuxGetAuthorizedKeysViewResponse =
LinuxGetAuthorizedKeysViewResponse'
{ _lgakvrResource = Nothing
}
lgakvrResource :: Lens' LinuxGetAuthorizedKeysViewResponse (Maybe AuthorizedKeysView)
lgakvrResource
= lens _lgakvrResource
(\ s a -> s{_lgakvrResource = a})
instance FromJSON LinuxGetAuthorizedKeysViewResponse
where
parseJSON
= withObject "LinuxGetAuthorizedKeysViewResponse"
(\ o ->
LinuxGetAuthorizedKeysViewResponse' <$>
(o .:? "resource"))
instance ToJSON LinuxGetAuthorizedKeysViewResponse
where
toJSON LinuxGetAuthorizedKeysViewResponse'{..}
= object
(catMaybes [("resource" .=) <$> _lgakvrResource])
data OperationErrorErrorsItem = OperationErrorErrorsItem'
{ _oeeiLocation :: !(Maybe Text)
, _oeeiCode :: !(Maybe Text)
, _oeeiMessage :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
operationErrorErrorsItem
:: OperationErrorErrorsItem
operationErrorErrorsItem =
OperationErrorErrorsItem'
{ _oeeiLocation = Nothing
, _oeeiCode = Nothing
, _oeeiMessage = Nothing
}
oeeiLocation :: Lens' OperationErrorErrorsItem (Maybe Text)
oeeiLocation
= lens _oeeiLocation (\ s a -> s{_oeeiLocation = a})
oeeiCode :: Lens' OperationErrorErrorsItem (Maybe Text)
oeeiCode = lens _oeeiCode (\ s a -> s{_oeeiCode = a})
oeeiMessage :: Lens' OperationErrorErrorsItem (Maybe Text)
oeeiMessage
= lens _oeeiMessage (\ s a -> s{_oeeiMessage = a})
instance FromJSON OperationErrorErrorsItem where
parseJSON
= withObject "OperationErrorErrorsItem"
(\ o ->
OperationErrorErrorsItem' <$>
(o .:? "location") <*> (o .:? "code") <*>
(o .:? "message"))
instance ToJSON OperationErrorErrorsItem where
toJSON OperationErrorErrorsItem'{..}
= object
(catMaybes
[("location" .=) <$> _oeeiLocation,
("code" .=) <$> _oeeiCode,
("message" .=) <$> _oeeiMessage])
newtype GroupsRemoveMemberRequest = GroupsRemoveMemberRequest'
{ _grmrUsers :: Maybe [Text]
} deriving (Eq,Show,Data,Typeable,Generic)
groupsRemoveMemberRequest
:: GroupsRemoveMemberRequest
groupsRemoveMemberRequest =
GroupsRemoveMemberRequest'
{ _grmrUsers = Nothing
}
grmrUsers :: Lens' GroupsRemoveMemberRequest [Text]
grmrUsers
= lens _grmrUsers (\ s a -> s{_grmrUsers = a}) .
_Default
. _Coerce
instance FromJSON GroupsRemoveMemberRequest where
parseJSON
= withObject "GroupsRemoveMemberRequest"
(\ o ->
GroupsRemoveMemberRequest' <$>
(o .:? "users" .!= mempty))
instance ToJSON GroupsRemoveMemberRequest where
toJSON GroupsRemoveMemberRequest'{..}
= object (catMaybes [("users" .=) <$> _grmrUsers])
data AuthorizedKeysView = AuthorizedKeysView'
{ _akvSudoer :: !(Maybe Bool)
, _akvKeys :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
authorizedKeysView
:: AuthorizedKeysView
authorizedKeysView =
AuthorizedKeysView'
{ _akvSudoer = Nothing
, _akvKeys = Nothing
}
akvSudoer :: Lens' AuthorizedKeysView (Maybe Bool)
akvSudoer
= lens _akvSudoer (\ s a -> s{_akvSudoer = a})
akvKeys :: Lens' AuthorizedKeysView [Text]
akvKeys
= lens _akvKeys (\ s a -> s{_akvKeys = a}) . _Default
. _Coerce
instance FromJSON AuthorizedKeysView where
parseJSON
= withObject "AuthorizedKeysView"
(\ o ->
AuthorizedKeysView' <$>
(o .:? "sudoer") <*> (o .:? "keys" .!= mempty))
instance ToJSON AuthorizedKeysView where
toJSON AuthorizedKeysView'{..}
= object
(catMaybes
[("sudoer" .=) <$> _akvSudoer,
("keys" .=) <$> _akvKeys])
data OperationWarningsItem = OperationWarningsItem'
{ _owiData :: !(Maybe [OperationWarningsItemDataItem])
, _owiCode :: !(Maybe OperationWarningsItemCode)
, _owiMessage :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
operationWarningsItem
:: OperationWarningsItem
operationWarningsItem =
OperationWarningsItem'
{ _owiData = Nothing
, _owiCode = Nothing
, _owiMessage = Nothing
}
owiData :: Lens' OperationWarningsItem [OperationWarningsItemDataItem]
owiData
= lens _owiData (\ s a -> s{_owiData = a}) . _Default
. _Coerce
owiCode :: Lens' OperationWarningsItem (Maybe OperationWarningsItemCode)
owiCode = lens _owiCode (\ s a -> s{_owiCode = a})
owiMessage :: Lens' OperationWarningsItem (Maybe Text)
owiMessage
= lens _owiMessage (\ s a -> s{_owiMessage = a})
instance FromJSON OperationWarningsItem where
parseJSON
= withObject "OperationWarningsItem"
(\ o ->
OperationWarningsItem' <$>
(o .:? "data" .!= mempty) <*> (o .:? "code") <*>
(o .:? "message"))
instance ToJSON OperationWarningsItem where
toJSON OperationWarningsItem'{..}
= object
(catMaybes
[("data" .=) <$> _owiData, ("code" .=) <$> _owiCode,
("message" .=) <$> _owiMessage])