module Network.AWS.Greengrass.Types.Product where
import Network.AWS.Greengrass.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
data ConnectivityInfo = ConnectivityInfo'
{ _ciPortNumber :: !(Maybe Int)
, _ciId :: !(Maybe Text)
, _ciMetadata :: !(Maybe Text)
, _ciHostAddress :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
connectivityInfo
:: ConnectivityInfo
connectivityInfo =
ConnectivityInfo'
{ _ciPortNumber = Nothing
, _ciId = Nothing
, _ciMetadata = Nothing
, _ciHostAddress = Nothing
}
ciPortNumber :: Lens' ConnectivityInfo (Maybe Int)
ciPortNumber = lens _ciPortNumber (\ s a -> s{_ciPortNumber = a});
ciId :: Lens' ConnectivityInfo (Maybe Text)
ciId = lens _ciId (\ s a -> s{_ciId = a});
ciMetadata :: Lens' ConnectivityInfo (Maybe Text)
ciMetadata = lens _ciMetadata (\ s a -> s{_ciMetadata = a});
ciHostAddress :: Lens' ConnectivityInfo (Maybe Text)
ciHostAddress = lens _ciHostAddress (\ s a -> s{_ciHostAddress = a});
instance FromJSON ConnectivityInfo where
parseJSON
= withObject "ConnectivityInfo"
(\ x ->
ConnectivityInfo' <$>
(x .:? "PortNumber") <*> (x .:? "Id") <*>
(x .:? "Metadata")
<*> (x .:? "HostAddress"))
instance Hashable ConnectivityInfo where
instance NFData ConnectivityInfo where
instance ToJSON ConnectivityInfo where
toJSON ConnectivityInfo'{..}
= object
(catMaybes
[("PortNumber" .=) <$> _ciPortNumber,
("Id" .=) <$> _ciId, ("Metadata" .=) <$> _ciMetadata,
("HostAddress" .=) <$> _ciHostAddress])
data Core = Core'
{ _cCertificateARN :: !(Maybe Text)
, _cThingARN :: !(Maybe Text)
, _cSyncShadow :: !(Maybe Bool)
, _cId :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
core
:: Core
core =
Core'
{ _cCertificateARN = Nothing
, _cThingARN = Nothing
, _cSyncShadow = Nothing
, _cId = Nothing
}
cCertificateARN :: Lens' Core (Maybe Text)
cCertificateARN = lens _cCertificateARN (\ s a -> s{_cCertificateARN = a});
cThingARN :: Lens' Core (Maybe Text)
cThingARN = lens _cThingARN (\ s a -> s{_cThingARN = a});
cSyncShadow :: Lens' Core (Maybe Bool)
cSyncShadow = lens _cSyncShadow (\ s a -> s{_cSyncShadow = a});
cId :: Lens' Core (Maybe Text)
cId = lens _cId (\ s a -> s{_cId = a});
instance FromJSON Core where
parseJSON
= withObject "Core"
(\ x ->
Core' <$>
(x .:? "CertificateArn") <*> (x .:? "ThingArn") <*>
(x .:? "SyncShadow")
<*> (x .:? "Id"))
instance Hashable Core where
instance NFData Core where
instance ToJSON Core where
toJSON Core'{..}
= object
(catMaybes
[("CertificateArn" .=) <$> _cCertificateARN,
("ThingArn" .=) <$> _cThingARN,
("SyncShadow" .=) <$> _cSyncShadow,
("Id" .=) <$> _cId])
newtype CoreDefinitionVersion = CoreDefinitionVersion'
{ _cdvCores :: Maybe [Core]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
coreDefinitionVersion
:: CoreDefinitionVersion
coreDefinitionVersion = CoreDefinitionVersion' {_cdvCores = Nothing}
cdvCores :: Lens' CoreDefinitionVersion [Core]
cdvCores = lens _cdvCores (\ s a -> s{_cdvCores = a}) . _Default . _Coerce;
instance FromJSON CoreDefinitionVersion where
parseJSON
= withObject "CoreDefinitionVersion"
(\ x ->
CoreDefinitionVersion' <$>
(x .:? "Cores" .!= mempty))
instance Hashable CoreDefinitionVersion where
instance NFData CoreDefinitionVersion where
instance ToJSON CoreDefinitionVersion where
toJSON CoreDefinitionVersion'{..}
= object (catMaybes [("Cores" .=) <$> _cdvCores])
data DefinitionInformation = DefinitionInformation'
{ _diLatestVersionARN :: !(Maybe Text)
, _diARN :: !(Maybe Text)
, _diName :: !(Maybe Text)
, _diCreationTimestamp :: !(Maybe Text)
, _diId :: !(Maybe Text)
, _diLatestVersion :: !(Maybe Text)
, _diLastUpdatedTimestamp :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
definitionInformation
:: DefinitionInformation
definitionInformation =
DefinitionInformation'
{ _diLatestVersionARN = Nothing
, _diARN = Nothing
, _diName = Nothing
, _diCreationTimestamp = Nothing
, _diId = Nothing
, _diLatestVersion = Nothing
, _diLastUpdatedTimestamp = Nothing
}
diLatestVersionARN :: Lens' DefinitionInformation (Maybe Text)
diLatestVersionARN = lens _diLatestVersionARN (\ s a -> s{_diLatestVersionARN = a});
diARN :: Lens' DefinitionInformation (Maybe Text)
diARN = lens _diARN (\ s a -> s{_diARN = a});
diName :: Lens' DefinitionInformation (Maybe Text)
diName = lens _diName (\ s a -> s{_diName = a});
diCreationTimestamp :: Lens' DefinitionInformation (Maybe Text)
diCreationTimestamp = lens _diCreationTimestamp (\ s a -> s{_diCreationTimestamp = a});
diId :: Lens' DefinitionInformation (Maybe Text)
diId = lens _diId (\ s a -> s{_diId = a});
diLatestVersion :: Lens' DefinitionInformation (Maybe Text)
diLatestVersion = lens _diLatestVersion (\ s a -> s{_diLatestVersion = a});
diLastUpdatedTimestamp :: Lens' DefinitionInformation (Maybe Text)
diLastUpdatedTimestamp = lens _diLastUpdatedTimestamp (\ s a -> s{_diLastUpdatedTimestamp = a});
instance FromJSON DefinitionInformation where
parseJSON
= withObject "DefinitionInformation"
(\ x ->
DefinitionInformation' <$>
(x .:? "LatestVersionArn") <*> (x .:? "Arn") <*>
(x .:? "Name")
<*> (x .:? "CreationTimestamp")
<*> (x .:? "Id")
<*> (x .:? "LatestVersion")
<*> (x .:? "LastUpdatedTimestamp"))
instance Hashable DefinitionInformation where
instance NFData DefinitionInformation where
data Deployment = Deployment'
{ _dDeploymentId :: !(Maybe Text)
, _dDeploymentARN :: !(Maybe Text)
, _dCreatedAt :: !(Maybe Text)
, _dDeploymentType :: !(Maybe DeploymentType)
, _dGroupARN :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deployment
:: Deployment
deployment =
Deployment'
{ _dDeploymentId = Nothing
, _dDeploymentARN = Nothing
, _dCreatedAt = Nothing
, _dDeploymentType = Nothing
, _dGroupARN = Nothing
}
dDeploymentId :: Lens' Deployment (Maybe Text)
dDeploymentId = lens _dDeploymentId (\ s a -> s{_dDeploymentId = a});
dDeploymentARN :: Lens' Deployment (Maybe Text)
dDeploymentARN = lens _dDeploymentARN (\ s a -> s{_dDeploymentARN = a});
dCreatedAt :: Lens' Deployment (Maybe Text)
dCreatedAt = lens _dCreatedAt (\ s a -> s{_dCreatedAt = a});
dDeploymentType :: Lens' Deployment (Maybe DeploymentType)
dDeploymentType = lens _dDeploymentType (\ s a -> s{_dDeploymentType = a});
dGroupARN :: Lens' Deployment (Maybe Text)
dGroupARN = lens _dGroupARN (\ s a -> s{_dGroupARN = a});
instance FromJSON Deployment where
parseJSON
= withObject "Deployment"
(\ x ->
Deployment' <$>
(x .:? "DeploymentId") <*> (x .:? "DeploymentArn")
<*> (x .:? "CreatedAt")
<*> (x .:? "DeploymentType")
<*> (x .:? "GroupArn"))
instance Hashable Deployment where
instance NFData Deployment where
data Device = Device'
{ _dCertificateARN :: !(Maybe Text)
, _dThingARN :: !(Maybe Text)
, _dSyncShadow :: !(Maybe Bool)
, _dId :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
device
:: Device
device =
Device'
{ _dCertificateARN = Nothing
, _dThingARN = Nothing
, _dSyncShadow = Nothing
, _dId = Nothing
}
dCertificateARN :: Lens' Device (Maybe Text)
dCertificateARN = lens _dCertificateARN (\ s a -> s{_dCertificateARN = a});
dThingARN :: Lens' Device (Maybe Text)
dThingARN = lens _dThingARN (\ s a -> s{_dThingARN = a});
dSyncShadow :: Lens' Device (Maybe Bool)
dSyncShadow = lens _dSyncShadow (\ s a -> s{_dSyncShadow = a});
dId :: Lens' Device (Maybe Text)
dId = lens _dId (\ s a -> s{_dId = a});
instance FromJSON Device where
parseJSON
= withObject "Device"
(\ x ->
Device' <$>
(x .:? "CertificateArn") <*> (x .:? "ThingArn") <*>
(x .:? "SyncShadow")
<*> (x .:? "Id"))
instance Hashable Device where
instance NFData Device where
instance ToJSON Device where
toJSON Device'{..}
= object
(catMaybes
[("CertificateArn" .=) <$> _dCertificateARN,
("ThingArn" .=) <$> _dThingARN,
("SyncShadow" .=) <$> _dSyncShadow,
("Id" .=) <$> _dId])
newtype DeviceDefinitionVersion = DeviceDefinitionVersion'
{ _ddvDevices :: Maybe [Device]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deviceDefinitionVersion
:: DeviceDefinitionVersion
deviceDefinitionVersion = DeviceDefinitionVersion' {_ddvDevices = Nothing}
ddvDevices :: Lens' DeviceDefinitionVersion [Device]
ddvDevices = lens _ddvDevices (\ s a -> s{_ddvDevices = a}) . _Default . _Coerce;
instance FromJSON DeviceDefinitionVersion where
parseJSON
= withObject "DeviceDefinitionVersion"
(\ x ->
DeviceDefinitionVersion' <$>
(x .:? "Devices" .!= mempty))
instance Hashable DeviceDefinitionVersion where
instance NFData DeviceDefinitionVersion where
instance ToJSON DeviceDefinitionVersion where
toJSON DeviceDefinitionVersion'{..}
= object (catMaybes [("Devices" .=) <$> _ddvDevices])
data ErrorDetail = ErrorDetail'
{ _edDetailedErrorCode :: !(Maybe Text)
, _edDetailedErrorMessage :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
errorDetail
:: ErrorDetail
errorDetail =
ErrorDetail'
{_edDetailedErrorCode = Nothing, _edDetailedErrorMessage = Nothing}
edDetailedErrorCode :: Lens' ErrorDetail (Maybe Text)
edDetailedErrorCode = lens _edDetailedErrorCode (\ s a -> s{_edDetailedErrorCode = a});
edDetailedErrorMessage :: Lens' ErrorDetail (Maybe Text)
edDetailedErrorMessage = lens _edDetailedErrorMessage (\ s a -> s{_edDetailedErrorMessage = a});
instance FromJSON ErrorDetail where
parseJSON
= withObject "ErrorDetail"
(\ x ->
ErrorDetail' <$>
(x .:? "DetailedErrorCode") <*>
(x .:? "DetailedErrorMessage"))
instance Hashable ErrorDetail where
instance NFData ErrorDetail where
data Function = Function'
{ _fFunctionARN :: !(Maybe Text)
, _fFunctionConfiguration :: !(Maybe FunctionConfiguration)
, _fId :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
function
:: Function
function =
Function'
{_fFunctionARN = Nothing, _fFunctionConfiguration = Nothing, _fId = Nothing}
fFunctionARN :: Lens' Function (Maybe Text)
fFunctionARN = lens _fFunctionARN (\ s a -> s{_fFunctionARN = a});
fFunctionConfiguration :: Lens' Function (Maybe FunctionConfiguration)
fFunctionConfiguration = lens _fFunctionConfiguration (\ s a -> s{_fFunctionConfiguration = a});
fId :: Lens' Function (Maybe Text)
fId = lens _fId (\ s a -> s{_fId = a});
instance FromJSON Function where
parseJSON
= withObject "Function"
(\ x ->
Function' <$>
(x .:? "FunctionArn") <*>
(x .:? "FunctionConfiguration")
<*> (x .:? "Id"))
instance Hashable Function where
instance NFData Function where
instance ToJSON Function where
toJSON Function'{..}
= object
(catMaybes
[("FunctionArn" .=) <$> _fFunctionARN,
("FunctionConfiguration" .=) <$>
_fFunctionConfiguration,
("Id" .=) <$> _fId])
data FunctionConfiguration = FunctionConfiguration'
{ _fcMemorySize :: !(Maybe Int)
, _fcExecArgs :: !(Maybe Text)
, _fcEnvironment :: !(Maybe FunctionConfigurationEnvironment)
, _fcExecutable :: !(Maybe Text)
, _fcPinned :: !(Maybe Bool)
, _fcTimeout :: !(Maybe Int)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
functionConfiguration
:: FunctionConfiguration
functionConfiguration =
FunctionConfiguration'
{ _fcMemorySize = Nothing
, _fcExecArgs = Nothing
, _fcEnvironment = Nothing
, _fcExecutable = Nothing
, _fcPinned = Nothing
, _fcTimeout = Nothing
}
fcMemorySize :: Lens' FunctionConfiguration (Maybe Int)
fcMemorySize = lens _fcMemorySize (\ s a -> s{_fcMemorySize = a});
fcExecArgs :: Lens' FunctionConfiguration (Maybe Text)
fcExecArgs = lens _fcExecArgs (\ s a -> s{_fcExecArgs = a});
fcEnvironment :: Lens' FunctionConfiguration (Maybe FunctionConfigurationEnvironment)
fcEnvironment = lens _fcEnvironment (\ s a -> s{_fcEnvironment = a});
fcExecutable :: Lens' FunctionConfiguration (Maybe Text)
fcExecutable = lens _fcExecutable (\ s a -> s{_fcExecutable = a});
fcPinned :: Lens' FunctionConfiguration (Maybe Bool)
fcPinned = lens _fcPinned (\ s a -> s{_fcPinned = a});
fcTimeout :: Lens' FunctionConfiguration (Maybe Int)
fcTimeout = lens _fcTimeout (\ s a -> s{_fcTimeout = a});
instance FromJSON FunctionConfiguration where
parseJSON
= withObject "FunctionConfiguration"
(\ x ->
FunctionConfiguration' <$>
(x .:? "MemorySize") <*> (x .:? "ExecArgs") <*>
(x .:? "Environment")
<*> (x .:? "Executable")
<*> (x .:? "Pinned")
<*> (x .:? "Timeout"))
instance Hashable FunctionConfiguration where
instance NFData FunctionConfiguration where
instance ToJSON FunctionConfiguration where
toJSON FunctionConfiguration'{..}
= object
(catMaybes
[("MemorySize" .=) <$> _fcMemorySize,
("ExecArgs" .=) <$> _fcExecArgs,
("Environment" .=) <$> _fcEnvironment,
("Executable" .=) <$> _fcExecutable,
("Pinned" .=) <$> _fcPinned,
("Timeout" .=) <$> _fcTimeout])
newtype FunctionConfigurationEnvironment = FunctionConfigurationEnvironment'
{ _fceVariables :: Maybe (Map Text Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
functionConfigurationEnvironment
:: FunctionConfigurationEnvironment
functionConfigurationEnvironment =
FunctionConfigurationEnvironment' {_fceVariables = Nothing}
fceVariables :: Lens' FunctionConfigurationEnvironment (HashMap Text Text)
fceVariables = lens _fceVariables (\ s a -> s{_fceVariables = a}) . _Default . _Map;
instance FromJSON FunctionConfigurationEnvironment
where
parseJSON
= withObject "FunctionConfigurationEnvironment"
(\ x ->
FunctionConfigurationEnvironment' <$>
(x .:? "Variables" .!= mempty))
instance Hashable FunctionConfigurationEnvironment
where
instance NFData FunctionConfigurationEnvironment
where
instance ToJSON FunctionConfigurationEnvironment
where
toJSON FunctionConfigurationEnvironment'{..}
= object
(catMaybes [("Variables" .=) <$> _fceVariables])
newtype FunctionDefinitionVersion = FunctionDefinitionVersion'
{ _fdvFunctions :: Maybe [Function]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
functionDefinitionVersion
:: FunctionDefinitionVersion
functionDefinitionVersion = FunctionDefinitionVersion' {_fdvFunctions = Nothing}
fdvFunctions :: Lens' FunctionDefinitionVersion [Function]
fdvFunctions = lens _fdvFunctions (\ s a -> s{_fdvFunctions = a}) . _Default . _Coerce;
instance FromJSON FunctionDefinitionVersion where
parseJSON
= withObject "FunctionDefinitionVersion"
(\ x ->
FunctionDefinitionVersion' <$>
(x .:? "Functions" .!= mempty))
instance Hashable FunctionDefinitionVersion where
instance NFData FunctionDefinitionVersion where
instance ToJSON FunctionDefinitionVersion where
toJSON FunctionDefinitionVersion'{..}
= object
(catMaybes [("Functions" .=) <$> _fdvFunctions])
data GreengrassLogger = GreengrassLogger'
{ _glSpace :: !(Maybe Int)
, _glComponent :: !(Maybe LoggerComponent)
, _glId :: !(Maybe Text)
, _glType :: !(Maybe LoggerType)
, _glLevel :: !(Maybe LoggerLevel)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
greengrassLogger
:: GreengrassLogger
greengrassLogger =
GreengrassLogger'
{ _glSpace = Nothing
, _glComponent = Nothing
, _glId = Nothing
, _glType = Nothing
, _glLevel = Nothing
}
glSpace :: Lens' GreengrassLogger (Maybe Int)
glSpace = lens _glSpace (\ s a -> s{_glSpace = a});
glComponent :: Lens' GreengrassLogger (Maybe LoggerComponent)
glComponent = lens _glComponent (\ s a -> s{_glComponent = a});
glId :: Lens' GreengrassLogger (Maybe Text)
glId = lens _glId (\ s a -> s{_glId = a});
glType :: Lens' GreengrassLogger (Maybe LoggerType)
glType = lens _glType (\ s a -> s{_glType = a});
glLevel :: Lens' GreengrassLogger (Maybe LoggerLevel)
glLevel = lens _glLevel (\ s a -> s{_glLevel = a});
instance FromJSON GreengrassLogger where
parseJSON
= withObject "GreengrassLogger"
(\ x ->
GreengrassLogger' <$>
(x .:? "Space") <*> (x .:? "Component") <*>
(x .:? "Id")
<*> (x .:? "Type")
<*> (x .:? "Level"))
instance Hashable GreengrassLogger where
instance NFData GreengrassLogger where
instance ToJSON GreengrassLogger where
toJSON GreengrassLogger'{..}
= object
(catMaybes
[("Space" .=) <$> _glSpace,
("Component" .=) <$> _glComponent,
("Id" .=) <$> _glId, ("Type" .=) <$> _glType,
("Level" .=) <$> _glLevel])
data GroupCertificateAuthorityProperties = GroupCertificateAuthorityProperties'
{ _gcapGroupCertificateAuthorityARN :: !(Maybe Text)
, _gcapGroupCertificateAuthorityId :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
groupCertificateAuthorityProperties
:: GroupCertificateAuthorityProperties
groupCertificateAuthorityProperties =
GroupCertificateAuthorityProperties'
{ _gcapGroupCertificateAuthorityARN = Nothing
, _gcapGroupCertificateAuthorityId = Nothing
}
gcapGroupCertificateAuthorityARN :: Lens' GroupCertificateAuthorityProperties (Maybe Text)
gcapGroupCertificateAuthorityARN = lens _gcapGroupCertificateAuthorityARN (\ s a -> s{_gcapGroupCertificateAuthorityARN = a});
gcapGroupCertificateAuthorityId :: Lens' GroupCertificateAuthorityProperties (Maybe Text)
gcapGroupCertificateAuthorityId = lens _gcapGroupCertificateAuthorityId (\ s a -> s{_gcapGroupCertificateAuthorityId = a});
instance FromJSON GroupCertificateAuthorityProperties
where
parseJSON
= withObject "GroupCertificateAuthorityProperties"
(\ x ->
GroupCertificateAuthorityProperties' <$>
(x .:? "GroupCertificateAuthorityArn") <*>
(x .:? "GroupCertificateAuthorityId"))
instance Hashable GroupCertificateAuthorityProperties
where
instance NFData GroupCertificateAuthorityProperties
where
data GroupInformation = GroupInformation'
{ _giLatestVersionARN :: !(Maybe Text)
, _giARN :: !(Maybe Text)
, _giName :: !(Maybe Text)
, _giCreationTimestamp :: !(Maybe Text)
, _giId :: !(Maybe Text)
, _giLatestVersion :: !(Maybe Text)
, _giLastUpdatedTimestamp :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
groupInformation
:: GroupInformation
groupInformation =
GroupInformation'
{ _giLatestVersionARN = Nothing
, _giARN = Nothing
, _giName = Nothing
, _giCreationTimestamp = Nothing
, _giId = Nothing
, _giLatestVersion = Nothing
, _giLastUpdatedTimestamp = Nothing
}
giLatestVersionARN :: Lens' GroupInformation (Maybe Text)
giLatestVersionARN = lens _giLatestVersionARN (\ s a -> s{_giLatestVersionARN = a});
giARN :: Lens' GroupInformation (Maybe Text)
giARN = lens _giARN (\ s a -> s{_giARN = a});
giName :: Lens' GroupInformation (Maybe Text)
giName = lens _giName (\ s a -> s{_giName = a});
giCreationTimestamp :: Lens' GroupInformation (Maybe Text)
giCreationTimestamp = lens _giCreationTimestamp (\ s a -> s{_giCreationTimestamp = a});
giId :: Lens' GroupInformation (Maybe Text)
giId = lens _giId (\ s a -> s{_giId = a});
giLatestVersion :: Lens' GroupInformation (Maybe Text)
giLatestVersion = lens _giLatestVersion (\ s a -> s{_giLatestVersion = a});
giLastUpdatedTimestamp :: Lens' GroupInformation (Maybe Text)
giLastUpdatedTimestamp = lens _giLastUpdatedTimestamp (\ s a -> s{_giLastUpdatedTimestamp = a});
instance FromJSON GroupInformation where
parseJSON
= withObject "GroupInformation"
(\ x ->
GroupInformation' <$>
(x .:? "LatestVersionArn") <*> (x .:? "Arn") <*>
(x .:? "Name")
<*> (x .:? "CreationTimestamp")
<*> (x .:? "Id")
<*> (x .:? "LatestVersion")
<*> (x .:? "LastUpdatedTimestamp"))
instance Hashable GroupInformation where
instance NFData GroupInformation where
data GroupVersion = GroupVersion'
{ _gvSubscriptionDefinitionVersionARN :: !(Maybe Text)
, _gvCoreDefinitionVersionARN :: !(Maybe Text)
, _gvDeviceDefinitionVersionARN :: !(Maybe Text)
, _gvFunctionDefinitionVersionARN :: !(Maybe Text)
, _gvLoggerDefinitionVersionARN :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
groupVersion
:: GroupVersion
groupVersion =
GroupVersion'
{ _gvSubscriptionDefinitionVersionARN = Nothing
, _gvCoreDefinitionVersionARN = Nothing
, _gvDeviceDefinitionVersionARN = Nothing
, _gvFunctionDefinitionVersionARN = Nothing
, _gvLoggerDefinitionVersionARN = Nothing
}
gvSubscriptionDefinitionVersionARN :: Lens' GroupVersion (Maybe Text)
gvSubscriptionDefinitionVersionARN = lens _gvSubscriptionDefinitionVersionARN (\ s a -> s{_gvSubscriptionDefinitionVersionARN = a});
gvCoreDefinitionVersionARN :: Lens' GroupVersion (Maybe Text)
gvCoreDefinitionVersionARN = lens _gvCoreDefinitionVersionARN (\ s a -> s{_gvCoreDefinitionVersionARN = a});
gvDeviceDefinitionVersionARN :: Lens' GroupVersion (Maybe Text)
gvDeviceDefinitionVersionARN = lens _gvDeviceDefinitionVersionARN (\ s a -> s{_gvDeviceDefinitionVersionARN = a});
gvFunctionDefinitionVersionARN :: Lens' GroupVersion (Maybe Text)
gvFunctionDefinitionVersionARN = lens _gvFunctionDefinitionVersionARN (\ s a -> s{_gvFunctionDefinitionVersionARN = a});
gvLoggerDefinitionVersionARN :: Lens' GroupVersion (Maybe Text)
gvLoggerDefinitionVersionARN = lens _gvLoggerDefinitionVersionARN (\ s a -> s{_gvLoggerDefinitionVersionARN = a});
instance FromJSON GroupVersion where
parseJSON
= withObject "GroupVersion"
(\ x ->
GroupVersion' <$>
(x .:? "SubscriptionDefinitionVersionArn") <*>
(x .:? "CoreDefinitionVersionArn")
<*> (x .:? "DeviceDefinitionVersionArn")
<*> (x .:? "FunctionDefinitionVersionArn")
<*> (x .:? "LoggerDefinitionVersionArn"))
instance Hashable GroupVersion where
instance NFData GroupVersion where
instance ToJSON GroupVersion where
toJSON GroupVersion'{..}
= object
(catMaybes
[("SubscriptionDefinitionVersionArn" .=) <$>
_gvSubscriptionDefinitionVersionARN,
("CoreDefinitionVersionArn" .=) <$>
_gvCoreDefinitionVersionARN,
("DeviceDefinitionVersionArn" .=) <$>
_gvDeviceDefinitionVersionARN,
("FunctionDefinitionVersionArn" .=) <$>
_gvFunctionDefinitionVersionARN,
("LoggerDefinitionVersionArn" .=) <$>
_gvLoggerDefinitionVersionARN])
newtype LoggerDefinitionVersion = LoggerDefinitionVersion'
{ _ldvLoggers :: Maybe [GreengrassLogger]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
loggerDefinitionVersion
:: LoggerDefinitionVersion
loggerDefinitionVersion = LoggerDefinitionVersion' {_ldvLoggers = Nothing}
ldvLoggers :: Lens' LoggerDefinitionVersion [GreengrassLogger]
ldvLoggers = lens _ldvLoggers (\ s a -> s{_ldvLoggers = a}) . _Default . _Coerce;
instance FromJSON LoggerDefinitionVersion where
parseJSON
= withObject "LoggerDefinitionVersion"
(\ x ->
LoggerDefinitionVersion' <$>
(x .:? "Loggers" .!= mempty))
instance Hashable LoggerDefinitionVersion where
instance NFData LoggerDefinitionVersion where
instance ToJSON LoggerDefinitionVersion where
toJSON LoggerDefinitionVersion'{..}
= object (catMaybes [("Loggers" .=) <$> _ldvLoggers])
data Subscription = Subscription'
{ _sSubject :: !(Maybe Text)
, _sSource :: !(Maybe Text)
, _sId :: !(Maybe Text)
, _sTarget :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
subscription
:: Subscription
subscription =
Subscription'
{_sSubject = Nothing, _sSource = Nothing, _sId = Nothing, _sTarget = Nothing}
sSubject :: Lens' Subscription (Maybe Text)
sSubject = lens _sSubject (\ s a -> s{_sSubject = a});
sSource :: Lens' Subscription (Maybe Text)
sSource = lens _sSource (\ s a -> s{_sSource = a});
sId :: Lens' Subscription (Maybe Text)
sId = lens _sId (\ s a -> s{_sId = a});
sTarget :: Lens' Subscription (Maybe Text)
sTarget = lens _sTarget (\ s a -> s{_sTarget = a});
instance FromJSON Subscription where
parseJSON
= withObject "Subscription"
(\ x ->
Subscription' <$>
(x .:? "Subject") <*> (x .:? "Source") <*>
(x .:? "Id")
<*> (x .:? "Target"))
instance Hashable Subscription where
instance NFData Subscription where
instance ToJSON Subscription where
toJSON Subscription'{..}
= object
(catMaybes
[("Subject" .=) <$> _sSubject,
("Source" .=) <$> _sSource, ("Id" .=) <$> _sId,
("Target" .=) <$> _sTarget])
newtype SubscriptionDefinitionVersion = SubscriptionDefinitionVersion'
{ _sdvSubscriptions :: Maybe [Subscription]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
subscriptionDefinitionVersion
:: SubscriptionDefinitionVersion
subscriptionDefinitionVersion =
SubscriptionDefinitionVersion' {_sdvSubscriptions = Nothing}
sdvSubscriptions :: Lens' SubscriptionDefinitionVersion [Subscription]
sdvSubscriptions = lens _sdvSubscriptions (\ s a -> s{_sdvSubscriptions = a}) . _Default . _Coerce;
instance FromJSON SubscriptionDefinitionVersion where
parseJSON
= withObject "SubscriptionDefinitionVersion"
(\ x ->
SubscriptionDefinitionVersion' <$>
(x .:? "Subscriptions" .!= mempty))
instance Hashable SubscriptionDefinitionVersion where
instance NFData SubscriptionDefinitionVersion where
instance ToJSON SubscriptionDefinitionVersion where
toJSON SubscriptionDefinitionVersion'{..}
= object
(catMaybes
[("Subscriptions" .=) <$> _sdvSubscriptions])
data VersionInformation = VersionInformation'
{ _viARN :: !(Maybe Text)
, _viCreationTimestamp :: !(Maybe Text)
, _viVersion :: !(Maybe Text)
, _viId :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
versionInformation
:: VersionInformation
versionInformation =
VersionInformation'
{ _viARN = Nothing
, _viCreationTimestamp = Nothing
, _viVersion = Nothing
, _viId = Nothing
}
viARN :: Lens' VersionInformation (Maybe Text)
viARN = lens _viARN (\ s a -> s{_viARN = a});
viCreationTimestamp :: Lens' VersionInformation (Maybe Text)
viCreationTimestamp = lens _viCreationTimestamp (\ s a -> s{_viCreationTimestamp = a});
viVersion :: Lens' VersionInformation (Maybe Text)
viVersion = lens _viVersion (\ s a -> s{_viVersion = a});
viId :: Lens' VersionInformation (Maybe Text)
viId = lens _viId (\ s a -> s{_viId = a});
instance FromJSON VersionInformation where
parseJSON
= withObject "VersionInformation"
(\ x ->
VersionInformation' <$>
(x .:? "Arn") <*> (x .:? "CreationTimestamp") <*>
(x .:? "Version")
<*> (x .:? "Id"))
instance Hashable VersionInformation where
instance NFData VersionInformation where