{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.FirebaseHosting.Types.Sum where
import Network.Google.Prelude hiding (Bytes)
data DomainStatus
= DomainStatusUnspecified
| DomainChangePending
| DomainActive
| DomainVerificationRequired
| DomainVerificationLost
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable DomainStatus
instance FromHttpApiData DomainStatus where
parseQueryParam = \case
"DOMAIN_STATUS_UNSPECIFIED" -> Right DomainStatusUnspecified
"DOMAIN_CHANGE_PENDING" -> Right DomainChangePending
"DOMAIN_ACTIVE" -> Right DomainActive
"DOMAIN_VERIFICATION_REQUIRED" -> Right DomainVerificationRequired
"DOMAIN_VERIFICATION_LOST" -> Right DomainVerificationLost
x -> Left ("Unable to parse DomainStatus from: " <> x)
instance ToHttpApiData DomainStatus where
toQueryParam = \case
DomainStatusUnspecified -> "DOMAIN_STATUS_UNSPECIFIED"
DomainChangePending -> "DOMAIN_CHANGE_PENDING"
DomainActive -> "DOMAIN_ACTIVE"
DomainVerificationRequired -> "DOMAIN_VERIFICATION_REQUIRED"
DomainVerificationLost -> "DOMAIN_VERIFICATION_LOST"
instance FromJSON DomainStatus where
parseJSON = parseJSONText "DomainStatus"
instance ToJSON DomainStatus where
toJSON = toJSONText
data DomainProvisioningDNSStatus
= DNSStatusUnspecified
| DNSPending
| DNSMissing
| DNSPartialMatch
| DNSMatch
| DNSExtraneousMatch
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable DomainProvisioningDNSStatus
instance FromHttpApiData DomainProvisioningDNSStatus where
parseQueryParam = \case
"DNS_STATUS_UNSPECIFIED" -> Right DNSStatusUnspecified
"DNS_PENDING" -> Right DNSPending
"DNS_MISSING" -> Right DNSMissing
"DNS_PARTIAL_MATCH" -> Right DNSPartialMatch
"DNS_MATCH" -> Right DNSMatch
"DNS_EXTRANEOUS_MATCH" -> Right DNSExtraneousMatch
x -> Left ("Unable to parse DomainProvisioningDNSStatus from: " <> x)
instance ToHttpApiData DomainProvisioningDNSStatus where
toQueryParam = \case
DNSStatusUnspecified -> "DNS_STATUS_UNSPECIFIED"
DNSPending -> "DNS_PENDING"
DNSMissing -> "DNS_MISSING"
DNSPartialMatch -> "DNS_PARTIAL_MATCH"
DNSMatch -> "DNS_MATCH"
DNSExtraneousMatch -> "DNS_EXTRANEOUS_MATCH"
instance FromJSON DomainProvisioningDNSStatus where
parseJSON = parseJSONText "DomainProvisioningDNSStatus"
instance ToJSON DomainProvisioningDNSStatus where
toJSON = toJSONText
data DomainRedirectType
= RedirectTypeUnspecified
| MovedPermanently
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable DomainRedirectType
instance FromHttpApiData DomainRedirectType where
parseQueryParam = \case
"REDIRECT_TYPE_UNSPECIFIED" -> Right RedirectTypeUnspecified
"MOVED_PERMANENTLY" -> Right MovedPermanently
x -> Left ("Unable to parse DomainRedirectType from: " <> x)
instance ToHttpApiData DomainRedirectType where
toQueryParam = \case
RedirectTypeUnspecified -> "REDIRECT_TYPE_UNSPECIFIED"
MovedPermanently -> "MOVED_PERMANENTLY"
instance FromJSON DomainRedirectType where
parseJSON = parseJSONText "DomainRedirectType"
instance ToJSON DomainRedirectType where
toJSON = toJSONText
data ServingConfigAppAssociation
= Auto
| None
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable ServingConfigAppAssociation
instance FromHttpApiData ServingConfigAppAssociation where
parseQueryParam = \case
"AUTO" -> Right Auto
"NONE" -> Right None
x -> Left ("Unable to parse ServingConfigAppAssociation from: " <> x)
instance ToHttpApiData ServingConfigAppAssociation where
toQueryParam = \case
Auto -> "AUTO"
None -> "NONE"
instance FromJSON ServingConfigAppAssociation where
parseJSON = parseJSONText "ServingConfigAppAssociation"
instance ToJSON ServingConfigAppAssociation where
toJSON = toJSONText
data VersionStatus
= VersionStatusUnspecified
| Created
| Finalized
| Deleted
| Abandoned
| Expired
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable VersionStatus
instance FromHttpApiData VersionStatus where
parseQueryParam = \case
"VERSION_STATUS_UNSPECIFIED" -> Right VersionStatusUnspecified
"CREATED" -> Right Created
"FINALIZED" -> Right Finalized
"DELETED" -> Right Deleted
"ABANDONED" -> Right Abandoned
"EXPIRED" -> Right Expired
x -> Left ("Unable to parse VersionStatus from: " <> x)
instance ToHttpApiData VersionStatus where
toQueryParam = \case
VersionStatusUnspecified -> "VERSION_STATUS_UNSPECIFIED"
Created -> "CREATED"
Finalized -> "FINALIZED"
Deleted -> "DELETED"
Abandoned -> "ABANDONED"
Expired -> "EXPIRED"
instance FromJSON VersionStatus where
parseJSON = parseJSONText "VersionStatus"
instance ToJSON VersionStatus where
toJSON = toJSONText
data Xgafv
= X1
| X2
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable Xgafv
instance FromHttpApiData Xgafv where
parseQueryParam = \case
"1" -> Right X1
"2" -> Right X2
x -> Left ("Unable to parse Xgafv from: " <> x)
instance ToHttpApiData Xgafv where
toQueryParam = \case
X1 -> "1"
X2 -> "2"
instance FromJSON Xgafv where
parseJSON = parseJSONText "Xgafv"
instance ToJSON Xgafv where
toJSON = toJSONText
data DomainProvisioningCertStatus
= CertStatusUnspecified
| CertPending
| CertMissing
| CertProcessing
| CertPropagating
| CertActive
| CertError
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable DomainProvisioningCertStatus
instance FromHttpApiData DomainProvisioningCertStatus where
parseQueryParam = \case
"CERT_STATUS_UNSPECIFIED" -> Right CertStatusUnspecified
"CERT_PENDING" -> Right CertPending
"CERT_MISSING" -> Right CertMissing
"CERT_PROCESSING" -> Right CertProcessing
"CERT_PROPAGATING" -> Right CertPropagating
"CERT_ACTIVE" -> Right CertActive
"CERT_ERROR" -> Right CertError
x -> Left ("Unable to parse DomainProvisioningCertStatus from: " <> x)
instance ToHttpApiData DomainProvisioningCertStatus where
toQueryParam = \case
CertStatusUnspecified -> "CERT_STATUS_UNSPECIFIED"
CertPending -> "CERT_PENDING"
CertMissing -> "CERT_MISSING"
CertProcessing -> "CERT_PROCESSING"
CertPropagating -> "CERT_PROPAGATING"
CertActive -> "CERT_ACTIVE"
CertError -> "CERT_ERROR"
instance FromJSON DomainProvisioningCertStatus where
parseJSON = parseJSONText "DomainProvisioningCertStatus"
instance ToJSON DomainProvisioningCertStatus where
toJSON = toJSONText
data VersionFileStatus
= StatusUnspecified
| Expected
| Active
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable VersionFileStatus
instance FromHttpApiData VersionFileStatus where
parseQueryParam = \case
"STATUS_UNSPECIFIED" -> Right StatusUnspecified
"EXPECTED" -> Right Expected
"ACTIVE" -> Right Active
x -> Left ("Unable to parse VersionFileStatus from: " <> x)
instance ToHttpApiData VersionFileStatus where
toQueryParam = \case
StatusUnspecified -> "STATUS_UNSPECIFIED"
Expected -> "EXPECTED"
Active -> "ACTIVE"
instance FromJSON VersionFileStatus where
parseJSON = parseJSONText "VersionFileStatus"
instance ToJSON VersionFileStatus where
toJSON = toJSONText
data ServingConfigTrailingSlashBehavior
= TrailingSlashBehaviorUnspecified
| Add
| Remove
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable ServingConfigTrailingSlashBehavior
instance FromHttpApiData ServingConfigTrailingSlashBehavior where
parseQueryParam = \case
"TRAILING_SLASH_BEHAVIOR_UNSPECIFIED" -> Right TrailingSlashBehaviorUnspecified
"ADD" -> Right Add
"REMOVE" -> Right Remove
x -> Left ("Unable to parse ServingConfigTrailingSlashBehavior from: " <> x)
instance ToHttpApiData ServingConfigTrailingSlashBehavior where
toQueryParam = \case
TrailingSlashBehaviorUnspecified -> "TRAILING_SLASH_BEHAVIOR_UNSPECIFIED"
Add -> "ADD"
Remove -> "REMOVE"
instance FromJSON ServingConfigTrailingSlashBehavior where
parseJSON = parseJSONText "ServingConfigTrailingSlashBehavior"
instance ToJSON ServingConfigTrailingSlashBehavior where
toJSON = toJSONText
data ReleaseType
= TypeUnspecified
| Deploy
| Rollback
| SiteDisable
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable ReleaseType
instance FromHttpApiData ReleaseType where
parseQueryParam = \case
"TYPE_UNSPECIFIED" -> Right TypeUnspecified
"DEPLOY" -> Right Deploy
"ROLLBACK" -> Right Rollback
"SITE_DISABLE" -> Right SiteDisable
x -> Left ("Unable to parse ReleaseType from: " <> x)
instance ToHttpApiData ReleaseType where
toQueryParam = \case
TypeUnspecified -> "TYPE_UNSPECIFIED"
Deploy -> "DEPLOY"
Rollback -> "ROLLBACK"
SiteDisable -> "SITE_DISABLE"
instance FromJSON ReleaseType where
parseJSON = parseJSONText "ReleaseType"
instance ToJSON ReleaseType where
toJSON = toJSONText