{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Amazonka.IoTSiteWise.Waiters where
import qualified Amazonka.Core as Core
import Amazonka.IoTSiteWise.DescribeAsset
import Amazonka.IoTSiteWise.DescribeAssetModel
import Amazonka.IoTSiteWise.DescribePortal
import Amazonka.IoTSiteWise.Lens
import Amazonka.IoTSiteWise.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
newAssetModelNotExists :: Core.Wait DescribeAssetModel
newAssetModelNotExists :: Wait DescribeAssetModel
newAssetModelNotExists =
Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
{ $sel:_waitName:Wait :: ByteString
Core._waitName = ByteString
"AssetModelNotExists",
$sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
20,
$sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
3,
$sel:_waitAcceptors:Wait :: [Acceptor DescribeAssetModel]
Core._waitAcceptors =
[ ErrorCode -> Accept -> Acceptor DescribeAssetModel
forall a. ErrorCode -> Accept -> Acceptor a
Core.matchError
ErrorCode
"ResourceNotFoundException"
Accept
Core.AcceptSuccess
]
}
newAssetNotExists :: Core.Wait DescribeAsset
newAssetNotExists :: Wait DescribeAsset
newAssetNotExists =
Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
{ $sel:_waitName:Wait :: ByteString
Core._waitName = ByteString
"AssetNotExists",
$sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
20,
$sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
3,
$sel:_waitAcceptors:Wait :: [Acceptor DescribeAsset]
Core._waitAcceptors =
[ ErrorCode -> Accept -> Acceptor DescribeAsset
forall a. ErrorCode -> Accept -> Acceptor a
Core.matchError
ErrorCode
"ResourceNotFoundException"
Accept
Core.AcceptSuccess
]
}
newAssetModelActive :: Core.Wait DescribeAssetModel
newAssetModelActive :: Wait DescribeAssetModel
newAssetModelActive =
Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
{ $sel:_waitName:Wait :: ByteString
Core._waitName = ByteString
"AssetModelActive",
$sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
20,
$sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
3,
$sel:_waitAcceptors:Wait :: [Acceptor DescribeAssetModel]
Core._waitAcceptors =
[ CI Text
-> Accept
-> Fold (AWSResponse DescribeAssetModel) (CI Text)
-> Acceptor DescribeAssetModel
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"ACTIVE"
Accept
Core.AcceptSuccess
( (AssetModelStatus -> f AssetModelStatus)
-> DescribeAssetModelResponse -> f DescribeAssetModelResponse
Lens' DescribeAssetModelResponse AssetModelStatus
describeAssetModelResponse_assetModelStatus
((AssetModelStatus -> f AssetModelStatus)
-> DescribeAssetModelResponse -> f DescribeAssetModelResponse)
-> ((CI Text -> f (CI Text))
-> AssetModelStatus -> f AssetModelStatus)
-> (CI Text -> f (CI Text))
-> DescribeAssetModelResponse
-> f DescribeAssetModelResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (AssetModelState -> f AssetModelState)
-> AssetModelStatus -> f AssetModelStatus
Lens' AssetModelStatus AssetModelState
assetModelStatus_state
((AssetModelState -> f AssetModelState)
-> AssetModelStatus -> f AssetModelStatus)
-> ((CI Text -> f (CI Text))
-> AssetModelState -> f AssetModelState)
-> (CI Text -> f (CI Text))
-> AssetModelStatus
-> f AssetModelStatus
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (AssetModelState -> CI Text)
-> (CI Text -> f (CI Text)) -> AssetModelState -> f AssetModelState
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to AssetModelState -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
),
CI Text
-> Accept
-> Fold (AWSResponse DescribeAssetModel) (CI Text)
-> Acceptor DescribeAssetModel
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"FAILED"
Accept
Core.AcceptFailure
( (AssetModelStatus -> f AssetModelStatus)
-> DescribeAssetModelResponse -> f DescribeAssetModelResponse
Lens' DescribeAssetModelResponse AssetModelStatus
describeAssetModelResponse_assetModelStatus
((AssetModelStatus -> f AssetModelStatus)
-> DescribeAssetModelResponse -> f DescribeAssetModelResponse)
-> ((CI Text -> f (CI Text))
-> AssetModelStatus -> f AssetModelStatus)
-> (CI Text -> f (CI Text))
-> DescribeAssetModelResponse
-> f DescribeAssetModelResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (AssetModelState -> f AssetModelState)
-> AssetModelStatus -> f AssetModelStatus
Lens' AssetModelStatus AssetModelState
assetModelStatus_state
((AssetModelState -> f AssetModelState)
-> AssetModelStatus -> f AssetModelStatus)
-> ((CI Text -> f (CI Text))
-> AssetModelState -> f AssetModelState)
-> (CI Text -> f (CI Text))
-> AssetModelStatus
-> f AssetModelStatus
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (AssetModelState -> CI Text)
-> (CI Text -> f (CI Text)) -> AssetModelState -> f AssetModelState
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to AssetModelState -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
)
]
}
newPortalNotExists :: Core.Wait DescribePortal
newPortalNotExists :: Wait DescribePortal
newPortalNotExists =
Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
{ $sel:_waitName:Wait :: ByteString
Core._waitName = ByteString
"PortalNotExists",
$sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
20,
$sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
3,
$sel:_waitAcceptors:Wait :: [Acceptor DescribePortal]
Core._waitAcceptors =
[ ErrorCode -> Accept -> Acceptor DescribePortal
forall a. ErrorCode -> Accept -> Acceptor a
Core.matchError
ErrorCode
"ResourceNotFoundException"
Accept
Core.AcceptSuccess
]
}
newAssetActive :: Core.Wait DescribeAsset
newAssetActive :: Wait DescribeAsset
newAssetActive =
Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
{ $sel:_waitName:Wait :: ByteString
Core._waitName = ByteString
"AssetActive",
$sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
20,
$sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
3,
$sel:_waitAcceptors:Wait :: [Acceptor DescribeAsset]
Core._waitAcceptors =
[ CI Text
-> Accept
-> Fold (AWSResponse DescribeAsset) (CI Text)
-> Acceptor DescribeAsset
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"ACTIVE"
Accept
Core.AcceptSuccess
( (AssetStatus -> f AssetStatus)
-> DescribeAssetResponse -> f DescribeAssetResponse
Lens' DescribeAssetResponse AssetStatus
describeAssetResponse_assetStatus
((AssetStatus -> f AssetStatus)
-> DescribeAssetResponse -> f DescribeAssetResponse)
-> ((CI Text -> f (CI Text)) -> AssetStatus -> f AssetStatus)
-> (CI Text -> f (CI Text))
-> DescribeAssetResponse
-> f DescribeAssetResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (AssetState -> f AssetState) -> AssetStatus -> f AssetStatus
Lens' AssetStatus AssetState
assetStatus_state
((AssetState -> f AssetState) -> AssetStatus -> f AssetStatus)
-> ((CI Text -> f (CI Text)) -> AssetState -> f AssetState)
-> (CI Text -> f (CI Text))
-> AssetStatus
-> f AssetStatus
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (AssetState -> CI Text)
-> (CI Text -> f (CI Text)) -> AssetState -> f AssetState
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to AssetState -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
),
CI Text
-> Accept
-> Fold (AWSResponse DescribeAsset) (CI Text)
-> Acceptor DescribeAsset
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"FAILED"
Accept
Core.AcceptFailure
( (AssetStatus -> f AssetStatus)
-> DescribeAssetResponse -> f DescribeAssetResponse
Lens' DescribeAssetResponse AssetStatus
describeAssetResponse_assetStatus
((AssetStatus -> f AssetStatus)
-> DescribeAssetResponse -> f DescribeAssetResponse)
-> ((CI Text -> f (CI Text)) -> AssetStatus -> f AssetStatus)
-> (CI Text -> f (CI Text))
-> DescribeAssetResponse
-> f DescribeAssetResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (AssetState -> f AssetState) -> AssetStatus -> f AssetStatus
Lens' AssetStatus AssetState
assetStatus_state
((AssetState -> f AssetState) -> AssetStatus -> f AssetStatus)
-> ((CI Text -> f (CI Text)) -> AssetState -> f AssetState)
-> (CI Text -> f (CI Text))
-> AssetStatus
-> f AssetStatus
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (AssetState -> CI Text)
-> (CI Text -> f (CI Text)) -> AssetState -> f AssetState
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to AssetState -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
)
]
}
newPortalActive :: Core.Wait DescribePortal
newPortalActive :: Wait DescribePortal
newPortalActive =
Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
{ $sel:_waitName:Wait :: ByteString
Core._waitName = ByteString
"PortalActive",
$sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
20,
$sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
3,
$sel:_waitAcceptors:Wait :: [Acceptor DescribePortal]
Core._waitAcceptors =
[ CI Text
-> Accept
-> Fold (AWSResponse DescribePortal) (CI Text)
-> Acceptor DescribePortal
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"ACTIVE"
Accept
Core.AcceptSuccess
( (PortalStatus -> f PortalStatus)
-> DescribePortalResponse -> f DescribePortalResponse
Lens' DescribePortalResponse PortalStatus
describePortalResponse_portalStatus
((PortalStatus -> f PortalStatus)
-> DescribePortalResponse -> f DescribePortalResponse)
-> ((CI Text -> f (CI Text)) -> PortalStatus -> f PortalStatus)
-> (CI Text -> f (CI Text))
-> DescribePortalResponse
-> f DescribePortalResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (PortalState -> f PortalState) -> PortalStatus -> f PortalStatus
Lens' PortalStatus PortalState
portalStatus_state
((PortalState -> f PortalState) -> PortalStatus -> f PortalStatus)
-> ((CI Text -> f (CI Text)) -> PortalState -> f PortalState)
-> (CI Text -> f (CI Text))
-> PortalStatus
-> f PortalStatus
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (PortalState -> CI Text)
-> (CI Text -> f (CI Text)) -> PortalState -> f PortalState
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to PortalState -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
)
]
}