Skip to content

Commit

Permalink
Regenerating all sum types with consistent error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanhay committed Aug 17, 2016
1 parent 172fe66 commit 89776f0
Show file tree
Hide file tree
Showing 58 changed files with 403 additions and 403 deletions.
8 changes: 4 additions & 4 deletions amazonka-apigateway/gen/Network/AWS/APIGateway/Types/Sum.hs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ instance FromText AuthorizerType where
"cognito_user_pools" -> pure CognitoUserPools
"token" -> pure Token
e -> fromTextError $ "Failure parsing AuthorizerType from value: '" <> e
<> "'. Accepted values: COGNITO_USER_POOLS, TOKEN"
<> "'. Accepted values: cognito_user_pools, token"

instance ToText AuthorizerType where
toText = \case
Expand Down Expand Up @@ -114,7 +114,7 @@ instance FromText CacheClusterStatus where
"flush_in_progress" -> pure FlushInProgress
"not_available" -> pure NotAvailable
e -> fromTextError $ "Failure parsing CacheClusterStatus from value: '" <> e
<> "'. Accepted values: AVAILABLE, CREATE_IN_PROGRESS, DELETE_IN_PROGRESS, FLUSH_IN_PROGRESS, NOT_AVAILABLE"
<> "'. Accepted values: available, create_in_progress, delete_in_progress, flush_in_progress, not_available"

instance ToText CacheClusterStatus where
toText = \case
Expand Down Expand Up @@ -146,7 +146,7 @@ instance FromText IntegrationType where
"http" -> pure HTTP
"mock" -> pure Mock
e -> fromTextError $ "Failure parsing IntegrationType from value: '" <> e
<> "'. Accepted values: AWS, HTTP, MOCK"
<> "'. Accepted values: aws, http, mock"

instance ToText IntegrationType where
toText = \case
Expand Down Expand Up @@ -242,7 +242,7 @@ instance FromText UnauthorizedCacheControlHeaderStrategy where
"succeed_with_response_header" -> pure SucceedWithResponseHeader
"succeed_without_response_header" -> pure SucceedWithoutResponseHeader
e -> fromTextError $ "Failure parsing UnauthorizedCacheControlHeaderStrategy from value: '" <> e
<> "'. Accepted values: FAIL_WITH_403, SUCCEED_WITH_RESPONSE_HEADER, SUCCEED_WITHOUT_RESPONSE_HEADER"
<> "'. Accepted values: fail_with_403, succeed_with_response_header, succeed_without_response_header"

instance ToText UnauthorizedCacheControlHeaderStrategy where
toText = \case
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ instance FromText AdjustmentType where
"exactcapacity" -> pure ExactCapacity
"percentchangeincapacity" -> pure PercentChangeInCapacity
e -> fromTextError $ "Failure parsing AdjustmentType from value: '" <> e
<> "'. Accepted values: ChangeInCapacity, ExactCapacity, PercentChangeInCapacity"
<> "'. Accepted values: changeincapacity, exactcapacity, percentchangeincapacity"

instance ToText AdjustmentType where
toText = \case
Expand Down Expand Up @@ -63,7 +63,7 @@ instance FromText MetricAggregationType where
"maximum" -> pure Maximum
"minimum" -> pure Minimum
e -> fromTextError $ "Failure parsing MetricAggregationType from value: '" <> e
<> "'. Accepted values: Average, Maximum, Minimum"
<> "'. Accepted values: average, maximum, minimum"

instance ToText MetricAggregationType where
toText = \case
Expand Down Expand Up @@ -91,7 +91,7 @@ instance FromText PolicyType where
parser = takeLowerText >>= \case
"stepscaling" -> pure StepScaling
e -> fromTextError $ "Failure parsing PolicyType from value: '" <> e
<> "'. Accepted values: StepScaling"
<> "'. Accepted values: stepscaling"

instance ToText PolicyType where
toText = \case
Expand All @@ -117,7 +117,7 @@ instance FromText ScalableDimension where
parser = takeLowerText >>= \case
"ecs:service:desiredcount" -> pure EcsServiceDesiredCount
e -> fromTextError $ "Failure parsing ScalableDimension from value: '" <> e
<> "'. Accepted values: ecs:service:DesiredCount"
<> "'. Accepted values: ecs:service:desiredcount"

instance ToText ScalableDimension where
toText = \case
Expand Down Expand Up @@ -153,7 +153,7 @@ instance FromText ScalingActivityStatusCode where
"successful" -> pure Successful
"unfulfilled" -> pure Unfulfilled
e -> fromTextError $ "Failure parsing ScalingActivityStatusCode from value: '" <> e
<> "'. Accepted values: Failed, InProgress, Overridden, Pending, Successful, Unfulfilled"
<> "'. Accepted values: failed, inprogress, overridden, pending, successful, unfulfilled"

instance ToText ScalingActivityStatusCode where
toText = \case
Expand Down
4 changes: 2 additions & 2 deletions amazonka-autoscaling/gen/Network/AWS/AutoScaling/Types/Sum.hs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ instance FromText LifecycleState where
"terminating:proceed" -> pure TerminatingProceed
"terminating:wait" -> pure TerminatingWait
e -> fromTextError $ "Failure parsing LifecycleState from value: '" <> e
<> "'. Accepted values: Detached, Detaching, EnteringStandby, InService, Pending, Pending:Proceed, Pending:Wait, Quarantined, Standby, Terminated, Terminating, Terminating:Proceed, Terminating:Wait"
<> "'. Accepted values: detached, detaching, enteringstandby, inservice, pending, pending:proceed, pending:wait, quarantined, standby, terminated, terminating, terminating:proceed, terminating:wait"

instance ToText LifecycleState where
toText = \case
Expand Down Expand Up @@ -108,7 +108,7 @@ instance FromText ScalingActivityStatusCode where
"waitingforspotinstanceid" -> pure WaitingForSpotInstanceId
"waitingforspotinstancerequestid" -> pure WaitingForSpotInstanceRequestId
e -> fromTextError $ "Failure parsing ScalingActivityStatusCode from value: '" <> e
<> "'. Accepted values: Cancelled, Failed, InProgress, MidLifecycleAction, PendingSpotBidPlacement, PreInService, Successful, WaitingForELBConnectionDraining, WaitingForInstanceId, WaitingForInstanceWarmup, WaitingForSpotInstanceId, WaitingForSpotInstanceRequestId"
<> "'. Accepted values: cancelled, failed, inprogress, midlifecycleaction, pendingspotbidplacement, preinservice, successful, waitingforelbconnectiondraining, waitingforinstanceid, waitingforinstancewarmup, waitingforspotinstanceid, waitingforspotinstancerequestid"

instance ToText ScalingActivityStatusCode where
toText = \case
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ instance FromText CertificateStatus where
"revoked" -> pure Revoked
"validation_timed_out" -> pure ValidationTimedOut
e -> fromTextError $ "Failure parsing CertificateStatus from value: '" <> e
<> "'. Accepted values: EXPIRED, FAILED, INACTIVE, ISSUED, PENDING_VALIDATION, REVOKED, VALIDATION_TIMED_OUT"
<> "'. Accepted values: expired, failed, inactive, issued, pending_validation, revoked, validation_timed_out"

instance ToText CertificateStatus where
toText = \case
Expand Down Expand Up @@ -79,7 +79,7 @@ instance FromText FailureReason where
"no_available_contacts" -> pure NoAvailableContacts
"other" -> pure Other
e -> fromTextError $ "Failure parsing FailureReason from value: '" <> e
<> "'. Accepted values: ADDITIONAL_VERIFICATION_REQUIRED, DOMAIN_NOT_ALLOWED, INVALID_PUBLIC_DOMAIN, NO_AVAILABLE_CONTACTS, OTHER"
<> "'. Accepted values: additional_verification_required, domain_not_allowed, invalid_public_domain, no_available_contacts, other"

instance ToText FailureReason where
toText = \case
Expand Down Expand Up @@ -108,7 +108,7 @@ instance FromText KeyAlgorithm where
"ec_prime256v1" -> pure EcPRIME256V1
"rsa_2048" -> pure Rsa2048
e -> fromTextError $ "Failure parsing KeyAlgorithm from value: '" <> e
<> "'. Accepted values: EC_prime256v1, RSA_2048"
<> "'. Accepted values: ec_prime256v1, rsa_2048"

instance ToText KeyAlgorithm where
toText = \case
Expand Down Expand Up @@ -150,7 +150,7 @@ instance FromText RevocationReason where
"superceded" -> pure Superceded
"unspecified" -> pure Unspecified
e -> fromTextError $ "Failure parsing RevocationReason from value: '" <> e
<> "'. Accepted values: A_A_COMPROMISE, AFFILIATION_CHANGED, CA_COMPROMISE, CERTIFICATE_HOLD, CESSATION_OF_OPERATION, KEY_COMPROMISE, PRIVILEGE_WITHDRAWN, REMOVE_FROM_CRL, SUPERCEDED, UNSPECIFIED"
<> "'. Accepted values: a_a_compromise, affiliation_changed, ca_compromise, certificate_hold, cessation_of_operation, key_compromise, privilege_withdrawn, remove_from_crl, superceded, unspecified"

instance ToText RevocationReason where
toText = \case
Expand Down
28 changes: 14 additions & 14 deletions amazonka-cloudformation/gen/Network/AWS/CloudFormation/Types/Sum.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ instance FromText Capability where
"capability_iam" -> pure CapabilityIAM
"capability_named_iam" -> pure CapabilityNamedIAM
e -> fromTextError $ "Failure parsing Capability from value: '" <> e
<> "'. Accepted values: CAPABILITY_IAM, CAPABILITY_NAMED_IAM"
<> "'. Accepted values: capability_iam, capability_named_iam"

instance ToText Capability where
toText = \case
Expand Down Expand Up @@ -57,7 +57,7 @@ instance FromText ChangeAction where
"modify" -> pure Modify
"remove" -> pure Remove
e -> fromTextError $ "Failure parsing ChangeAction from value: '" <> e
<> "'. Accepted values: Add, Modify, Remove"
<> "'. Accepted values: add, modify, remove"

instance ToText ChangeAction where
toText = \case
Expand Down Expand Up @@ -90,7 +90,7 @@ instance FromText ChangeSetStatus where
"delete_complete" -> pure CSSDeleteComplete
"failed" -> pure CSSFailed
e -> fromTextError $ "Failure parsing ChangeSetStatus from value: '" <> e
<> "'. Accepted values: CREATE_COMPLETE, CREATE_IN_PROGRESS, CREATE_PENDING, DELETE_COMPLETE, FAILED"
<> "'. Accepted values: create_complete, create_in_progress, create_pending, delete_complete, failed"

instance ToText ChangeSetStatus where
toText = \case
Expand Down Expand Up @@ -125,7 +125,7 @@ instance FromText ChangeSource where
"resourceattribute" -> pure ResourceAttribute
"resourcereference" -> pure ResourceReference
e -> fromTextError $ "Failure parsing ChangeSource from value: '" <> e
<> "'. Accepted values: Automatic, DirectModification, ParameterReference, ResourceAttribute, ResourceReference"
<> "'. Accepted values: automatic, directmodification, parameterreference, resourceattribute, resourcereference"

instance ToText ChangeSource where
toText = \case
Expand All @@ -152,7 +152,7 @@ instance FromText ChangeType where
parser = takeLowerText >>= \case
"resource" -> pure Resource
e -> fromTextError $ "Failure parsing ChangeType from value: '" <> e
<> "'. Accepted values: Resource"
<> "'. Accepted values: resource"

instance ToText ChangeType where
toText = \case
Expand All @@ -177,7 +177,7 @@ instance FromText EvaluationType where
"dynamic" -> pure Dynamic
"static" -> pure Static
e -> fromTextError $ "Failure parsing EvaluationType from value: '" <> e
<> "'. Accepted values: Dynamic, Static"
<> "'. Accepted values: dynamic, static"

instance ToText EvaluationType where
toText = \case
Expand Down Expand Up @@ -211,7 +211,7 @@ instance FromText ExecutionStatus where
"obsolete" -> pure Obsolete
"unavailable" -> pure Unavailable
e -> fromTextError $ "Failure parsing ExecutionStatus from value: '" <> e
<> "'. Accepted values: AVAILABLE, EXECUTE_COMPLETE, EXECUTE_FAILED, EXECUTE_IN_PROGRESS, OBSOLETE, UNAVAILABLE"
<> "'. Accepted values: available, execute_complete, execute_failed, execute_in_progress, obsolete, unavailable"

instance ToText ExecutionStatus where
toText = \case
Expand Down Expand Up @@ -243,7 +243,7 @@ instance FromText OnFailure where
"do_nothing" -> pure DoNothing
"rollback" -> pure Rollback
e -> fromTextError $ "Failure parsing OnFailure from value: '" <> e
<> "'. Accepted values: DELETE, DO_NOTHING, ROLLBACK"
<> "'. Accepted values: delete, do_nothing, rollback"

instance ToText OnFailure where
toText = \case
Expand All @@ -269,7 +269,7 @@ instance FromText Replacement where
"false" -> pure False'
"true" -> pure True'
e -> fromTextError $ "Failure parsing Replacement from value: '" <> e
<> "'. Accepted values: Conditional, False, True"
<> "'. Accepted values: conditional, false, true"

instance ToText Replacement where
toText = \case
Expand Down Expand Up @@ -298,7 +298,7 @@ instance FromText RequiresRecreation where
"conditionally" -> pure Conditionally
"never" -> pure Never
e -> fromTextError $ "Failure parsing RequiresRecreation from value: '" <> e
<> "'. Accepted values: Always, Conditionally, Never"
<> "'. Accepted values: always, conditionally, never"

instance ToText RequiresRecreation where
toText = \case
Expand Down Expand Up @@ -333,7 +333,7 @@ instance FromText ResourceAttribute where
"tags" -> pure Tags
"updatepolicy" -> pure UpdatePolicy
e -> fromTextError $ "Failure parsing ResourceAttribute from value: '" <> e
<> "'. Accepted values: CreationPolicy, DeletionPolicy, Metadata, Properties, Tags, UpdatePolicy"
<> "'. Accepted values: creationpolicy, deletionpolicy, metadata, properties, tags, updatepolicy"

instance ToText ResourceAttribute where
toText = \case
Expand Down Expand Up @@ -363,7 +363,7 @@ instance FromText ResourceSignalStatus where
"failure" -> pure Failure
"success" -> pure Success
e -> fromTextError $ "Failure parsing ResourceSignalStatus from value: '" <> e
<> "'. Accepted values: FAILURE, SUCCESS"
<> "'. Accepted values: failure, success"

instance ToText ResourceSignalStatus where
toText = \case
Expand Down Expand Up @@ -402,7 +402,7 @@ instance FromText ResourceStatus where
"update_failed" -> pure UpdateFailed
"update_in_progress" -> pure UpdateInProgress
e -> fromTextError $ "Failure parsing ResourceStatus from value: '" <> e
<> "'. Accepted values: CREATE_COMPLETE, CREATE_FAILED, CREATE_IN_PROGRESS, DELETE_COMPLETE, DELETE_FAILED, DELETE_IN_PROGRESS, DELETE_SKIPPED, UPDATE_COMPLETE, UPDATE_FAILED, UPDATE_IN_PROGRESS"
<> "'. Accepted values: create_complete, create_failed, create_in_progress, delete_complete, delete_failed, delete_in_progress, delete_skipped, update_complete, update_failed, update_in_progress"

instance ToText ResourceStatus where
toText = \case
Expand Down Expand Up @@ -464,7 +464,7 @@ instance FromText StackStatus where
"update_rollback_failed" -> pure SSUpdateRollbackFailed
"update_rollback_in_progress" -> pure SSUpdateRollbackInProgress
e -> fromTextError $ "Failure parsing StackStatus from value: '" <> e
<> "'. Accepted values: CREATE_COMPLETE, CREATE_FAILED, CREATE_IN_PROGRESS, DELETE_COMPLETE, DELETE_FAILED, DELETE_IN_PROGRESS, ROLLBACK_COMPLETE, ROLLBACK_FAILED, ROLLBACK_IN_PROGRESS, UPDATE_COMPLETE, UPDATE_COMPLETE_CLEANUP_IN_PROGRESS, UPDATE_IN_PROGRESS, UPDATE_ROLLBACK_COMPLETE, UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS, UPDATE_ROLLBACK_FAILED, UPDATE_ROLLBACK_IN_PROGRESS"
<> "'. Accepted values: create_complete, create_failed, create_in_progress, delete_complete, delete_failed, delete_in_progress, rollback_complete, rollback_failed, rollback_in_progress, update_complete, update_complete_cleanup_in_progress, update_in_progress, update_rollback_complete, update_rollback_complete_cleanup_in_progress, update_rollback_failed, update_rollback_in_progress"

instance ToText StackStatus where
toText = \case
Expand Down
8 changes: 4 additions & 4 deletions amazonka-cloudfront/gen/Network/AWS/CloudFront/Types/Sum.hs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ instance FromText Method where
"post" -> pure Post
"put" -> pure Put
e -> fromTextError $ "Failure parsing Method from value: '" <> e
<> "'. Accepted values: DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT"
<> "'. Accepted values: delete, get, head, options, patch, post, put"

instance ToText Method where
toText = \case
Expand Down Expand Up @@ -169,7 +169,7 @@ instance FromText MinimumProtocolVersion where
"sslv3" -> pure MPVSSLV3
"tlsv1" -> pure MPVTLSV1
e -> fromTextError $ "Failure parsing MinimumProtocolVersion from value: '" <> e
<> "'. Accepted values: SSLv3, TLSv1"
<> "'. Accepted values: sslv3, tlsv1"

instance ToText MinimumProtocolVersion where
toText = \case
Expand Down Expand Up @@ -232,7 +232,7 @@ instance FromText PriceClass where
"priceclass_200" -> pure PriceClass200
"priceclass_all" -> pure PriceClassAll
e -> fromTextError $ "Failure parsing PriceClass from value: '" <> e
<> "'. Accepted values: PriceClass_100, PriceClass_200, PriceClass_All"
<> "'. Accepted values: priceclass_100, priceclass_200, priceclass_all"

instance ToText PriceClass where
toText = \case
Expand Down Expand Up @@ -266,7 +266,7 @@ instance FromText SSLProtocol where
"tlsv1.1" -> pure TLSV1_1
"tlsv1.2" -> pure TLSV1_2
e -> fromTextError $ "Failure parsing SSLProtocol from value: '" <> e
<> "'. Accepted values: SSLv3, TLSv1, TLSv1.1, TLSv1.2"
<> "'. Accepted values: sslv3, tlsv1, tlsv1.1, tlsv1.2"

instance ToText SSLProtocol where
toText = \case
Expand Down
6 changes: 3 additions & 3 deletions amazonka-cloudhsm/gen/Network/AWS/CloudHSM/Types/Sum.hs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ instance FromText CloudHSMObjectState where
"ready" -> pure Ready
"updating" -> pure Updating
e -> fromTextError $ "Failure parsing CloudHSMObjectState from value: '" <> e
<> "'. Accepted values: DEGRADED, READY, UPDATING"
<> "'. Accepted values: degraded, ready, updating"

instance ToText CloudHSMObjectState where
toText = \case
Expand Down Expand Up @@ -94,7 +94,7 @@ instance FromText HSMStatus where
"terminating" -> pure HSTerminating
"updating" -> pure HSUpdating
e -> fromTextError $ "Failure parsing HSMStatus from value: '" <> e
<> "'. Accepted values: DEGRADED, PENDING, RUNNING, SUSPENDED, TERMINATED, TERMINATING, UPDATING"
<> "'. Accepted values: degraded, pending, running, suspended, terminated, terminating, updating"

instance ToText HSMStatus where
toText = \case
Expand Down Expand Up @@ -127,7 +127,7 @@ instance FromText SubscriptionType where
parser = takeLowerText >>= \case
"production" -> pure Production
e -> fromTextError $ "Failure parsing SubscriptionType from value: '" <> e
<> "'. Accepted values: PRODUCTION"
<> "'. Accepted values: production"

instance ToText SubscriptionType where
toText = \case
Expand Down
4 changes: 2 additions & 2 deletions amazonka-cloudsearch/gen/Network/AWS/CloudSearch/Types/Sum.hs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ instance FromText AnalysisSchemeLanguage where
"zh-hans" -> pure ZhHans
"zh-hant" -> pure ZhHant
e -> fromTextError $ "Failure parsing AnalysisSchemeLanguage from value: '" <> e
<> "'. Accepted values: ar, bg, ca, cs, da, de, el, en, es, eu, fa, fi, fr, ga, gl, he, hi, hu, hy, it, id, ja, ko, lv, mul, nl, no, pt, ro, ru, sv, th, tr, zh-Hans, zh-Hant"
<> "'. Accepted values: ar, bg, ca, cs, da, de, el, en, es, eu, fa, fi, fr, ga, gl, he, hi, hu, hy, it, id, ja, ko, lv, mul, nl, no, pt, ro, ru, sv, th, tr, zh-hans, zh-hant"

instance ToText AnalysisSchemeLanguage where
toText = \case
Expand Down Expand Up @@ -251,7 +251,7 @@ instance FromText OptionState where
"processing" -> pure Processing
"requiresindexdocuments" -> pure RequiresIndexDocuments
e -> fromTextError $ "Failure parsing OptionState from value: '" <> e
<> "'. Accepted values: Active, FailedToValidate, Processing, RequiresIndexDocuments"
<> "'. Accepted values: active, failedtovalidate, processing, requiresindexdocuments"

instance ToText OptionState where
toText = \case
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ instance FromText LookupAttributeKey where
"resourcetype" -> pure ResourceType
"username" -> pure Username
e -> fromTextError $ "Failure parsing LookupAttributeKey from value: '" <> e
<> "'. Accepted values: EventId, EventName, ResourceName, ResourceType, Username"
<> "'. Accepted values: eventid, eventname, resourcename, resourcetype, username"

instance ToText LookupAttributeKey where
toText = \case
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ instance FromText RuleState where
"disabled" -> pure Disabled
"enabled" -> pure Enabled
e -> fromTextError $ "Failure parsing RuleState from value: '" <> e
<> "'. Accepted values: DISABLED, ENABLED"
<> "'. Accepted values: disabled, enabled"

instance ToText RuleState where
toText = \case
Expand Down
Loading

0 comments on commit 89776f0

Please sign in to comment.