{-# 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.RedshiftServerLess.Types.Workgroup
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.RedshiftServerLess.Types.Workgroup where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.RedshiftServerLess.Types.ConfigParameter
import Amazonka.RedshiftServerLess.Types.Endpoint
import Amazonka.RedshiftServerLess.Types.WorkgroupStatus

-- | The collection of computing resources from which an endpoint is created.
--
-- /See:/ 'newWorkgroup' smart constructor.
data Workgroup = Workgroup'
  { -- | The base data warehouse capacity of the workgroup in Redshift Processing
    -- Units (RPUs).
    Workgroup -> Maybe Int
baseCapacity :: Prelude.Maybe Prelude.Int,
    -- | An array of parameters to set for finer control over a database. The
    -- options are @datestyle@, @enable_user_activity_logging@, @query_group@,
    -- @search_path@, and @max_query_execution_time@.
    Workgroup -> Maybe [ConfigParameter]
configParameters :: Prelude.Maybe [ConfigParameter],
    -- | The creation date of the workgroup.
    Workgroup -> Maybe ISO8601
creationDate :: Prelude.Maybe Data.ISO8601,
    -- | The endpoint that is created from the workgroup.
    Workgroup -> Maybe Endpoint
endpoint :: Prelude.Maybe Endpoint,
    -- | The value that specifies whether to enable enhanced virtual private
    -- cloud (VPC) routing, which forces Amazon Redshift Serverless to route
    -- traffic through your VPC.
    Workgroup -> Maybe Bool
enhancedVpcRouting :: Prelude.Maybe Prelude.Bool,
    -- | The namespace the workgroup is associated with.
    Workgroup -> Maybe Text
namespaceName :: Prelude.Maybe Prelude.Text,
    -- | The custom port to use when connecting to a workgroup. Valid port ranges
    -- are 5431-5455 and 8191-8215. The default is 5439.
    Workgroup -> Maybe Int
port :: Prelude.Maybe Prelude.Int,
    -- | A value that specifies whether the workgroup can be accessible from a
    -- public network
    Workgroup -> Maybe Bool
publiclyAccessible :: Prelude.Maybe Prelude.Bool,
    -- | An array of security group IDs to associate with the workgroup.
    Workgroup -> Maybe [Text]
securityGroupIds :: Prelude.Maybe [Prelude.Text],
    -- | The status of the workgroup.
    Workgroup -> Maybe WorkgroupStatus
status :: Prelude.Maybe WorkgroupStatus,
    -- | An array of subnet IDs the workgroup is associated with.
    Workgroup -> Maybe [Text]
subnetIds :: Prelude.Maybe [Prelude.Text],
    -- | The Amazon Resource Name (ARN) that links to the workgroup.
    Workgroup -> Maybe Text
workgroupArn :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier of the workgroup.
    Workgroup -> Maybe Text
workgroupId :: Prelude.Maybe Prelude.Text,
    -- | The name of the workgroup.
    Workgroup -> Maybe Text
workgroupName :: Prelude.Maybe Prelude.Text
  }
  deriving (Workgroup -> Workgroup -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Workgroup -> Workgroup -> Bool
$c/= :: Workgroup -> Workgroup -> Bool
== :: Workgroup -> Workgroup -> Bool
$c== :: Workgroup -> Workgroup -> Bool
Prelude.Eq, ReadPrec [Workgroup]
ReadPrec Workgroup
Int -> ReadS Workgroup
ReadS [Workgroup]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Workgroup]
$creadListPrec :: ReadPrec [Workgroup]
readPrec :: ReadPrec Workgroup
$creadPrec :: ReadPrec Workgroup
readList :: ReadS [Workgroup]
$creadList :: ReadS [Workgroup]
readsPrec :: Int -> ReadS Workgroup
$creadsPrec :: Int -> ReadS Workgroup
Prelude.Read, Int -> Workgroup -> ShowS
[Workgroup] -> ShowS
Workgroup -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Workgroup] -> ShowS
$cshowList :: [Workgroup] -> ShowS
show :: Workgroup -> String
$cshow :: Workgroup -> String
showsPrec :: Int -> Workgroup -> ShowS
$cshowsPrec :: Int -> Workgroup -> ShowS
Prelude.Show, forall x. Rep Workgroup x -> Workgroup
forall x. Workgroup -> Rep Workgroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Workgroup x -> Workgroup
$cfrom :: forall x. Workgroup -> Rep Workgroup x
Prelude.Generic)

-- |
-- Create a value of 'Workgroup' 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:
--
-- 'baseCapacity', 'workgroup_baseCapacity' - The base data warehouse capacity of the workgroup in Redshift Processing
-- Units (RPUs).
--
-- 'configParameters', 'workgroup_configParameters' - An array of parameters to set for finer control over a database. The
-- options are @datestyle@, @enable_user_activity_logging@, @query_group@,
-- @search_path@, and @max_query_execution_time@.
--
-- 'creationDate', 'workgroup_creationDate' - The creation date of the workgroup.
--
-- 'endpoint', 'workgroup_endpoint' - The endpoint that is created from the workgroup.
--
-- 'enhancedVpcRouting', 'workgroup_enhancedVpcRouting' - The value that specifies whether to enable enhanced virtual private
-- cloud (VPC) routing, which forces Amazon Redshift Serverless to route
-- traffic through your VPC.
--
-- 'namespaceName', 'workgroup_namespaceName' - The namespace the workgroup is associated with.
--
-- 'port', 'workgroup_port' - The custom port to use when connecting to a workgroup. Valid port ranges
-- are 5431-5455 and 8191-8215. The default is 5439.
--
-- 'publiclyAccessible', 'workgroup_publiclyAccessible' - A value that specifies whether the workgroup can be accessible from a
-- public network
--
-- 'securityGroupIds', 'workgroup_securityGroupIds' - An array of security group IDs to associate with the workgroup.
--
-- 'status', 'workgroup_status' - The status of the workgroup.
--
-- 'subnetIds', 'workgroup_subnetIds' - An array of subnet IDs the workgroup is associated with.
--
-- 'workgroupArn', 'workgroup_workgroupArn' - The Amazon Resource Name (ARN) that links to the workgroup.
--
-- 'workgroupId', 'workgroup_workgroupId' - The unique identifier of the workgroup.
--
-- 'workgroupName', 'workgroup_workgroupName' - The name of the workgroup.
newWorkgroup ::
  Workgroup
newWorkgroup :: Workgroup
newWorkgroup =
  Workgroup'
    { $sel:baseCapacity:Workgroup' :: Maybe Int
baseCapacity = forall a. Maybe a
Prelude.Nothing,
      $sel:configParameters:Workgroup' :: Maybe [ConfigParameter]
configParameters = forall a. Maybe a
Prelude.Nothing,
      $sel:creationDate:Workgroup' :: Maybe ISO8601
creationDate = forall a. Maybe a
Prelude.Nothing,
      $sel:endpoint:Workgroup' :: Maybe Endpoint
endpoint = forall a. Maybe a
Prelude.Nothing,
      $sel:enhancedVpcRouting:Workgroup' :: Maybe Bool
enhancedVpcRouting = forall a. Maybe a
Prelude.Nothing,
      $sel:namespaceName:Workgroup' :: Maybe Text
namespaceName = forall a. Maybe a
Prelude.Nothing,
      $sel:port:Workgroup' :: Maybe Int
port = forall a. Maybe a
Prelude.Nothing,
      $sel:publiclyAccessible:Workgroup' :: Maybe Bool
publiclyAccessible = forall a. Maybe a
Prelude.Nothing,
      $sel:securityGroupIds:Workgroup' :: Maybe [Text]
securityGroupIds = forall a. Maybe a
Prelude.Nothing,
      $sel:status:Workgroup' :: Maybe WorkgroupStatus
status = forall a. Maybe a
Prelude.Nothing,
      $sel:subnetIds:Workgroup' :: Maybe [Text]
subnetIds = forall a. Maybe a
Prelude.Nothing,
      $sel:workgroupArn:Workgroup' :: Maybe Text
workgroupArn = forall a. Maybe a
Prelude.Nothing,
      $sel:workgroupId:Workgroup' :: Maybe Text
workgroupId = forall a. Maybe a
Prelude.Nothing,
      $sel:workgroupName:Workgroup' :: Maybe Text
workgroupName = forall a. Maybe a
Prelude.Nothing
    }

-- | The base data warehouse capacity of the workgroup in Redshift Processing
-- Units (RPUs).
workgroup_baseCapacity :: Lens.Lens' Workgroup (Prelude.Maybe Prelude.Int)
workgroup_baseCapacity :: Lens' Workgroup (Maybe Int)
workgroup_baseCapacity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workgroup' {Maybe Int
baseCapacity :: Maybe Int
$sel:baseCapacity:Workgroup' :: Workgroup -> Maybe Int
baseCapacity} -> Maybe Int
baseCapacity) (\s :: Workgroup
s@Workgroup' {} Maybe Int
a -> Workgroup
s {$sel:baseCapacity:Workgroup' :: Maybe Int
baseCapacity = Maybe Int
a} :: Workgroup)

-- | An array of parameters to set for finer control over a database. The
-- options are @datestyle@, @enable_user_activity_logging@, @query_group@,
-- @search_path@, and @max_query_execution_time@.
workgroup_configParameters :: Lens.Lens' Workgroup (Prelude.Maybe [ConfigParameter])
workgroup_configParameters :: Lens' Workgroup (Maybe [ConfigParameter])
workgroup_configParameters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workgroup' {Maybe [ConfigParameter]
configParameters :: Maybe [ConfigParameter]
$sel:configParameters:Workgroup' :: Workgroup -> Maybe [ConfigParameter]
configParameters} -> Maybe [ConfigParameter]
configParameters) (\s :: Workgroup
s@Workgroup' {} Maybe [ConfigParameter]
a -> Workgroup
s {$sel:configParameters:Workgroup' :: Maybe [ConfigParameter]
configParameters = Maybe [ConfigParameter]
a} :: Workgroup) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The creation date of the workgroup.
workgroup_creationDate :: Lens.Lens' Workgroup (Prelude.Maybe Prelude.UTCTime)
workgroup_creationDate :: Lens' Workgroup (Maybe UTCTime)
workgroup_creationDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workgroup' {Maybe ISO8601
creationDate :: Maybe ISO8601
$sel:creationDate:Workgroup' :: Workgroup -> Maybe ISO8601
creationDate} -> Maybe ISO8601
creationDate) (\s :: Workgroup
s@Workgroup' {} Maybe ISO8601
a -> Workgroup
s {$sel:creationDate:Workgroup' :: Maybe ISO8601
creationDate = Maybe ISO8601
a} :: Workgroup) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The endpoint that is created from the workgroup.
workgroup_endpoint :: Lens.Lens' Workgroup (Prelude.Maybe Endpoint)
workgroup_endpoint :: Lens' Workgroup (Maybe Endpoint)
workgroup_endpoint = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workgroup' {Maybe Endpoint
endpoint :: Maybe Endpoint
$sel:endpoint:Workgroup' :: Workgroup -> Maybe Endpoint
endpoint} -> Maybe Endpoint
endpoint) (\s :: Workgroup
s@Workgroup' {} Maybe Endpoint
a -> Workgroup
s {$sel:endpoint:Workgroup' :: Maybe Endpoint
endpoint = Maybe Endpoint
a} :: Workgroup)

-- | The value that specifies whether to enable enhanced virtual private
-- cloud (VPC) routing, which forces Amazon Redshift Serverless to route
-- traffic through your VPC.
workgroup_enhancedVpcRouting :: Lens.Lens' Workgroup (Prelude.Maybe Prelude.Bool)
workgroup_enhancedVpcRouting :: Lens' Workgroup (Maybe Bool)
workgroup_enhancedVpcRouting = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workgroup' {Maybe Bool
enhancedVpcRouting :: Maybe Bool
$sel:enhancedVpcRouting:Workgroup' :: Workgroup -> Maybe Bool
enhancedVpcRouting} -> Maybe Bool
enhancedVpcRouting) (\s :: Workgroup
s@Workgroup' {} Maybe Bool
a -> Workgroup
s {$sel:enhancedVpcRouting:Workgroup' :: Maybe Bool
enhancedVpcRouting = Maybe Bool
a} :: Workgroup)

-- | The namespace the workgroup is associated with.
workgroup_namespaceName :: Lens.Lens' Workgroup (Prelude.Maybe Prelude.Text)
workgroup_namespaceName :: Lens' Workgroup (Maybe Text)
workgroup_namespaceName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workgroup' {Maybe Text
namespaceName :: Maybe Text
$sel:namespaceName:Workgroup' :: Workgroup -> Maybe Text
namespaceName} -> Maybe Text
namespaceName) (\s :: Workgroup
s@Workgroup' {} Maybe Text
a -> Workgroup
s {$sel:namespaceName:Workgroup' :: Maybe Text
namespaceName = Maybe Text
a} :: Workgroup)

-- | The custom port to use when connecting to a workgroup. Valid port ranges
-- are 5431-5455 and 8191-8215. The default is 5439.
workgroup_port :: Lens.Lens' Workgroup (Prelude.Maybe Prelude.Int)
workgroup_port :: Lens' Workgroup (Maybe Int)
workgroup_port = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workgroup' {Maybe Int
port :: Maybe Int
$sel:port:Workgroup' :: Workgroup -> Maybe Int
port} -> Maybe Int
port) (\s :: Workgroup
s@Workgroup' {} Maybe Int
a -> Workgroup
s {$sel:port:Workgroup' :: Maybe Int
port = Maybe Int
a} :: Workgroup)

-- | A value that specifies whether the workgroup can be accessible from a
-- public network
workgroup_publiclyAccessible :: Lens.Lens' Workgroup (Prelude.Maybe Prelude.Bool)
workgroup_publiclyAccessible :: Lens' Workgroup (Maybe Bool)
workgroup_publiclyAccessible = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workgroup' {Maybe Bool
publiclyAccessible :: Maybe Bool
$sel:publiclyAccessible:Workgroup' :: Workgroup -> Maybe Bool
publiclyAccessible} -> Maybe Bool
publiclyAccessible) (\s :: Workgroup
s@Workgroup' {} Maybe Bool
a -> Workgroup
s {$sel:publiclyAccessible:Workgroup' :: Maybe Bool
publiclyAccessible = Maybe Bool
a} :: Workgroup)

-- | An array of security group IDs to associate with the workgroup.
workgroup_securityGroupIds :: Lens.Lens' Workgroup (Prelude.Maybe [Prelude.Text])
workgroup_securityGroupIds :: Lens' Workgroup (Maybe [Text])
workgroup_securityGroupIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workgroup' {Maybe [Text]
securityGroupIds :: Maybe [Text]
$sel:securityGroupIds:Workgroup' :: Workgroup -> Maybe [Text]
securityGroupIds} -> Maybe [Text]
securityGroupIds) (\s :: Workgroup
s@Workgroup' {} Maybe [Text]
a -> Workgroup
s {$sel:securityGroupIds:Workgroup' :: Maybe [Text]
securityGroupIds = Maybe [Text]
a} :: Workgroup) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The status of the workgroup.
workgroup_status :: Lens.Lens' Workgroup (Prelude.Maybe WorkgroupStatus)
workgroup_status :: Lens' Workgroup (Maybe WorkgroupStatus)
workgroup_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workgroup' {Maybe WorkgroupStatus
status :: Maybe WorkgroupStatus
$sel:status:Workgroup' :: Workgroup -> Maybe WorkgroupStatus
status} -> Maybe WorkgroupStatus
status) (\s :: Workgroup
s@Workgroup' {} Maybe WorkgroupStatus
a -> Workgroup
s {$sel:status:Workgroup' :: Maybe WorkgroupStatus
status = Maybe WorkgroupStatus
a} :: Workgroup)

-- | An array of subnet IDs the workgroup is associated with.
workgroup_subnetIds :: Lens.Lens' Workgroup (Prelude.Maybe [Prelude.Text])
workgroup_subnetIds :: Lens' Workgroup (Maybe [Text])
workgroup_subnetIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workgroup' {Maybe [Text]
subnetIds :: Maybe [Text]
$sel:subnetIds:Workgroup' :: Workgroup -> Maybe [Text]
subnetIds} -> Maybe [Text]
subnetIds) (\s :: Workgroup
s@Workgroup' {} Maybe [Text]
a -> Workgroup
s {$sel:subnetIds:Workgroup' :: Maybe [Text]
subnetIds = Maybe [Text]
a} :: Workgroup) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Amazon Resource Name (ARN) that links to the workgroup.
workgroup_workgroupArn :: Lens.Lens' Workgroup (Prelude.Maybe Prelude.Text)
workgroup_workgroupArn :: Lens' Workgroup (Maybe Text)
workgroup_workgroupArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workgroup' {Maybe Text
workgroupArn :: Maybe Text
$sel:workgroupArn:Workgroup' :: Workgroup -> Maybe Text
workgroupArn} -> Maybe Text
workgroupArn) (\s :: Workgroup
s@Workgroup' {} Maybe Text
a -> Workgroup
s {$sel:workgroupArn:Workgroup' :: Maybe Text
workgroupArn = Maybe Text
a} :: Workgroup)

-- | The unique identifier of the workgroup.
workgroup_workgroupId :: Lens.Lens' Workgroup (Prelude.Maybe Prelude.Text)
workgroup_workgroupId :: Lens' Workgroup (Maybe Text)
workgroup_workgroupId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workgroup' {Maybe Text
workgroupId :: Maybe Text
$sel:workgroupId:Workgroup' :: Workgroup -> Maybe Text
workgroupId} -> Maybe Text
workgroupId) (\s :: Workgroup
s@Workgroup' {} Maybe Text
a -> Workgroup
s {$sel:workgroupId:Workgroup' :: Maybe Text
workgroupId = Maybe Text
a} :: Workgroup)

-- | The name of the workgroup.
workgroup_workgroupName :: Lens.Lens' Workgroup (Prelude.Maybe Prelude.Text)
workgroup_workgroupName :: Lens' Workgroup (Maybe Text)
workgroup_workgroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workgroup' {Maybe Text
workgroupName :: Maybe Text
$sel:workgroupName:Workgroup' :: Workgroup -> Maybe Text
workgroupName} -> Maybe Text
workgroupName) (\s :: Workgroup
s@Workgroup' {} Maybe Text
a -> Workgroup
s {$sel:workgroupName:Workgroup' :: Maybe Text
workgroupName = Maybe Text
a} :: Workgroup)

instance Data.FromJSON Workgroup where
  parseJSON :: Value -> Parser Workgroup
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"Workgroup"
      ( \Object
x ->
          Maybe Int
-> Maybe [ConfigParameter]
-> Maybe ISO8601
-> Maybe Endpoint
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe [Text]
-> Maybe WorkgroupStatus
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Workgroup
Workgroup'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"baseCapacity")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"configParameters"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"creationDate")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"endpoint")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"enhancedVpcRouting")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"namespaceName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"port")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"publiclyAccessible")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"securityGroupIds"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"status")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"subnetIds" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"workgroupArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"workgroupId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"workgroupName")
      )

instance Prelude.Hashable Workgroup where
  hashWithSalt :: Int -> Workgroup -> Int
hashWithSalt Int
_salt Workgroup' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe [ConfigParameter]
Maybe Text
Maybe ISO8601
Maybe Endpoint
Maybe WorkgroupStatus
workgroupName :: Maybe Text
workgroupId :: Maybe Text
workgroupArn :: Maybe Text
subnetIds :: Maybe [Text]
status :: Maybe WorkgroupStatus
securityGroupIds :: Maybe [Text]
publiclyAccessible :: Maybe Bool
port :: Maybe Int
namespaceName :: Maybe Text
enhancedVpcRouting :: Maybe Bool
endpoint :: Maybe Endpoint
creationDate :: Maybe ISO8601
configParameters :: Maybe [ConfigParameter]
baseCapacity :: Maybe Int
$sel:workgroupName:Workgroup' :: Workgroup -> Maybe Text
$sel:workgroupId:Workgroup' :: Workgroup -> Maybe Text
$sel:workgroupArn:Workgroup' :: Workgroup -> Maybe Text
$sel:subnetIds:Workgroup' :: Workgroup -> Maybe [Text]
$sel:status:Workgroup' :: Workgroup -> Maybe WorkgroupStatus
$sel:securityGroupIds:Workgroup' :: Workgroup -> Maybe [Text]
$sel:publiclyAccessible:Workgroup' :: Workgroup -> Maybe Bool
$sel:port:Workgroup' :: Workgroup -> Maybe Int
$sel:namespaceName:Workgroup' :: Workgroup -> Maybe Text
$sel:enhancedVpcRouting:Workgroup' :: Workgroup -> Maybe Bool
$sel:endpoint:Workgroup' :: Workgroup -> Maybe Endpoint
$sel:creationDate:Workgroup' :: Workgroup -> Maybe ISO8601
$sel:configParameters:Workgroup' :: Workgroup -> Maybe [ConfigParameter]
$sel:baseCapacity:Workgroup' :: Workgroup -> Maybe Int
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
baseCapacity
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ConfigParameter]
configParameters
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
creationDate
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Endpoint
endpoint
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
enhancedVpcRouting
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
namespaceName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
port
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
publiclyAccessible
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
securityGroupIds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe WorkgroupStatus
status
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
subnetIds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
workgroupArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
workgroupId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
workgroupName

instance Prelude.NFData Workgroup where
  rnf :: Workgroup -> ()
rnf Workgroup' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe [ConfigParameter]
Maybe Text
Maybe ISO8601
Maybe Endpoint
Maybe WorkgroupStatus
workgroupName :: Maybe Text
workgroupId :: Maybe Text
workgroupArn :: Maybe Text
subnetIds :: Maybe [Text]
status :: Maybe WorkgroupStatus
securityGroupIds :: Maybe [Text]
publiclyAccessible :: Maybe Bool
port :: Maybe Int
namespaceName :: Maybe Text
enhancedVpcRouting :: Maybe Bool
endpoint :: Maybe Endpoint
creationDate :: Maybe ISO8601
configParameters :: Maybe [ConfigParameter]
baseCapacity :: Maybe Int
$sel:workgroupName:Workgroup' :: Workgroup -> Maybe Text
$sel:workgroupId:Workgroup' :: Workgroup -> Maybe Text
$sel:workgroupArn:Workgroup' :: Workgroup -> Maybe Text
$sel:subnetIds:Workgroup' :: Workgroup -> Maybe [Text]
$sel:status:Workgroup' :: Workgroup -> Maybe WorkgroupStatus
$sel:securityGroupIds:Workgroup' :: Workgroup -> Maybe [Text]
$sel:publiclyAccessible:Workgroup' :: Workgroup -> Maybe Bool
$sel:port:Workgroup' :: Workgroup -> Maybe Int
$sel:namespaceName:Workgroup' :: Workgroup -> Maybe Text
$sel:enhancedVpcRouting:Workgroup' :: Workgroup -> Maybe Bool
$sel:endpoint:Workgroup' :: Workgroup -> Maybe Endpoint
$sel:creationDate:Workgroup' :: Workgroup -> Maybe ISO8601
$sel:configParameters:Workgroup' :: Workgroup -> Maybe [ConfigParameter]
$sel:baseCapacity:Workgroup' :: Workgroup -> Maybe Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
baseCapacity
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ConfigParameter]
configParameters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
creationDate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Endpoint
endpoint
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
enhancedVpcRouting
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
namespaceName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
port
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
publiclyAccessible
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
securityGroupIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe WorkgroupStatus
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
subnetIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
workgroupArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
workgroupId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
workgroupName