{-# 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.SageMaker.Types.OfflineStoreConfig -- 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.SageMaker.Types.OfflineStoreConfig 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.SageMaker.Types.DataCatalogConfig import Amazonka.SageMaker.Types.S3StorageConfig import Amazonka.SageMaker.Types.TableFormat -- | The configuration of an @OfflineStore@. -- -- Provide an @OfflineStoreConfig@ in a request to @CreateFeatureGroup@ to -- create an @OfflineStore@. -- -- To encrypt an @OfflineStore@ using at rest data encryption, specify -- Amazon Web Services Key Management Service (KMS) key ID, or @KMSKeyId@, -- in @S3StorageConfig@. -- -- /See:/ 'newOfflineStoreConfig' smart constructor. data OfflineStoreConfig = OfflineStoreConfig' { -- | The meta data of the Glue table that is autogenerated when an -- @OfflineStore@ is created. dataCatalogConfig :: Prelude.Maybe DataCatalogConfig, -- | Set to @True@ to disable the automatic creation of an Amazon Web -- Services Glue table when configuring an @OfflineStore@. disableGlueTableCreation :: Prelude.Maybe Prelude.Bool, -- | Format for the offline store table. Supported formats are Glue (Default) -- and . tableFormat :: Prelude.Maybe TableFormat, -- | The Amazon Simple Storage (Amazon S3) location of @OfflineStore@. s3StorageConfig :: S3StorageConfig } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'OfflineStoreConfig' with all optional fields omitted. -- -- Use or to modify other optional fields. -- -- The following record fields are available, with the corresponding lenses provided -- for backwards compatibility: -- -- 'dataCatalogConfig', 'offlineStoreConfig_dataCatalogConfig' - The meta data of the Glue table that is autogenerated when an -- @OfflineStore@ is created. -- -- 'disableGlueTableCreation', 'offlineStoreConfig_disableGlueTableCreation' - Set to @True@ to disable the automatic creation of an Amazon Web -- Services Glue table when configuring an @OfflineStore@. -- -- 'tableFormat', 'offlineStoreConfig_tableFormat' - Format for the offline store table. Supported formats are Glue (Default) -- and . -- -- 's3StorageConfig', 'offlineStoreConfig_s3StorageConfig' - The Amazon Simple Storage (Amazon S3) location of @OfflineStore@. newOfflineStoreConfig :: -- | 's3StorageConfig' S3StorageConfig -> OfflineStoreConfig newOfflineStoreConfig pS3StorageConfig_ = OfflineStoreConfig' { dataCatalogConfig = Prelude.Nothing, disableGlueTableCreation = Prelude.Nothing, tableFormat = Prelude.Nothing, s3StorageConfig = pS3StorageConfig_ } -- | The meta data of the Glue table that is autogenerated when an -- @OfflineStore@ is created. offlineStoreConfig_dataCatalogConfig :: Lens.Lens' OfflineStoreConfig (Prelude.Maybe DataCatalogConfig) offlineStoreConfig_dataCatalogConfig = Lens.lens (\OfflineStoreConfig' {dataCatalogConfig} -> dataCatalogConfig) (\s@OfflineStoreConfig' {} a -> s {dataCatalogConfig = a} :: OfflineStoreConfig) -- | Set to @True@ to disable the automatic creation of an Amazon Web -- Services Glue table when configuring an @OfflineStore@. offlineStoreConfig_disableGlueTableCreation :: Lens.Lens' OfflineStoreConfig (Prelude.Maybe Prelude.Bool) offlineStoreConfig_disableGlueTableCreation = Lens.lens (\OfflineStoreConfig' {disableGlueTableCreation} -> disableGlueTableCreation) (\s@OfflineStoreConfig' {} a -> s {disableGlueTableCreation = a} :: OfflineStoreConfig) -- | Format for the offline store table. Supported formats are Glue (Default) -- and . offlineStoreConfig_tableFormat :: Lens.Lens' OfflineStoreConfig (Prelude.Maybe TableFormat) offlineStoreConfig_tableFormat = Lens.lens (\OfflineStoreConfig' {tableFormat} -> tableFormat) (\s@OfflineStoreConfig' {} a -> s {tableFormat = a} :: OfflineStoreConfig) -- | The Amazon Simple Storage (Amazon S3) location of @OfflineStore@. offlineStoreConfig_s3StorageConfig :: Lens.Lens' OfflineStoreConfig S3StorageConfig offlineStoreConfig_s3StorageConfig = Lens.lens (\OfflineStoreConfig' {s3StorageConfig} -> s3StorageConfig) (\s@OfflineStoreConfig' {} a -> s {s3StorageConfig = a} :: OfflineStoreConfig) instance Data.FromJSON OfflineStoreConfig where parseJSON = Data.withObject "OfflineStoreConfig" ( \x -> OfflineStoreConfig' Prelude.<$> (x Data..:? "DataCatalogConfig") Prelude.<*> (x Data..:? "DisableGlueTableCreation") Prelude.<*> (x Data..:? "TableFormat") Prelude.<*> (x Data..: "S3StorageConfig") ) instance Prelude.Hashable OfflineStoreConfig where hashWithSalt _salt OfflineStoreConfig' {..} = _salt `Prelude.hashWithSalt` dataCatalogConfig `Prelude.hashWithSalt` disableGlueTableCreation `Prelude.hashWithSalt` tableFormat `Prelude.hashWithSalt` s3StorageConfig instance Prelude.NFData OfflineStoreConfig where rnf OfflineStoreConfig' {..} = Prelude.rnf dataCatalogConfig `Prelude.seq` Prelude.rnf disableGlueTableCreation `Prelude.seq` Prelude.rnf tableFormat `Prelude.seq` Prelude.rnf s3StorageConfig instance Data.ToJSON OfflineStoreConfig where toJSON OfflineStoreConfig' {..} = Data.object ( Prelude.catMaybes [ ("DataCatalogConfig" Data..=) Prelude.<$> dataCatalogConfig, ("DisableGlueTableCreation" Data..=) Prelude.<$> disableGlueTableCreation, ("TableFormat" Data..=) Prelude.<$> tableFormat, Prelude.Just ("S3StorageConfig" Data..= s3StorageConfig) ] )