module Network.Google.CivicInfo.Types.Sum where
import Network.Google.Prelude
data RepresentativesRepresentativeInfoByDivisionLevels
= ADMINISTRATIVEAREA1
| ADMINISTRATIVEAREA2
| Country
| International
| Locality
| Regional
| Special
| SUBLOCALITY1
| SUBLOCALITY2
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable RepresentativesRepresentativeInfoByDivisionLevels
instance FromText RepresentativesRepresentativeInfoByDivisionLevels where
fromText = \case
"administrativeArea1" -> Just ADMINISTRATIVEAREA1
"administrativeArea2" -> Just ADMINISTRATIVEAREA2
"country" -> Just Country
"international" -> Just International
"locality" -> Just Locality
"regional" -> Just Regional
"special" -> Just Special
"subLocality1" -> Just SUBLOCALITY1
"subLocality2" -> Just SUBLOCALITY2
_ -> Nothing
instance ToText RepresentativesRepresentativeInfoByDivisionLevels where
toText = \case
ADMINISTRATIVEAREA1 -> "administrativeArea1"
ADMINISTRATIVEAREA2 -> "administrativeArea2"
Country -> "country"
International -> "international"
Locality -> "locality"
Regional -> "regional"
Special -> "special"
SUBLOCALITY1 -> "subLocality1"
SUBLOCALITY2 -> "subLocality2"
instance FromJSON RepresentativesRepresentativeInfoByDivisionLevels where
parseJSON = parseJSONText "RepresentativesRepresentativeInfoByDivisionLevels"
instance ToJSON RepresentativesRepresentativeInfoByDivisionLevels where
toJSON = toJSONText
data RepresentativesRepresentativeInfoByAddressLevels
= RRIBALADMINISTRATIVEAREA1
| RRIBALADMINISTRATIVEAREA2
| RRIBALCountry
| RRIBALInternational
| RRIBALLocality
| RRIBALRegional
| RRIBALSpecial
| RRIBALSUBLOCALITY1
| RRIBALSUBLOCALITY2
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable RepresentativesRepresentativeInfoByAddressLevels
instance FromText RepresentativesRepresentativeInfoByAddressLevels where
fromText = \case
"administrativeArea1" -> Just RRIBALADMINISTRATIVEAREA1
"administrativeArea2" -> Just RRIBALADMINISTRATIVEAREA2
"country" -> Just RRIBALCountry
"international" -> Just RRIBALInternational
"locality" -> Just RRIBALLocality
"regional" -> Just RRIBALRegional
"special" -> Just RRIBALSpecial
"subLocality1" -> Just RRIBALSUBLOCALITY1
"subLocality2" -> Just RRIBALSUBLOCALITY2
_ -> Nothing
instance ToText RepresentativesRepresentativeInfoByAddressLevels where
toText = \case
RRIBALADMINISTRATIVEAREA1 -> "administrativeArea1"
RRIBALADMINISTRATIVEAREA2 -> "administrativeArea2"
RRIBALCountry -> "country"
RRIBALInternational -> "international"
RRIBALLocality -> "locality"
RRIBALRegional -> "regional"
RRIBALSpecial -> "special"
RRIBALSUBLOCALITY1 -> "subLocality1"
RRIBALSUBLOCALITY2 -> "subLocality2"
instance FromJSON RepresentativesRepresentativeInfoByAddressLevels where
parseJSON = parseJSONText "RepresentativesRepresentativeInfoByAddressLevels"
instance ToJSON RepresentativesRepresentativeInfoByAddressLevels where
toJSON = toJSONText
data RepresentativesRepresentativeInfoByDivisionRoles
= DeputyHeadOfGovernment
| ExecutiveCouncil
| GovernmentOfficer
| HeadOfGovernment
| HeadOfState
| HighestCourtJudge
| Judge
| LegislatorLowerBody
| LegislatorUpperBody
| SchoolBoard
| SpecialPurposeOfficer
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable RepresentativesRepresentativeInfoByDivisionRoles
instance FromText RepresentativesRepresentativeInfoByDivisionRoles where
fromText = \case
"deputyHeadOfGovernment" -> Just DeputyHeadOfGovernment
"executiveCouncil" -> Just ExecutiveCouncil
"governmentOfficer" -> Just GovernmentOfficer
"headOfGovernment" -> Just HeadOfGovernment
"headOfState" -> Just HeadOfState
"highestCourtJudge" -> Just HighestCourtJudge
"judge" -> Just Judge
"legislatorLowerBody" -> Just LegislatorLowerBody
"legislatorUpperBody" -> Just LegislatorUpperBody
"schoolBoard" -> Just SchoolBoard
"specialPurposeOfficer" -> Just SpecialPurposeOfficer
_ -> Nothing
instance ToText RepresentativesRepresentativeInfoByDivisionRoles where
toText = \case
DeputyHeadOfGovernment -> "deputyHeadOfGovernment"
ExecutiveCouncil -> "executiveCouncil"
GovernmentOfficer -> "governmentOfficer"
HeadOfGovernment -> "headOfGovernment"
HeadOfState -> "headOfState"
HighestCourtJudge -> "highestCourtJudge"
Judge -> "judge"
LegislatorLowerBody -> "legislatorLowerBody"
LegislatorUpperBody -> "legislatorUpperBody"
SchoolBoard -> "schoolBoard"
SpecialPurposeOfficer -> "specialPurposeOfficer"
instance FromJSON RepresentativesRepresentativeInfoByDivisionRoles where
parseJSON = parseJSONText "RepresentativesRepresentativeInfoByDivisionRoles"
instance ToJSON RepresentativesRepresentativeInfoByDivisionRoles where
toJSON = toJSONText
data RepresentativesRepresentativeInfoByAddressRoles
= RRIBARDeputyHeadOfGovernment
| RRIBARExecutiveCouncil
| RRIBARGovernmentOfficer
| RRIBARHeadOfGovernment
| RRIBARHeadOfState
| RRIBARHighestCourtJudge
| RRIBARJudge
| RRIBARLegislatorLowerBody
| RRIBARLegislatorUpperBody
| RRIBARSchoolBoard
| RRIBARSpecialPurposeOfficer
deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
instance Hashable RepresentativesRepresentativeInfoByAddressRoles
instance FromText RepresentativesRepresentativeInfoByAddressRoles where
fromText = \case
"deputyHeadOfGovernment" -> Just RRIBARDeputyHeadOfGovernment
"executiveCouncil" -> Just RRIBARExecutiveCouncil
"governmentOfficer" -> Just RRIBARGovernmentOfficer
"headOfGovernment" -> Just RRIBARHeadOfGovernment
"headOfState" -> Just RRIBARHeadOfState
"highestCourtJudge" -> Just RRIBARHighestCourtJudge
"judge" -> Just RRIBARJudge
"legislatorLowerBody" -> Just RRIBARLegislatorLowerBody
"legislatorUpperBody" -> Just RRIBARLegislatorUpperBody
"schoolBoard" -> Just RRIBARSchoolBoard
"specialPurposeOfficer" -> Just RRIBARSpecialPurposeOfficer
_ -> Nothing
instance ToText RepresentativesRepresentativeInfoByAddressRoles where
toText = \case
RRIBARDeputyHeadOfGovernment -> "deputyHeadOfGovernment"
RRIBARExecutiveCouncil -> "executiveCouncil"
RRIBARGovernmentOfficer -> "governmentOfficer"
RRIBARHeadOfGovernment -> "headOfGovernment"
RRIBARHeadOfState -> "headOfState"
RRIBARHighestCourtJudge -> "highestCourtJudge"
RRIBARJudge -> "judge"
RRIBARLegislatorLowerBody -> "legislatorLowerBody"
RRIBARLegislatorUpperBody -> "legislatorUpperBody"
RRIBARSchoolBoard -> "schoolBoard"
RRIBARSpecialPurposeOfficer -> "specialPurposeOfficer"
instance FromJSON RepresentativesRepresentativeInfoByAddressRoles where
parseJSON = parseJSONText "RepresentativesRepresentativeInfoByAddressRoles"
instance ToJSON RepresentativesRepresentativeInfoByAddressRoles where
toJSON = toJSONText