{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.FirebaseDynamicLinks.Types.Sum where
import Network.Google.Prelude hiding (Bytes)
data DynamicLinkEventStatPlatform
= DynamicLinkPlatformUnspecified
| Android
| Ios
| Desktop
| Other
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable DynamicLinkEventStatPlatform
instance FromHttpApiData DynamicLinkEventStatPlatform where
parseQueryParam = \case
"DYNAMIC_LINK_PLATFORM_UNSPECIFIED" -> Right DynamicLinkPlatformUnspecified
"ANDROID" -> Right Android
"IOS" -> Right Ios
"DESKTOP" -> Right Desktop
"OTHER" -> Right Other
x -> Left ("Unable to parse DynamicLinkEventStatPlatform from: " <> x)
instance ToHttpApiData DynamicLinkEventStatPlatform where
toQueryParam = \case
DynamicLinkPlatformUnspecified -> "DYNAMIC_LINK_PLATFORM_UNSPECIFIED"
Android -> "ANDROID"
Ios -> "IOS"
Desktop -> "DESKTOP"
Other -> "OTHER"
instance FromJSON DynamicLinkEventStatPlatform where
parseJSON = parseJSONText "DynamicLinkEventStatPlatform"
instance ToJSON DynamicLinkEventStatPlatform where
toJSON = toJSONText
data GetIosPostInstallAttributionRequestVisualStyle
= UnknownVisualStyle
| DefaultStyle
| CustomStyle
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable GetIosPostInstallAttributionRequestVisualStyle
instance FromHttpApiData GetIosPostInstallAttributionRequestVisualStyle where
parseQueryParam = \case
"UNKNOWN_VISUAL_STYLE" -> Right UnknownVisualStyle
"DEFAULT_STYLE" -> Right DefaultStyle
"CUSTOM_STYLE" -> Right CustomStyle
x -> Left ("Unable to parse GetIosPostInstallAttributionRequestVisualStyle from: " <> x)
instance ToHttpApiData GetIosPostInstallAttributionRequestVisualStyle where
toQueryParam = \case
UnknownVisualStyle -> "UNKNOWN_VISUAL_STYLE"
DefaultStyle -> "DEFAULT_STYLE"
CustomStyle -> "CUSTOM_STYLE"
instance FromJSON GetIosPostInstallAttributionRequestVisualStyle where
parseJSON = parseJSONText "GetIosPostInstallAttributionRequestVisualStyle"
instance ToJSON GetIosPostInstallAttributionRequestVisualStyle where
toJSON = toJSONText
data SuffixOption
= OptionUnspecified
| Unguessable
| Short
| Custom
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable SuffixOption
instance FromHttpApiData SuffixOption where
parseQueryParam = \case
"OPTION_UNSPECIFIED" -> Right OptionUnspecified
"UNGUESSABLE" -> Right Unguessable
"SHORT" -> Right Short
"CUSTOM" -> Right Custom
x -> Left ("Unable to parse SuffixOption from: " <> x)
instance ToHttpApiData SuffixOption where
toQueryParam = \case
OptionUnspecified -> "OPTION_UNSPECIFIED"
Unguessable -> "UNGUESSABLE"
Short -> "SHORT"
Custom -> "CUSTOM"
instance FromJSON SuffixOption where
parseJSON = parseJSONText "SuffixOption"
instance ToJSON SuffixOption where
toJSON = toJSONText
data DynamicLinkEventStatEvent
= DynamicLinkEventUnspecified
| Click
| Redirect
| AppInstall
| AppFirstOpen
| AppReOpen
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable DynamicLinkEventStatEvent
instance FromHttpApiData DynamicLinkEventStatEvent where
parseQueryParam = \case
"DYNAMIC_LINK_EVENT_UNSPECIFIED" -> Right DynamicLinkEventUnspecified
"CLICK" -> Right Click
"REDIRECT" -> Right Redirect
"APP_INSTALL" -> Right AppInstall
"APP_FIRST_OPEN" -> Right AppFirstOpen
"APP_RE_OPEN" -> Right AppReOpen
x -> Left ("Unable to parse DynamicLinkEventStatEvent from: " <> x)
instance ToHttpApiData DynamicLinkEventStatEvent where
toQueryParam = \case
DynamicLinkEventUnspecified -> "DYNAMIC_LINK_EVENT_UNSPECIFIED"
Click -> "CLICK"
Redirect -> "REDIRECT"
AppInstall -> "APP_INSTALL"
AppFirstOpen -> "APP_FIRST_OPEN"
AppReOpen -> "APP_RE_OPEN"
instance FromJSON DynamicLinkEventStatEvent where
parseJSON = parseJSONText "DynamicLinkEventStatEvent"
instance ToJSON DynamicLinkEventStatEvent where
toJSON = toJSONText
data GetIosPostInstallAttributionResponseRequestIPVersion
= UnknownIPVersion
| IPV4
| IPV6
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable GetIosPostInstallAttributionResponseRequestIPVersion
instance FromHttpApiData GetIosPostInstallAttributionResponseRequestIPVersion where
parseQueryParam = \case
"UNKNOWN_IP_VERSION" -> Right UnknownIPVersion
"IP_V4" -> Right IPV4
"IP_V6" -> Right IPV6
x -> Left ("Unable to parse GetIosPostInstallAttributionResponseRequestIPVersion from: " <> x)
instance ToHttpApiData GetIosPostInstallAttributionResponseRequestIPVersion where
toQueryParam = \case
UnknownIPVersion -> "UNKNOWN_IP_VERSION"
IPV4 -> "IP_V4"
IPV6 -> "IP_V6"
instance FromJSON GetIosPostInstallAttributionResponseRequestIPVersion where
parseJSON = parseJSONText "GetIosPostInstallAttributionResponseRequestIPVersion"
instance ToJSON GetIosPostInstallAttributionResponseRequestIPVersion 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 GetIosPostInstallAttributionResponseAttributionConfidence
= UnknownAttributionConfidence
| Weak
| Default
| Unique
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable GetIosPostInstallAttributionResponseAttributionConfidence
instance FromHttpApiData GetIosPostInstallAttributionResponseAttributionConfidence where
parseQueryParam = \case
"UNKNOWN_ATTRIBUTION_CONFIDENCE" -> Right UnknownAttributionConfidence
"WEAK" -> Right Weak
"DEFAULT" -> Right Default
"UNIQUE" -> Right Unique
x -> Left ("Unable to parse GetIosPostInstallAttributionResponseAttributionConfidence from: " <> x)
instance ToHttpApiData GetIosPostInstallAttributionResponseAttributionConfidence where
toQueryParam = \case
UnknownAttributionConfidence -> "UNKNOWN_ATTRIBUTION_CONFIDENCE"
Weak -> "WEAK"
Default -> "DEFAULT"
Unique -> "UNIQUE"
instance FromJSON GetIosPostInstallAttributionResponseAttributionConfidence where
parseJSON = parseJSONText "GetIosPostInstallAttributionResponseAttributionConfidence"
instance ToJSON GetIosPostInstallAttributionResponseAttributionConfidence where
toJSON = toJSONText
data DynamicLinkWarningWarningCode
= CodeUnspecified
| NotInProjectAndroidPackageName
| NotIntegerAndroidPackageMinVersion
| UnnecessaryAndroidPackageMinVersion
| NotURIAndroidLink
| UnnecessaryAndroidLink
| NotURIAndroidFallbackLink
| BadURISchemeAndroidFallbackLink
| NotInProjectIosBundleId
| NotInProjectIPadBundleId
| UnnecessaryIosURLScheme
| NotNumericIosAppStoreId
| UnnecessaryIosAppStoreId
| NotURIIosFallbackLink
| BadURISchemeIosFallbackLink
| NotURIIPadFallbackLink
| BadURISchemeIPadFallbackLink
| BadDebugParam
| BadAdParam
| DeprecatedParam
| UnrecognizedParam
| TooLongParam
| NotURISocialImageLink
| BadURISchemeSocialImageLink
| NotURISocialURL
| BadURISchemeSocialURL
| LinkLengthTooLong
| LinkWithFragments
| NotMatchingIosBundleIdAndStoreId
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable DynamicLinkWarningWarningCode
instance FromHttpApiData DynamicLinkWarningWarningCode where
parseQueryParam = \case
"CODE_UNSPECIFIED" -> Right CodeUnspecified
"NOT_IN_PROJECT_ANDROID_PACKAGE_NAME" -> Right NotInProjectAndroidPackageName
"NOT_INTEGER_ANDROID_PACKAGE_MIN_VERSION" -> Right NotIntegerAndroidPackageMinVersion
"UNNECESSARY_ANDROID_PACKAGE_MIN_VERSION" -> Right UnnecessaryAndroidPackageMinVersion
"NOT_URI_ANDROID_LINK" -> Right NotURIAndroidLink
"UNNECESSARY_ANDROID_LINK" -> Right UnnecessaryAndroidLink
"NOT_URI_ANDROID_FALLBACK_LINK" -> Right NotURIAndroidFallbackLink
"BAD_URI_SCHEME_ANDROID_FALLBACK_LINK" -> Right BadURISchemeAndroidFallbackLink
"NOT_IN_PROJECT_IOS_BUNDLE_ID" -> Right NotInProjectIosBundleId
"NOT_IN_PROJECT_IPAD_BUNDLE_ID" -> Right NotInProjectIPadBundleId
"UNNECESSARY_IOS_URL_SCHEME" -> Right UnnecessaryIosURLScheme
"NOT_NUMERIC_IOS_APP_STORE_ID" -> Right NotNumericIosAppStoreId
"UNNECESSARY_IOS_APP_STORE_ID" -> Right UnnecessaryIosAppStoreId
"NOT_URI_IOS_FALLBACK_LINK" -> Right NotURIIosFallbackLink
"BAD_URI_SCHEME_IOS_FALLBACK_LINK" -> Right BadURISchemeIosFallbackLink
"NOT_URI_IPAD_FALLBACK_LINK" -> Right NotURIIPadFallbackLink
"BAD_URI_SCHEME_IPAD_FALLBACK_LINK" -> Right BadURISchemeIPadFallbackLink
"BAD_DEBUG_PARAM" -> Right BadDebugParam
"BAD_AD_PARAM" -> Right BadAdParam
"DEPRECATED_PARAM" -> Right DeprecatedParam
"UNRECOGNIZED_PARAM" -> Right UnrecognizedParam
"TOO_LONG_PARAM" -> Right TooLongParam
"NOT_URI_SOCIAL_IMAGE_LINK" -> Right NotURISocialImageLink
"BAD_URI_SCHEME_SOCIAL_IMAGE_LINK" -> Right BadURISchemeSocialImageLink
"NOT_URI_SOCIAL_URL" -> Right NotURISocialURL
"BAD_URI_SCHEME_SOCIAL_URL" -> Right BadURISchemeSocialURL
"LINK_LENGTH_TOO_LONG" -> Right LinkLengthTooLong
"LINK_WITH_FRAGMENTS" -> Right LinkWithFragments
"NOT_MATCHING_IOS_BUNDLE_ID_AND_STORE_ID" -> Right NotMatchingIosBundleIdAndStoreId
x -> Left ("Unable to parse DynamicLinkWarningWarningCode from: " <> x)
instance ToHttpApiData DynamicLinkWarningWarningCode where
toQueryParam = \case
CodeUnspecified -> "CODE_UNSPECIFIED"
NotInProjectAndroidPackageName -> "NOT_IN_PROJECT_ANDROID_PACKAGE_NAME"
NotIntegerAndroidPackageMinVersion -> "NOT_INTEGER_ANDROID_PACKAGE_MIN_VERSION"
UnnecessaryAndroidPackageMinVersion -> "UNNECESSARY_ANDROID_PACKAGE_MIN_VERSION"
NotURIAndroidLink -> "NOT_URI_ANDROID_LINK"
UnnecessaryAndroidLink -> "UNNECESSARY_ANDROID_LINK"
NotURIAndroidFallbackLink -> "NOT_URI_ANDROID_FALLBACK_LINK"
BadURISchemeAndroidFallbackLink -> "BAD_URI_SCHEME_ANDROID_FALLBACK_LINK"
NotInProjectIosBundleId -> "NOT_IN_PROJECT_IOS_BUNDLE_ID"
NotInProjectIPadBundleId -> "NOT_IN_PROJECT_IPAD_BUNDLE_ID"
UnnecessaryIosURLScheme -> "UNNECESSARY_IOS_URL_SCHEME"
NotNumericIosAppStoreId -> "NOT_NUMERIC_IOS_APP_STORE_ID"
UnnecessaryIosAppStoreId -> "UNNECESSARY_IOS_APP_STORE_ID"
NotURIIosFallbackLink -> "NOT_URI_IOS_FALLBACK_LINK"
BadURISchemeIosFallbackLink -> "BAD_URI_SCHEME_IOS_FALLBACK_LINK"
NotURIIPadFallbackLink -> "NOT_URI_IPAD_FALLBACK_LINK"
BadURISchemeIPadFallbackLink -> "BAD_URI_SCHEME_IPAD_FALLBACK_LINK"
BadDebugParam -> "BAD_DEBUG_PARAM"
BadAdParam -> "BAD_AD_PARAM"
DeprecatedParam -> "DEPRECATED_PARAM"
UnrecognizedParam -> "UNRECOGNIZED_PARAM"
TooLongParam -> "TOO_LONG_PARAM"
NotURISocialImageLink -> "NOT_URI_SOCIAL_IMAGE_LINK"
BadURISchemeSocialImageLink -> "BAD_URI_SCHEME_SOCIAL_IMAGE_LINK"
NotURISocialURL -> "NOT_URI_SOCIAL_URL"
BadURISchemeSocialURL -> "BAD_URI_SCHEME_SOCIAL_URL"
LinkLengthTooLong -> "LINK_LENGTH_TOO_LONG"
LinkWithFragments -> "LINK_WITH_FRAGMENTS"
NotMatchingIosBundleIdAndStoreId -> "NOT_MATCHING_IOS_BUNDLE_ID_AND_STORE_ID"
instance FromJSON DynamicLinkWarningWarningCode where
parseJSON = parseJSONText "DynamicLinkWarningWarningCode"
instance ToJSON DynamicLinkWarningWarningCode where
toJSON = toJSONText
data GetIosPostInstallAttributionRequestRetrievalMethod
= UnknownPayloadRetrievalMethod
| ImplicitWeakMatch
| ExplicitWeakMatch
| ExplicitStrongAfterWeakMatch
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable GetIosPostInstallAttributionRequestRetrievalMethod
instance FromHttpApiData GetIosPostInstallAttributionRequestRetrievalMethod where
parseQueryParam = \case
"UNKNOWN_PAYLOAD_RETRIEVAL_METHOD" -> Right UnknownPayloadRetrievalMethod
"IMPLICIT_WEAK_MATCH" -> Right ImplicitWeakMatch
"EXPLICIT_WEAK_MATCH" -> Right ExplicitWeakMatch
"EXPLICIT_STRONG_AFTER_WEAK_MATCH" -> Right ExplicitStrongAfterWeakMatch
x -> Left ("Unable to parse GetIosPostInstallAttributionRequestRetrievalMethod from: " <> x)
instance ToHttpApiData GetIosPostInstallAttributionRequestRetrievalMethod where
toQueryParam = \case
UnknownPayloadRetrievalMethod -> "UNKNOWN_PAYLOAD_RETRIEVAL_METHOD"
ImplicitWeakMatch -> "IMPLICIT_WEAK_MATCH"
ExplicitWeakMatch -> "EXPLICIT_WEAK_MATCH"
ExplicitStrongAfterWeakMatch -> "EXPLICIT_STRONG_AFTER_WEAK_MATCH"
instance FromJSON GetIosPostInstallAttributionRequestRetrievalMethod where
parseJSON = parseJSONText "GetIosPostInstallAttributionRequestRetrievalMethod"
instance ToJSON GetIosPostInstallAttributionRequestRetrievalMethod where
toJSON = toJSONText
data ManagedShortLinkVisibility
= UnspecifiedVisibility
| Unarchived
| Archived
| NeverShown
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable ManagedShortLinkVisibility
instance FromHttpApiData ManagedShortLinkVisibility where
parseQueryParam = \case
"UNSPECIFIED_VISIBILITY" -> Right UnspecifiedVisibility
"UNARCHIVED" -> Right Unarchived
"ARCHIVED" -> Right Archived
"NEVER_SHOWN" -> Right NeverShown
x -> Left ("Unable to parse ManagedShortLinkVisibility from: " <> x)
instance ToHttpApiData ManagedShortLinkVisibility where
toQueryParam = \case
UnspecifiedVisibility -> "UNSPECIFIED_VISIBILITY"
Unarchived -> "UNARCHIVED"
Archived -> "ARCHIVED"
NeverShown -> "NEVER_SHOWN"
instance FromJSON ManagedShortLinkVisibility where
parseJSON = parseJSONText "ManagedShortLinkVisibility"
instance ToJSON ManagedShortLinkVisibility where
toJSON = toJSONText