{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.AmplifyUiBuilder.Types
(
defaultService,
_InternalServerException,
_InvalidParameterException,
_ResourceConflictException,
_ResourceNotFoundException,
_ServiceQuotaExceededException,
_UnauthorizedException,
FixedPosition (..),
FormActionType (..),
FormButtonsPosition (..),
FormDataSourceType (..),
SortDirection (..),
TokenProviders (..),
ActionParameters (..),
newActionParameters,
actionParameters_anchor,
actionParameters_fields,
actionParameters_global,
actionParameters_id,
actionParameters_model,
actionParameters_state,
actionParameters_target,
actionParameters_type,
actionParameters_url,
Component (..),
newComponent,
component_children,
component_collectionProperties,
component_events,
component_modifiedAt,
component_schemaVersion,
component_sourceId,
component_tags,
component_appId,
component_bindingProperties,
component_componentType,
component_createdAt,
component_environmentName,
component_id,
component_name,
component_overrides,
component_properties,
component_variants,
ComponentBindingPropertiesValue (..),
newComponentBindingPropertiesValue,
componentBindingPropertiesValue_bindingProperties,
componentBindingPropertiesValue_defaultValue,
componentBindingPropertiesValue_type,
ComponentBindingPropertiesValueProperties (..),
newComponentBindingPropertiesValueProperties,
componentBindingPropertiesValueProperties_bucket,
componentBindingPropertiesValueProperties_defaultValue,
componentBindingPropertiesValueProperties_field,
componentBindingPropertiesValueProperties_key,
componentBindingPropertiesValueProperties_model,
componentBindingPropertiesValueProperties_predicates,
componentBindingPropertiesValueProperties_slotName,
componentBindingPropertiesValueProperties_userAttribute,
ComponentChild (..),
newComponentChild,
componentChild_children,
componentChild_events,
componentChild_sourceId,
componentChild_componentType,
componentChild_name,
componentChild_properties,
ComponentConditionProperty (..),
newComponentConditionProperty,
componentConditionProperty_else,
componentConditionProperty_field,
componentConditionProperty_operand,
componentConditionProperty_operandType,
componentConditionProperty_operator,
componentConditionProperty_property,
componentConditionProperty_then,
ComponentDataConfiguration (..),
newComponentDataConfiguration,
componentDataConfiguration_identifiers,
componentDataConfiguration_predicate,
componentDataConfiguration_sort,
componentDataConfiguration_model,
ComponentEvent (..),
newComponentEvent,
componentEvent_action,
componentEvent_bindingEvent,
componentEvent_parameters,
ComponentProperty (..),
newComponentProperty,
componentProperty_bindingProperties,
componentProperty_bindings,
componentProperty_collectionBindingProperties,
componentProperty_componentName,
componentProperty_concat,
componentProperty_condition,
componentProperty_configured,
componentProperty_defaultValue,
componentProperty_event,
componentProperty_importedValue,
componentProperty_model,
componentProperty_property,
componentProperty_type,
componentProperty_userAttribute,
componentProperty_value,
ComponentPropertyBindingProperties (..),
newComponentPropertyBindingProperties,
componentPropertyBindingProperties_field,
componentPropertyBindingProperties_property,
ComponentSummary (..),
newComponentSummary,
componentSummary_appId,
componentSummary_componentType,
componentSummary_environmentName,
componentSummary_id,
componentSummary_name,
ComponentVariant (..),
newComponentVariant,
componentVariant_overrides,
componentVariant_variantValues,
CreateComponentData (..),
newCreateComponentData,
createComponentData_children,
createComponentData_collectionProperties,
createComponentData_events,
createComponentData_schemaVersion,
createComponentData_sourceId,
createComponentData_tags,
createComponentData_bindingProperties,
createComponentData_componentType,
createComponentData_name,
createComponentData_overrides,
createComponentData_properties,
createComponentData_variants,
CreateFormData (..),
newCreateFormData,
createFormData_cta,
createFormData_tags,
createFormData_dataType,
createFormData_fields,
createFormData_formActionType,
createFormData_name,
createFormData_schemaVersion,
createFormData_sectionalElements,
createFormData_style,
CreateThemeData (..),
newCreateThemeData,
createThemeData_overrides,
createThemeData_tags,
createThemeData_name,
createThemeData_values,
ExchangeCodeForTokenRequestBody (..),
newExchangeCodeForTokenRequestBody,
exchangeCodeForTokenRequestBody_code,
exchangeCodeForTokenRequestBody_redirectUri,
FieldConfig (..),
newFieldConfig,
fieldConfig_excluded,
fieldConfig_inputType,
fieldConfig_label,
fieldConfig_position,
fieldConfig_validations,
FieldInputConfig (..),
newFieldInputConfig,
fieldInputConfig_defaultChecked,
fieldInputConfig_defaultCountryCode,
fieldInputConfig_defaultValue,
fieldInputConfig_descriptiveText,
fieldInputConfig_isArray,
fieldInputConfig_maxValue,
fieldInputConfig_minValue,
fieldInputConfig_name,
fieldInputConfig_placeholder,
fieldInputConfig_readOnly,
fieldInputConfig_required,
fieldInputConfig_step,
fieldInputConfig_value,
fieldInputConfig_valueMappings,
fieldInputConfig_type,
FieldPosition (..),
newFieldPosition,
fieldPosition_below,
fieldPosition_fixed,
fieldPosition_rightOf,
FieldValidationConfiguration (..),
newFieldValidationConfiguration,
fieldValidationConfiguration_numValues,
fieldValidationConfiguration_strValues,
fieldValidationConfiguration_validationMessage,
fieldValidationConfiguration_type,
Form (..),
newForm,
form_cta,
form_tags,
form_appId,
form_dataType,
form_environmentName,
form_fields,
form_formActionType,
form_id,
form_name,
form_schemaVersion,
form_sectionalElements,
form_style,
FormBindingElement (..),
newFormBindingElement,
formBindingElement_element,
formBindingElement_property,
FormButton (..),
newFormButton,
formButton_children,
formButton_excluded,
formButton_position,
FormCTA (..),
newFormCTA,
formCTA_cancel,
formCTA_clear,
formCTA_position,
formCTA_submit,
FormDataTypeConfig (..),
newFormDataTypeConfig,
formDataTypeConfig_dataSourceType,
formDataTypeConfig_dataTypeName,
FormInputValueProperty (..),
newFormInputValueProperty,
formInputValueProperty_value,
FormStyle (..),
newFormStyle,
formStyle_horizontalGap,
formStyle_outerPadding,
formStyle_verticalGap,
FormStyleConfig (..),
newFormStyleConfig,
formStyleConfig_tokenReference,
formStyleConfig_value,
FormSummary (..),
newFormSummary,
formSummary_appId,
formSummary_dataType,
formSummary_environmentName,
formSummary_formActionType,
formSummary_id,
formSummary_name,
MutationActionSetStateParameter (..),
newMutationActionSetStateParameter,
mutationActionSetStateParameter_componentName,
mutationActionSetStateParameter_property,
mutationActionSetStateParameter_set,
Predicate (..),
newPredicate,
predicate_and,
predicate_field,
predicate_operand,
predicate_operator,
predicate_or,
PutMetadataFlagBody (..),
newPutMetadataFlagBody,
putMetadataFlagBody_newValue,
RefreshTokenRequestBody (..),
newRefreshTokenRequestBody,
refreshTokenRequestBody_token,
SectionalElement (..),
newSectionalElement,
sectionalElement_level,
sectionalElement_orientation,
sectionalElement_position,
sectionalElement_text,
sectionalElement_type,
SortProperty (..),
newSortProperty,
sortProperty_direction,
sortProperty_field,
Theme (..),
newTheme,
theme_modifiedAt,
theme_overrides,
theme_tags,
theme_appId,
theme_createdAt,
theme_environmentName,
theme_id,
theme_name,
theme_values,
ThemeSummary (..),
newThemeSummary,
themeSummary_appId,
themeSummary_environmentName,
themeSummary_id,
themeSummary_name,
ThemeValue (..),
newThemeValue,
themeValue_children,
themeValue_value,
ThemeValues (..),
newThemeValues,
themeValues_key,
themeValues_value,
UpdateComponentData (..),
newUpdateComponentData,
updateComponentData_bindingProperties,
updateComponentData_children,
updateComponentData_collectionProperties,
updateComponentData_componentType,
updateComponentData_events,
updateComponentData_id,
updateComponentData_name,
updateComponentData_overrides,
updateComponentData_properties,
updateComponentData_schemaVersion,
updateComponentData_sourceId,
updateComponentData_variants,
UpdateFormData (..),
newUpdateFormData,
updateFormData_cta,
updateFormData_dataType,
updateFormData_fields,
updateFormData_formActionType,
updateFormData_name,
updateFormData_schemaVersion,
updateFormData_sectionalElements,
updateFormData_style,
UpdateThemeData (..),
newUpdateThemeData,
updateThemeData_id,
updateThemeData_name,
updateThemeData_overrides,
updateThemeData_values,
ValueMapping (..),
newValueMapping,
valueMapping_displayValue,
valueMapping_value,
ValueMappings (..),
newValueMappings,
valueMappings_values,
)
where
import Amazonka.AmplifyUiBuilder.Types.ActionParameters
import Amazonka.AmplifyUiBuilder.Types.Component
import Amazonka.AmplifyUiBuilder.Types.ComponentBindingPropertiesValue
import Amazonka.AmplifyUiBuilder.Types.ComponentBindingPropertiesValueProperties
import Amazonka.AmplifyUiBuilder.Types.ComponentChild
import Amazonka.AmplifyUiBuilder.Types.ComponentConditionProperty
import Amazonka.AmplifyUiBuilder.Types.ComponentDataConfiguration
import Amazonka.AmplifyUiBuilder.Types.ComponentEvent
import Amazonka.AmplifyUiBuilder.Types.ComponentProperty
import Amazonka.AmplifyUiBuilder.Types.ComponentPropertyBindingProperties
import Amazonka.AmplifyUiBuilder.Types.ComponentSummary
import Amazonka.AmplifyUiBuilder.Types.ComponentVariant
import Amazonka.AmplifyUiBuilder.Types.CreateComponentData
import Amazonka.AmplifyUiBuilder.Types.CreateFormData
import Amazonka.AmplifyUiBuilder.Types.CreateThemeData
import Amazonka.AmplifyUiBuilder.Types.ExchangeCodeForTokenRequestBody
import Amazonka.AmplifyUiBuilder.Types.FieldConfig
import Amazonka.AmplifyUiBuilder.Types.FieldInputConfig
import Amazonka.AmplifyUiBuilder.Types.FieldPosition
import Amazonka.AmplifyUiBuilder.Types.FieldValidationConfiguration
import Amazonka.AmplifyUiBuilder.Types.FixedPosition
import Amazonka.AmplifyUiBuilder.Types.Form
import Amazonka.AmplifyUiBuilder.Types.FormActionType
import Amazonka.AmplifyUiBuilder.Types.FormBindingElement
import Amazonka.AmplifyUiBuilder.Types.FormButton
import Amazonka.AmplifyUiBuilder.Types.FormButtonsPosition
import Amazonka.AmplifyUiBuilder.Types.FormCTA
import Amazonka.AmplifyUiBuilder.Types.FormDataSourceType
import Amazonka.AmplifyUiBuilder.Types.FormDataTypeConfig
import Amazonka.AmplifyUiBuilder.Types.FormInputValueProperty
import Amazonka.AmplifyUiBuilder.Types.FormStyle
import Amazonka.AmplifyUiBuilder.Types.FormStyleConfig
import Amazonka.AmplifyUiBuilder.Types.FormSummary
import Amazonka.AmplifyUiBuilder.Types.MutationActionSetStateParameter
import Amazonka.AmplifyUiBuilder.Types.Predicate
import Amazonka.AmplifyUiBuilder.Types.PutMetadataFlagBody
import Amazonka.AmplifyUiBuilder.Types.RefreshTokenRequestBody
import Amazonka.AmplifyUiBuilder.Types.SectionalElement
import Amazonka.AmplifyUiBuilder.Types.SortDirection
import Amazonka.AmplifyUiBuilder.Types.SortProperty
import Amazonka.AmplifyUiBuilder.Types.Theme
import Amazonka.AmplifyUiBuilder.Types.ThemeSummary
import Amazonka.AmplifyUiBuilder.Types.ThemeValue
import Amazonka.AmplifyUiBuilder.Types.ThemeValues
import Amazonka.AmplifyUiBuilder.Types.TokenProviders
import Amazonka.AmplifyUiBuilder.Types.UpdateComponentData
import Amazonka.AmplifyUiBuilder.Types.UpdateFormData
import Amazonka.AmplifyUiBuilder.Types.UpdateThemeData
import Amazonka.AmplifyUiBuilder.Types.ValueMapping
import Amazonka.AmplifyUiBuilder.Types.ValueMappings
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
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
"AmplifyUiBuilder",
$sel:signer:Service :: Signer
Core.signer = Signer
Sign.v4,
$sel:endpointPrefix:Service :: ByteString
Core.endpointPrefix = ByteString
"amplifyuibuilder",
$sel:signingName:Service :: ByteString
Core.signingName = ByteString
"amplifyuibuilder",
$sel:version:Service :: ByteString
Core.version = ByteString
"2021-08-11",
$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
"AmplifyUiBuilder",
$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
_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
_InvalidParameterException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InvalidParameterException :: forall a. AsError a => Fold a ServiceError
_InvalidParameterException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InvalidParameterException"
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
_ResourceConflictException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ResourceConflictException :: forall a. AsError a => Fold a ServiceError
_ResourceConflictException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ResourceConflictException"
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
_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
_ServiceQuotaExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ServiceQuotaExceededException :: forall a. AsError a => Fold a ServiceError
_ServiceQuotaExceededException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ServiceQuotaExceededException"
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
402
_UnauthorizedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_UnauthorizedException :: forall a. AsError a => Fold a ServiceError
_UnauthorizedException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"UnauthorizedException"
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
401