{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

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

-- |
-- Module      : Amazonka.Lightsail.Types.ContainerService
-- 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.Lightsail.Types.ContainerService where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Lightsail.Types.ContainerServiceDeployment
import Amazonka.Lightsail.Types.ContainerServicePowerName
import Amazonka.Lightsail.Types.ContainerServiceState
import Amazonka.Lightsail.Types.ContainerServiceStateDetail
import Amazonka.Lightsail.Types.ResourceLocation
import Amazonka.Lightsail.Types.ResourceType
import Amazonka.Lightsail.Types.Tag
import qualified Amazonka.Prelude as Prelude

-- | Describes an Amazon Lightsail container service.
--
-- /See:/ 'newContainerService' smart constructor.
data ContainerService = ContainerService'
  { -- | The current state of the container service.
    --
    -- The following container service states are possible:
    --
    -- -   @PENDING@ - The container service is being created.
    --
    -- -   @READY@ - The container service is running but it does not have an
    --     active container deployment.
    --
    -- -   @DEPLOYING@ - The container service is launching a container
    --     deployment.
    --
    -- -   @RUNNING@ - The container service is running and it has an active
    --     container deployment.
    --
    -- -   @UPDATING@ - The container service capacity or its custom domains
    --     are being updated.
    --
    -- -   @DELETING@ - The container service is being deleted.
    --
    -- -   @DISABLED@ - The container service is disabled, and its active
    --     deployment and containers, if any, are shut down.
    ContainerService -> Maybe ContainerServiceState
state :: Prelude.Maybe ContainerServiceState,
    -- | The ID of the power of the container service.
    ContainerService -> Maybe Text
powerId :: Prelude.Maybe Prelude.Text,
    -- | The Lightsail resource type of the container service (i.e.,
    -- @ContainerService@).
    ContainerService -> Maybe ResourceType
resourceType :: Prelude.Maybe ResourceType,
    -- | The Amazon Resource Name (ARN) of the container service.
    ContainerService -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The timestamp when the container service was created.
    ContainerService -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | An object that describes the location of the container service, such as
    -- the AWS Region and Availability Zone.
    ContainerService -> Maybe ResourceLocation
location :: Prelude.Maybe ResourceLocation,
    -- | The scale specification of the container service.
    --
    -- The scale specifies the allocated compute nodes of the container
    -- service.
    ContainerService -> Maybe Natural
scale :: Prelude.Maybe Prelude.Natural,
    -- | The publicly accessible URL of the container service.
    --
    -- If no public endpoint is specified in the @currentDeployment@, this URL
    -- returns a 404 response.
    ContainerService -> Maybe Text
url :: Prelude.Maybe Prelude.Text,
    -- | An object that describes the current state of the container service.
    --
    -- The state detail is populated only when a container service is in a
    -- @PENDING@, @DEPLOYING@, or @UPDATING@ state.
    ContainerService -> Maybe ContainerServiceStateDetail
stateDetail :: Prelude.Maybe ContainerServiceStateDetail,
    -- | An object that describes the next deployment of the container service.
    --
    -- This value is @null@ when there is no deployment in a @pending@ state.
    ContainerService -> Maybe ContainerServiceDeployment
nextDeployment :: Prelude.Maybe ContainerServiceDeployment,
    -- | The principal ARN of the container service.
    --
    -- The principal ARN can be used to create a trust relationship between
    -- your standard AWS account and your Lightsail container service. This
    -- allows you to give your service permission to access resources in your
    -- standard AWS account.
    ContainerService -> Maybe Text
principalArn :: Prelude.Maybe Prelude.Text,
    -- | The power specification of the container service.
    --
    -- The power specifies the amount of RAM, the number of vCPUs, and the base
    -- price of the container service.
    ContainerService -> Maybe ContainerServicePowerName
power :: Prelude.Maybe ContainerServicePowerName,
    -- | The private domain name of the container service.
    --
    -- The private domain name is accessible only by other resources within the
    -- default virtual private cloud (VPC) of your Lightsail account.
    ContainerService -> Maybe Text
privateDomainName :: Prelude.Maybe Prelude.Text,
    -- | A Boolean value indicating whether the container service is disabled.
    ContainerService -> Maybe Bool
isDisabled :: Prelude.Maybe Prelude.Bool,
    -- | The public domain name of the container service, such as @example.com@
    -- and @www.example.com@.
    --
    -- You can specify up to four public domain names for a container service.
    -- The domain names that you specify are used when you create a deployment
    -- with a container configured as the public endpoint of your container
    -- service.
    --
    -- If you don\'t specify public domain names, then you can use the default
    -- domain of the container service.
    --
    -- You must create and validate an SSL\/TLS certificate before you can use
    -- public domain names with your container service. Use the
    -- @CreateCertificate@ action to create a certificate for the public domain
    -- names you want to use with your container service.
    --
    -- See @CreateContainerService@ or @UpdateContainerService@ for information
    -- about how to specify public domain names for your Lightsail container
    -- service.
    ContainerService -> Maybe (HashMap Text [Text])
publicDomainNames :: Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text]),
    -- | The name of the container service.
    ContainerService -> Maybe Text
containerServiceName :: Prelude.Maybe Prelude.Text,
    -- | An object that describes the current container deployment of the
    -- container service.
    ContainerService -> Maybe ContainerServiceDeployment
currentDeployment :: Prelude.Maybe ContainerServiceDeployment,
    -- | The tag keys and optional values for the resource. For more information
    -- about tags in Lightsail, see the
    -- <https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-tags Amazon Lightsail Developer Guide>.
    ContainerService -> Maybe [Tag]
tags :: Prelude.Maybe [Tag]
  }
  deriving (ContainerService -> ContainerService -> Bool
(ContainerService -> ContainerService -> Bool)
-> (ContainerService -> ContainerService -> Bool)
-> Eq ContainerService
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ContainerService -> ContainerService -> Bool
$c/= :: ContainerService -> ContainerService -> Bool
== :: ContainerService -> ContainerService -> Bool
$c== :: ContainerService -> ContainerService -> Bool
Prelude.Eq, ReadPrec [ContainerService]
ReadPrec ContainerService
Int -> ReadS ContainerService
ReadS [ContainerService]
(Int -> ReadS ContainerService)
-> ReadS [ContainerService]
-> ReadPrec ContainerService
-> ReadPrec [ContainerService]
-> Read ContainerService
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ContainerService]
$creadListPrec :: ReadPrec [ContainerService]
readPrec :: ReadPrec ContainerService
$creadPrec :: ReadPrec ContainerService
readList :: ReadS [ContainerService]
$creadList :: ReadS [ContainerService]
readsPrec :: Int -> ReadS ContainerService
$creadsPrec :: Int -> ReadS ContainerService
Prelude.Read, Int -> ContainerService -> ShowS
[ContainerService] -> ShowS
ContainerService -> String
(Int -> ContainerService -> ShowS)
-> (ContainerService -> String)
-> ([ContainerService] -> ShowS)
-> Show ContainerService
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ContainerService] -> ShowS
$cshowList :: [ContainerService] -> ShowS
show :: ContainerService -> String
$cshow :: ContainerService -> String
showsPrec :: Int -> ContainerService -> ShowS
$cshowsPrec :: Int -> ContainerService -> ShowS
Prelude.Show, (forall x. ContainerService -> Rep ContainerService x)
-> (forall x. Rep ContainerService x -> ContainerService)
-> Generic ContainerService
forall x. Rep ContainerService x -> ContainerService
forall x. ContainerService -> Rep ContainerService x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ContainerService x -> ContainerService
$cfrom :: forall x. ContainerService -> Rep ContainerService x
Prelude.Generic)

-- |
-- Create a value of 'ContainerService' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'state', 'containerService_state' - The current state of the container service.
--
-- The following container service states are possible:
--
-- -   @PENDING@ - The container service is being created.
--
-- -   @READY@ - The container service is running but it does not have an
--     active container deployment.
--
-- -   @DEPLOYING@ - The container service is launching a container
--     deployment.
--
-- -   @RUNNING@ - The container service is running and it has an active
--     container deployment.
--
-- -   @UPDATING@ - The container service capacity or its custom domains
--     are being updated.
--
-- -   @DELETING@ - The container service is being deleted.
--
-- -   @DISABLED@ - The container service is disabled, and its active
--     deployment and containers, if any, are shut down.
--
-- 'powerId', 'containerService_powerId' - The ID of the power of the container service.
--
-- 'resourceType', 'containerService_resourceType' - The Lightsail resource type of the container service (i.e.,
-- @ContainerService@).
--
-- 'arn', 'containerService_arn' - The Amazon Resource Name (ARN) of the container service.
--
-- 'createdAt', 'containerService_createdAt' - The timestamp when the container service was created.
--
-- 'location', 'containerService_location' - An object that describes the location of the container service, such as
-- the AWS Region and Availability Zone.
--
-- 'scale', 'containerService_scale' - The scale specification of the container service.
--
-- The scale specifies the allocated compute nodes of the container
-- service.
--
-- 'url', 'containerService_url' - The publicly accessible URL of the container service.
--
-- If no public endpoint is specified in the @currentDeployment@, this URL
-- returns a 404 response.
--
-- 'stateDetail', 'containerService_stateDetail' - An object that describes the current state of the container service.
--
-- The state detail is populated only when a container service is in a
-- @PENDING@, @DEPLOYING@, or @UPDATING@ state.
--
-- 'nextDeployment', 'containerService_nextDeployment' - An object that describes the next deployment of the container service.
--
-- This value is @null@ when there is no deployment in a @pending@ state.
--
-- 'principalArn', 'containerService_principalArn' - The principal ARN of the container service.
--
-- The principal ARN can be used to create a trust relationship between
-- your standard AWS account and your Lightsail container service. This
-- allows you to give your service permission to access resources in your
-- standard AWS account.
--
-- 'power', 'containerService_power' - The power specification of the container service.
--
-- The power specifies the amount of RAM, the number of vCPUs, and the base
-- price of the container service.
--
-- 'privateDomainName', 'containerService_privateDomainName' - The private domain name of the container service.
--
-- The private domain name is accessible only by other resources within the
-- default virtual private cloud (VPC) of your Lightsail account.
--
-- 'isDisabled', 'containerService_isDisabled' - A Boolean value indicating whether the container service is disabled.
--
-- 'publicDomainNames', 'containerService_publicDomainNames' - The public domain name of the container service, such as @example.com@
-- and @www.example.com@.
--
-- You can specify up to four public domain names for a container service.
-- The domain names that you specify are used when you create a deployment
-- with a container configured as the public endpoint of your container
-- service.
--
-- If you don\'t specify public domain names, then you can use the default
-- domain of the container service.
--
-- You must create and validate an SSL\/TLS certificate before you can use
-- public domain names with your container service. Use the
-- @CreateCertificate@ action to create a certificate for the public domain
-- names you want to use with your container service.
--
-- See @CreateContainerService@ or @UpdateContainerService@ for information
-- about how to specify public domain names for your Lightsail container
-- service.
--
-- 'containerServiceName', 'containerService_containerServiceName' - The name of the container service.
--
-- 'currentDeployment', 'containerService_currentDeployment' - An object that describes the current container deployment of the
-- container service.
--
-- 'tags', 'containerService_tags' - The tag keys and optional values for the resource. For more information
-- about tags in Lightsail, see the
-- <https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-tags Amazon Lightsail Developer Guide>.
newContainerService ::
  ContainerService
newContainerService :: ContainerService
newContainerService =
  ContainerService' :: Maybe ContainerServiceState
-> Maybe Text
-> Maybe ResourceType
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Natural
-> Maybe Text
-> Maybe ContainerServiceStateDetail
-> Maybe ContainerServiceDeployment
-> Maybe Text
-> Maybe ContainerServicePowerName
-> Maybe Text
-> Maybe Bool
-> Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe ContainerServiceDeployment
-> Maybe [Tag]
-> ContainerService
ContainerService'
    { $sel:state:ContainerService' :: Maybe ContainerServiceState
state = Maybe ContainerServiceState
forall a. Maybe a
Prelude.Nothing,
      $sel:powerId:ContainerService' :: Maybe Text
powerId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceType:ContainerService' :: Maybe ResourceType
resourceType = Maybe ResourceType
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:ContainerService' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:ContainerService' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:location:ContainerService' :: Maybe ResourceLocation
location = Maybe ResourceLocation
forall a. Maybe a
Prelude.Nothing,
      $sel:scale:ContainerService' :: Maybe Natural
scale = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:url:ContainerService' :: Maybe Text
url = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:stateDetail:ContainerService' :: Maybe ContainerServiceStateDetail
stateDetail = Maybe ContainerServiceStateDetail
forall a. Maybe a
Prelude.Nothing,
      $sel:nextDeployment:ContainerService' :: Maybe ContainerServiceDeployment
nextDeployment = Maybe ContainerServiceDeployment
forall a. Maybe a
Prelude.Nothing,
      $sel:principalArn:ContainerService' :: Maybe Text
principalArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:power:ContainerService' :: Maybe ContainerServicePowerName
power = Maybe ContainerServicePowerName
forall a. Maybe a
Prelude.Nothing,
      $sel:privateDomainName:ContainerService' :: Maybe Text
privateDomainName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:isDisabled:ContainerService' :: Maybe Bool
isDisabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:publicDomainNames:ContainerService' :: Maybe (HashMap Text [Text])
publicDomainNames = Maybe (HashMap Text [Text])
forall a. Maybe a
Prelude.Nothing,
      $sel:containerServiceName:ContainerService' :: Maybe Text
containerServiceName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:currentDeployment:ContainerService' :: Maybe ContainerServiceDeployment
currentDeployment = Maybe ContainerServiceDeployment
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:ContainerService' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing
    }

-- | The current state of the container service.
--
-- The following container service states are possible:
--
-- -   @PENDING@ - The container service is being created.
--
-- -   @READY@ - The container service is running but it does not have an
--     active container deployment.
--
-- -   @DEPLOYING@ - The container service is launching a container
--     deployment.
--
-- -   @RUNNING@ - The container service is running and it has an active
--     container deployment.
--
-- -   @UPDATING@ - The container service capacity or its custom domains
--     are being updated.
--
-- -   @DELETING@ - The container service is being deleted.
--
-- -   @DISABLED@ - The container service is disabled, and its active
--     deployment and containers, if any, are shut down.
containerService_state :: Lens.Lens' ContainerService (Prelude.Maybe ContainerServiceState)
containerService_state :: (Maybe ContainerServiceState -> f (Maybe ContainerServiceState))
-> ContainerService -> f ContainerService
containerService_state = (ContainerService -> Maybe ContainerServiceState)
-> (ContainerService
    -> Maybe ContainerServiceState -> ContainerService)
-> Lens
     ContainerService
     ContainerService
     (Maybe ContainerServiceState)
     (Maybe ContainerServiceState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe ContainerServiceState
state :: Maybe ContainerServiceState
$sel:state:ContainerService' :: ContainerService -> Maybe ContainerServiceState
state} -> Maybe ContainerServiceState
state) (\s :: ContainerService
s@ContainerService' {} Maybe ContainerServiceState
a -> ContainerService
s {$sel:state:ContainerService' :: Maybe ContainerServiceState
state = Maybe ContainerServiceState
a} :: ContainerService)

-- | The ID of the power of the container service.
containerService_powerId :: Lens.Lens' ContainerService (Prelude.Maybe Prelude.Text)
containerService_powerId :: (Maybe Text -> f (Maybe Text))
-> ContainerService -> f ContainerService
containerService_powerId = (ContainerService -> Maybe Text)
-> (ContainerService -> Maybe Text -> ContainerService)
-> Lens ContainerService ContainerService (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe Text
powerId :: Maybe Text
$sel:powerId:ContainerService' :: ContainerService -> Maybe Text
powerId} -> Maybe Text
powerId) (\s :: ContainerService
s@ContainerService' {} Maybe Text
a -> ContainerService
s {$sel:powerId:ContainerService' :: Maybe Text
powerId = Maybe Text
a} :: ContainerService)

-- | The Lightsail resource type of the container service (i.e.,
-- @ContainerService@).
containerService_resourceType :: Lens.Lens' ContainerService (Prelude.Maybe ResourceType)
containerService_resourceType :: (Maybe ResourceType -> f (Maybe ResourceType))
-> ContainerService -> f ContainerService
containerService_resourceType = (ContainerService -> Maybe ResourceType)
-> (ContainerService -> Maybe ResourceType -> ContainerService)
-> Lens
     ContainerService
     ContainerService
     (Maybe ResourceType)
     (Maybe ResourceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe ResourceType
resourceType :: Maybe ResourceType
$sel:resourceType:ContainerService' :: ContainerService -> Maybe ResourceType
resourceType} -> Maybe ResourceType
resourceType) (\s :: ContainerService
s@ContainerService' {} Maybe ResourceType
a -> ContainerService
s {$sel:resourceType:ContainerService' :: Maybe ResourceType
resourceType = Maybe ResourceType
a} :: ContainerService)

-- | The Amazon Resource Name (ARN) of the container service.
containerService_arn :: Lens.Lens' ContainerService (Prelude.Maybe Prelude.Text)
containerService_arn :: (Maybe Text -> f (Maybe Text))
-> ContainerService -> f ContainerService
containerService_arn = (ContainerService -> Maybe Text)
-> (ContainerService -> Maybe Text -> ContainerService)
-> Lens ContainerService ContainerService (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe Text
arn :: Maybe Text
$sel:arn:ContainerService' :: ContainerService -> Maybe Text
arn} -> Maybe Text
arn) (\s :: ContainerService
s@ContainerService' {} Maybe Text
a -> ContainerService
s {$sel:arn:ContainerService' :: Maybe Text
arn = Maybe Text
a} :: ContainerService)

-- | The timestamp when the container service was created.
containerService_createdAt :: Lens.Lens' ContainerService (Prelude.Maybe Prelude.UTCTime)
containerService_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ContainerService -> f ContainerService
containerService_createdAt = (ContainerService -> Maybe POSIX)
-> (ContainerService -> Maybe POSIX -> ContainerService)
-> Lens
     ContainerService ContainerService (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:ContainerService' :: ContainerService -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: ContainerService
s@ContainerService' {} Maybe POSIX
a -> ContainerService
s {$sel:createdAt:ContainerService' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: ContainerService) ((Maybe POSIX -> f (Maybe POSIX))
 -> ContainerService -> f ContainerService)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ContainerService
-> f ContainerService
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | An object that describes the location of the container service, such as
-- the AWS Region and Availability Zone.
containerService_location :: Lens.Lens' ContainerService (Prelude.Maybe ResourceLocation)
containerService_location :: (Maybe ResourceLocation -> f (Maybe ResourceLocation))
-> ContainerService -> f ContainerService
containerService_location = (ContainerService -> Maybe ResourceLocation)
-> (ContainerService -> Maybe ResourceLocation -> ContainerService)
-> Lens
     ContainerService
     ContainerService
     (Maybe ResourceLocation)
     (Maybe ResourceLocation)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe ResourceLocation
location :: Maybe ResourceLocation
$sel:location:ContainerService' :: ContainerService -> Maybe ResourceLocation
location} -> Maybe ResourceLocation
location) (\s :: ContainerService
s@ContainerService' {} Maybe ResourceLocation
a -> ContainerService
s {$sel:location:ContainerService' :: Maybe ResourceLocation
location = Maybe ResourceLocation
a} :: ContainerService)

-- | The scale specification of the container service.
--
-- The scale specifies the allocated compute nodes of the container
-- service.
containerService_scale :: Lens.Lens' ContainerService (Prelude.Maybe Prelude.Natural)
containerService_scale :: (Maybe Natural -> f (Maybe Natural))
-> ContainerService -> f ContainerService
containerService_scale = (ContainerService -> Maybe Natural)
-> (ContainerService -> Maybe Natural -> ContainerService)
-> Lens
     ContainerService ContainerService (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe Natural
scale :: Maybe Natural
$sel:scale:ContainerService' :: ContainerService -> Maybe Natural
scale} -> Maybe Natural
scale) (\s :: ContainerService
s@ContainerService' {} Maybe Natural
a -> ContainerService
s {$sel:scale:ContainerService' :: Maybe Natural
scale = Maybe Natural
a} :: ContainerService)

-- | The publicly accessible URL of the container service.
--
-- If no public endpoint is specified in the @currentDeployment@, this URL
-- returns a 404 response.
containerService_url :: Lens.Lens' ContainerService (Prelude.Maybe Prelude.Text)
containerService_url :: (Maybe Text -> f (Maybe Text))
-> ContainerService -> f ContainerService
containerService_url = (ContainerService -> Maybe Text)
-> (ContainerService -> Maybe Text -> ContainerService)
-> Lens ContainerService ContainerService (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe Text
url :: Maybe Text
$sel:url:ContainerService' :: ContainerService -> Maybe Text
url} -> Maybe Text
url) (\s :: ContainerService
s@ContainerService' {} Maybe Text
a -> ContainerService
s {$sel:url:ContainerService' :: Maybe Text
url = Maybe Text
a} :: ContainerService)

-- | An object that describes the current state of the container service.
--
-- The state detail is populated only when a container service is in a
-- @PENDING@, @DEPLOYING@, or @UPDATING@ state.
containerService_stateDetail :: Lens.Lens' ContainerService (Prelude.Maybe ContainerServiceStateDetail)
containerService_stateDetail :: (Maybe ContainerServiceStateDetail
 -> f (Maybe ContainerServiceStateDetail))
-> ContainerService -> f ContainerService
containerService_stateDetail = (ContainerService -> Maybe ContainerServiceStateDetail)
-> (ContainerService
    -> Maybe ContainerServiceStateDetail -> ContainerService)
-> Lens
     ContainerService
     ContainerService
     (Maybe ContainerServiceStateDetail)
     (Maybe ContainerServiceStateDetail)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe ContainerServiceStateDetail
stateDetail :: Maybe ContainerServiceStateDetail
$sel:stateDetail:ContainerService' :: ContainerService -> Maybe ContainerServiceStateDetail
stateDetail} -> Maybe ContainerServiceStateDetail
stateDetail) (\s :: ContainerService
s@ContainerService' {} Maybe ContainerServiceStateDetail
a -> ContainerService
s {$sel:stateDetail:ContainerService' :: Maybe ContainerServiceStateDetail
stateDetail = Maybe ContainerServiceStateDetail
a} :: ContainerService)

-- | An object that describes the next deployment of the container service.
--
-- This value is @null@ when there is no deployment in a @pending@ state.
containerService_nextDeployment :: Lens.Lens' ContainerService (Prelude.Maybe ContainerServiceDeployment)
containerService_nextDeployment :: (Maybe ContainerServiceDeployment
 -> f (Maybe ContainerServiceDeployment))
-> ContainerService -> f ContainerService
containerService_nextDeployment = (ContainerService -> Maybe ContainerServiceDeployment)
-> (ContainerService
    -> Maybe ContainerServiceDeployment -> ContainerService)
-> Lens
     ContainerService
     ContainerService
     (Maybe ContainerServiceDeployment)
     (Maybe ContainerServiceDeployment)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe ContainerServiceDeployment
nextDeployment :: Maybe ContainerServiceDeployment
$sel:nextDeployment:ContainerService' :: ContainerService -> Maybe ContainerServiceDeployment
nextDeployment} -> Maybe ContainerServiceDeployment
nextDeployment) (\s :: ContainerService
s@ContainerService' {} Maybe ContainerServiceDeployment
a -> ContainerService
s {$sel:nextDeployment:ContainerService' :: Maybe ContainerServiceDeployment
nextDeployment = Maybe ContainerServiceDeployment
a} :: ContainerService)

-- | The principal ARN of the container service.
--
-- The principal ARN can be used to create a trust relationship between
-- your standard AWS account and your Lightsail container service. This
-- allows you to give your service permission to access resources in your
-- standard AWS account.
containerService_principalArn :: Lens.Lens' ContainerService (Prelude.Maybe Prelude.Text)
containerService_principalArn :: (Maybe Text -> f (Maybe Text))
-> ContainerService -> f ContainerService
containerService_principalArn = (ContainerService -> Maybe Text)
-> (ContainerService -> Maybe Text -> ContainerService)
-> Lens ContainerService ContainerService (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe Text
principalArn :: Maybe Text
$sel:principalArn:ContainerService' :: ContainerService -> Maybe Text
principalArn} -> Maybe Text
principalArn) (\s :: ContainerService
s@ContainerService' {} Maybe Text
a -> ContainerService
s {$sel:principalArn:ContainerService' :: Maybe Text
principalArn = Maybe Text
a} :: ContainerService)

-- | The power specification of the container service.
--
-- The power specifies the amount of RAM, the number of vCPUs, and the base
-- price of the container service.
containerService_power :: Lens.Lens' ContainerService (Prelude.Maybe ContainerServicePowerName)
containerService_power :: (Maybe ContainerServicePowerName
 -> f (Maybe ContainerServicePowerName))
-> ContainerService -> f ContainerService
containerService_power = (ContainerService -> Maybe ContainerServicePowerName)
-> (ContainerService
    -> Maybe ContainerServicePowerName -> ContainerService)
-> Lens
     ContainerService
     ContainerService
     (Maybe ContainerServicePowerName)
     (Maybe ContainerServicePowerName)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe ContainerServicePowerName
power :: Maybe ContainerServicePowerName
$sel:power:ContainerService' :: ContainerService -> Maybe ContainerServicePowerName
power} -> Maybe ContainerServicePowerName
power) (\s :: ContainerService
s@ContainerService' {} Maybe ContainerServicePowerName
a -> ContainerService
s {$sel:power:ContainerService' :: Maybe ContainerServicePowerName
power = Maybe ContainerServicePowerName
a} :: ContainerService)

-- | The private domain name of the container service.
--
-- The private domain name is accessible only by other resources within the
-- default virtual private cloud (VPC) of your Lightsail account.
containerService_privateDomainName :: Lens.Lens' ContainerService (Prelude.Maybe Prelude.Text)
containerService_privateDomainName :: (Maybe Text -> f (Maybe Text))
-> ContainerService -> f ContainerService
containerService_privateDomainName = (ContainerService -> Maybe Text)
-> (ContainerService -> Maybe Text -> ContainerService)
-> Lens ContainerService ContainerService (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe Text
privateDomainName :: Maybe Text
$sel:privateDomainName:ContainerService' :: ContainerService -> Maybe Text
privateDomainName} -> Maybe Text
privateDomainName) (\s :: ContainerService
s@ContainerService' {} Maybe Text
a -> ContainerService
s {$sel:privateDomainName:ContainerService' :: Maybe Text
privateDomainName = Maybe Text
a} :: ContainerService)

-- | A Boolean value indicating whether the container service is disabled.
containerService_isDisabled :: Lens.Lens' ContainerService (Prelude.Maybe Prelude.Bool)
containerService_isDisabled :: (Maybe Bool -> f (Maybe Bool))
-> ContainerService -> f ContainerService
containerService_isDisabled = (ContainerService -> Maybe Bool)
-> (ContainerService -> Maybe Bool -> ContainerService)
-> Lens ContainerService ContainerService (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe Bool
isDisabled :: Maybe Bool
$sel:isDisabled:ContainerService' :: ContainerService -> Maybe Bool
isDisabled} -> Maybe Bool
isDisabled) (\s :: ContainerService
s@ContainerService' {} Maybe Bool
a -> ContainerService
s {$sel:isDisabled:ContainerService' :: Maybe Bool
isDisabled = Maybe Bool
a} :: ContainerService)

-- | The public domain name of the container service, such as @example.com@
-- and @www.example.com@.
--
-- You can specify up to four public domain names for a container service.
-- The domain names that you specify are used when you create a deployment
-- with a container configured as the public endpoint of your container
-- service.
--
-- If you don\'t specify public domain names, then you can use the default
-- domain of the container service.
--
-- You must create and validate an SSL\/TLS certificate before you can use
-- public domain names with your container service. Use the
-- @CreateCertificate@ action to create a certificate for the public domain
-- names you want to use with your container service.
--
-- See @CreateContainerService@ or @UpdateContainerService@ for information
-- about how to specify public domain names for your Lightsail container
-- service.
containerService_publicDomainNames :: Lens.Lens' ContainerService (Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text]))
containerService_publicDomainNames :: (Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> ContainerService -> f ContainerService
containerService_publicDomainNames = (ContainerService -> Maybe (HashMap Text [Text]))
-> (ContainerService
    -> Maybe (HashMap Text [Text]) -> ContainerService)
-> Lens
     ContainerService
     ContainerService
     (Maybe (HashMap Text [Text]))
     (Maybe (HashMap Text [Text]))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe (HashMap Text [Text])
publicDomainNames :: Maybe (HashMap Text [Text])
$sel:publicDomainNames:ContainerService' :: ContainerService -> Maybe (HashMap Text [Text])
publicDomainNames} -> Maybe (HashMap Text [Text])
publicDomainNames) (\s :: ContainerService
s@ContainerService' {} Maybe (HashMap Text [Text])
a -> ContainerService
s {$sel:publicDomainNames:ContainerService' :: Maybe (HashMap Text [Text])
publicDomainNames = Maybe (HashMap Text [Text])
a} :: ContainerService) ((Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
 -> ContainerService -> f ContainerService)
-> ((Maybe (HashMap Text [Text])
     -> f (Maybe (HashMap Text [Text])))
    -> Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> (Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> ContainerService
-> f ContainerService
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text [Text])
  (HashMap Text [Text])
  (HashMap Text [Text])
  (HashMap Text [Text])
-> Iso
     (Maybe (HashMap Text [Text]))
     (Maybe (HashMap Text [Text]))
     (Maybe (HashMap Text [Text]))
     (Maybe (HashMap Text [Text]))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text [Text])
  (HashMap Text [Text])
  (HashMap Text [Text])
  (HashMap Text [Text])
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the container service.
containerService_containerServiceName :: Lens.Lens' ContainerService (Prelude.Maybe Prelude.Text)
containerService_containerServiceName :: (Maybe Text -> f (Maybe Text))
-> ContainerService -> f ContainerService
containerService_containerServiceName = (ContainerService -> Maybe Text)
-> (ContainerService -> Maybe Text -> ContainerService)
-> Lens ContainerService ContainerService (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe Text
containerServiceName :: Maybe Text
$sel:containerServiceName:ContainerService' :: ContainerService -> Maybe Text
containerServiceName} -> Maybe Text
containerServiceName) (\s :: ContainerService
s@ContainerService' {} Maybe Text
a -> ContainerService
s {$sel:containerServiceName:ContainerService' :: Maybe Text
containerServiceName = Maybe Text
a} :: ContainerService)

-- | An object that describes the current container deployment of the
-- container service.
containerService_currentDeployment :: Lens.Lens' ContainerService (Prelude.Maybe ContainerServiceDeployment)
containerService_currentDeployment :: (Maybe ContainerServiceDeployment
 -> f (Maybe ContainerServiceDeployment))
-> ContainerService -> f ContainerService
containerService_currentDeployment = (ContainerService -> Maybe ContainerServiceDeployment)
-> (ContainerService
    -> Maybe ContainerServiceDeployment -> ContainerService)
-> Lens
     ContainerService
     ContainerService
     (Maybe ContainerServiceDeployment)
     (Maybe ContainerServiceDeployment)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe ContainerServiceDeployment
currentDeployment :: Maybe ContainerServiceDeployment
$sel:currentDeployment:ContainerService' :: ContainerService -> Maybe ContainerServiceDeployment
currentDeployment} -> Maybe ContainerServiceDeployment
currentDeployment) (\s :: ContainerService
s@ContainerService' {} Maybe ContainerServiceDeployment
a -> ContainerService
s {$sel:currentDeployment:ContainerService' :: Maybe ContainerServiceDeployment
currentDeployment = Maybe ContainerServiceDeployment
a} :: ContainerService)

-- | The tag keys and optional values for the resource. For more information
-- about tags in Lightsail, see the
-- <https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-tags Amazon Lightsail Developer Guide>.
containerService_tags :: Lens.Lens' ContainerService (Prelude.Maybe [Tag])
containerService_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> ContainerService -> f ContainerService
containerService_tags = (ContainerService -> Maybe [Tag])
-> (ContainerService -> Maybe [Tag] -> ContainerService)
-> Lens
     ContainerService ContainerService (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerService' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:ContainerService' :: ContainerService -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: ContainerService
s@ContainerService' {} Maybe [Tag]
a -> ContainerService
s {$sel:tags:ContainerService' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: ContainerService) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> ContainerService -> f ContainerService)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> ContainerService
-> f ContainerService
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.FromJSON ContainerService where
  parseJSON :: Value -> Parser ContainerService
parseJSON =
    String
-> (Object -> Parser ContainerService)
-> Value
-> Parser ContainerService
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ContainerService"
      ( \Object
x ->
          Maybe ContainerServiceState
-> Maybe Text
-> Maybe ResourceType
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Natural
-> Maybe Text
-> Maybe ContainerServiceStateDetail
-> Maybe ContainerServiceDeployment
-> Maybe Text
-> Maybe ContainerServicePowerName
-> Maybe Text
-> Maybe Bool
-> Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe ContainerServiceDeployment
-> Maybe [Tag]
-> ContainerService
ContainerService'
            (Maybe ContainerServiceState
 -> Maybe Text
 -> Maybe ResourceType
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe ResourceLocation
 -> Maybe Natural
 -> Maybe Text
 -> Maybe ContainerServiceStateDetail
 -> Maybe ContainerServiceDeployment
 -> Maybe Text
 -> Maybe ContainerServicePowerName
 -> Maybe Text
 -> Maybe Bool
 -> Maybe (HashMap Text [Text])
 -> Maybe Text
 -> Maybe ContainerServiceDeployment
 -> Maybe [Tag]
 -> ContainerService)
-> Parser (Maybe ContainerServiceState)
-> Parser
     (Maybe Text
      -> Maybe ResourceType
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe ResourceLocation
      -> Maybe Natural
      -> Maybe Text
      -> Maybe ContainerServiceStateDetail
      -> Maybe ContainerServiceDeployment
      -> Maybe Text
      -> Maybe ContainerServicePowerName
      -> Maybe Text
      -> Maybe Bool
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe ContainerServiceDeployment
      -> Maybe [Tag]
      -> ContainerService)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ContainerServiceState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"state")
            Parser
  (Maybe Text
   -> Maybe ResourceType
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe ResourceLocation
   -> Maybe Natural
   -> Maybe Text
   -> Maybe ContainerServiceStateDetail
   -> Maybe ContainerServiceDeployment
   -> Maybe Text
   -> Maybe ContainerServicePowerName
   -> Maybe Text
   -> Maybe Bool
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe ContainerServiceDeployment
   -> Maybe [Tag]
   -> ContainerService)
-> Parser (Maybe Text)
-> Parser
     (Maybe ResourceType
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe ResourceLocation
      -> Maybe Natural
      -> Maybe Text
      -> Maybe ContainerServiceStateDetail
      -> Maybe ContainerServiceDeployment
      -> Maybe Text
      -> Maybe ContainerServicePowerName
      -> Maybe Text
      -> Maybe Bool
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe ContainerServiceDeployment
      -> Maybe [Tag]
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"powerId")
            Parser
  (Maybe ResourceType
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe ResourceLocation
   -> Maybe Natural
   -> Maybe Text
   -> Maybe ContainerServiceStateDetail
   -> Maybe ContainerServiceDeployment
   -> Maybe Text
   -> Maybe ContainerServicePowerName
   -> Maybe Text
   -> Maybe Bool
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe ContainerServiceDeployment
   -> Maybe [Tag]
   -> ContainerService)
-> Parser (Maybe ResourceType)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe ResourceLocation
      -> Maybe Natural
      -> Maybe Text
      -> Maybe ContainerServiceStateDetail
      -> Maybe ContainerServiceDeployment
      -> Maybe Text
      -> Maybe ContainerServicePowerName
      -> Maybe Text
      -> Maybe Bool
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe ContainerServiceDeployment
      -> Maybe [Tag]
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ResourceType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"resourceType")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe ResourceLocation
   -> Maybe Natural
   -> Maybe Text
   -> Maybe ContainerServiceStateDetail
   -> Maybe ContainerServiceDeployment
   -> Maybe Text
   -> Maybe ContainerServicePowerName
   -> Maybe Text
   -> Maybe Bool
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe ContainerServiceDeployment
   -> Maybe [Tag]
   -> ContainerService)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe ResourceLocation
      -> Maybe Natural
      -> Maybe Text
      -> Maybe ContainerServiceStateDetail
      -> Maybe ContainerServiceDeployment
      -> Maybe Text
      -> Maybe ContainerServicePowerName
      -> Maybe Text
      -> Maybe Bool
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe ContainerServiceDeployment
      -> Maybe [Tag]
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"arn")
            Parser
  (Maybe POSIX
   -> Maybe ResourceLocation
   -> Maybe Natural
   -> Maybe Text
   -> Maybe ContainerServiceStateDetail
   -> Maybe ContainerServiceDeployment
   -> Maybe Text
   -> Maybe ContainerServicePowerName
   -> Maybe Text
   -> Maybe Bool
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe ContainerServiceDeployment
   -> Maybe [Tag]
   -> ContainerService)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe ResourceLocation
      -> Maybe Natural
      -> Maybe Text
      -> Maybe ContainerServiceStateDetail
      -> Maybe ContainerServiceDeployment
      -> Maybe Text
      -> Maybe ContainerServicePowerName
      -> Maybe Text
      -> Maybe Bool
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe ContainerServiceDeployment
      -> Maybe [Tag]
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"createdAt")
            Parser
  (Maybe ResourceLocation
   -> Maybe Natural
   -> Maybe Text
   -> Maybe ContainerServiceStateDetail
   -> Maybe ContainerServiceDeployment
   -> Maybe Text
   -> Maybe ContainerServicePowerName
   -> Maybe Text
   -> Maybe Bool
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe ContainerServiceDeployment
   -> Maybe [Tag]
   -> ContainerService)
-> Parser (Maybe ResourceLocation)
-> Parser
     (Maybe Natural
      -> Maybe Text
      -> Maybe ContainerServiceStateDetail
      -> Maybe ContainerServiceDeployment
      -> Maybe Text
      -> Maybe ContainerServicePowerName
      -> Maybe Text
      -> Maybe Bool
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe ContainerServiceDeployment
      -> Maybe [Tag]
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ResourceLocation)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"location")
            Parser
  (Maybe Natural
   -> Maybe Text
   -> Maybe ContainerServiceStateDetail
   -> Maybe ContainerServiceDeployment
   -> Maybe Text
   -> Maybe ContainerServicePowerName
   -> Maybe Text
   -> Maybe Bool
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe ContainerServiceDeployment
   -> Maybe [Tag]
   -> ContainerService)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Text
      -> Maybe ContainerServiceStateDetail
      -> Maybe ContainerServiceDeployment
      -> Maybe Text
      -> Maybe ContainerServicePowerName
      -> Maybe Text
      -> Maybe Bool
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe ContainerServiceDeployment
      -> Maybe [Tag]
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"scale")
            Parser
  (Maybe Text
   -> Maybe ContainerServiceStateDetail
   -> Maybe ContainerServiceDeployment
   -> Maybe Text
   -> Maybe ContainerServicePowerName
   -> Maybe Text
   -> Maybe Bool
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe ContainerServiceDeployment
   -> Maybe [Tag]
   -> ContainerService)
-> Parser (Maybe Text)
-> Parser
     (Maybe ContainerServiceStateDetail
      -> Maybe ContainerServiceDeployment
      -> Maybe Text
      -> Maybe ContainerServicePowerName
      -> Maybe Text
      -> Maybe Bool
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe ContainerServiceDeployment
      -> Maybe [Tag]
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"url")
            Parser
  (Maybe ContainerServiceStateDetail
   -> Maybe ContainerServiceDeployment
   -> Maybe Text
   -> Maybe ContainerServicePowerName
   -> Maybe Text
   -> Maybe Bool
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe ContainerServiceDeployment
   -> Maybe [Tag]
   -> ContainerService)
-> Parser (Maybe ContainerServiceStateDetail)
-> Parser
     (Maybe ContainerServiceDeployment
      -> Maybe Text
      -> Maybe ContainerServicePowerName
      -> Maybe Text
      -> Maybe Bool
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe ContainerServiceDeployment
      -> Maybe [Tag]
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ContainerServiceStateDetail)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"stateDetail")
            Parser
  (Maybe ContainerServiceDeployment
   -> Maybe Text
   -> Maybe ContainerServicePowerName
   -> Maybe Text
   -> Maybe Bool
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe ContainerServiceDeployment
   -> Maybe [Tag]
   -> ContainerService)
-> Parser (Maybe ContainerServiceDeployment)
-> Parser
     (Maybe Text
      -> Maybe ContainerServicePowerName
      -> Maybe Text
      -> Maybe Bool
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe ContainerServiceDeployment
      -> Maybe [Tag]
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ContainerServiceDeployment)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"nextDeployment")
            Parser
  (Maybe Text
   -> Maybe ContainerServicePowerName
   -> Maybe Text
   -> Maybe Bool
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe ContainerServiceDeployment
   -> Maybe [Tag]
   -> ContainerService)
-> Parser (Maybe Text)
-> Parser
     (Maybe ContainerServicePowerName
      -> Maybe Text
      -> Maybe Bool
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe ContainerServiceDeployment
      -> Maybe [Tag]
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"principalArn")
            Parser
  (Maybe ContainerServicePowerName
   -> Maybe Text
   -> Maybe Bool
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe ContainerServiceDeployment
   -> Maybe [Tag]
   -> ContainerService)
-> Parser (Maybe ContainerServicePowerName)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe ContainerServiceDeployment
      -> Maybe [Tag]
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ContainerServicePowerName)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"power")
            Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe ContainerServiceDeployment
   -> Maybe [Tag]
   -> ContainerService)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe ContainerServiceDeployment
      -> Maybe [Tag]
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"privateDomainName")
            Parser
  (Maybe Bool
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe ContainerServiceDeployment
   -> Maybe [Tag]
   -> ContainerService)
-> Parser (Maybe Bool)
-> Parser
     (Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe ContainerServiceDeployment
      -> Maybe [Tag]
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"isDisabled")
            Parser
  (Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe ContainerServiceDeployment
   -> Maybe [Tag]
   -> ContainerService)
-> Parser (Maybe (HashMap Text [Text]))
-> Parser
     (Maybe Text
      -> Maybe ContainerServiceDeployment
      -> Maybe [Tag]
      -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text [Text])))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"publicDomainNames"
                            Parser (Maybe (Maybe (HashMap Text [Text])))
-> Maybe (HashMap Text [Text])
-> Parser (Maybe (HashMap Text [Text]))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text [Text])
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Text
   -> Maybe ContainerServiceDeployment
   -> Maybe [Tag]
   -> ContainerService)
-> Parser (Maybe Text)
-> Parser
     (Maybe ContainerServiceDeployment
      -> Maybe [Tag] -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"containerServiceName")
            Parser
  (Maybe ContainerServiceDeployment
   -> Maybe [Tag] -> ContainerService)
-> Parser (Maybe ContainerServiceDeployment)
-> Parser (Maybe [Tag] -> ContainerService)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ContainerServiceDeployment)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"currentDeployment")
            Parser (Maybe [Tag] -> ContainerService)
-> Parser (Maybe [Tag]) -> Parser ContainerService
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Tag]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe [Tag])) -> Maybe [Tag] -> Parser (Maybe [Tag])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Tag]
forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable ContainerService

instance Prelude.NFData ContainerService