{-# 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.Athena.Types.ResultConfigurationUpdates
-- 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.Athena.Types.ResultConfigurationUpdates where

import Amazonka.Athena.Types.AclConfiguration
import Amazonka.Athena.Types.EncryptionConfiguration
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

-- | The information about the updates in the query results, such as output
-- location and encryption configuration for the query results.
--
-- /See:/ 'newResultConfigurationUpdates' smart constructor.
data ResultConfigurationUpdates = ResultConfigurationUpdates'
  { -- | The ACL configuration for the query results.
    ResultConfigurationUpdates -> Maybe AclConfiguration
aclConfiguration :: Prelude.Maybe AclConfiguration,
    -- | The encryption configuration for the query results.
    ResultConfigurationUpdates -> Maybe EncryptionConfiguration
encryptionConfiguration :: Prelude.Maybe EncryptionConfiguration,
    -- | The Amazon Web Services account ID that you expect to be the owner of
    -- the Amazon S3 bucket specified by ResultConfiguration$OutputLocation. If
    -- set, Athena uses the value for @ExpectedBucketOwner@ when it makes
    -- Amazon S3 calls to your specified output location. If the
    -- @ExpectedBucketOwner@ Amazon Web Services account ID does not match the
    -- actual owner of the Amazon S3 bucket, the call fails with a permissions
    -- error.
    --
    -- If workgroup settings override client-side settings, then the query uses
    -- the @ExpectedBucketOwner@ setting that is specified for the workgroup,
    -- and also uses the location for storing query results specified in the
    -- workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration and
    -- <https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html Workgroup Settings Override Client-Side Settings>.
    ResultConfigurationUpdates -> Maybe Text
expectedBucketOwner :: Prelude.Maybe Prelude.Text,
    -- | The location in Amazon S3 where your query results are stored, such as
    -- @s3:\/\/path\/to\/query\/bucket\/@. For more information, see
    -- <https://docs.aws.amazon.com/athena/latest/ug/querying.html Query Results>
    -- If workgroup settings override client-side settings, then the query uses
    -- the location for the query results and the encryption configuration that
    -- are specified for the workgroup. The \"workgroup settings override\" is
    -- specified in @EnforceWorkGroupConfiguration@ (true\/false) in the
    -- @WorkGroupConfiguration@. See
    -- WorkGroupConfiguration$EnforceWorkGroupConfiguration.
    ResultConfigurationUpdates -> Maybe Text
outputLocation :: Prelude.Maybe Prelude.Text,
    -- | If set to @true@, indicates that the previously-specified ACL
    -- configuration for queries in this workgroup should be ignored and set to
    -- null. If set to @false@ or not set, and a value is present in the
    -- @AclConfiguration@ of @ResultConfigurationUpdates@, the
    -- @AclConfiguration@ in the workgroup\'s @ResultConfiguration@ is updated
    -- with the new value. For more information, see
    -- <https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html Workgroup Settings Override Client-Side Settings>.
    ResultConfigurationUpdates -> Maybe Bool
removeAclConfiguration :: Prelude.Maybe Prelude.Bool,
    -- | If set to \"true\", indicates that the previously-specified encryption
    -- configuration (also known as the client-side setting) for queries in
    -- this workgroup should be ignored and set to null. If set to \"false\" or
    -- not set, and a value is present in the @EncryptionConfiguration@ in
    -- @ResultConfigurationUpdates@ (the client-side setting), the
    -- @EncryptionConfiguration@ in the workgroup\'s @ResultConfiguration@ will
    -- be updated with the new value. For more information, see
    -- <https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html Workgroup Settings Override Client-Side Settings>.
    ResultConfigurationUpdates -> Maybe Bool
removeEncryptionConfiguration :: Prelude.Maybe Prelude.Bool,
    -- | If set to \"true\", removes the Amazon Web Services account ID
    -- previously specified for ResultConfiguration$ExpectedBucketOwner. If set
    -- to \"false\" or not set, and a value is present in the
    -- @ExpectedBucketOwner@ in @ResultConfigurationUpdates@ (the client-side
    -- setting), the @ExpectedBucketOwner@ in the workgroup\'s
    -- @ResultConfiguration@ is updated with the new value. For more
    -- information, see
    -- <https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html Workgroup Settings Override Client-Side Settings>.
    ResultConfigurationUpdates -> Maybe Bool
removeExpectedBucketOwner :: Prelude.Maybe Prelude.Bool,
    -- | If set to \"true\", indicates that the previously-specified query
    -- results location (also known as a client-side setting) for queries in
    -- this workgroup should be ignored and set to null. If set to \"false\" or
    -- not set, and a value is present in the @OutputLocation@ in
    -- @ResultConfigurationUpdates@ (the client-side setting), the
    -- @OutputLocation@ in the workgroup\'s @ResultConfiguration@ will be
    -- updated with the new value. For more information, see
    -- <https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html Workgroup Settings Override Client-Side Settings>.
    ResultConfigurationUpdates -> Maybe Bool
removeOutputLocation :: Prelude.Maybe Prelude.Bool
  }
  deriving (ResultConfigurationUpdates -> ResultConfigurationUpdates -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResultConfigurationUpdates -> ResultConfigurationUpdates -> Bool
$c/= :: ResultConfigurationUpdates -> ResultConfigurationUpdates -> Bool
== :: ResultConfigurationUpdates -> ResultConfigurationUpdates -> Bool
$c== :: ResultConfigurationUpdates -> ResultConfigurationUpdates -> Bool
Prelude.Eq, ReadPrec [ResultConfigurationUpdates]
ReadPrec ResultConfigurationUpdates
Int -> ReadS ResultConfigurationUpdates
ReadS [ResultConfigurationUpdates]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResultConfigurationUpdates]
$creadListPrec :: ReadPrec [ResultConfigurationUpdates]
readPrec :: ReadPrec ResultConfigurationUpdates
$creadPrec :: ReadPrec ResultConfigurationUpdates
readList :: ReadS [ResultConfigurationUpdates]
$creadList :: ReadS [ResultConfigurationUpdates]
readsPrec :: Int -> ReadS ResultConfigurationUpdates
$creadsPrec :: Int -> ReadS ResultConfigurationUpdates
Prelude.Read, Int -> ResultConfigurationUpdates -> ShowS
[ResultConfigurationUpdates] -> ShowS
ResultConfigurationUpdates -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResultConfigurationUpdates] -> ShowS
$cshowList :: [ResultConfigurationUpdates] -> ShowS
show :: ResultConfigurationUpdates -> String
$cshow :: ResultConfigurationUpdates -> String
showsPrec :: Int -> ResultConfigurationUpdates -> ShowS
$cshowsPrec :: Int -> ResultConfigurationUpdates -> ShowS
Prelude.Show, forall x.
Rep ResultConfigurationUpdates x -> ResultConfigurationUpdates
forall x.
ResultConfigurationUpdates -> Rep ResultConfigurationUpdates x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ResultConfigurationUpdates x -> ResultConfigurationUpdates
$cfrom :: forall x.
ResultConfigurationUpdates -> Rep ResultConfigurationUpdates x
Prelude.Generic)

-- |
-- Create a value of 'ResultConfigurationUpdates' 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:
--
-- 'aclConfiguration', 'resultConfigurationUpdates_aclConfiguration' - The ACL configuration for the query results.
--
-- 'encryptionConfiguration', 'resultConfigurationUpdates_encryptionConfiguration' - The encryption configuration for the query results.
--
-- 'expectedBucketOwner', 'resultConfigurationUpdates_expectedBucketOwner' - The Amazon Web Services account ID that you expect to be the owner of
-- the Amazon S3 bucket specified by ResultConfiguration$OutputLocation. If
-- set, Athena uses the value for @ExpectedBucketOwner@ when it makes
-- Amazon S3 calls to your specified output location. If the
-- @ExpectedBucketOwner@ Amazon Web Services account ID does not match the
-- actual owner of the Amazon S3 bucket, the call fails with a permissions
-- error.
--
-- If workgroup settings override client-side settings, then the query uses
-- the @ExpectedBucketOwner@ setting that is specified for the workgroup,
-- and also uses the location for storing query results specified in the
-- workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration and
-- <https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html Workgroup Settings Override Client-Side Settings>.
--
-- 'outputLocation', 'resultConfigurationUpdates_outputLocation' - The location in Amazon S3 where your query results are stored, such as
-- @s3:\/\/path\/to\/query\/bucket\/@. For more information, see
-- <https://docs.aws.amazon.com/athena/latest/ug/querying.html Query Results>
-- If workgroup settings override client-side settings, then the query uses
-- the location for the query results and the encryption configuration that
-- are specified for the workgroup. The \"workgroup settings override\" is
-- specified in @EnforceWorkGroupConfiguration@ (true\/false) in the
-- @WorkGroupConfiguration@. See
-- WorkGroupConfiguration$EnforceWorkGroupConfiguration.
--
-- 'removeAclConfiguration', 'resultConfigurationUpdates_removeAclConfiguration' - If set to @true@, indicates that the previously-specified ACL
-- configuration for queries in this workgroup should be ignored and set to
-- null. If set to @false@ or not set, and a value is present in the
-- @AclConfiguration@ of @ResultConfigurationUpdates@, the
-- @AclConfiguration@ in the workgroup\'s @ResultConfiguration@ is updated
-- with the new value. For more information, see
-- <https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html Workgroup Settings Override Client-Side Settings>.
--
-- 'removeEncryptionConfiguration', 'resultConfigurationUpdates_removeEncryptionConfiguration' - If set to \"true\", indicates that the previously-specified encryption
-- configuration (also known as the client-side setting) for queries in
-- this workgroup should be ignored and set to null. If set to \"false\" or
-- not set, and a value is present in the @EncryptionConfiguration@ in
-- @ResultConfigurationUpdates@ (the client-side setting), the
-- @EncryptionConfiguration@ in the workgroup\'s @ResultConfiguration@ will
-- be updated with the new value. For more information, see
-- <https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html Workgroup Settings Override Client-Side Settings>.
--
-- 'removeExpectedBucketOwner', 'resultConfigurationUpdates_removeExpectedBucketOwner' - If set to \"true\", removes the Amazon Web Services account ID
-- previously specified for ResultConfiguration$ExpectedBucketOwner. If set
-- to \"false\" or not set, and a value is present in the
-- @ExpectedBucketOwner@ in @ResultConfigurationUpdates@ (the client-side
-- setting), the @ExpectedBucketOwner@ in the workgroup\'s
-- @ResultConfiguration@ is updated with the new value. For more
-- information, see
-- <https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html Workgroup Settings Override Client-Side Settings>.
--
-- 'removeOutputLocation', 'resultConfigurationUpdates_removeOutputLocation' - If set to \"true\", indicates that the previously-specified query
-- results location (also known as a client-side setting) for queries in
-- this workgroup should be ignored and set to null. If set to \"false\" or
-- not set, and a value is present in the @OutputLocation@ in
-- @ResultConfigurationUpdates@ (the client-side setting), the
-- @OutputLocation@ in the workgroup\'s @ResultConfiguration@ will be
-- updated with the new value. For more information, see
-- <https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html Workgroup Settings Override Client-Side Settings>.
newResultConfigurationUpdates ::
  ResultConfigurationUpdates
newResultConfigurationUpdates :: ResultConfigurationUpdates
newResultConfigurationUpdates =
  ResultConfigurationUpdates'
    { $sel:aclConfiguration:ResultConfigurationUpdates' :: Maybe AclConfiguration
aclConfiguration =
        forall a. Maybe a
Prelude.Nothing,
      $sel:encryptionConfiguration:ResultConfigurationUpdates' :: Maybe EncryptionConfiguration
encryptionConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:expectedBucketOwner:ResultConfigurationUpdates' :: Maybe Text
expectedBucketOwner = forall a. Maybe a
Prelude.Nothing,
      $sel:outputLocation:ResultConfigurationUpdates' :: Maybe Text
outputLocation = forall a. Maybe a
Prelude.Nothing,
      $sel:removeAclConfiguration:ResultConfigurationUpdates' :: Maybe Bool
removeAclConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:removeEncryptionConfiguration:ResultConfigurationUpdates' :: Maybe Bool
removeEncryptionConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:removeExpectedBucketOwner:ResultConfigurationUpdates' :: Maybe Bool
removeExpectedBucketOwner = forall a. Maybe a
Prelude.Nothing,
      $sel:removeOutputLocation:ResultConfigurationUpdates' :: Maybe Bool
removeOutputLocation = forall a. Maybe a
Prelude.Nothing
    }

-- | The ACL configuration for the query results.
resultConfigurationUpdates_aclConfiguration :: Lens.Lens' ResultConfigurationUpdates (Prelude.Maybe AclConfiguration)
resultConfigurationUpdates_aclConfiguration :: Lens' ResultConfigurationUpdates (Maybe AclConfiguration)
resultConfigurationUpdates_aclConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResultConfigurationUpdates' {Maybe AclConfiguration
aclConfiguration :: Maybe AclConfiguration
$sel:aclConfiguration:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe AclConfiguration
aclConfiguration} -> Maybe AclConfiguration
aclConfiguration) (\s :: ResultConfigurationUpdates
s@ResultConfigurationUpdates' {} Maybe AclConfiguration
a -> ResultConfigurationUpdates
s {$sel:aclConfiguration:ResultConfigurationUpdates' :: Maybe AclConfiguration
aclConfiguration = Maybe AclConfiguration
a} :: ResultConfigurationUpdates)

-- | The encryption configuration for the query results.
resultConfigurationUpdates_encryptionConfiguration :: Lens.Lens' ResultConfigurationUpdates (Prelude.Maybe EncryptionConfiguration)
resultConfigurationUpdates_encryptionConfiguration :: Lens' ResultConfigurationUpdates (Maybe EncryptionConfiguration)
resultConfigurationUpdates_encryptionConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResultConfigurationUpdates' {Maybe EncryptionConfiguration
encryptionConfiguration :: Maybe EncryptionConfiguration
$sel:encryptionConfiguration:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe EncryptionConfiguration
encryptionConfiguration} -> Maybe EncryptionConfiguration
encryptionConfiguration) (\s :: ResultConfigurationUpdates
s@ResultConfigurationUpdates' {} Maybe EncryptionConfiguration
a -> ResultConfigurationUpdates
s {$sel:encryptionConfiguration:ResultConfigurationUpdates' :: Maybe EncryptionConfiguration
encryptionConfiguration = Maybe EncryptionConfiguration
a} :: ResultConfigurationUpdates)

-- | The Amazon Web Services account ID that you expect to be the owner of
-- the Amazon S3 bucket specified by ResultConfiguration$OutputLocation. If
-- set, Athena uses the value for @ExpectedBucketOwner@ when it makes
-- Amazon S3 calls to your specified output location. If the
-- @ExpectedBucketOwner@ Amazon Web Services account ID does not match the
-- actual owner of the Amazon S3 bucket, the call fails with a permissions
-- error.
--
-- If workgroup settings override client-side settings, then the query uses
-- the @ExpectedBucketOwner@ setting that is specified for the workgroup,
-- and also uses the location for storing query results specified in the
-- workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration and
-- <https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html Workgroup Settings Override Client-Side Settings>.
resultConfigurationUpdates_expectedBucketOwner :: Lens.Lens' ResultConfigurationUpdates (Prelude.Maybe Prelude.Text)
resultConfigurationUpdates_expectedBucketOwner :: Lens' ResultConfigurationUpdates (Maybe Text)
resultConfigurationUpdates_expectedBucketOwner = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResultConfigurationUpdates' {Maybe Text
expectedBucketOwner :: Maybe Text
$sel:expectedBucketOwner:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe Text
expectedBucketOwner} -> Maybe Text
expectedBucketOwner) (\s :: ResultConfigurationUpdates
s@ResultConfigurationUpdates' {} Maybe Text
a -> ResultConfigurationUpdates
s {$sel:expectedBucketOwner:ResultConfigurationUpdates' :: Maybe Text
expectedBucketOwner = Maybe Text
a} :: ResultConfigurationUpdates)

-- | The location in Amazon S3 where your query results are stored, such as
-- @s3:\/\/path\/to\/query\/bucket\/@. For more information, see
-- <https://docs.aws.amazon.com/athena/latest/ug/querying.html Query Results>
-- If workgroup settings override client-side settings, then the query uses
-- the location for the query results and the encryption configuration that
-- are specified for the workgroup. The \"workgroup settings override\" is
-- specified in @EnforceWorkGroupConfiguration@ (true\/false) in the
-- @WorkGroupConfiguration@. See
-- WorkGroupConfiguration$EnforceWorkGroupConfiguration.
resultConfigurationUpdates_outputLocation :: Lens.Lens' ResultConfigurationUpdates (Prelude.Maybe Prelude.Text)
resultConfigurationUpdates_outputLocation :: Lens' ResultConfigurationUpdates (Maybe Text)
resultConfigurationUpdates_outputLocation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResultConfigurationUpdates' {Maybe Text
outputLocation :: Maybe Text
$sel:outputLocation:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe Text
outputLocation} -> Maybe Text
outputLocation) (\s :: ResultConfigurationUpdates
s@ResultConfigurationUpdates' {} Maybe Text
a -> ResultConfigurationUpdates
s {$sel:outputLocation:ResultConfigurationUpdates' :: Maybe Text
outputLocation = Maybe Text
a} :: ResultConfigurationUpdates)

-- | If set to @true@, indicates that the previously-specified ACL
-- configuration for queries in this workgroup should be ignored and set to
-- null. If set to @false@ or not set, and a value is present in the
-- @AclConfiguration@ of @ResultConfigurationUpdates@, the
-- @AclConfiguration@ in the workgroup\'s @ResultConfiguration@ is updated
-- with the new value. For more information, see
-- <https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html Workgroup Settings Override Client-Side Settings>.
resultConfigurationUpdates_removeAclConfiguration :: Lens.Lens' ResultConfigurationUpdates (Prelude.Maybe Prelude.Bool)
resultConfigurationUpdates_removeAclConfiguration :: Lens' ResultConfigurationUpdates (Maybe Bool)
resultConfigurationUpdates_removeAclConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResultConfigurationUpdates' {Maybe Bool
removeAclConfiguration :: Maybe Bool
$sel:removeAclConfiguration:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe Bool
removeAclConfiguration} -> Maybe Bool
removeAclConfiguration) (\s :: ResultConfigurationUpdates
s@ResultConfigurationUpdates' {} Maybe Bool
a -> ResultConfigurationUpdates
s {$sel:removeAclConfiguration:ResultConfigurationUpdates' :: Maybe Bool
removeAclConfiguration = Maybe Bool
a} :: ResultConfigurationUpdates)

-- | If set to \"true\", indicates that the previously-specified encryption
-- configuration (also known as the client-side setting) for queries in
-- this workgroup should be ignored and set to null. If set to \"false\" or
-- not set, and a value is present in the @EncryptionConfiguration@ in
-- @ResultConfigurationUpdates@ (the client-side setting), the
-- @EncryptionConfiguration@ in the workgroup\'s @ResultConfiguration@ will
-- be updated with the new value. For more information, see
-- <https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html Workgroup Settings Override Client-Side Settings>.
resultConfigurationUpdates_removeEncryptionConfiguration :: Lens.Lens' ResultConfigurationUpdates (Prelude.Maybe Prelude.Bool)
resultConfigurationUpdates_removeEncryptionConfiguration :: Lens' ResultConfigurationUpdates (Maybe Bool)
resultConfigurationUpdates_removeEncryptionConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResultConfigurationUpdates' {Maybe Bool
removeEncryptionConfiguration :: Maybe Bool
$sel:removeEncryptionConfiguration:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe Bool
removeEncryptionConfiguration} -> Maybe Bool
removeEncryptionConfiguration) (\s :: ResultConfigurationUpdates
s@ResultConfigurationUpdates' {} Maybe Bool
a -> ResultConfigurationUpdates
s {$sel:removeEncryptionConfiguration:ResultConfigurationUpdates' :: Maybe Bool
removeEncryptionConfiguration = Maybe Bool
a} :: ResultConfigurationUpdates)

-- | If set to \"true\", removes the Amazon Web Services account ID
-- previously specified for ResultConfiguration$ExpectedBucketOwner. If set
-- to \"false\" or not set, and a value is present in the
-- @ExpectedBucketOwner@ in @ResultConfigurationUpdates@ (the client-side
-- setting), the @ExpectedBucketOwner@ in the workgroup\'s
-- @ResultConfiguration@ is updated with the new value. For more
-- information, see
-- <https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html Workgroup Settings Override Client-Side Settings>.
resultConfigurationUpdates_removeExpectedBucketOwner :: Lens.Lens' ResultConfigurationUpdates (Prelude.Maybe Prelude.Bool)
resultConfigurationUpdates_removeExpectedBucketOwner :: Lens' ResultConfigurationUpdates (Maybe Bool)
resultConfigurationUpdates_removeExpectedBucketOwner = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResultConfigurationUpdates' {Maybe Bool
removeExpectedBucketOwner :: Maybe Bool
$sel:removeExpectedBucketOwner:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe Bool
removeExpectedBucketOwner} -> Maybe Bool
removeExpectedBucketOwner) (\s :: ResultConfigurationUpdates
s@ResultConfigurationUpdates' {} Maybe Bool
a -> ResultConfigurationUpdates
s {$sel:removeExpectedBucketOwner:ResultConfigurationUpdates' :: Maybe Bool
removeExpectedBucketOwner = Maybe Bool
a} :: ResultConfigurationUpdates)

-- | If set to \"true\", indicates that the previously-specified query
-- results location (also known as a client-side setting) for queries in
-- this workgroup should be ignored and set to null. If set to \"false\" or
-- not set, and a value is present in the @OutputLocation@ in
-- @ResultConfigurationUpdates@ (the client-side setting), the
-- @OutputLocation@ in the workgroup\'s @ResultConfiguration@ will be
-- updated with the new value. For more information, see
-- <https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html Workgroup Settings Override Client-Side Settings>.
resultConfigurationUpdates_removeOutputLocation :: Lens.Lens' ResultConfigurationUpdates (Prelude.Maybe Prelude.Bool)
resultConfigurationUpdates_removeOutputLocation :: Lens' ResultConfigurationUpdates (Maybe Bool)
resultConfigurationUpdates_removeOutputLocation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResultConfigurationUpdates' {Maybe Bool
removeOutputLocation :: Maybe Bool
$sel:removeOutputLocation:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe Bool
removeOutputLocation} -> Maybe Bool
removeOutputLocation) (\s :: ResultConfigurationUpdates
s@ResultConfigurationUpdates' {} Maybe Bool
a -> ResultConfigurationUpdates
s {$sel:removeOutputLocation:ResultConfigurationUpdates' :: Maybe Bool
removeOutputLocation = Maybe Bool
a} :: ResultConfigurationUpdates)

instance Prelude.Hashable ResultConfigurationUpdates where
  hashWithSalt :: Int -> ResultConfigurationUpdates -> Int
hashWithSalt Int
_salt ResultConfigurationUpdates' {Maybe Bool
Maybe Text
Maybe EncryptionConfiguration
Maybe AclConfiguration
removeOutputLocation :: Maybe Bool
removeExpectedBucketOwner :: Maybe Bool
removeEncryptionConfiguration :: Maybe Bool
removeAclConfiguration :: Maybe Bool
outputLocation :: Maybe Text
expectedBucketOwner :: Maybe Text
encryptionConfiguration :: Maybe EncryptionConfiguration
aclConfiguration :: Maybe AclConfiguration
$sel:removeOutputLocation:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe Bool
$sel:removeExpectedBucketOwner:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe Bool
$sel:removeEncryptionConfiguration:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe Bool
$sel:removeAclConfiguration:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe Bool
$sel:outputLocation:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe Text
$sel:expectedBucketOwner:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe Text
$sel:encryptionConfiguration:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe EncryptionConfiguration
$sel:aclConfiguration:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe AclConfiguration
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AclConfiguration
aclConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EncryptionConfiguration
encryptionConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
expectedBucketOwner
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
outputLocation
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
removeAclConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
removeEncryptionConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
removeExpectedBucketOwner
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
removeOutputLocation

instance Prelude.NFData ResultConfigurationUpdates where
  rnf :: ResultConfigurationUpdates -> ()
rnf ResultConfigurationUpdates' {Maybe Bool
Maybe Text
Maybe EncryptionConfiguration
Maybe AclConfiguration
removeOutputLocation :: Maybe Bool
removeExpectedBucketOwner :: Maybe Bool
removeEncryptionConfiguration :: Maybe Bool
removeAclConfiguration :: Maybe Bool
outputLocation :: Maybe Text
expectedBucketOwner :: Maybe Text
encryptionConfiguration :: Maybe EncryptionConfiguration
aclConfiguration :: Maybe AclConfiguration
$sel:removeOutputLocation:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe Bool
$sel:removeExpectedBucketOwner:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe Bool
$sel:removeEncryptionConfiguration:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe Bool
$sel:removeAclConfiguration:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe Bool
$sel:outputLocation:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe Text
$sel:expectedBucketOwner:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe Text
$sel:encryptionConfiguration:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe EncryptionConfiguration
$sel:aclConfiguration:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe AclConfiguration
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe AclConfiguration
aclConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe EncryptionConfiguration
encryptionConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
expectedBucketOwner
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
outputLocation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
removeAclConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
removeEncryptionConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
removeExpectedBucketOwner
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
removeOutputLocation

instance Data.ToJSON ResultConfigurationUpdates where
  toJSON :: ResultConfigurationUpdates -> Value
toJSON ResultConfigurationUpdates' {Maybe Bool
Maybe Text
Maybe EncryptionConfiguration
Maybe AclConfiguration
removeOutputLocation :: Maybe Bool
removeExpectedBucketOwner :: Maybe Bool
removeEncryptionConfiguration :: Maybe Bool
removeAclConfiguration :: Maybe Bool
outputLocation :: Maybe Text
expectedBucketOwner :: Maybe Text
encryptionConfiguration :: Maybe EncryptionConfiguration
aclConfiguration :: Maybe AclConfiguration
$sel:removeOutputLocation:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe Bool
$sel:removeExpectedBucketOwner:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe Bool
$sel:removeEncryptionConfiguration:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe Bool
$sel:removeAclConfiguration:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe Bool
$sel:outputLocation:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe Text
$sel:expectedBucketOwner:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe Text
$sel:encryptionConfiguration:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe EncryptionConfiguration
$sel:aclConfiguration:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe AclConfiguration
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"AclConfiguration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AclConfiguration
aclConfiguration,
            (Key
"EncryptionConfiguration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EncryptionConfiguration
encryptionConfiguration,
            (Key
"ExpectedBucketOwner" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
expectedBucketOwner,
            (Key
"OutputLocation" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
outputLocation,
            (Key
"RemoveAclConfiguration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
removeAclConfiguration,
            (Key
"RemoveEncryptionConfiguration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
removeEncryptionConfiguration,
            (Key
"RemoveExpectedBucketOwner" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
removeExpectedBucketOwner,
            (Key
"RemoveOutputLocation" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
removeOutputLocation
          ]
      )