{-# 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.AppFlow.Types.SnowflakeConnectorProfileProperties
-- 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.AppFlow.Types.SnowflakeConnectorProfileProperties where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | The connector-specific profile properties required when using Snowflake.
--
-- /See:/ 'newSnowflakeConnectorProfileProperties' smart constructor.
data SnowflakeConnectorProfileProperties = SnowflakeConnectorProfileProperties'
  { -- | The Snowflake Private Link service name to be used for private data
    -- transfers.
    SnowflakeConnectorProfileProperties -> Maybe Text
privateLinkServiceName :: Prelude.Maybe Prelude.Text,
    -- | The name of the account.
    SnowflakeConnectorProfileProperties -> Maybe Text
accountName :: Prelude.Maybe Prelude.Text,
    -- | The bucket path that refers to the Amazon S3 bucket associated with
    -- Snowflake.
    SnowflakeConnectorProfileProperties -> Maybe Text
bucketPrefix :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Web Services Region of the Snowflake account.
    SnowflakeConnectorProfileProperties -> Maybe Text
region :: Prelude.Maybe Prelude.Text,
    -- | The name of the Snowflake warehouse.
    SnowflakeConnectorProfileProperties -> Text
warehouse :: Prelude.Text,
    -- | The name of the Amazon S3 stage that was created while setting up an
    -- Amazon S3 stage in the Snowflake account. This is written in the
    -- following format: \< Database>\< Schema>\<Stage Name>.
    SnowflakeConnectorProfileProperties -> Text
stage :: Prelude.Text,
    -- | The name of the Amazon S3 bucket associated with Snowflake.
    SnowflakeConnectorProfileProperties -> Text
bucketName :: Prelude.Text
  }
  deriving (SnowflakeConnectorProfileProperties
-> SnowflakeConnectorProfileProperties -> Bool
(SnowflakeConnectorProfileProperties
 -> SnowflakeConnectorProfileProperties -> Bool)
-> (SnowflakeConnectorProfileProperties
    -> SnowflakeConnectorProfileProperties -> Bool)
-> Eq SnowflakeConnectorProfileProperties
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SnowflakeConnectorProfileProperties
-> SnowflakeConnectorProfileProperties -> Bool
$c/= :: SnowflakeConnectorProfileProperties
-> SnowflakeConnectorProfileProperties -> Bool
== :: SnowflakeConnectorProfileProperties
-> SnowflakeConnectorProfileProperties -> Bool
$c== :: SnowflakeConnectorProfileProperties
-> SnowflakeConnectorProfileProperties -> Bool
Prelude.Eq, ReadPrec [SnowflakeConnectorProfileProperties]
ReadPrec SnowflakeConnectorProfileProperties
Int -> ReadS SnowflakeConnectorProfileProperties
ReadS [SnowflakeConnectorProfileProperties]
(Int -> ReadS SnowflakeConnectorProfileProperties)
-> ReadS [SnowflakeConnectorProfileProperties]
-> ReadPrec SnowflakeConnectorProfileProperties
-> ReadPrec [SnowflakeConnectorProfileProperties]
-> Read SnowflakeConnectorProfileProperties
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SnowflakeConnectorProfileProperties]
$creadListPrec :: ReadPrec [SnowflakeConnectorProfileProperties]
readPrec :: ReadPrec SnowflakeConnectorProfileProperties
$creadPrec :: ReadPrec SnowflakeConnectorProfileProperties
readList :: ReadS [SnowflakeConnectorProfileProperties]
$creadList :: ReadS [SnowflakeConnectorProfileProperties]
readsPrec :: Int -> ReadS SnowflakeConnectorProfileProperties
$creadsPrec :: Int -> ReadS SnowflakeConnectorProfileProperties
Prelude.Read, Int -> SnowflakeConnectorProfileProperties -> ShowS
[SnowflakeConnectorProfileProperties] -> ShowS
SnowflakeConnectorProfileProperties -> String
(Int -> SnowflakeConnectorProfileProperties -> ShowS)
-> (SnowflakeConnectorProfileProperties -> String)
-> ([SnowflakeConnectorProfileProperties] -> ShowS)
-> Show SnowflakeConnectorProfileProperties
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SnowflakeConnectorProfileProperties] -> ShowS
$cshowList :: [SnowflakeConnectorProfileProperties] -> ShowS
show :: SnowflakeConnectorProfileProperties -> String
$cshow :: SnowflakeConnectorProfileProperties -> String
showsPrec :: Int -> SnowflakeConnectorProfileProperties -> ShowS
$cshowsPrec :: Int -> SnowflakeConnectorProfileProperties -> ShowS
Prelude.Show, (forall x.
 SnowflakeConnectorProfileProperties
 -> Rep SnowflakeConnectorProfileProperties x)
-> (forall x.
    Rep SnowflakeConnectorProfileProperties x
    -> SnowflakeConnectorProfileProperties)
-> Generic SnowflakeConnectorProfileProperties
forall x.
Rep SnowflakeConnectorProfileProperties x
-> SnowflakeConnectorProfileProperties
forall x.
SnowflakeConnectorProfileProperties
-> Rep SnowflakeConnectorProfileProperties x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SnowflakeConnectorProfileProperties x
-> SnowflakeConnectorProfileProperties
$cfrom :: forall x.
SnowflakeConnectorProfileProperties
-> Rep SnowflakeConnectorProfileProperties x
Prelude.Generic)

-- |
-- Create a value of 'SnowflakeConnectorProfileProperties' 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:
--
-- 'privateLinkServiceName', 'snowflakeConnectorProfileProperties_privateLinkServiceName' - The Snowflake Private Link service name to be used for private data
-- transfers.
--
-- 'accountName', 'snowflakeConnectorProfileProperties_accountName' - The name of the account.
--
-- 'bucketPrefix', 'snowflakeConnectorProfileProperties_bucketPrefix' - The bucket path that refers to the Amazon S3 bucket associated with
-- Snowflake.
--
-- 'region', 'snowflakeConnectorProfileProperties_region' - The Amazon Web Services Region of the Snowflake account.
--
-- 'warehouse', 'snowflakeConnectorProfileProperties_warehouse' - The name of the Snowflake warehouse.
--
-- 'stage', 'snowflakeConnectorProfileProperties_stage' - The name of the Amazon S3 stage that was created while setting up an
-- Amazon S3 stage in the Snowflake account. This is written in the
-- following format: \< Database>\< Schema>\<Stage Name>.
--
-- 'bucketName', 'snowflakeConnectorProfileProperties_bucketName' - The name of the Amazon S3 bucket associated with Snowflake.
newSnowflakeConnectorProfileProperties ::
  -- | 'warehouse'
  Prelude.Text ->
  -- | 'stage'
  Prelude.Text ->
  -- | 'bucketName'
  Prelude.Text ->
  SnowflakeConnectorProfileProperties
newSnowflakeConnectorProfileProperties :: Text -> Text -> Text -> SnowflakeConnectorProfileProperties
newSnowflakeConnectorProfileProperties
  Text
pWarehouse_
  Text
pStage_
  Text
pBucketName_ =
    SnowflakeConnectorProfileProperties' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> SnowflakeConnectorProfileProperties
SnowflakeConnectorProfileProperties'
      { $sel:privateLinkServiceName:SnowflakeConnectorProfileProperties' :: Maybe Text
privateLinkServiceName =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:accountName:SnowflakeConnectorProfileProperties' :: Maybe Text
accountName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:bucketPrefix:SnowflakeConnectorProfileProperties' :: Maybe Text
bucketPrefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:region:SnowflakeConnectorProfileProperties' :: Maybe Text
region = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:warehouse:SnowflakeConnectorProfileProperties' :: Text
warehouse = Text
pWarehouse_,
        $sel:stage:SnowflakeConnectorProfileProperties' :: Text
stage = Text
pStage_,
        $sel:bucketName:SnowflakeConnectorProfileProperties' :: Text
bucketName = Text
pBucketName_
      }

-- | The Snowflake Private Link service name to be used for private data
-- transfers.
snowflakeConnectorProfileProperties_privateLinkServiceName :: Lens.Lens' SnowflakeConnectorProfileProperties (Prelude.Maybe Prelude.Text)
snowflakeConnectorProfileProperties_privateLinkServiceName :: (Maybe Text -> f (Maybe Text))
-> SnowflakeConnectorProfileProperties
-> f SnowflakeConnectorProfileProperties
snowflakeConnectorProfileProperties_privateLinkServiceName = (SnowflakeConnectorProfileProperties -> Maybe Text)
-> (SnowflakeConnectorProfileProperties
    -> Maybe Text -> SnowflakeConnectorProfileProperties)
-> Lens
     SnowflakeConnectorProfileProperties
     SnowflakeConnectorProfileProperties
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SnowflakeConnectorProfileProperties' {Maybe Text
privateLinkServiceName :: Maybe Text
$sel:privateLinkServiceName:SnowflakeConnectorProfileProperties' :: SnowflakeConnectorProfileProperties -> Maybe Text
privateLinkServiceName} -> Maybe Text
privateLinkServiceName) (\s :: SnowflakeConnectorProfileProperties
s@SnowflakeConnectorProfileProperties' {} Maybe Text
a -> SnowflakeConnectorProfileProperties
s {$sel:privateLinkServiceName:SnowflakeConnectorProfileProperties' :: Maybe Text
privateLinkServiceName = Maybe Text
a} :: SnowflakeConnectorProfileProperties)

-- | The name of the account.
snowflakeConnectorProfileProperties_accountName :: Lens.Lens' SnowflakeConnectorProfileProperties (Prelude.Maybe Prelude.Text)
snowflakeConnectorProfileProperties_accountName :: (Maybe Text -> f (Maybe Text))
-> SnowflakeConnectorProfileProperties
-> f SnowflakeConnectorProfileProperties
snowflakeConnectorProfileProperties_accountName = (SnowflakeConnectorProfileProperties -> Maybe Text)
-> (SnowflakeConnectorProfileProperties
    -> Maybe Text -> SnowflakeConnectorProfileProperties)
-> Lens
     SnowflakeConnectorProfileProperties
     SnowflakeConnectorProfileProperties
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SnowflakeConnectorProfileProperties' {Maybe Text
accountName :: Maybe Text
$sel:accountName:SnowflakeConnectorProfileProperties' :: SnowflakeConnectorProfileProperties -> Maybe Text
accountName} -> Maybe Text
accountName) (\s :: SnowflakeConnectorProfileProperties
s@SnowflakeConnectorProfileProperties' {} Maybe Text
a -> SnowflakeConnectorProfileProperties
s {$sel:accountName:SnowflakeConnectorProfileProperties' :: Maybe Text
accountName = Maybe Text
a} :: SnowflakeConnectorProfileProperties)

-- | The bucket path that refers to the Amazon S3 bucket associated with
-- Snowflake.
snowflakeConnectorProfileProperties_bucketPrefix :: Lens.Lens' SnowflakeConnectorProfileProperties (Prelude.Maybe Prelude.Text)
snowflakeConnectorProfileProperties_bucketPrefix :: (Maybe Text -> f (Maybe Text))
-> SnowflakeConnectorProfileProperties
-> f SnowflakeConnectorProfileProperties
snowflakeConnectorProfileProperties_bucketPrefix = (SnowflakeConnectorProfileProperties -> Maybe Text)
-> (SnowflakeConnectorProfileProperties
    -> Maybe Text -> SnowflakeConnectorProfileProperties)
-> Lens
     SnowflakeConnectorProfileProperties
     SnowflakeConnectorProfileProperties
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SnowflakeConnectorProfileProperties' {Maybe Text
bucketPrefix :: Maybe Text
$sel:bucketPrefix:SnowflakeConnectorProfileProperties' :: SnowflakeConnectorProfileProperties -> Maybe Text
bucketPrefix} -> Maybe Text
bucketPrefix) (\s :: SnowflakeConnectorProfileProperties
s@SnowflakeConnectorProfileProperties' {} Maybe Text
a -> SnowflakeConnectorProfileProperties
s {$sel:bucketPrefix:SnowflakeConnectorProfileProperties' :: Maybe Text
bucketPrefix = Maybe Text
a} :: SnowflakeConnectorProfileProperties)

-- | The Amazon Web Services Region of the Snowflake account.
snowflakeConnectorProfileProperties_region :: Lens.Lens' SnowflakeConnectorProfileProperties (Prelude.Maybe Prelude.Text)
snowflakeConnectorProfileProperties_region :: (Maybe Text -> f (Maybe Text))
-> SnowflakeConnectorProfileProperties
-> f SnowflakeConnectorProfileProperties
snowflakeConnectorProfileProperties_region = (SnowflakeConnectorProfileProperties -> Maybe Text)
-> (SnowflakeConnectorProfileProperties
    -> Maybe Text -> SnowflakeConnectorProfileProperties)
-> Lens
     SnowflakeConnectorProfileProperties
     SnowflakeConnectorProfileProperties
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SnowflakeConnectorProfileProperties' {Maybe Text
region :: Maybe Text
$sel:region:SnowflakeConnectorProfileProperties' :: SnowflakeConnectorProfileProperties -> Maybe Text
region} -> Maybe Text
region) (\s :: SnowflakeConnectorProfileProperties
s@SnowflakeConnectorProfileProperties' {} Maybe Text
a -> SnowflakeConnectorProfileProperties
s {$sel:region:SnowflakeConnectorProfileProperties' :: Maybe Text
region = Maybe Text
a} :: SnowflakeConnectorProfileProperties)

-- | The name of the Snowflake warehouse.
snowflakeConnectorProfileProperties_warehouse :: Lens.Lens' SnowflakeConnectorProfileProperties Prelude.Text
snowflakeConnectorProfileProperties_warehouse :: (Text -> f Text)
-> SnowflakeConnectorProfileProperties
-> f SnowflakeConnectorProfileProperties
snowflakeConnectorProfileProperties_warehouse = (SnowflakeConnectorProfileProperties -> Text)
-> (SnowflakeConnectorProfileProperties
    -> Text -> SnowflakeConnectorProfileProperties)
-> Lens
     SnowflakeConnectorProfileProperties
     SnowflakeConnectorProfileProperties
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SnowflakeConnectorProfileProperties' {Text
warehouse :: Text
$sel:warehouse:SnowflakeConnectorProfileProperties' :: SnowflakeConnectorProfileProperties -> Text
warehouse} -> Text
warehouse) (\s :: SnowflakeConnectorProfileProperties
s@SnowflakeConnectorProfileProperties' {} Text
a -> SnowflakeConnectorProfileProperties
s {$sel:warehouse:SnowflakeConnectorProfileProperties' :: Text
warehouse = Text
a} :: SnowflakeConnectorProfileProperties)

-- | The name of the Amazon S3 stage that was created while setting up an
-- Amazon S3 stage in the Snowflake account. This is written in the
-- following format: \< Database>\< Schema>\<Stage Name>.
snowflakeConnectorProfileProperties_stage :: Lens.Lens' SnowflakeConnectorProfileProperties Prelude.Text
snowflakeConnectorProfileProperties_stage :: (Text -> f Text)
-> SnowflakeConnectorProfileProperties
-> f SnowflakeConnectorProfileProperties
snowflakeConnectorProfileProperties_stage = (SnowflakeConnectorProfileProperties -> Text)
-> (SnowflakeConnectorProfileProperties
    -> Text -> SnowflakeConnectorProfileProperties)
-> Lens
     SnowflakeConnectorProfileProperties
     SnowflakeConnectorProfileProperties
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SnowflakeConnectorProfileProperties' {Text
stage :: Text
$sel:stage:SnowflakeConnectorProfileProperties' :: SnowflakeConnectorProfileProperties -> Text
stage} -> Text
stage) (\s :: SnowflakeConnectorProfileProperties
s@SnowflakeConnectorProfileProperties' {} Text
a -> SnowflakeConnectorProfileProperties
s {$sel:stage:SnowflakeConnectorProfileProperties' :: Text
stage = Text
a} :: SnowflakeConnectorProfileProperties)

-- | The name of the Amazon S3 bucket associated with Snowflake.
snowflakeConnectorProfileProperties_bucketName :: Lens.Lens' SnowflakeConnectorProfileProperties Prelude.Text
snowflakeConnectorProfileProperties_bucketName :: (Text -> f Text)
-> SnowflakeConnectorProfileProperties
-> f SnowflakeConnectorProfileProperties
snowflakeConnectorProfileProperties_bucketName = (SnowflakeConnectorProfileProperties -> Text)
-> (SnowflakeConnectorProfileProperties
    -> Text -> SnowflakeConnectorProfileProperties)
-> Lens
     SnowflakeConnectorProfileProperties
     SnowflakeConnectorProfileProperties
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SnowflakeConnectorProfileProperties' {Text
bucketName :: Text
$sel:bucketName:SnowflakeConnectorProfileProperties' :: SnowflakeConnectorProfileProperties -> Text
bucketName} -> Text
bucketName) (\s :: SnowflakeConnectorProfileProperties
s@SnowflakeConnectorProfileProperties' {} Text
a -> SnowflakeConnectorProfileProperties
s {$sel:bucketName:SnowflakeConnectorProfileProperties' :: Text
bucketName = Text
a} :: SnowflakeConnectorProfileProperties)

instance
  Core.FromJSON
    SnowflakeConnectorProfileProperties
  where
  parseJSON :: Value -> Parser SnowflakeConnectorProfileProperties
parseJSON =
    String
-> (Object -> Parser SnowflakeConnectorProfileProperties)
-> Value
-> Parser SnowflakeConnectorProfileProperties
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"SnowflakeConnectorProfileProperties"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> SnowflakeConnectorProfileProperties
SnowflakeConnectorProfileProperties'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Text
 -> Text
 -> Text
 -> SnowflakeConnectorProfileProperties)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> Text
      -> SnowflakeConnectorProfileProperties)
forall (f :: * -> *) a b. Functor 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
"privateLinkServiceName")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> Text
   -> SnowflakeConnectorProfileProperties)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> Text
      -> SnowflakeConnectorProfileProperties)
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
"accountName")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> Text
   -> SnowflakeConnectorProfileProperties)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Text -> Text -> Text -> SnowflakeConnectorProfileProperties)
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
"bucketPrefix")
            Parser
  (Maybe Text
   -> Text -> Text -> Text -> SnowflakeConnectorProfileProperties)
-> Parser (Maybe Text)
-> Parser
     (Text -> Text -> Text -> SnowflakeConnectorProfileProperties)
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
"region")
            Parser
  (Text -> Text -> Text -> SnowflakeConnectorProfileProperties)
-> Parser Text
-> Parser (Text -> Text -> SnowflakeConnectorProfileProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"warehouse")
            Parser (Text -> Text -> SnowflakeConnectorProfileProperties)
-> Parser Text
-> Parser (Text -> SnowflakeConnectorProfileProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"stage")
            Parser (Text -> SnowflakeConnectorProfileProperties)
-> Parser Text -> Parser SnowflakeConnectorProfileProperties
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"bucketName")
      )

instance
  Prelude.Hashable
    SnowflakeConnectorProfileProperties

instance
  Prelude.NFData
    SnowflakeConnectorProfileProperties

instance
  Core.ToJSON
    SnowflakeConnectorProfileProperties
  where
  toJSON :: SnowflakeConnectorProfileProperties -> Value
toJSON SnowflakeConnectorProfileProperties' {Maybe Text
Text
bucketName :: Text
stage :: Text
warehouse :: Text
region :: Maybe Text
bucketPrefix :: Maybe Text
accountName :: Maybe Text
privateLinkServiceName :: Maybe Text
$sel:bucketName:SnowflakeConnectorProfileProperties' :: SnowflakeConnectorProfileProperties -> Text
$sel:stage:SnowflakeConnectorProfileProperties' :: SnowflakeConnectorProfileProperties -> Text
$sel:warehouse:SnowflakeConnectorProfileProperties' :: SnowflakeConnectorProfileProperties -> Text
$sel:region:SnowflakeConnectorProfileProperties' :: SnowflakeConnectorProfileProperties -> Maybe Text
$sel:bucketPrefix:SnowflakeConnectorProfileProperties' :: SnowflakeConnectorProfileProperties -> Maybe Text
$sel:accountName:SnowflakeConnectorProfileProperties' :: SnowflakeConnectorProfileProperties -> Maybe Text
$sel:privateLinkServiceName:SnowflakeConnectorProfileProperties' :: SnowflakeConnectorProfileProperties -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"privateLinkServiceName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
privateLinkServiceName,
            (Text
"accountName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
accountName,
            (Text
"bucketPrefix" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
bucketPrefix,
            (Text
"region" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
region,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"warehouse" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
warehouse),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"stage" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
stage),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"bucketName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
bucketName)
          ]
      )