{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# 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.UpdateContainerService
-- 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)
--
-- Updates the configuration of your Amazon Lightsail container service,
-- such as its power, scale, and public domain names.
module Amazonka.Lightsail.UpdateContainerService
  ( -- * Creating a Request
    UpdateContainerService (..),
    newUpdateContainerService,

    -- * Request Lenses
    updateContainerService_scale,
    updateContainerService_power,
    updateContainerService_isDisabled,
    updateContainerService_publicDomainNames,
    updateContainerService_serviceName,

    -- * Destructuring the Response
    UpdateContainerServiceResponse (..),
    newUpdateContainerServiceResponse,

    -- * Response Lenses
    updateContainerServiceResponse_containerService,
    updateContainerServiceResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Lightsail.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newUpdateContainerService' smart constructor.
data UpdateContainerService = UpdateContainerService'
  { -- | The scale for the container service.
    --
    -- The scale specifies the allocated compute nodes of the container
    -- service. The @power@ and @scale@ of a container service makes up its
    -- configured capacity. To determine the monthly price of your container
    -- service, multiply the base price of the @power@ with the @scale@ (the
    -- number of nodes) of the service.
    UpdateContainerService -> Maybe Natural
scale :: Prelude.Maybe Prelude.Natural,
    -- | The power for the container service.
    --
    -- The power specifies the amount of memory, vCPUs, and base monthly cost
    -- of each node of the container service. The @power@ and @scale@ of a
    -- container service makes up its configured capacity. To determine the
    -- monthly price of your container service, multiply the base price of the
    -- @power@ with the @scale@ (the number of nodes) of the service.
    --
    -- Use the @GetContainerServicePowers@ action to view the specifications of
    -- each power option.
    UpdateContainerService -> Maybe ContainerServicePowerName
power :: Prelude.Maybe ContainerServicePowerName,
    -- | A Boolean value to indicate whether the container service is disabled.
    UpdateContainerService -> Maybe Bool
isDisabled :: Prelude.Maybe Prelude.Bool,
    -- | The public domain names to use with 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.
    --
    -- You can specify public domain names using a string to array map as shown
    -- in the example later on this page.
    UpdateContainerService -> Maybe (HashMap Text [Text])
publicDomainNames :: Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text]),
    -- | The name of the container service to update.
    UpdateContainerService -> Text
serviceName :: Prelude.Text
  }
  deriving (UpdateContainerService -> UpdateContainerService -> Bool
(UpdateContainerService -> UpdateContainerService -> Bool)
-> (UpdateContainerService -> UpdateContainerService -> Bool)
-> Eq UpdateContainerService
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateContainerService -> UpdateContainerService -> Bool
$c/= :: UpdateContainerService -> UpdateContainerService -> Bool
== :: UpdateContainerService -> UpdateContainerService -> Bool
$c== :: UpdateContainerService -> UpdateContainerService -> Bool
Prelude.Eq, ReadPrec [UpdateContainerService]
ReadPrec UpdateContainerService
Int -> ReadS UpdateContainerService
ReadS [UpdateContainerService]
(Int -> ReadS UpdateContainerService)
-> ReadS [UpdateContainerService]
-> ReadPrec UpdateContainerService
-> ReadPrec [UpdateContainerService]
-> Read UpdateContainerService
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateContainerService]
$creadListPrec :: ReadPrec [UpdateContainerService]
readPrec :: ReadPrec UpdateContainerService
$creadPrec :: ReadPrec UpdateContainerService
readList :: ReadS [UpdateContainerService]
$creadList :: ReadS [UpdateContainerService]
readsPrec :: Int -> ReadS UpdateContainerService
$creadsPrec :: Int -> ReadS UpdateContainerService
Prelude.Read, Int -> UpdateContainerService -> ShowS
[UpdateContainerService] -> ShowS
UpdateContainerService -> String
(Int -> UpdateContainerService -> ShowS)
-> (UpdateContainerService -> String)
-> ([UpdateContainerService] -> ShowS)
-> Show UpdateContainerService
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateContainerService] -> ShowS
$cshowList :: [UpdateContainerService] -> ShowS
show :: UpdateContainerService -> String
$cshow :: UpdateContainerService -> String
showsPrec :: Int -> UpdateContainerService -> ShowS
$cshowsPrec :: Int -> UpdateContainerService -> ShowS
Prelude.Show, (forall x. UpdateContainerService -> Rep UpdateContainerService x)
-> (forall x.
    Rep UpdateContainerService x -> UpdateContainerService)
-> Generic UpdateContainerService
forall x. Rep UpdateContainerService x -> UpdateContainerService
forall x. UpdateContainerService -> Rep UpdateContainerService x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateContainerService x -> UpdateContainerService
$cfrom :: forall x. UpdateContainerService -> Rep UpdateContainerService x
Prelude.Generic)

-- |
-- Create a value of 'UpdateContainerService' 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:
--
-- 'scale', 'updateContainerService_scale' - The scale for the container service.
--
-- The scale specifies the allocated compute nodes of the container
-- service. The @power@ and @scale@ of a container service makes up its
-- configured capacity. To determine the monthly price of your container
-- service, multiply the base price of the @power@ with the @scale@ (the
-- number of nodes) of the service.
--
-- 'power', 'updateContainerService_power' - The power for the container service.
--
-- The power specifies the amount of memory, vCPUs, and base monthly cost
-- of each node of the container service. The @power@ and @scale@ of a
-- container service makes up its configured capacity. To determine the
-- monthly price of your container service, multiply the base price of the
-- @power@ with the @scale@ (the number of nodes) of the service.
--
-- Use the @GetContainerServicePowers@ action to view the specifications of
-- each power option.
--
-- 'isDisabled', 'updateContainerService_isDisabled' - A Boolean value to indicate whether the container service is disabled.
--
-- 'publicDomainNames', 'updateContainerService_publicDomainNames' - The public domain names to use with 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.
--
-- You can specify public domain names using a string to array map as shown
-- in the example later on this page.
--
-- 'serviceName', 'updateContainerService_serviceName' - The name of the container service to update.
newUpdateContainerService ::
  -- | 'serviceName'
  Prelude.Text ->
  UpdateContainerService
newUpdateContainerService :: Text -> UpdateContainerService
newUpdateContainerService Text
pServiceName_ =
  UpdateContainerService' :: Maybe Natural
-> Maybe ContainerServicePowerName
-> Maybe Bool
-> Maybe (HashMap Text [Text])
-> Text
-> UpdateContainerService
UpdateContainerService'
    { $sel:scale:UpdateContainerService' :: Maybe Natural
scale = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:power:UpdateContainerService' :: Maybe ContainerServicePowerName
power = Maybe ContainerServicePowerName
forall a. Maybe a
Prelude.Nothing,
      $sel:isDisabled:UpdateContainerService' :: Maybe Bool
isDisabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:publicDomainNames:UpdateContainerService' :: Maybe (HashMap Text [Text])
publicDomainNames = Maybe (HashMap Text [Text])
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceName:UpdateContainerService' :: Text
serviceName = Text
pServiceName_
    }

-- | The scale for the container service.
--
-- The scale specifies the allocated compute nodes of the container
-- service. The @power@ and @scale@ of a container service makes up its
-- configured capacity. To determine the monthly price of your container
-- service, multiply the base price of the @power@ with the @scale@ (the
-- number of nodes) of the service.
updateContainerService_scale :: Lens.Lens' UpdateContainerService (Prelude.Maybe Prelude.Natural)
updateContainerService_scale :: (Maybe Natural -> f (Maybe Natural))
-> UpdateContainerService -> f UpdateContainerService
updateContainerService_scale = (UpdateContainerService -> Maybe Natural)
-> (UpdateContainerService
    -> Maybe Natural -> UpdateContainerService)
-> Lens
     UpdateContainerService
     UpdateContainerService
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateContainerService' {Maybe Natural
scale :: Maybe Natural
$sel:scale:UpdateContainerService' :: UpdateContainerService -> Maybe Natural
scale} -> Maybe Natural
scale) (\s :: UpdateContainerService
s@UpdateContainerService' {} Maybe Natural
a -> UpdateContainerService
s {$sel:scale:UpdateContainerService' :: Maybe Natural
scale = Maybe Natural
a} :: UpdateContainerService)

-- | The power for the container service.
--
-- The power specifies the amount of memory, vCPUs, and base monthly cost
-- of each node of the container service. The @power@ and @scale@ of a
-- container service makes up its configured capacity. To determine the
-- monthly price of your container service, multiply the base price of the
-- @power@ with the @scale@ (the number of nodes) of the service.
--
-- Use the @GetContainerServicePowers@ action to view the specifications of
-- each power option.
updateContainerService_power :: Lens.Lens' UpdateContainerService (Prelude.Maybe ContainerServicePowerName)
updateContainerService_power :: (Maybe ContainerServicePowerName
 -> f (Maybe ContainerServicePowerName))
-> UpdateContainerService -> f UpdateContainerService
updateContainerService_power = (UpdateContainerService -> Maybe ContainerServicePowerName)
-> (UpdateContainerService
    -> Maybe ContainerServicePowerName -> UpdateContainerService)
-> Lens
     UpdateContainerService
     UpdateContainerService
     (Maybe ContainerServicePowerName)
     (Maybe ContainerServicePowerName)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateContainerService' {Maybe ContainerServicePowerName
power :: Maybe ContainerServicePowerName
$sel:power:UpdateContainerService' :: UpdateContainerService -> Maybe ContainerServicePowerName
power} -> Maybe ContainerServicePowerName
power) (\s :: UpdateContainerService
s@UpdateContainerService' {} Maybe ContainerServicePowerName
a -> UpdateContainerService
s {$sel:power:UpdateContainerService' :: Maybe ContainerServicePowerName
power = Maybe ContainerServicePowerName
a} :: UpdateContainerService)

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

-- | The public domain names to use with 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.
--
-- You can specify public domain names using a string to array map as shown
-- in the example later on this page.
updateContainerService_publicDomainNames :: Lens.Lens' UpdateContainerService (Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text]))
updateContainerService_publicDomainNames :: (Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> UpdateContainerService -> f UpdateContainerService
updateContainerService_publicDomainNames = (UpdateContainerService -> Maybe (HashMap Text [Text]))
-> (UpdateContainerService
    -> Maybe (HashMap Text [Text]) -> UpdateContainerService)
-> Lens
     UpdateContainerService
     UpdateContainerService
     (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 (\UpdateContainerService' {Maybe (HashMap Text [Text])
publicDomainNames :: Maybe (HashMap Text [Text])
$sel:publicDomainNames:UpdateContainerService' :: UpdateContainerService -> Maybe (HashMap Text [Text])
publicDomainNames} -> Maybe (HashMap Text [Text])
publicDomainNames) (\s :: UpdateContainerService
s@UpdateContainerService' {} Maybe (HashMap Text [Text])
a -> UpdateContainerService
s {$sel:publicDomainNames:UpdateContainerService' :: Maybe (HashMap Text [Text])
publicDomainNames = Maybe (HashMap Text [Text])
a} :: UpdateContainerService) ((Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
 -> UpdateContainerService -> f UpdateContainerService)
-> ((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])))
-> UpdateContainerService
-> f UpdateContainerService
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 to update.
updateContainerService_serviceName :: Lens.Lens' UpdateContainerService Prelude.Text
updateContainerService_serviceName :: (Text -> f Text)
-> UpdateContainerService -> f UpdateContainerService
updateContainerService_serviceName = (UpdateContainerService -> Text)
-> (UpdateContainerService -> Text -> UpdateContainerService)
-> Lens UpdateContainerService UpdateContainerService Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateContainerService' {Text
serviceName :: Text
$sel:serviceName:UpdateContainerService' :: UpdateContainerService -> Text
serviceName} -> Text
serviceName) (\s :: UpdateContainerService
s@UpdateContainerService' {} Text
a -> UpdateContainerService
s {$sel:serviceName:UpdateContainerService' :: Text
serviceName = Text
a} :: UpdateContainerService)

instance Core.AWSRequest UpdateContainerService where
  type
    AWSResponse UpdateContainerService =
      UpdateContainerServiceResponse
  request :: UpdateContainerService -> Request UpdateContainerService
request = Service -> UpdateContainerService -> Request UpdateContainerService
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateContainerService
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateContainerService)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateContainerService))
-> Logger
-> Service
-> Proxy UpdateContainerService
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateContainerService)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe ContainerService -> Int -> UpdateContainerServiceResponse
UpdateContainerServiceResponse'
            (Maybe ContainerService -> Int -> UpdateContainerServiceResponse)
-> Either String (Maybe ContainerService)
-> Either String (Int -> UpdateContainerServiceResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe ContainerService)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"containerService")
            Either String (Int -> UpdateContainerServiceResponse)
-> Either String Int
-> Either String UpdateContainerServiceResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable UpdateContainerService

instance Prelude.NFData UpdateContainerService

instance Core.ToHeaders UpdateContainerService where
  toHeaders :: UpdateContainerService -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateContainerService -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"Lightsail_20161128.UpdateContainerService" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON UpdateContainerService where
  toJSON :: UpdateContainerService -> Value
toJSON UpdateContainerService' {Maybe Bool
Maybe Natural
Maybe (HashMap Text [Text])
Maybe ContainerServicePowerName
Text
serviceName :: Text
publicDomainNames :: Maybe (HashMap Text [Text])
isDisabled :: Maybe Bool
power :: Maybe ContainerServicePowerName
scale :: Maybe Natural
$sel:serviceName:UpdateContainerService' :: UpdateContainerService -> Text
$sel:publicDomainNames:UpdateContainerService' :: UpdateContainerService -> Maybe (HashMap Text [Text])
$sel:isDisabled:UpdateContainerService' :: UpdateContainerService -> Maybe Bool
$sel:power:UpdateContainerService' :: UpdateContainerService -> Maybe ContainerServicePowerName
$sel:scale:UpdateContainerService' :: UpdateContainerService -> Maybe Natural
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"scale" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
scale,
            (Text
"power" Text -> ContainerServicePowerName -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ContainerServicePowerName -> Pair)
-> Maybe ContainerServicePowerName -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ContainerServicePowerName
power,
            (Text
"isDisabled" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
isDisabled,
            (Text
"publicDomainNames" Text -> HashMap Text [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (HashMap Text [Text] -> Pair)
-> Maybe (HashMap Text [Text]) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text [Text])
publicDomainNames,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"serviceName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
serviceName)
          ]
      )

instance Core.ToPath UpdateContainerService where
  toPath :: UpdateContainerService -> ByteString
toPath = ByteString -> UpdateContainerService -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery UpdateContainerService where
  toQuery :: UpdateContainerService -> QueryString
toQuery = QueryString -> UpdateContainerService -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newUpdateContainerServiceResponse' smart constructor.
data UpdateContainerServiceResponse = UpdateContainerServiceResponse'
  { -- | An object that describes a container service.
    UpdateContainerServiceResponse -> Maybe ContainerService
containerService :: Prelude.Maybe ContainerService,
    -- | The response's http status code.
    UpdateContainerServiceResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateContainerServiceResponse
-> UpdateContainerServiceResponse -> Bool
(UpdateContainerServiceResponse
 -> UpdateContainerServiceResponse -> Bool)
-> (UpdateContainerServiceResponse
    -> UpdateContainerServiceResponse -> Bool)
-> Eq UpdateContainerServiceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateContainerServiceResponse
-> UpdateContainerServiceResponse -> Bool
$c/= :: UpdateContainerServiceResponse
-> UpdateContainerServiceResponse -> Bool
== :: UpdateContainerServiceResponse
-> UpdateContainerServiceResponse -> Bool
$c== :: UpdateContainerServiceResponse
-> UpdateContainerServiceResponse -> Bool
Prelude.Eq, ReadPrec [UpdateContainerServiceResponse]
ReadPrec UpdateContainerServiceResponse
Int -> ReadS UpdateContainerServiceResponse
ReadS [UpdateContainerServiceResponse]
(Int -> ReadS UpdateContainerServiceResponse)
-> ReadS [UpdateContainerServiceResponse]
-> ReadPrec UpdateContainerServiceResponse
-> ReadPrec [UpdateContainerServiceResponse]
-> Read UpdateContainerServiceResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateContainerServiceResponse]
$creadListPrec :: ReadPrec [UpdateContainerServiceResponse]
readPrec :: ReadPrec UpdateContainerServiceResponse
$creadPrec :: ReadPrec UpdateContainerServiceResponse
readList :: ReadS [UpdateContainerServiceResponse]
$creadList :: ReadS [UpdateContainerServiceResponse]
readsPrec :: Int -> ReadS UpdateContainerServiceResponse
$creadsPrec :: Int -> ReadS UpdateContainerServiceResponse
Prelude.Read, Int -> UpdateContainerServiceResponse -> ShowS
[UpdateContainerServiceResponse] -> ShowS
UpdateContainerServiceResponse -> String
(Int -> UpdateContainerServiceResponse -> ShowS)
-> (UpdateContainerServiceResponse -> String)
-> ([UpdateContainerServiceResponse] -> ShowS)
-> Show UpdateContainerServiceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateContainerServiceResponse] -> ShowS
$cshowList :: [UpdateContainerServiceResponse] -> ShowS
show :: UpdateContainerServiceResponse -> String
$cshow :: UpdateContainerServiceResponse -> String
showsPrec :: Int -> UpdateContainerServiceResponse -> ShowS
$cshowsPrec :: Int -> UpdateContainerServiceResponse -> ShowS
Prelude.Show, (forall x.
 UpdateContainerServiceResponse
 -> Rep UpdateContainerServiceResponse x)
-> (forall x.
    Rep UpdateContainerServiceResponse x
    -> UpdateContainerServiceResponse)
-> Generic UpdateContainerServiceResponse
forall x.
Rep UpdateContainerServiceResponse x
-> UpdateContainerServiceResponse
forall x.
UpdateContainerServiceResponse
-> Rep UpdateContainerServiceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateContainerServiceResponse x
-> UpdateContainerServiceResponse
$cfrom :: forall x.
UpdateContainerServiceResponse
-> Rep UpdateContainerServiceResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateContainerServiceResponse' 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:
--
-- 'containerService', 'updateContainerServiceResponse_containerService' - An object that describes a container service.
--
-- 'httpStatus', 'updateContainerServiceResponse_httpStatus' - The response's http status code.
newUpdateContainerServiceResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateContainerServiceResponse
newUpdateContainerServiceResponse :: Int -> UpdateContainerServiceResponse
newUpdateContainerServiceResponse Int
pHttpStatus_ =
  UpdateContainerServiceResponse' :: Maybe ContainerService -> Int -> UpdateContainerServiceResponse
UpdateContainerServiceResponse'
    { $sel:containerService:UpdateContainerServiceResponse' :: Maybe ContainerService
containerService =
        Maybe ContainerService
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateContainerServiceResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An object that describes a container service.
updateContainerServiceResponse_containerService :: Lens.Lens' UpdateContainerServiceResponse (Prelude.Maybe ContainerService)
updateContainerServiceResponse_containerService :: (Maybe ContainerService -> f (Maybe ContainerService))
-> UpdateContainerServiceResponse
-> f UpdateContainerServiceResponse
updateContainerServiceResponse_containerService = (UpdateContainerServiceResponse -> Maybe ContainerService)
-> (UpdateContainerServiceResponse
    -> Maybe ContainerService -> UpdateContainerServiceResponse)
-> Lens
     UpdateContainerServiceResponse
     UpdateContainerServiceResponse
     (Maybe ContainerService)
     (Maybe ContainerService)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateContainerServiceResponse' {Maybe ContainerService
containerService :: Maybe ContainerService
$sel:containerService:UpdateContainerServiceResponse' :: UpdateContainerServiceResponse -> Maybe ContainerService
containerService} -> Maybe ContainerService
containerService) (\s :: UpdateContainerServiceResponse
s@UpdateContainerServiceResponse' {} Maybe ContainerService
a -> UpdateContainerServiceResponse
s {$sel:containerService:UpdateContainerServiceResponse' :: Maybe ContainerService
containerService = Maybe ContainerService
a} :: UpdateContainerServiceResponse)

-- | The response's http status code.
updateContainerServiceResponse_httpStatus :: Lens.Lens' UpdateContainerServiceResponse Prelude.Int
updateContainerServiceResponse_httpStatus :: (Int -> f Int)
-> UpdateContainerServiceResponse
-> f UpdateContainerServiceResponse
updateContainerServiceResponse_httpStatus = (UpdateContainerServiceResponse -> Int)
-> (UpdateContainerServiceResponse
    -> Int -> UpdateContainerServiceResponse)
-> Lens
     UpdateContainerServiceResponse
     UpdateContainerServiceResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateContainerServiceResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateContainerServiceResponse' :: UpdateContainerServiceResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateContainerServiceResponse
s@UpdateContainerServiceResponse' {} Int
a -> UpdateContainerServiceResponse
s {$sel:httpStatus:UpdateContainerServiceResponse' :: Int
httpStatus = Int
a} :: UpdateContainerServiceResponse)

instance
  Prelude.NFData
    UpdateContainerServiceResponse