module Network.AWS.ElasticSearch.Types.Product where
import Network.AWS.ElasticSearch.Types.Sum
import Network.AWS.Prelude
data AccessPoliciesStatus = AccessPoliciesStatus'
{ _apsOptions :: !Text
, _apsStatus :: !OptionStatus
} deriving (Eq,Read,Show,Data,Typeable,Generic)
accessPoliciesStatus
:: Text
-> OptionStatus
-> AccessPoliciesStatus
accessPoliciesStatus pOptions_ pStatus_ =
AccessPoliciesStatus'
{ _apsOptions = pOptions_
, _apsStatus = pStatus_
}
apsOptions :: Lens' AccessPoliciesStatus Text
apsOptions = lens _apsOptions (\ s a -> s{_apsOptions = a});
apsStatus :: Lens' AccessPoliciesStatus OptionStatus
apsStatus = lens _apsStatus (\ s a -> s{_apsStatus = a});
instance FromJSON AccessPoliciesStatus where
parseJSON
= withObject "AccessPoliciesStatus"
(\ x ->
AccessPoliciesStatus' <$>
(x .: "Options") <*> (x .: "Status"))
data AdvancedOptionsStatus = AdvancedOptionsStatus'
{ _aosOptions :: !(Map Text Text)
, _aosStatus :: !OptionStatus
} deriving (Eq,Read,Show,Data,Typeable,Generic)
advancedOptionsStatus
:: OptionStatus
-> AdvancedOptionsStatus
advancedOptionsStatus pStatus_ =
AdvancedOptionsStatus'
{ _aosOptions = mempty
, _aosStatus = pStatus_
}
aosOptions :: Lens' AdvancedOptionsStatus (HashMap Text Text)
aosOptions = lens _aosOptions (\ s a -> s{_aosOptions = a}) . _Map;
aosStatus :: Lens' AdvancedOptionsStatus OptionStatus
aosStatus = lens _aosStatus (\ s a -> s{_aosStatus = a});
instance FromJSON AdvancedOptionsStatus where
parseJSON
= withObject "AdvancedOptionsStatus"
(\ x ->
AdvancedOptionsStatus' <$>
(x .:? "Options" .!= mempty) <*> (x .: "Status"))
newtype DomainInfo = DomainInfo'
{ _diDomainName :: Maybe Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
domainInfo
:: DomainInfo
domainInfo =
DomainInfo'
{ _diDomainName = Nothing
}
diDomainName :: Lens' DomainInfo (Maybe Text)
diDomainName = lens _diDomainName (\ s a -> s{_diDomainName = a});
instance FromJSON DomainInfo where
parseJSON
= withObject "DomainInfo"
(\ x -> DomainInfo' <$> (x .:? "DomainName"))
data EBSOptions = EBSOptions'
{ _eoVolumeSize :: !(Maybe Int)
, _eoIOPS :: !(Maybe Int)
, _eoVolumeType :: !(Maybe VolumeType)
, _eoEBSEnabled :: !(Maybe Bool)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
ebsOptions
:: EBSOptions
ebsOptions =
EBSOptions'
{ _eoVolumeSize = Nothing
, _eoIOPS = Nothing
, _eoVolumeType = Nothing
, _eoEBSEnabled = Nothing
}
eoVolumeSize :: Lens' EBSOptions (Maybe Int)
eoVolumeSize = lens _eoVolumeSize (\ s a -> s{_eoVolumeSize = a});
eoIOPS :: Lens' EBSOptions (Maybe Int)
eoIOPS = lens _eoIOPS (\ s a -> s{_eoIOPS = a});
eoVolumeType :: Lens' EBSOptions (Maybe VolumeType)
eoVolumeType = lens _eoVolumeType (\ s a -> s{_eoVolumeType = a});
eoEBSEnabled :: Lens' EBSOptions (Maybe Bool)
eoEBSEnabled = lens _eoEBSEnabled (\ s a -> s{_eoEBSEnabled = a});
instance FromJSON EBSOptions where
parseJSON
= withObject "EBSOptions"
(\ x ->
EBSOptions' <$>
(x .:? "VolumeSize") <*> (x .:? "Iops") <*>
(x .:? "VolumeType")
<*> (x .:? "EBSEnabled"))
instance ToJSON EBSOptions where
toJSON EBSOptions'{..}
= object
(catMaybes
[("VolumeSize" .=) <$> _eoVolumeSize,
("Iops" .=) <$> _eoIOPS,
("VolumeType" .=) <$> _eoVolumeType,
("EBSEnabled" .=) <$> _eoEBSEnabled])
data EBSOptionsStatus = EBSOptionsStatus'
{ _eosOptions :: !EBSOptions
, _eosStatus :: !OptionStatus
} deriving (Eq,Read,Show,Data,Typeable,Generic)
ebsOptionsStatus
:: EBSOptions
-> OptionStatus
-> EBSOptionsStatus
ebsOptionsStatus pOptions_ pStatus_ =
EBSOptionsStatus'
{ _eosOptions = pOptions_
, _eosStatus = pStatus_
}
eosOptions :: Lens' EBSOptionsStatus EBSOptions
eosOptions = lens _eosOptions (\ s a -> s{_eosOptions = a});
eosStatus :: Lens' EBSOptionsStatus OptionStatus
eosStatus = lens _eosStatus (\ s a -> s{_eosStatus = a});
instance FromJSON EBSOptionsStatus where
parseJSON
= withObject "EBSOptionsStatus"
(\ x ->
EBSOptionsStatus' <$>
(x .: "Options") <*> (x .: "Status"))
data ElasticsearchClusterConfig = ElasticsearchClusterConfig'
{ _eccDedicatedMasterCount :: !(Maybe Int)
, _eccDedicatedMasterType :: !(Maybe ESPartitionInstanceType)
, _eccDedicatedMasterEnabled :: !(Maybe Bool)
, _eccInstanceCount :: !(Maybe Int)
, _eccZoneAwarenessEnabled :: !(Maybe Bool)
, _eccInstanceType :: !(Maybe ESPartitionInstanceType)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
elasticsearchClusterConfig
:: ElasticsearchClusterConfig
elasticsearchClusterConfig =
ElasticsearchClusterConfig'
{ _eccDedicatedMasterCount = Nothing
, _eccDedicatedMasterType = Nothing
, _eccDedicatedMasterEnabled = Nothing
, _eccInstanceCount = Nothing
, _eccZoneAwarenessEnabled = Nothing
, _eccInstanceType = Nothing
}
eccDedicatedMasterCount :: Lens' ElasticsearchClusterConfig (Maybe Int)
eccDedicatedMasterCount = lens _eccDedicatedMasterCount (\ s a -> s{_eccDedicatedMasterCount = a});
eccDedicatedMasterType :: Lens' ElasticsearchClusterConfig (Maybe ESPartitionInstanceType)
eccDedicatedMasterType = lens _eccDedicatedMasterType (\ s a -> s{_eccDedicatedMasterType = a});
eccDedicatedMasterEnabled :: Lens' ElasticsearchClusterConfig (Maybe Bool)
eccDedicatedMasterEnabled = lens _eccDedicatedMasterEnabled (\ s a -> s{_eccDedicatedMasterEnabled = a});
eccInstanceCount :: Lens' ElasticsearchClusterConfig (Maybe Int)
eccInstanceCount = lens _eccInstanceCount (\ s a -> s{_eccInstanceCount = a});
eccZoneAwarenessEnabled :: Lens' ElasticsearchClusterConfig (Maybe Bool)
eccZoneAwarenessEnabled = lens _eccZoneAwarenessEnabled (\ s a -> s{_eccZoneAwarenessEnabled = a});
eccInstanceType :: Lens' ElasticsearchClusterConfig (Maybe ESPartitionInstanceType)
eccInstanceType = lens _eccInstanceType (\ s a -> s{_eccInstanceType = a});
instance FromJSON ElasticsearchClusterConfig where
parseJSON
= withObject "ElasticsearchClusterConfig"
(\ x ->
ElasticsearchClusterConfig' <$>
(x .:? "DedicatedMasterCount") <*>
(x .:? "DedicatedMasterType")
<*> (x .:? "DedicatedMasterEnabled")
<*> (x .:? "InstanceCount")
<*> (x .:? "ZoneAwarenessEnabled")
<*> (x .:? "InstanceType"))
instance ToJSON ElasticsearchClusterConfig where
toJSON ElasticsearchClusterConfig'{..}
= object
(catMaybes
[("DedicatedMasterCount" .=) <$>
_eccDedicatedMasterCount,
("DedicatedMasterType" .=) <$>
_eccDedicatedMasterType,
("DedicatedMasterEnabled" .=) <$>
_eccDedicatedMasterEnabled,
("InstanceCount" .=) <$> _eccInstanceCount,
("ZoneAwarenessEnabled" .=) <$>
_eccZoneAwarenessEnabled,
("InstanceType" .=) <$> _eccInstanceType])
data ElasticsearchClusterConfigStatus = ElasticsearchClusterConfigStatus'
{ _eccsOptions :: !ElasticsearchClusterConfig
, _eccsStatus :: !OptionStatus
} deriving (Eq,Read,Show,Data,Typeable,Generic)
elasticsearchClusterConfigStatus
:: ElasticsearchClusterConfig
-> OptionStatus
-> ElasticsearchClusterConfigStatus
elasticsearchClusterConfigStatus pOptions_ pStatus_ =
ElasticsearchClusterConfigStatus'
{ _eccsOptions = pOptions_
, _eccsStatus = pStatus_
}
eccsOptions :: Lens' ElasticsearchClusterConfigStatus ElasticsearchClusterConfig
eccsOptions = lens _eccsOptions (\ s a -> s{_eccsOptions = a});
eccsStatus :: Lens' ElasticsearchClusterConfigStatus OptionStatus
eccsStatus = lens _eccsStatus (\ s a -> s{_eccsStatus = a});
instance FromJSON ElasticsearchClusterConfigStatus
where
parseJSON
= withObject "ElasticsearchClusterConfigStatus"
(\ x ->
ElasticsearchClusterConfigStatus' <$>
(x .: "Options") <*> (x .: "Status"))
data ElasticsearchDomainConfig = ElasticsearchDomainConfig'
{ _edcEBSOptions :: !(Maybe EBSOptionsStatus)
, _edcAccessPolicies :: !(Maybe AccessPoliciesStatus)
, _edcElasticsearchClusterConfig :: !(Maybe ElasticsearchClusterConfigStatus)
, _edcSnapshotOptions :: !(Maybe SnapshotOptionsStatus)
, _edcAdvancedOptions :: !(Maybe AdvancedOptionsStatus)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
elasticsearchDomainConfig
:: ElasticsearchDomainConfig
elasticsearchDomainConfig =
ElasticsearchDomainConfig'
{ _edcEBSOptions = Nothing
, _edcAccessPolicies = Nothing
, _edcElasticsearchClusterConfig = Nothing
, _edcSnapshotOptions = Nothing
, _edcAdvancedOptions = Nothing
}
edcEBSOptions :: Lens' ElasticsearchDomainConfig (Maybe EBSOptionsStatus)
edcEBSOptions = lens _edcEBSOptions (\ s a -> s{_edcEBSOptions = a});
edcAccessPolicies :: Lens' ElasticsearchDomainConfig (Maybe AccessPoliciesStatus)
edcAccessPolicies = lens _edcAccessPolicies (\ s a -> s{_edcAccessPolicies = a});
edcElasticsearchClusterConfig :: Lens' ElasticsearchDomainConfig (Maybe ElasticsearchClusterConfigStatus)
edcElasticsearchClusterConfig = lens _edcElasticsearchClusterConfig (\ s a -> s{_edcElasticsearchClusterConfig = a});
edcSnapshotOptions :: Lens' ElasticsearchDomainConfig (Maybe SnapshotOptionsStatus)
edcSnapshotOptions = lens _edcSnapshotOptions (\ s a -> s{_edcSnapshotOptions = a});
edcAdvancedOptions :: Lens' ElasticsearchDomainConfig (Maybe AdvancedOptionsStatus)
edcAdvancedOptions = lens _edcAdvancedOptions (\ s a -> s{_edcAdvancedOptions = a});
instance FromJSON ElasticsearchDomainConfig where
parseJSON
= withObject "ElasticsearchDomainConfig"
(\ x ->
ElasticsearchDomainConfig' <$>
(x .:? "EBSOptions") <*> (x .:? "AccessPolicies") <*>
(x .:? "ElasticsearchClusterConfig")
<*> (x .:? "SnapshotOptions")
<*> (x .:? "AdvancedOptions"))
data ElasticsearchDomainStatus = ElasticsearchDomainStatus'
{ _edsEBSOptions :: !(Maybe EBSOptions)
, _edsAccessPolicies :: !(Maybe Text)
, _edsCreated :: !(Maybe Bool)
, _edsSnapshotOptions :: !(Maybe SnapshotOptions)
, _edsDeleted :: !(Maybe Bool)
, _edsProcessing :: !(Maybe Bool)
, _edsEndpoint :: !(Maybe Text)
, _edsAdvancedOptions :: !(Maybe (Map Text Text))
, _edsDomainId :: !Text
, _edsDomainName :: !Text
, _edsARN :: !Text
, _edsElasticsearchClusterConfig :: !ElasticsearchClusterConfig
} deriving (Eq,Read,Show,Data,Typeable,Generic)
elasticsearchDomainStatus
:: Text
-> Text
-> Text
-> ElasticsearchClusterConfig
-> ElasticsearchDomainStatus
elasticsearchDomainStatus pDomainId_ pDomainName_ pARN_ pElasticsearchClusterConfig_ =
ElasticsearchDomainStatus'
{ _edsEBSOptions = Nothing
, _edsAccessPolicies = Nothing
, _edsCreated = Nothing
, _edsSnapshotOptions = Nothing
, _edsDeleted = Nothing
, _edsProcessing = Nothing
, _edsEndpoint = Nothing
, _edsAdvancedOptions = Nothing
, _edsDomainId = pDomainId_
, _edsDomainName = pDomainName_
, _edsARN = pARN_
, _edsElasticsearchClusterConfig = pElasticsearchClusterConfig_
}
edsEBSOptions :: Lens' ElasticsearchDomainStatus (Maybe EBSOptions)
edsEBSOptions = lens _edsEBSOptions (\ s a -> s{_edsEBSOptions = a});
edsAccessPolicies :: Lens' ElasticsearchDomainStatus (Maybe Text)
edsAccessPolicies = lens _edsAccessPolicies (\ s a -> s{_edsAccessPolicies = a});
edsCreated :: Lens' ElasticsearchDomainStatus (Maybe Bool)
edsCreated = lens _edsCreated (\ s a -> s{_edsCreated = a});
edsSnapshotOptions :: Lens' ElasticsearchDomainStatus (Maybe SnapshotOptions)
edsSnapshotOptions = lens _edsSnapshotOptions (\ s a -> s{_edsSnapshotOptions = a});
edsDeleted :: Lens' ElasticsearchDomainStatus (Maybe Bool)
edsDeleted = lens _edsDeleted (\ s a -> s{_edsDeleted = a});
edsProcessing :: Lens' ElasticsearchDomainStatus (Maybe Bool)
edsProcessing = lens _edsProcessing (\ s a -> s{_edsProcessing = a});
edsEndpoint :: Lens' ElasticsearchDomainStatus (Maybe Text)
edsEndpoint = lens _edsEndpoint (\ s a -> s{_edsEndpoint = a});
edsAdvancedOptions :: Lens' ElasticsearchDomainStatus (HashMap Text Text)
edsAdvancedOptions = lens _edsAdvancedOptions (\ s a -> s{_edsAdvancedOptions = a}) . _Default . _Map;
edsDomainId :: Lens' ElasticsearchDomainStatus Text
edsDomainId = lens _edsDomainId (\ s a -> s{_edsDomainId = a});
edsDomainName :: Lens' ElasticsearchDomainStatus Text
edsDomainName = lens _edsDomainName (\ s a -> s{_edsDomainName = a});
edsARN :: Lens' ElasticsearchDomainStatus Text
edsARN = lens _edsARN (\ s a -> s{_edsARN = a});
edsElasticsearchClusterConfig :: Lens' ElasticsearchDomainStatus ElasticsearchClusterConfig
edsElasticsearchClusterConfig = lens _edsElasticsearchClusterConfig (\ s a -> s{_edsElasticsearchClusterConfig = a});
instance FromJSON ElasticsearchDomainStatus where
parseJSON
= withObject "ElasticsearchDomainStatus"
(\ x ->
ElasticsearchDomainStatus' <$>
(x .:? "EBSOptions") <*> (x .:? "AccessPolicies") <*>
(x .:? "Created")
<*> (x .:? "SnapshotOptions")
<*> (x .:? "Deleted")
<*> (x .:? "Processing")
<*> (x .:? "Endpoint")
<*> (x .:? "AdvancedOptions" .!= mempty)
<*> (x .: "DomainId")
<*> (x .: "DomainName")
<*> (x .: "ARN")
<*> (x .: "ElasticsearchClusterConfig"))
data OptionStatus = OptionStatus'
{ _osPendingDeletion :: !(Maybe Bool)
, _osUpdateVersion :: !(Maybe Nat)
, _osCreationDate :: !POSIX
, _osUpdateDate :: !POSIX
, _osState :: !OptionState
} deriving (Eq,Read,Show,Data,Typeable,Generic)
optionStatus
:: UTCTime
-> UTCTime
-> OptionState
-> OptionStatus
optionStatus pCreationDate_ pUpdateDate_ pState_ =
OptionStatus'
{ _osPendingDeletion = Nothing
, _osUpdateVersion = Nothing
, _osCreationDate = _Time # pCreationDate_
, _osUpdateDate = _Time # pUpdateDate_
, _osState = pState_
}
osPendingDeletion :: Lens' OptionStatus (Maybe Bool)
osPendingDeletion = lens _osPendingDeletion (\ s a -> s{_osPendingDeletion = a});
osUpdateVersion :: Lens' OptionStatus (Maybe Natural)
osUpdateVersion = lens _osUpdateVersion (\ s a -> s{_osUpdateVersion = a}) . mapping _Nat;
osCreationDate :: Lens' OptionStatus UTCTime
osCreationDate = lens _osCreationDate (\ s a -> s{_osCreationDate = a}) . _Time;
osUpdateDate :: Lens' OptionStatus UTCTime
osUpdateDate = lens _osUpdateDate (\ s a -> s{_osUpdateDate = a}) . _Time;
osState :: Lens' OptionStatus OptionState
osState = lens _osState (\ s a -> s{_osState = a});
instance FromJSON OptionStatus where
parseJSON
= withObject "OptionStatus"
(\ x ->
OptionStatus' <$>
(x .:? "PendingDeletion") <*> (x .:? "UpdateVersion")
<*> (x .: "CreationDate")
<*> (x .: "UpdateDate")
<*> (x .: "State"))
newtype SnapshotOptions = SnapshotOptions'
{ _soAutomatedSnapshotStartHour :: Maybe Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
snapshotOptions
:: SnapshotOptions
snapshotOptions =
SnapshotOptions'
{ _soAutomatedSnapshotStartHour = Nothing
}
soAutomatedSnapshotStartHour :: Lens' SnapshotOptions (Maybe Int)
soAutomatedSnapshotStartHour = lens _soAutomatedSnapshotStartHour (\ s a -> s{_soAutomatedSnapshotStartHour = a});
instance FromJSON SnapshotOptions where
parseJSON
= withObject "SnapshotOptions"
(\ x ->
SnapshotOptions' <$>
(x .:? "AutomatedSnapshotStartHour"))
instance ToJSON SnapshotOptions where
toJSON SnapshotOptions'{..}
= object
(catMaybes
[("AutomatedSnapshotStartHour" .=) <$>
_soAutomatedSnapshotStartHour])
data SnapshotOptionsStatus = SnapshotOptionsStatus'
{ _sosOptions :: !SnapshotOptions
, _sosStatus :: !OptionStatus
} deriving (Eq,Read,Show,Data,Typeable,Generic)
snapshotOptionsStatus
:: SnapshotOptions
-> OptionStatus
-> SnapshotOptionsStatus
snapshotOptionsStatus pOptions_ pStatus_ =
SnapshotOptionsStatus'
{ _sosOptions = pOptions_
, _sosStatus = pStatus_
}
sosOptions :: Lens' SnapshotOptionsStatus SnapshotOptions
sosOptions = lens _sosOptions (\ s a -> s{_sosOptions = a});
sosStatus :: Lens' SnapshotOptionsStatus OptionStatus
sosStatus = lens _sosStatus (\ s a -> s{_sosStatus = a});
instance FromJSON SnapshotOptionsStatus where
parseJSON
= withObject "SnapshotOptionsStatus"
(\ x ->
SnapshotOptionsStatus' <$>
(x .: "Options") <*> (x .: "Status"))
data Tag = Tag'
{ _tagKey :: !Text
, _tagValue :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
tag
:: Text
-> Text
-> Tag
tag pKey_ pValue_ =
Tag'
{ _tagKey = pKey_
, _tagValue = pValue_
}
tagKey :: Lens' Tag Text
tagKey = lens _tagKey (\ s a -> s{_tagKey = a});
tagValue :: Lens' Tag Text
tagValue = lens _tagValue (\ s a -> s{_tagValue = a});
instance FromJSON Tag where
parseJSON
= withObject "Tag"
(\ x -> Tag' <$> (x .: "Key") <*> (x .: "Value"))
instance ToJSON Tag where
toJSON Tag'{..}
= object
(catMaybes
[Just ("Key" .= _tagKey),
Just ("Value" .= _tagValue)])