{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.SearchConsole.Types.Sum where
import Network.Google.Prelude hiding (Bytes)
data RunMobileFriendlyTestResponseMobileFriendliness
= MobileFriendlyTestResultUnspecified
| MobileFriendly
| NotMobileFriendly
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable RunMobileFriendlyTestResponseMobileFriendliness
instance FromHttpApiData RunMobileFriendlyTestResponseMobileFriendliness where
parseQueryParam = \case
"MOBILE_FRIENDLY_TEST_RESULT_UNSPECIFIED" -> Right MobileFriendlyTestResultUnspecified
"MOBILE_FRIENDLY" -> Right MobileFriendly
"NOT_MOBILE_FRIENDLY" -> Right NotMobileFriendly
x -> Left ("Unable to parse RunMobileFriendlyTestResponseMobileFriendliness from: " <> x)
instance ToHttpApiData RunMobileFriendlyTestResponseMobileFriendliness where
toQueryParam = \case
MobileFriendlyTestResultUnspecified -> "MOBILE_FRIENDLY_TEST_RESULT_UNSPECIFIED"
MobileFriendly -> "MOBILE_FRIENDLY"
NotMobileFriendly -> "NOT_MOBILE_FRIENDLY"
instance FromJSON RunMobileFriendlyTestResponseMobileFriendliness where
parseJSON = parseJSONText "RunMobileFriendlyTestResponseMobileFriendliness"
instance ToJSON RunMobileFriendlyTestResponseMobileFriendliness where
toJSON = toJSONText
data TestStatusStatus
= TestStatusUnspecified
| Complete
| InternalError
| PageUnreachable
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable TestStatusStatus
instance FromHttpApiData TestStatusStatus where
parseQueryParam = \case
"TEST_STATUS_UNSPECIFIED" -> Right TestStatusUnspecified
"COMPLETE" -> Right Complete
"INTERNAL_ERROR" -> Right InternalError
"PAGE_UNREACHABLE" -> Right PageUnreachable
x -> Left ("Unable to parse TestStatusStatus from: " <> x)
instance ToHttpApiData TestStatusStatus where
toQueryParam = \case
TestStatusUnspecified -> "TEST_STATUS_UNSPECIFIED"
Complete -> "COMPLETE"
InternalError -> "INTERNAL_ERROR"
PageUnreachable -> "PAGE_UNREACHABLE"
instance FromJSON TestStatusStatus where
parseJSON = parseJSONText "TestStatusStatus"
instance ToJSON TestStatusStatus 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 MobileFriendlyIssueRule
= MobileFriendlyRuleUnspecified
| UsesIncompatiblePlugins
| ConfigureViewport
| FixedWidthViewport
| SizeContentToViewport
| UseLegibleFontSizes
| TapTargetsTooClose
deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
instance Hashable MobileFriendlyIssueRule
instance FromHttpApiData MobileFriendlyIssueRule where
parseQueryParam = \case
"MOBILE_FRIENDLY_RULE_UNSPECIFIED" -> Right MobileFriendlyRuleUnspecified
"USES_INCOMPATIBLE_PLUGINS" -> Right UsesIncompatiblePlugins
"CONFIGURE_VIEWPORT" -> Right ConfigureViewport
"FIXED_WIDTH_VIEWPORT" -> Right FixedWidthViewport
"SIZE_CONTENT_TO_VIEWPORT" -> Right SizeContentToViewport
"USE_LEGIBLE_FONT_SIZES" -> Right UseLegibleFontSizes
"TAP_TARGETS_TOO_CLOSE" -> Right TapTargetsTooClose
x -> Left ("Unable to parse MobileFriendlyIssueRule from: " <> x)
instance ToHttpApiData MobileFriendlyIssueRule where
toQueryParam = \case
MobileFriendlyRuleUnspecified -> "MOBILE_FRIENDLY_RULE_UNSPECIFIED"
UsesIncompatiblePlugins -> "USES_INCOMPATIBLE_PLUGINS"
ConfigureViewport -> "CONFIGURE_VIEWPORT"
FixedWidthViewport -> "FIXED_WIDTH_VIEWPORT"
SizeContentToViewport -> "SIZE_CONTENT_TO_VIEWPORT"
UseLegibleFontSizes -> "USE_LEGIBLE_FONT_SIZES"
TapTargetsTooClose -> "TAP_TARGETS_TOO_CLOSE"
instance FromJSON MobileFriendlyIssueRule where
parseJSON = parseJSONText "MobileFriendlyIssueRule"
instance ToJSON MobileFriendlyIssueRule where
toJSON = toJSONText