{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.FinSpaceData.Types
(
defaultService,
_AccessDeniedException,
_ConflictException,
_InternalServerException,
_LimitExceededException,
_ResourceNotFoundException,
_ThrottlingException,
_ValidationException,
ApiAccess (..),
ApplicationPermission (..),
ChangeType (..),
ColumnDataType (..),
DataViewStatus (..),
DatasetKind (..),
DatasetStatus (..),
ErrorCategory (..),
ExportFileFormat (..),
IngestionStatus (..),
LocationType (..),
PermissionGroupMembershipStatus (..),
UserStatus (..),
UserType (..),
AwsCredentials (..),
newAwsCredentials,
awsCredentials_accessKeyId,
awsCredentials_expiration,
awsCredentials_secretAccessKey,
awsCredentials_sessionToken,
ChangesetErrorInfo (..),
newChangesetErrorInfo,
changesetErrorInfo_errorCategory,
changesetErrorInfo_errorMessage,
ChangesetSummary (..),
newChangesetSummary,
changesetSummary_activeFromTimestamp,
changesetSummary_activeUntilTimestamp,
changesetSummary_changeType,
changesetSummary_changesetArn,
changesetSummary_changesetId,
changesetSummary_createTime,
changesetSummary_datasetId,
changesetSummary_errorInfo,
changesetSummary_formatParams,
changesetSummary_sourceParams,
changesetSummary_status,
changesetSummary_updatedByChangesetId,
changesetSummary_updatesChangesetId,
ColumnDefinition (..),
newColumnDefinition,
columnDefinition_columnDescription,
columnDefinition_columnName,
columnDefinition_dataType,
Credentials (..),
newCredentials,
credentials_accessKeyId,
credentials_secretAccessKey,
credentials_sessionToken,
DataViewDestinationTypeParams (..),
newDataViewDestinationTypeParams,
dataViewDestinationTypeParams_s3DestinationExportFileFormat,
dataViewDestinationTypeParams_s3DestinationExportFileFormatOptions,
dataViewDestinationTypeParams_destinationType,
DataViewErrorInfo (..),
newDataViewErrorInfo,
dataViewErrorInfo_errorCategory,
dataViewErrorInfo_errorMessage,
DataViewSummary (..),
newDataViewSummary,
dataViewSummary_asOfTimestamp,
dataViewSummary_autoUpdate,
dataViewSummary_createTime,
dataViewSummary_dataViewArn,
dataViewSummary_dataViewId,
dataViewSummary_datasetId,
dataViewSummary_destinationTypeProperties,
dataViewSummary_errorInfo,
dataViewSummary_lastModifiedTime,
dataViewSummary_partitionColumns,
dataViewSummary_sortColumns,
dataViewSummary_status,
Dataset (..),
newDataset,
dataset_alias,
dataset_createTime,
dataset_datasetArn,
dataset_datasetDescription,
dataset_datasetId,
dataset_datasetTitle,
dataset_kind,
dataset_lastModifiedTime,
dataset_ownerInfo,
dataset_schemaDefinition,
DatasetOwnerInfo (..),
newDatasetOwnerInfo,
datasetOwnerInfo_email,
datasetOwnerInfo_name,
datasetOwnerInfo_phoneNumber,
PermissionGroup (..),
newPermissionGroup,
permissionGroup_applicationPermissions,
permissionGroup_createTime,
permissionGroup_description,
permissionGroup_lastModifiedTime,
permissionGroup_membershipStatus,
permissionGroup_name,
permissionGroup_permissionGroupId,
PermissionGroupByUser (..),
newPermissionGroupByUser,
permissionGroupByUser_membershipStatus,
permissionGroupByUser_name,
permissionGroupByUser_permissionGroupId,
PermissionGroupParams (..),
newPermissionGroupParams,
permissionGroupParams_datasetPermissions,
permissionGroupParams_permissionGroupId,
ResourcePermission (..),
newResourcePermission,
resourcePermission_permission,
S3Location (..),
newS3Location,
s3Location_bucket,
s3Location_key,
SchemaDefinition (..),
newSchemaDefinition,
schemaDefinition_columns,
schemaDefinition_primaryKeyColumns,
SchemaUnion (..),
newSchemaUnion,
schemaUnion_tabularSchemaConfig,
User (..),
newUser,
user_apiAccess,
user_apiAccessPrincipalArn,
user_createTime,
user_emailAddress,
user_firstName,
user_lastDisabledTime,
user_lastEnabledTime,
user_lastLoginTime,
user_lastModifiedTime,
user_lastName,
user_status,
user_type,
user_userId,
UserByPermissionGroup (..),
newUserByPermissionGroup,
userByPermissionGroup_apiAccess,
userByPermissionGroup_apiAccessPrincipalArn,
userByPermissionGroup_emailAddress,
userByPermissionGroup_firstName,
userByPermissionGroup_lastName,
userByPermissionGroup_membershipStatus,
userByPermissionGroup_status,
userByPermissionGroup_type,
userByPermissionGroup_userId,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import Amazonka.FinSpaceData.Types.ApiAccess
import Amazonka.FinSpaceData.Types.ApplicationPermission
import Amazonka.FinSpaceData.Types.AwsCredentials
import Amazonka.FinSpaceData.Types.ChangeType
import Amazonka.FinSpaceData.Types.ChangesetErrorInfo
import Amazonka.FinSpaceData.Types.ChangesetSummary
import Amazonka.FinSpaceData.Types.ColumnDataType
import Amazonka.FinSpaceData.Types.ColumnDefinition
import Amazonka.FinSpaceData.Types.Credentials
import Amazonka.FinSpaceData.Types.DataViewDestinationTypeParams
import Amazonka.FinSpaceData.Types.DataViewErrorInfo
import Amazonka.FinSpaceData.Types.DataViewStatus
import Amazonka.FinSpaceData.Types.DataViewSummary
import Amazonka.FinSpaceData.Types.Dataset
import Amazonka.FinSpaceData.Types.DatasetKind
import Amazonka.FinSpaceData.Types.DatasetOwnerInfo
import Amazonka.FinSpaceData.Types.DatasetStatus
import Amazonka.FinSpaceData.Types.ErrorCategory
import Amazonka.FinSpaceData.Types.ExportFileFormat
import Amazonka.FinSpaceData.Types.IngestionStatus
import Amazonka.FinSpaceData.Types.LocationType
import Amazonka.FinSpaceData.Types.PermissionGroup
import Amazonka.FinSpaceData.Types.PermissionGroupByUser
import Amazonka.FinSpaceData.Types.PermissionGroupMembershipStatus
import Amazonka.FinSpaceData.Types.PermissionGroupParams
import Amazonka.FinSpaceData.Types.ResourcePermission
import Amazonka.FinSpaceData.Types.S3Location
import Amazonka.FinSpaceData.Types.SchemaDefinition
import Amazonka.FinSpaceData.Types.SchemaUnion
import Amazonka.FinSpaceData.Types.User
import Amazonka.FinSpaceData.Types.UserByPermissionGroup
import Amazonka.FinSpaceData.Types.UserStatus
import Amazonka.FinSpaceData.Types.UserType
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Sign.V4 as Sign
defaultService :: Core.Service
defaultService :: Service
defaultService =
Core.Service
{ $sel:abbrev:Service :: Abbrev
Core.abbrev = Abbrev
"FinSpaceData",
$sel:signer:Service :: Signer
Core.signer = Signer
Sign.v4,
$sel:endpointPrefix:Service :: ByteString
Core.endpointPrefix = ByteString
"finspace-api",
$sel:signingName:Service :: ByteString
Core.signingName = ByteString
"finspace-api",
$sel:version:Service :: ByteString
Core.version = ByteString
"2020-07-13",
$sel:s3AddressingStyle:Service :: S3AddressingStyle
Core.s3AddressingStyle = S3AddressingStyle
Core.S3AddressingStyleAuto,
$sel:endpoint:Service :: Region -> Endpoint
Core.endpoint = Service -> Region -> Endpoint
Core.defaultEndpoint Service
defaultService,
$sel:timeout:Service :: Maybe Seconds
Core.timeout = forall a. a -> Maybe a
Prelude.Just Seconds
70,
$sel:check:Service :: Status -> Bool
Core.check = Status -> Bool
Core.statusSuccess,
$sel:error:Service :: Status -> [Header] -> ByteStringLazy -> Error
Core.error = Abbrev -> Status -> [Header] -> ByteStringLazy -> Error
Core.parseJSONError Abbrev
"FinSpaceData",
$sel:retry:Service :: Retry
Core.retry = Retry
retry
}
where
retry :: Retry
retry =
Core.Exponential
{ $sel:base:Exponential :: Double
Core.base = Double
5.0e-2,
$sel:growth:Exponential :: Int
Core.growth = Int
2,
$sel:attempts:Exponential :: Int
Core.attempts = Int
5,
$sel:check:Exponential :: ServiceError -> Maybe Text
Core.check = forall {a}. IsString a => ServiceError -> Maybe a
check
}
check :: ServiceError -> Maybe a
check ServiceError
e
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
502) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"bad_gateway"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
504) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"gateway_timeout"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
500) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"general_server_error"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
509) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"limit_exceeded"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"RequestThrottledException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"request_throttled_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
503) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"service_unavailable"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottledException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttled_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"Throttling"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttling"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottlingException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttling_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode
ErrorCode
"ProvisionedThroughputExceededException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throughput_exceeded"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
429) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"too_many_requests"
| Bool
Prelude.otherwise = forall a. Maybe a
Prelude.Nothing
_AccessDeniedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_AccessDeniedException :: forall a. AsError a => Fold a ServiceError
_AccessDeniedException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"AccessDeniedException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
403
_ConflictException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ConflictException :: forall a. AsError a => Fold a ServiceError
_ConflictException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ConflictException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
409
_InternalServerException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InternalServerException :: forall a. AsError a => Fold a ServiceError
_InternalServerException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InternalServerException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
500
_LimitExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_LimitExceededException :: forall a. AsError a => Fold a ServiceError
_LimitExceededException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"LimitExceededException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
_ResourceNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ResourceNotFoundException :: forall a. AsError a => Fold a ServiceError
_ResourceNotFoundException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ResourceNotFoundException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
404
_ThrottlingException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ThrottlingException :: forall a. AsError a => Fold a ServiceError
_ThrottlingException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ThrottlingException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
429
_ValidationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ValidationException :: forall a. AsError a => Fold a ServiceError
_ValidationException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ValidationException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400