{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Proton.Waiters
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Proton.Waiters where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Proton.GetEnvironment
import Amazonka.Proton.GetEnvironmentTemplateVersion
import Amazonka.Proton.GetService
import Amazonka.Proton.GetServiceInstance
import Amazonka.Proton.GetServiceTemplateVersion
import Amazonka.Proton.Lens
import Amazonka.Proton.Types

-- | Polls 'Amazonka.Proton.GetEnvironment' every 5 seconds until a successful state is reached. An error is returned after 999 failed checks.
newEnvironmentDeployed :: Core.Wait GetEnvironment
newEnvironmentDeployed :: Wait GetEnvironment
newEnvironmentDeployed =
  Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
    { $sel:_waitName:Wait :: ByteString
Core._waitName = ByteString
"EnvironmentDeployed",
      $sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
999,
      $sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
5,
      $sel:_waitAcceptors:Wait :: [Acceptor GetEnvironment]
Core._waitAcceptors =
        [ CI Text
-> Accept
-> Fold (AWSResponse GetEnvironment) (CI Text)
-> Acceptor GetEnvironment
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"SUCCEEDED"
            Accept
Core.AcceptSuccess
            ( (Environment -> f Environment)
-> GetEnvironmentResponse -> f GetEnvironmentResponse
Lens' GetEnvironmentResponse Environment
getEnvironmentResponse_environment
                ((Environment -> f Environment)
 -> GetEnvironmentResponse -> f GetEnvironmentResponse)
-> ((CI Text -> f (CI Text)) -> Environment -> f Environment)
-> (CI Text -> f (CI Text))
-> GetEnvironmentResponse
-> f GetEnvironmentResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (DeploymentStatus -> f DeploymentStatus)
-> Environment -> f Environment
Lens' Environment DeploymentStatus
environment_deploymentStatus
                ((DeploymentStatus -> f DeploymentStatus)
 -> Environment -> f Environment)
-> ((CI Text -> f (CI Text))
    -> DeploymentStatus -> f DeploymentStatus)
-> (CI Text -> f (CI Text))
-> Environment
-> f Environment
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (DeploymentStatus -> CI Text)
-> (CI Text -> f (CI Text))
-> DeploymentStatus
-> f DeploymentStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to DeploymentStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          CI Text
-> Accept
-> Fold (AWSResponse GetEnvironment) (CI Text)
-> Acceptor GetEnvironment
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"FAILED"
            Accept
Core.AcceptFailure
            ( (Environment -> f Environment)
-> GetEnvironmentResponse -> f GetEnvironmentResponse
Lens' GetEnvironmentResponse Environment
getEnvironmentResponse_environment
                ((Environment -> f Environment)
 -> GetEnvironmentResponse -> f GetEnvironmentResponse)
-> ((CI Text -> f (CI Text)) -> Environment -> f Environment)
-> (CI Text -> f (CI Text))
-> GetEnvironmentResponse
-> f GetEnvironmentResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (DeploymentStatus -> f DeploymentStatus)
-> Environment -> f Environment
Lens' Environment DeploymentStatus
environment_deploymentStatus
                ((DeploymentStatus -> f DeploymentStatus)
 -> Environment -> f Environment)
-> ((CI Text -> f (CI Text))
    -> DeploymentStatus -> f DeploymentStatus)
-> (CI Text -> f (CI Text))
-> Environment
-> f Environment
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (DeploymentStatus -> CI Text)
-> (CI Text -> f (CI Text))
-> DeploymentStatus
-> f DeploymentStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to DeploymentStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            )
        ]
    }

-- | Polls 'Amazonka.Proton.GetServiceTemplateVersion' every 2 seconds until a successful state is reached. An error is returned after 150 failed checks.
newServiceTemplateVersionRegistered :: Core.Wait GetServiceTemplateVersion
newServiceTemplateVersionRegistered :: Wait GetServiceTemplateVersion
newServiceTemplateVersionRegistered =
  Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
    { $sel:_waitName:Wait :: ByteString
Core._waitName =
        ByteString
"ServiceTemplateVersionRegistered",
      $sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
150,
      $sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
2,
      $sel:_waitAcceptors:Wait :: [Acceptor GetServiceTemplateVersion]
Core._waitAcceptors =
        [ CI Text
-> Accept
-> Fold (AWSResponse GetServiceTemplateVersion) (CI Text)
-> Acceptor GetServiceTemplateVersion
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"DRAFT"
            Accept
Core.AcceptSuccess
            ( (ServiceTemplateVersion -> f ServiceTemplateVersion)
-> GetServiceTemplateVersionResponse
-> f GetServiceTemplateVersionResponse
Lens' GetServiceTemplateVersionResponse ServiceTemplateVersion
getServiceTemplateVersionResponse_serviceTemplateVersion
                ((ServiceTemplateVersion -> f ServiceTemplateVersion)
 -> GetServiceTemplateVersionResponse
 -> f GetServiceTemplateVersionResponse)
-> ((CI Text -> f (CI Text))
    -> ServiceTemplateVersion -> f ServiceTemplateVersion)
-> (CI Text -> f (CI Text))
-> GetServiceTemplateVersionResponse
-> f GetServiceTemplateVersionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (TemplateVersionStatus -> f TemplateVersionStatus)
-> ServiceTemplateVersion -> f ServiceTemplateVersion
Lens' ServiceTemplateVersion TemplateVersionStatus
serviceTemplateVersion_status
                ((TemplateVersionStatus -> f TemplateVersionStatus)
 -> ServiceTemplateVersion -> f ServiceTemplateVersion)
-> ((CI Text -> f (CI Text))
    -> TemplateVersionStatus -> f TemplateVersionStatus)
-> (CI Text -> f (CI Text))
-> ServiceTemplateVersion
-> f ServiceTemplateVersion
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (TemplateVersionStatus -> CI Text)
-> (CI Text -> f (CI Text))
-> TemplateVersionStatus
-> f TemplateVersionStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to TemplateVersionStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          CI Text
-> Accept
-> Fold (AWSResponse GetServiceTemplateVersion) (CI Text)
-> Acceptor GetServiceTemplateVersion
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"PUBLISHED"
            Accept
Core.AcceptSuccess
            ( (ServiceTemplateVersion -> f ServiceTemplateVersion)
-> GetServiceTemplateVersionResponse
-> f GetServiceTemplateVersionResponse
Lens' GetServiceTemplateVersionResponse ServiceTemplateVersion
getServiceTemplateVersionResponse_serviceTemplateVersion
                ((ServiceTemplateVersion -> f ServiceTemplateVersion)
 -> GetServiceTemplateVersionResponse
 -> f GetServiceTemplateVersionResponse)
-> ((CI Text -> f (CI Text))
    -> ServiceTemplateVersion -> f ServiceTemplateVersion)
-> (CI Text -> f (CI Text))
-> GetServiceTemplateVersionResponse
-> f GetServiceTemplateVersionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (TemplateVersionStatus -> f TemplateVersionStatus)
-> ServiceTemplateVersion -> f ServiceTemplateVersion
Lens' ServiceTemplateVersion TemplateVersionStatus
serviceTemplateVersion_status
                ((TemplateVersionStatus -> f TemplateVersionStatus)
 -> ServiceTemplateVersion -> f ServiceTemplateVersion)
-> ((CI Text -> f (CI Text))
    -> TemplateVersionStatus -> f TemplateVersionStatus)
-> (CI Text -> f (CI Text))
-> ServiceTemplateVersion
-> f ServiceTemplateVersion
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (TemplateVersionStatus -> CI Text)
-> (CI Text -> f (CI Text))
-> TemplateVersionStatus
-> f TemplateVersionStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to TemplateVersionStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          CI Text
-> Accept
-> Fold (AWSResponse GetServiceTemplateVersion) (CI Text)
-> Acceptor GetServiceTemplateVersion
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"REGISTRATION_FAILED"
            Accept
Core.AcceptFailure
            ( (ServiceTemplateVersion -> f ServiceTemplateVersion)
-> GetServiceTemplateVersionResponse
-> f GetServiceTemplateVersionResponse
Lens' GetServiceTemplateVersionResponse ServiceTemplateVersion
getServiceTemplateVersionResponse_serviceTemplateVersion
                ((ServiceTemplateVersion -> f ServiceTemplateVersion)
 -> GetServiceTemplateVersionResponse
 -> f GetServiceTemplateVersionResponse)
-> ((CI Text -> f (CI Text))
    -> ServiceTemplateVersion -> f ServiceTemplateVersion)
-> (CI Text -> f (CI Text))
-> GetServiceTemplateVersionResponse
-> f GetServiceTemplateVersionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (TemplateVersionStatus -> f TemplateVersionStatus)
-> ServiceTemplateVersion -> f ServiceTemplateVersion
Lens' ServiceTemplateVersion TemplateVersionStatus
serviceTemplateVersion_status
                ((TemplateVersionStatus -> f TemplateVersionStatus)
 -> ServiceTemplateVersion -> f ServiceTemplateVersion)
-> ((CI Text -> f (CI Text))
    -> TemplateVersionStatus -> f TemplateVersionStatus)
-> (CI Text -> f (CI Text))
-> ServiceTemplateVersion
-> f ServiceTemplateVersion
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (TemplateVersionStatus -> CI Text)
-> (CI Text -> f (CI Text))
-> TemplateVersionStatus
-> f TemplateVersionStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to TemplateVersionStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            )
        ]
    }

-- | Polls 'Amazonka.Proton.GetEnvironmentTemplateVersion' every 2 seconds until a successful state is reached. An error is returned after 150 failed checks.
newEnvironmentTemplateVersionRegistered :: Core.Wait GetEnvironmentTemplateVersion
newEnvironmentTemplateVersionRegistered :: Wait GetEnvironmentTemplateVersion
newEnvironmentTemplateVersionRegistered =
  Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
    { $sel:_waitName:Wait :: ByteString
Core._waitName =
        ByteString
"EnvironmentTemplateVersionRegistered",
      $sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
150,
      $sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
2,
      $sel:_waitAcceptors:Wait :: [Acceptor GetEnvironmentTemplateVersion]
Core._waitAcceptors =
        [ CI Text
-> Accept
-> Fold (AWSResponse GetEnvironmentTemplateVersion) (CI Text)
-> Acceptor GetEnvironmentTemplateVersion
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"DRAFT"
            Accept
Core.AcceptSuccess
            ( (EnvironmentTemplateVersion -> f EnvironmentTemplateVersion)
-> GetEnvironmentTemplateVersionResponse
-> f GetEnvironmentTemplateVersionResponse
Lens'
  GetEnvironmentTemplateVersionResponse EnvironmentTemplateVersion
getEnvironmentTemplateVersionResponse_environmentTemplateVersion
                ((EnvironmentTemplateVersion -> f EnvironmentTemplateVersion)
 -> GetEnvironmentTemplateVersionResponse
 -> f GetEnvironmentTemplateVersionResponse)
-> ((CI Text -> f (CI Text))
    -> EnvironmentTemplateVersion -> f EnvironmentTemplateVersion)
-> (CI Text -> f (CI Text))
-> GetEnvironmentTemplateVersionResponse
-> f GetEnvironmentTemplateVersionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (TemplateVersionStatus -> f TemplateVersionStatus)
-> EnvironmentTemplateVersion -> f EnvironmentTemplateVersion
Lens' EnvironmentTemplateVersion TemplateVersionStatus
environmentTemplateVersion_status
                ((TemplateVersionStatus -> f TemplateVersionStatus)
 -> EnvironmentTemplateVersion -> f EnvironmentTemplateVersion)
-> ((CI Text -> f (CI Text))
    -> TemplateVersionStatus -> f TemplateVersionStatus)
-> (CI Text -> f (CI Text))
-> EnvironmentTemplateVersion
-> f EnvironmentTemplateVersion
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (TemplateVersionStatus -> CI Text)
-> (CI Text -> f (CI Text))
-> TemplateVersionStatus
-> f TemplateVersionStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to TemplateVersionStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          CI Text
-> Accept
-> Fold (AWSResponse GetEnvironmentTemplateVersion) (CI Text)
-> Acceptor GetEnvironmentTemplateVersion
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"PUBLISHED"
            Accept
Core.AcceptSuccess
            ( (EnvironmentTemplateVersion -> f EnvironmentTemplateVersion)
-> GetEnvironmentTemplateVersionResponse
-> f GetEnvironmentTemplateVersionResponse
Lens'
  GetEnvironmentTemplateVersionResponse EnvironmentTemplateVersion
getEnvironmentTemplateVersionResponse_environmentTemplateVersion
                ((EnvironmentTemplateVersion -> f EnvironmentTemplateVersion)
 -> GetEnvironmentTemplateVersionResponse
 -> f GetEnvironmentTemplateVersionResponse)
-> ((CI Text -> f (CI Text))
    -> EnvironmentTemplateVersion -> f EnvironmentTemplateVersion)
-> (CI Text -> f (CI Text))
-> GetEnvironmentTemplateVersionResponse
-> f GetEnvironmentTemplateVersionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (TemplateVersionStatus -> f TemplateVersionStatus)
-> EnvironmentTemplateVersion -> f EnvironmentTemplateVersion
Lens' EnvironmentTemplateVersion TemplateVersionStatus
environmentTemplateVersion_status
                ((TemplateVersionStatus -> f TemplateVersionStatus)
 -> EnvironmentTemplateVersion -> f EnvironmentTemplateVersion)
-> ((CI Text -> f (CI Text))
    -> TemplateVersionStatus -> f TemplateVersionStatus)
-> (CI Text -> f (CI Text))
-> EnvironmentTemplateVersion
-> f EnvironmentTemplateVersion
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (TemplateVersionStatus -> CI Text)
-> (CI Text -> f (CI Text))
-> TemplateVersionStatus
-> f TemplateVersionStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to TemplateVersionStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          CI Text
-> Accept
-> Fold (AWSResponse GetEnvironmentTemplateVersion) (CI Text)
-> Acceptor GetEnvironmentTemplateVersion
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"REGISTRATION_FAILED"
            Accept
Core.AcceptFailure
            ( (EnvironmentTemplateVersion -> f EnvironmentTemplateVersion)
-> GetEnvironmentTemplateVersionResponse
-> f GetEnvironmentTemplateVersionResponse
Lens'
  GetEnvironmentTemplateVersionResponse EnvironmentTemplateVersion
getEnvironmentTemplateVersionResponse_environmentTemplateVersion
                ((EnvironmentTemplateVersion -> f EnvironmentTemplateVersion)
 -> GetEnvironmentTemplateVersionResponse
 -> f GetEnvironmentTemplateVersionResponse)
-> ((CI Text -> f (CI Text))
    -> EnvironmentTemplateVersion -> f EnvironmentTemplateVersion)
-> (CI Text -> f (CI Text))
-> GetEnvironmentTemplateVersionResponse
-> f GetEnvironmentTemplateVersionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (TemplateVersionStatus -> f TemplateVersionStatus)
-> EnvironmentTemplateVersion -> f EnvironmentTemplateVersion
Lens' EnvironmentTemplateVersion TemplateVersionStatus
environmentTemplateVersion_status
                ((TemplateVersionStatus -> f TemplateVersionStatus)
 -> EnvironmentTemplateVersion -> f EnvironmentTemplateVersion)
-> ((CI Text -> f (CI Text))
    -> TemplateVersionStatus -> f TemplateVersionStatus)
-> (CI Text -> f (CI Text))
-> EnvironmentTemplateVersion
-> f EnvironmentTemplateVersion
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (TemplateVersionStatus -> CI Text)
-> (CI Text -> f (CI Text))
-> TemplateVersionStatus
-> f TemplateVersionStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to TemplateVersionStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            )
        ]
    }

-- | Polls 'Amazonka.Proton.GetService' every 5 seconds until a successful state is reached. An error is returned after 999 failed checks.
newServiceUpdated :: Core.Wait GetService
newServiceUpdated :: Wait GetService
newServiceUpdated =
  Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
    { $sel:_waitName:Wait :: ByteString
Core._waitName = ByteString
"ServiceUpdated",
      $sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
999,
      $sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
5,
      $sel:_waitAcceptors:Wait :: [Acceptor GetService]
Core._waitAcceptors =
        [ CI Text
-> Accept
-> Fold (AWSResponse GetService) (CI Text)
-> Acceptor GetService
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"ACTIVE"
            Accept
Core.AcceptSuccess
            ( (Maybe Service -> f (Maybe Service))
-> GetServiceResponse -> f GetServiceResponse
Lens' GetServiceResponse (Maybe Service)
getServiceResponse_service ((Maybe Service -> f (Maybe Service))
 -> GetServiceResponse -> f GetServiceResponse)
-> ((CI Text -> f (CI Text)) -> Maybe Service -> f (Maybe Service))
-> (CI Text -> f (CI Text))
-> GetServiceResponse
-> f GetServiceResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Service -> f Service) -> Maybe Service -> f (Maybe Service)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((Service -> f Service) -> Maybe Service -> f (Maybe Service))
-> ((CI Text -> f (CI Text)) -> Service -> f Service)
-> (CI Text -> f (CI Text))
-> Maybe Service
-> f (Maybe Service)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ServiceStatus -> f ServiceStatus) -> Service -> f Service
Lens' Service ServiceStatus
service_status
                ((ServiceStatus -> f ServiceStatus) -> Service -> f Service)
-> ((CI Text -> f (CI Text)) -> ServiceStatus -> f ServiceStatus)
-> (CI Text -> f (CI Text))
-> Service
-> f Service
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ServiceStatus -> CI Text)
-> (CI Text -> f (CI Text)) -> ServiceStatus -> f ServiceStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to ServiceStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          CI Text
-> Accept
-> Fold (AWSResponse GetService) (CI Text)
-> Acceptor GetService
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"UPDATE_FAILED_CLEANUP_COMPLETE"
            Accept
Core.AcceptFailure
            ( (Maybe Service -> f (Maybe Service))
-> GetServiceResponse -> f GetServiceResponse
Lens' GetServiceResponse (Maybe Service)
getServiceResponse_service ((Maybe Service -> f (Maybe Service))
 -> GetServiceResponse -> f GetServiceResponse)
-> ((CI Text -> f (CI Text)) -> Maybe Service -> f (Maybe Service))
-> (CI Text -> f (CI Text))
-> GetServiceResponse
-> f GetServiceResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Service -> f Service) -> Maybe Service -> f (Maybe Service)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((Service -> f Service) -> Maybe Service -> f (Maybe Service))
-> ((CI Text -> f (CI Text)) -> Service -> f Service)
-> (CI Text -> f (CI Text))
-> Maybe Service
-> f (Maybe Service)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ServiceStatus -> f ServiceStatus) -> Service -> f Service
Lens' Service ServiceStatus
service_status
                ((ServiceStatus -> f ServiceStatus) -> Service -> f Service)
-> ((CI Text -> f (CI Text)) -> ServiceStatus -> f ServiceStatus)
-> (CI Text -> f (CI Text))
-> Service
-> f Service
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ServiceStatus -> CI Text)
-> (CI Text -> f (CI Text)) -> ServiceStatus -> f ServiceStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to ServiceStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          CI Text
-> Accept
-> Fold (AWSResponse GetService) (CI Text)
-> Acceptor GetService
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"UPDATE_FAILED_CLEANUP_FAILED"
            Accept
Core.AcceptFailure
            ( (Maybe Service -> f (Maybe Service))
-> GetServiceResponse -> f GetServiceResponse
Lens' GetServiceResponse (Maybe Service)
getServiceResponse_service ((Maybe Service -> f (Maybe Service))
 -> GetServiceResponse -> f GetServiceResponse)
-> ((CI Text -> f (CI Text)) -> Maybe Service -> f (Maybe Service))
-> (CI Text -> f (CI Text))
-> GetServiceResponse
-> f GetServiceResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Service -> f Service) -> Maybe Service -> f (Maybe Service)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((Service -> f Service) -> Maybe Service -> f (Maybe Service))
-> ((CI Text -> f (CI Text)) -> Service -> f Service)
-> (CI Text -> f (CI Text))
-> Maybe Service
-> f (Maybe Service)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ServiceStatus -> f ServiceStatus) -> Service -> f Service
Lens' Service ServiceStatus
service_status
                ((ServiceStatus -> f ServiceStatus) -> Service -> f Service)
-> ((CI Text -> f (CI Text)) -> ServiceStatus -> f ServiceStatus)
-> (CI Text -> f (CI Text))
-> Service
-> f Service
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ServiceStatus -> CI Text)
-> (CI Text -> f (CI Text)) -> ServiceStatus -> f ServiceStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to ServiceStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          CI Text
-> Accept
-> Fold (AWSResponse GetService) (CI Text)
-> Acceptor GetService
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"UPDATE_FAILED"
            Accept
Core.AcceptFailure
            ( (Maybe Service -> f (Maybe Service))
-> GetServiceResponse -> f GetServiceResponse
Lens' GetServiceResponse (Maybe Service)
getServiceResponse_service ((Maybe Service -> f (Maybe Service))
 -> GetServiceResponse -> f GetServiceResponse)
-> ((CI Text -> f (CI Text)) -> Maybe Service -> f (Maybe Service))
-> (CI Text -> f (CI Text))
-> GetServiceResponse
-> f GetServiceResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Service -> f Service) -> Maybe Service -> f (Maybe Service)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((Service -> f Service) -> Maybe Service -> f (Maybe Service))
-> ((CI Text -> f (CI Text)) -> Service -> f Service)
-> (CI Text -> f (CI Text))
-> Maybe Service
-> f (Maybe Service)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ServiceStatus -> f ServiceStatus) -> Service -> f Service
Lens' Service ServiceStatus
service_status
                ((ServiceStatus -> f ServiceStatus) -> Service -> f Service)
-> ((CI Text -> f (CI Text)) -> ServiceStatus -> f ServiceStatus)
-> (CI Text -> f (CI Text))
-> Service
-> f Service
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ServiceStatus -> CI Text)
-> (CI Text -> f (CI Text)) -> ServiceStatus -> f ServiceStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to ServiceStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          CI Text
-> Accept
-> Fold (AWSResponse GetService) (CI Text)
-> Acceptor GetService
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"UPDATE_COMPLETE_CLEANUP_FAILED"
            Accept
Core.AcceptFailure
            ( (Maybe Service -> f (Maybe Service))
-> GetServiceResponse -> f GetServiceResponse
Lens' GetServiceResponse (Maybe Service)
getServiceResponse_service ((Maybe Service -> f (Maybe Service))
 -> GetServiceResponse -> f GetServiceResponse)
-> ((CI Text -> f (CI Text)) -> Maybe Service -> f (Maybe Service))
-> (CI Text -> f (CI Text))
-> GetServiceResponse
-> f GetServiceResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Service -> f Service) -> Maybe Service -> f (Maybe Service)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((Service -> f Service) -> Maybe Service -> f (Maybe Service))
-> ((CI Text -> f (CI Text)) -> Service -> f Service)
-> (CI Text -> f (CI Text))
-> Maybe Service
-> f (Maybe Service)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ServiceStatus -> f ServiceStatus) -> Service -> f Service
Lens' Service ServiceStatus
service_status
                ((ServiceStatus -> f ServiceStatus) -> Service -> f Service)
-> ((CI Text -> f (CI Text)) -> ServiceStatus -> f ServiceStatus)
-> (CI Text -> f (CI Text))
-> Service
-> f Service
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ServiceStatus -> CI Text)
-> (CI Text -> f (CI Text)) -> ServiceStatus -> f ServiceStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to ServiceStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            )
        ]
    }

-- | Polls 'Amazonka.Proton.GetService' every 5 seconds until a successful state is reached. An error is returned after 999 failed checks.
newServiceDeleted :: Core.Wait GetService
newServiceDeleted :: Wait GetService
newServiceDeleted =
  Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
    { $sel:_waitName:Wait :: ByteString
Core._waitName = ByteString
"ServiceDeleted",
      $sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
999,
      $sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
5,
      $sel:_waitAcceptors:Wait :: [Acceptor GetService]
Core._waitAcceptors =
        [ ErrorCode -> Accept -> Acceptor GetService
forall a. ErrorCode -> Accept -> Acceptor a
Core.matchError
            ErrorCode
"ResourceNotFoundException"
            Accept
Core.AcceptSuccess,
          CI Text
-> Accept
-> Fold (AWSResponse GetService) (CI Text)
-> Acceptor GetService
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"DELETE_FAILED"
            Accept
Core.AcceptFailure
            ( (Maybe Service -> f (Maybe Service))
-> GetServiceResponse -> f GetServiceResponse
Lens' GetServiceResponse (Maybe Service)
getServiceResponse_service ((Maybe Service -> f (Maybe Service))
 -> GetServiceResponse -> f GetServiceResponse)
-> ((CI Text -> f (CI Text)) -> Maybe Service -> f (Maybe Service))
-> (CI Text -> f (CI Text))
-> GetServiceResponse
-> f GetServiceResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Service -> f Service) -> Maybe Service -> f (Maybe Service)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((Service -> f Service) -> Maybe Service -> f (Maybe Service))
-> ((CI Text -> f (CI Text)) -> Service -> f Service)
-> (CI Text -> f (CI Text))
-> Maybe Service
-> f (Maybe Service)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ServiceStatus -> f ServiceStatus) -> Service -> f Service
Lens' Service ServiceStatus
service_status
                ((ServiceStatus -> f ServiceStatus) -> Service -> f Service)
-> ((CI Text -> f (CI Text)) -> ServiceStatus -> f ServiceStatus)
-> (CI Text -> f (CI Text))
-> Service
-> f Service
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ServiceStatus -> CI Text)
-> (CI Text -> f (CI Text)) -> ServiceStatus -> f ServiceStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to ServiceStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            )
        ]
    }

-- | Polls 'Amazonka.Proton.GetServiceInstance' every 5 seconds until a successful state is reached. An error is returned after 999 failed checks.
newServiceInstanceDeployed :: Core.Wait GetServiceInstance
newServiceInstanceDeployed :: Wait GetServiceInstance
newServiceInstanceDeployed =
  Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
    { $sel:_waitName:Wait :: ByteString
Core._waitName =
        ByteString
"ServiceInstanceDeployed",
      $sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
999,
      $sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
5,
      $sel:_waitAcceptors:Wait :: [Acceptor GetServiceInstance]
Core._waitAcceptors =
        [ CI Text
-> Accept
-> Fold (AWSResponse GetServiceInstance) (CI Text)
-> Acceptor GetServiceInstance
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"SUCCEEDED"
            Accept
Core.AcceptSuccess
            ( (ServiceInstance -> f ServiceInstance)
-> GetServiceInstanceResponse -> f GetServiceInstanceResponse
Lens' GetServiceInstanceResponse ServiceInstance
getServiceInstanceResponse_serviceInstance
                ((ServiceInstance -> f ServiceInstance)
 -> GetServiceInstanceResponse -> f GetServiceInstanceResponse)
-> ((CI Text -> f (CI Text))
    -> ServiceInstance -> f ServiceInstance)
-> (CI Text -> f (CI Text))
-> GetServiceInstanceResponse
-> f GetServiceInstanceResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (DeploymentStatus -> f DeploymentStatus)
-> ServiceInstance -> f ServiceInstance
Lens' ServiceInstance DeploymentStatus
serviceInstance_deploymentStatus
                ((DeploymentStatus -> f DeploymentStatus)
 -> ServiceInstance -> f ServiceInstance)
-> ((CI Text -> f (CI Text))
    -> DeploymentStatus -> f DeploymentStatus)
-> (CI Text -> f (CI Text))
-> ServiceInstance
-> f ServiceInstance
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (DeploymentStatus -> CI Text)
-> (CI Text -> f (CI Text))
-> DeploymentStatus
-> f DeploymentStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to DeploymentStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          CI Text
-> Accept
-> Fold (AWSResponse GetServiceInstance) (CI Text)
-> Acceptor GetServiceInstance
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"FAILED"
            Accept
Core.AcceptFailure
            ( (ServiceInstance -> f ServiceInstance)
-> GetServiceInstanceResponse -> f GetServiceInstanceResponse
Lens' GetServiceInstanceResponse ServiceInstance
getServiceInstanceResponse_serviceInstance
                ((ServiceInstance -> f ServiceInstance)
 -> GetServiceInstanceResponse -> f GetServiceInstanceResponse)
-> ((CI Text -> f (CI Text))
    -> ServiceInstance -> f ServiceInstance)
-> (CI Text -> f (CI Text))
-> GetServiceInstanceResponse
-> f GetServiceInstanceResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (DeploymentStatus -> f DeploymentStatus)
-> ServiceInstance -> f ServiceInstance
Lens' ServiceInstance DeploymentStatus
serviceInstance_deploymentStatus
                ((DeploymentStatus -> f DeploymentStatus)
 -> ServiceInstance -> f ServiceInstance)
-> ((CI Text -> f (CI Text))
    -> DeploymentStatus -> f DeploymentStatus)
-> (CI Text -> f (CI Text))
-> ServiceInstance
-> f ServiceInstance
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (DeploymentStatus -> CI Text)
-> (CI Text -> f (CI Text))
-> DeploymentStatus
-> f DeploymentStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to DeploymentStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            )
        ]
    }

-- | Polls 'Amazonka.Proton.GetService' every 10 seconds until a successful state is reached. An error is returned after 360 failed checks.
newServicePipelineDeployed :: Core.Wait GetService
newServicePipelineDeployed :: Wait GetService
newServicePipelineDeployed =
  Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
    { $sel:_waitName:Wait :: ByteString
Core._waitName =
        ByteString
"ServicePipelineDeployed",
      $sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
360,
      $sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
10,
      $sel:_waitAcceptors:Wait :: [Acceptor GetService]
Core._waitAcceptors =
        [ CI Text
-> Accept
-> Fold (AWSResponse GetService) (CI Text)
-> Acceptor GetService
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"SUCCEEDED"
            Accept
Core.AcceptSuccess
            ( (Maybe Service -> f (Maybe Service))
-> GetServiceResponse -> f GetServiceResponse
Lens' GetServiceResponse (Maybe Service)
getServiceResponse_service ((Maybe Service -> f (Maybe Service))
 -> GetServiceResponse -> f GetServiceResponse)
-> ((CI Text -> f (CI Text)) -> Maybe Service -> f (Maybe Service))
-> (CI Text -> f (CI Text))
-> GetServiceResponse
-> f GetServiceResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Service -> f Service) -> Maybe Service -> f (Maybe Service)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((Service -> f Service) -> Maybe Service -> f (Maybe Service))
-> ((CI Text -> f (CI Text)) -> Service -> f Service)
-> (CI Text -> f (CI Text))
-> Maybe Service
-> f (Maybe Service)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe ServicePipeline -> f (Maybe ServicePipeline))
-> Service -> f Service
Lens' Service (Maybe ServicePipeline)
service_pipeline
                ((Maybe ServicePipeline -> f (Maybe ServicePipeline))
 -> Service -> f Service)
-> ((CI Text -> f (CI Text))
    -> Maybe ServicePipeline -> f (Maybe ServicePipeline))
-> (CI Text -> f (CI Text))
-> Service
-> f Service
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ServicePipeline -> f ServicePipeline)
-> Maybe ServicePipeline -> f (Maybe ServicePipeline)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((ServicePipeline -> f ServicePipeline)
 -> Maybe ServicePipeline -> f (Maybe ServicePipeline))
-> ((CI Text -> f (CI Text))
    -> ServicePipeline -> f ServicePipeline)
-> (CI Text -> f (CI Text))
-> Maybe ServicePipeline
-> f (Maybe ServicePipeline)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (DeploymentStatus -> f DeploymentStatus)
-> ServicePipeline -> f ServicePipeline
Lens' ServicePipeline DeploymentStatus
servicePipeline_deploymentStatus
                ((DeploymentStatus -> f DeploymentStatus)
 -> ServicePipeline -> f ServicePipeline)
-> ((CI Text -> f (CI Text))
    -> DeploymentStatus -> f DeploymentStatus)
-> (CI Text -> f (CI Text))
-> ServicePipeline
-> f ServicePipeline
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (DeploymentStatus -> CI Text)
-> (CI Text -> f (CI Text))
-> DeploymentStatus
-> f DeploymentStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to DeploymentStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          CI Text
-> Accept
-> Fold (AWSResponse GetService) (CI Text)
-> Acceptor GetService
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"FAILED"
            Accept
Core.AcceptFailure
            ( (Maybe Service -> f (Maybe Service))
-> GetServiceResponse -> f GetServiceResponse
Lens' GetServiceResponse (Maybe Service)
getServiceResponse_service ((Maybe Service -> f (Maybe Service))
 -> GetServiceResponse -> f GetServiceResponse)
-> ((CI Text -> f (CI Text)) -> Maybe Service -> f (Maybe Service))
-> (CI Text -> f (CI Text))
-> GetServiceResponse
-> f GetServiceResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Service -> f Service) -> Maybe Service -> f (Maybe Service)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((Service -> f Service) -> Maybe Service -> f (Maybe Service))
-> ((CI Text -> f (CI Text)) -> Service -> f Service)
-> (CI Text -> f (CI Text))
-> Maybe Service
-> f (Maybe Service)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe ServicePipeline -> f (Maybe ServicePipeline))
-> Service -> f Service
Lens' Service (Maybe ServicePipeline)
service_pipeline
                ((Maybe ServicePipeline -> f (Maybe ServicePipeline))
 -> Service -> f Service)
-> ((CI Text -> f (CI Text))
    -> Maybe ServicePipeline -> f (Maybe ServicePipeline))
-> (CI Text -> f (CI Text))
-> Service
-> f Service
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ServicePipeline -> f ServicePipeline)
-> Maybe ServicePipeline -> f (Maybe ServicePipeline)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((ServicePipeline -> f ServicePipeline)
 -> Maybe ServicePipeline -> f (Maybe ServicePipeline))
-> ((CI Text -> f (CI Text))
    -> ServicePipeline -> f ServicePipeline)
-> (CI Text -> f (CI Text))
-> Maybe ServicePipeline
-> f (Maybe ServicePipeline)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (DeploymentStatus -> f DeploymentStatus)
-> ServicePipeline -> f ServicePipeline
Lens' ServicePipeline DeploymentStatus
servicePipeline_deploymentStatus
                ((DeploymentStatus -> f DeploymentStatus)
 -> ServicePipeline -> f ServicePipeline)
-> ((CI Text -> f (CI Text))
    -> DeploymentStatus -> f DeploymentStatus)
-> (CI Text -> f (CI Text))
-> ServicePipeline
-> f ServicePipeline
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (DeploymentStatus -> CI Text)
-> (CI Text -> f (CI Text))
-> DeploymentStatus
-> f DeploymentStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to DeploymentStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            )
        ]
    }

-- | Polls 'Amazonka.Proton.GetService' every 5 seconds until a successful state is reached. An error is returned after 999 failed checks.
newServiceCreated :: Core.Wait GetService
newServiceCreated :: Wait GetService
newServiceCreated =
  Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
    { $sel:_waitName:Wait :: ByteString
Core._waitName = ByteString
"ServiceCreated",
      $sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
999,
      $sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
5,
      $sel:_waitAcceptors:Wait :: [Acceptor GetService]
Core._waitAcceptors =
        [ CI Text
-> Accept
-> Fold (AWSResponse GetService) (CI Text)
-> Acceptor GetService
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"ACTIVE"
            Accept
Core.AcceptSuccess
            ( (Maybe Service -> f (Maybe Service))
-> GetServiceResponse -> f GetServiceResponse
Lens' GetServiceResponse (Maybe Service)
getServiceResponse_service ((Maybe Service -> f (Maybe Service))
 -> GetServiceResponse -> f GetServiceResponse)
-> ((CI Text -> f (CI Text)) -> Maybe Service -> f (Maybe Service))
-> (CI Text -> f (CI Text))
-> GetServiceResponse
-> f GetServiceResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Service -> f Service) -> Maybe Service -> f (Maybe Service)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((Service -> f Service) -> Maybe Service -> f (Maybe Service))
-> ((CI Text -> f (CI Text)) -> Service -> f Service)
-> (CI Text -> f (CI Text))
-> Maybe Service
-> f (Maybe Service)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ServiceStatus -> f ServiceStatus) -> Service -> f Service
Lens' Service ServiceStatus
service_status
                ((ServiceStatus -> f ServiceStatus) -> Service -> f Service)
-> ((CI Text -> f (CI Text)) -> ServiceStatus -> f ServiceStatus)
-> (CI Text -> f (CI Text))
-> Service
-> f Service
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ServiceStatus -> CI Text)
-> (CI Text -> f (CI Text)) -> ServiceStatus -> f ServiceStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to ServiceStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          CI Text
-> Accept
-> Fold (AWSResponse GetService) (CI Text)
-> Acceptor GetService
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"CREATE_FAILED_CLEANUP_COMPLETE"
            Accept
Core.AcceptFailure
            ( (Maybe Service -> f (Maybe Service))
-> GetServiceResponse -> f GetServiceResponse
Lens' GetServiceResponse (Maybe Service)
getServiceResponse_service ((Maybe Service -> f (Maybe Service))
 -> GetServiceResponse -> f GetServiceResponse)
-> ((CI Text -> f (CI Text)) -> Maybe Service -> f (Maybe Service))
-> (CI Text -> f (CI Text))
-> GetServiceResponse
-> f GetServiceResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Service -> f Service) -> Maybe Service -> f (Maybe Service)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((Service -> f Service) -> Maybe Service -> f (Maybe Service))
-> ((CI Text -> f (CI Text)) -> Service -> f Service)
-> (CI Text -> f (CI Text))
-> Maybe Service
-> f (Maybe Service)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ServiceStatus -> f ServiceStatus) -> Service -> f Service
Lens' Service ServiceStatus
service_status
                ((ServiceStatus -> f ServiceStatus) -> Service -> f Service)
-> ((CI Text -> f (CI Text)) -> ServiceStatus -> f ServiceStatus)
-> (CI Text -> f (CI Text))
-> Service
-> f Service
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ServiceStatus -> CI Text)
-> (CI Text -> f (CI Text)) -> ServiceStatus -> f ServiceStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to ServiceStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          CI Text
-> Accept
-> Fold (AWSResponse GetService) (CI Text)
-> Acceptor GetService
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"CREATE_FAILED_CLEANUP_FAILED"
            Accept
Core.AcceptFailure
            ( (Maybe Service -> f (Maybe Service))
-> GetServiceResponse -> f GetServiceResponse
Lens' GetServiceResponse (Maybe Service)
getServiceResponse_service ((Maybe Service -> f (Maybe Service))
 -> GetServiceResponse -> f GetServiceResponse)
-> ((CI Text -> f (CI Text)) -> Maybe Service -> f (Maybe Service))
-> (CI Text -> f (CI Text))
-> GetServiceResponse
-> f GetServiceResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Service -> f Service) -> Maybe Service -> f (Maybe Service)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((Service -> f Service) -> Maybe Service -> f (Maybe Service))
-> ((CI Text -> f (CI Text)) -> Service -> f Service)
-> (CI Text -> f (CI Text))
-> Maybe Service
-> f (Maybe Service)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ServiceStatus -> f ServiceStatus) -> Service -> f Service
Lens' Service ServiceStatus
service_status
                ((ServiceStatus -> f ServiceStatus) -> Service -> f Service)
-> ((CI Text -> f (CI Text)) -> ServiceStatus -> f ServiceStatus)
-> (CI Text -> f (CI Text))
-> Service
-> f Service
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ServiceStatus -> CI Text)
-> (CI Text -> f (CI Text)) -> ServiceStatus -> f ServiceStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to ServiceStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            ),
          CI Text
-> Accept
-> Fold (AWSResponse GetService) (CI Text)
-> Acceptor GetService
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
            CI Text
"CREATE_FAILED"
            Accept
Core.AcceptFailure
            ( (Maybe Service -> f (Maybe Service))
-> GetServiceResponse -> f GetServiceResponse
Lens' GetServiceResponse (Maybe Service)
getServiceResponse_service ((Maybe Service -> f (Maybe Service))
 -> GetServiceResponse -> f GetServiceResponse)
-> ((CI Text -> f (CI Text)) -> Maybe Service -> f (Maybe Service))
-> (CI Text -> f (CI Text))
-> GetServiceResponse
-> f GetServiceResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Service -> f Service) -> Maybe Service -> f (Maybe Service)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
                ((Service -> f Service) -> Maybe Service -> f (Maybe Service))
-> ((CI Text -> f (CI Text)) -> Service -> f Service)
-> (CI Text -> f (CI Text))
-> Maybe Service
-> f (Maybe Service)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ServiceStatus -> f ServiceStatus) -> Service -> f Service
Lens' Service ServiceStatus
service_status
                ((ServiceStatus -> f ServiceStatus) -> Service -> f Service)
-> ((CI Text -> f (CI Text)) -> ServiceStatus -> f ServiceStatus)
-> (CI Text -> f (CI Text))
-> Service
-> f Service
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ServiceStatus -> CI Text)
-> (CI Text -> f (CI Text)) -> ServiceStatus -> f ServiceStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to ServiceStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
            )
        ]
    }