@@ -519,7 +519,10 @@ cOrderOnBallot
519 (\ s a -> s{_cOrderOnBallot = a})
519 (\ s a -> s{_cOrderOnBallot = a})
520 . mapping _Coerce
520 . mapping _Coerce
522−-- | The candidate\'s name.
522+-- | The candidate\'s name. If this is a joint ticket it will indicate the
523+-- name of the candidate at the top of a ticket followed by a \/ and that
524+-- name of candidate at the bottom of the ticket. e.g. \"Mitt Romney \/
523cName :: Lens' Candidate (Maybe Text)
526cName :: Lens' Candidate (Maybe Text)
524cName = lens _cName (\ s a -> s{_cName = a})
527cName = lens _cName (\ s a -> s{_cName = a})
@@ -656,6 +659,41 @@ instance ToJSON Office where
656 ("sources" .=) <$> _oSources, ("name" .=) <$> _oName,
659 ("sources" .=) <$> _oSources, ("name" .=) <$> _oName,
657 ("levels" .=) <$> _oLevels])
660 ("levels" .=) <$> _oLevels])
663+-- /See:/ 'electionsQueryRequest' smart constructor.
664+newtype ElectionsQueryRequest = ElectionsQueryRequest'
665+ { _eqrContextParams :: Maybe ContextParams
666+ } deriving (Eq,Show,Data,Typeable,Generic)
668+-- | Creates a value of 'ElectionsQueryRequest' with the minimum fields required to make a request.
670+-- Use one of the following lenses to modify other fields as desired:
672+-- * 'eqrContextParams'
673+electionsQueryRequest
674+ :: ElectionsQueryRequest
675+electionsQueryRequest =
676+ ElectionsQueryRequest'
677+ { _eqrContextParams = Nothing
680+eqrContextParams :: Lens' ElectionsQueryRequest (Maybe ContextParams)
682+ = lens _eqrContextParams
683+ (\ s a -> s{_eqrContextParams = a})
685+instance FromJSON ElectionsQueryRequest where
687+ = withObject "ElectionsQueryRequest"
689+ ElectionsQueryRequest' <$> (o .:? "contextParams"))
691+instance ToJSON ElectionsQueryRequest where
692+ toJSON ElectionsQueryRequest'{..}
695+ [("contextParams" .=) <$> _eqrContextParams])
659-- | A social media or web channel for a candidate.
697-- | A social media or web channel for a candidate.
661-- /See:/ 'channel' smart constructor.
699-- /See:/ 'channel' smart constructor.
@@ -925,6 +963,42 @@ instance ToJSON DivisionSearchResult where
925 ("name" .=) <$> _dsrName,
963 ("name" .=) <$> _dsrName,
926 ("ocdId" .=) <$> _dsrOcdId])
964 ("ocdId" .=) <$> _dsrOcdId])
966+-- | A search request for political geographies.
968+-- /See:/ 'divisionSearchRequest' smart constructor.
969+newtype DivisionSearchRequest = DivisionSearchRequest'
970+ { _dsrContextParams :: Maybe ContextParams
971+ } deriving (Eq,Show,Data,Typeable,Generic)
973+-- | Creates a value of 'DivisionSearchRequest' with the minimum fields required to make a request.
975+-- Use one of the following lenses to modify other fields as desired:
977+-- * 'dsrContextParams'
978+divisionSearchRequest
979+ :: DivisionSearchRequest
980+divisionSearchRequest =
981+ DivisionSearchRequest'
982+ { _dsrContextParams = Nothing
985+dsrContextParams :: Lens' DivisionSearchRequest (Maybe ContextParams)
987+ = lens _dsrContextParams
988+ (\ s a -> s{_dsrContextParams = a})
990+instance FromJSON DivisionSearchRequest where
992+ = withObject "DivisionSearchRequest"
994+ DivisionSearchRequest' <$> (o .:? "contextParams"))
996+instance ToJSON DivisionSearchRequest where
997+ toJSON DivisionSearchRequest'{..}
1000+ [("contextParams" .=) <$> _dsrContextParams])
928-- | Information about an election administrative body (e.g. County Board of
1002-- | Information about an election administrative body (e.g. County Board of
929-- Elections).
1003-- Elections).
@@ -941,6 +1015,7 @@ data AdministrativeBody = AdministrativeBody'
941 , _abElectionOfficials :: !(Maybe [ElectionOfficial])
1015 , _abElectionOfficials :: !(Maybe [ElectionOfficial])
942 , _abName :: !(Maybe Text)
1016 , _abName :: !(Maybe Text)
943 , _abElectionRulesURL :: !(Maybe Text)
1017 , _abElectionRulesURL :: !(Maybe Text)
1018+ , _abAddressLines :: !(Maybe [Text])
944 , _abVoterServices :: !(Maybe [Text])
1019 , _abVoterServices :: !(Maybe [Text])
945 , _abElectionRegistrationURL :: !(Maybe Text)
1020 , _abElectionRegistrationURL :: !(Maybe Text)
946 } deriving (Eq,Show,Data,Typeable,Generic)
1021 } deriving (Eq,Show,Data,Typeable,Generic)
@@ -971,6 +1046,8 @@ data AdministrativeBody = AdministrativeBody'
972-- * 'abElectionRulesURL'
1047-- * 'abElectionRulesURL'
1049+-- * 'abAddressLines'
974-- * 'abVoterServices'
1051-- * 'abVoterServices'
976-- * 'abElectionRegistrationURL'
1053-- * 'abElectionRegistrationURL'
@@ -989,6 +1066,7 @@ administrativeBody =
989 , _abElectionOfficials = Nothing
1066 , _abElectionOfficials = Nothing
990 , _abName = Nothing
1067 , _abName = Nothing
991 , _abElectionRulesURL = Nothing
1068 , _abElectionRulesURL = Nothing
1069+ , _abAddressLines = Nothing
992 , _abVoterServices = Nothing
1070 , _abVoterServices = Nothing
993 , _abElectionRegistrationURL = Nothing
1071 , _abElectionRegistrationURL = Nothing
@@ -1065,6 +1143,13 @@ abElectionRulesURL
1065 = lens _abElectionRulesURL
1143 = lens _abElectionRulesURL
1066 (\ s a -> s{_abElectionRulesURL = a})
1144 (\ s a -> s{_abElectionRulesURL = a})
1146+abAddressLines :: Lens' AdministrativeBody [Text]
1148+ = lens _abAddressLines
1149+ (\ s a -> s{_abAddressLines = a})
1068-- | A description of the services this administrative body may provide.
1153-- | A description of the services this administrative body may provide.
1069abVoterServices :: Lens' AdministrativeBody [Text]
1154abVoterServices :: Lens' AdministrativeBody [Text]
1070abVoterServices
1155abVoterServices
@@ -1096,6 +1181,7 @@ instance FromJSON AdministrativeBody where
1096 <*> (o .:? "electionOfficials" .!= mempty)
1181 <*> (o .:? "electionOfficials" .!= mempty)
1097 <*> (o .:? "name")
1182 <*> (o .:? "name")
1098 <*> (o .:? "electionRulesUrl")
1183 <*> (o .:? "electionRulesUrl")
1184+ <*> (o .:? "addressLines" .!= mempty)
1099 <*> (o .:? "voter_services" .!= mempty)
1185 <*> (o .:? "voter_services" .!= mempty)
1100 <*> (o .:? "electionRegistrationUrl"))
1186 <*> (o .:? "electionRegistrationUrl"))
@@ -1118,10 +1204,49 @@ instance ToJSON AdministrativeBody where
1118 ("electionOfficials" .=) <$> _abElectionOfficials,
1204 ("electionOfficials" .=) <$> _abElectionOfficials,
1119 ("name" .=) <$> _abName,
1205 ("name" .=) <$> _abName,
1120 ("electionRulesUrl" .=) <$> _abElectionRulesURL,
1206 ("electionRulesUrl" .=) <$> _abElectionRulesURL,
1207+ ("addressLines" .=) <$> _abAddressLines,
1121 ("voter_services" .=) <$> _abVoterServices,
1208 ("voter_services" .=) <$> _abVoterServices,
1122 ("electionRegistrationUrl" .=) <$>
1209 ("electionRegistrationUrl" .=) <$>
1123 _abElectionRegistrationURL])
1210 _abElectionRegistrationURL])
1212+-- | A request for political geography and representative information for an
1215+-- /See:/ 'representativeInfoRequest' smart constructor.
1216+newtype RepresentativeInfoRequest = RepresentativeInfoRequest'
1217+ { _rirContextParams :: Maybe ContextParams
1218+ } deriving (Eq,Show,Data,Typeable,Generic)
1220+-- | Creates a value of 'RepresentativeInfoRequest' with the minimum fields required to make a request.
1222+-- Use one of the following lenses to modify other fields as desired:
1224+-- * 'rirContextParams'
1225+representativeInfoRequest
1226+ :: RepresentativeInfoRequest
1227+representativeInfoRequest =
1228+ RepresentativeInfoRequest'
1229+ { _rirContextParams = Nothing
1232+rirContextParams :: Lens' RepresentativeInfoRequest (Maybe ContextParams)
1234+ = lens _rirContextParams
1235+ (\ s a -> s{_rirContextParams = a})
1237+instance FromJSON RepresentativeInfoRequest where
1239+ = withObject "RepresentativeInfoRequest"
1241+ RepresentativeInfoRequest' <$>
1242+ (o .:? "contextParams"))
1244+instance ToJSON RepresentativeInfoRequest where
1245+ toJSON RepresentativeInfoRequest'{..}
1248+ [("contextParams" .=) <$> _rirContextParams])
1125-- | Information about a contest that appears on a voter\'s ballot.
1250-- | Information about a contest that appears on a voter\'s ballot.
1127-- /See:/ 'contest' smart constructor.
1252-- /See:/ 'contest' smart constructor.
@@ -1308,8 +1433,8 @@ conReferendumProStatement
1309-- | The set of ballot responses for the referendum. A ballot response
1434-- | The set of ballot responses for the referendum. A ballot response
1310-- represents a line on the ballot. Common examples might include \"yes\"
1435-- represents a line on the ballot. Common examples might include \"yes\"
1311−-- or \"no\" for referenda, or a judge\'s name for a retention contest.
1312−-- This field is only populated for contests of type \'Referendum\'.
1436+-- or \"no\" for referenda. This field is only populated for contests of
1437+-- type \'Referendum\'.
1313conReferendumBallotResponses :: Lens' Contest [Text]
1438conReferendumBallotResponses :: Lens' Contest [Text]
1314conReferendumBallotResponses
1439conReferendumBallotResponses
1315 = lens _conReferendumBallotResponses
1440 = lens _conReferendumBallotResponses
@@ -1351,7 +1476,8 @@ conId = lens _conId (\ s a -> s{_conId = a})
1352-- | The type of contest. Usually this will be \'General\', \'Primary\', or
1477-- | The type of contest. Usually this will be \'General\', \'Primary\', or
1353-- \'Run-off\' for contests with candidates. For referenda this will be
1478-- \'Run-off\' for contests with candidates. For referenda this will be
1354−-- \'Referendum\'.
1479+-- \'Referendum\'. For Retention contests this will typically be
1355conType :: Lens' Contest (Maybe Text)
1481conType :: Lens' Contest (Maybe Text)
1356conType = lens _conType (\ s a -> s{_conType = a})
1482conType = lens _conType (\ s a -> s{_conType = a})
@@ -1750,19 +1876,61 @@ instance ToJSON Source where
1750 [("name" .=) <$> _sName,
1876 [("name" .=) <$> _sName,
1751 ("official" .=) <$> _sOfficial])
1877 ("official" .=) <$> _sOfficial])
1879+-- | A request to look up representative information for a single division.
1881+-- /See:/ 'divisionRepresentativeInfoRequest' smart constructor.
1882+newtype DivisionRepresentativeInfoRequest = DivisionRepresentativeInfoRequest'
1883+ { _drirContextParams :: Maybe ContextParams
1884+ } deriving (Eq,Show,Data,Typeable,Generic)
1886+-- | Creates a value of 'DivisionRepresentativeInfoRequest' with the minimum fields required to make a request.
1888+-- Use one of the following lenses to modify other fields as desired:
1890+-- * 'drirContextParams'
1891+divisionRepresentativeInfoRequest
1892+ :: DivisionRepresentativeInfoRequest
1893+divisionRepresentativeInfoRequest =
1894+ DivisionRepresentativeInfoRequest'
1895+ { _drirContextParams = Nothing
1898+drirContextParams :: Lens' DivisionRepresentativeInfoRequest (Maybe ContextParams)
1900+ = lens _drirContextParams
1901+ (\ s a -> s{_drirContextParams = a})
1903+instance FromJSON DivisionRepresentativeInfoRequest
1906+ = withObject "DivisionRepresentativeInfoRequest"
1908+ DivisionRepresentativeInfoRequest' <$>
1909+ (o .:? "contextParams"))
1911+instance ToJSON DivisionRepresentativeInfoRequest
1913+ toJSON DivisionRepresentativeInfoRequest'{..}
1916+ [("contextParams" .=) <$> _drirContextParams])
1753-- | Describes the geographic scope of a contest.
1918-- | Describes the geographic scope of a contest.
1755-- /See:/ 'electoralDistrict' smart constructor.
1920-- /See:/ 'electoralDistrict' smart constructor.
1756data ElectoralDistrict = ElectoralDistrict'
1921data ElectoralDistrict = ElectoralDistrict'
1922+ { _edKgForeignKey :: !(Maybe Text)
1757− { _edName :: !(Maybe Text)
1923+ , _edName :: !(Maybe Text)
1758− , _edScope :: !(Maybe Text)
1924+ , _edScope :: !(Maybe Text)
1759− , _edId :: !(Maybe Text)
1925+ , _edId :: !(Maybe Text)
1760 } deriving (Eq,Show,Data,Typeable,Generic)
1926 } deriving (Eq,Show,Data,Typeable,Generic)
1762-- | Creates a value of 'ElectoralDistrict' with the minimum fields required to make a request.
1928-- | Creates a value of 'ElectoralDistrict' with the minimum fields required to make a request.
1764-- Use one of the following lenses to modify other fields as desired:
1930-- Use one of the following lenses to modify other fields as desired:
1932+-- * 'edKgForeignKey'
1766-- * 'edName'
1934-- * 'edName'
1768-- * 'edScope'
1936-- * 'edScope'
@@ -1772,11 +1940,17 @@ electoralDistrict
1772 :: ElectoralDistrict
1940 :: ElectoralDistrict
1773electoralDistrict =
1941electoralDistrict =
1774 ElectoralDistrict'
1942 ElectoralDistrict'
1943+ { _edKgForeignKey = Nothing
1775− { _edName = Nothing
1944+ , _edName = Nothing
1776 , _edScope = Nothing
1945 , _edScope = Nothing
1777 , _edId = Nothing
1946 , _edId = Nothing
1949+edKgForeignKey :: Lens' ElectoralDistrict (Maybe Text)
1951+ = lens _edKgForeignKey
1952+ (\ s a -> s{_edKgForeignKey = a})
1780-- | The name of the district.
1954-- | The name of the district.
1781edName :: Lens' ElectoralDistrict (Maybe Text)
1955edName :: Lens' ElectoralDistrict (Maybe Text)
1782edName = lens _edName (\ s a -> s{_edName = a})
1956edName = lens _edName (\ s a -> s{_edName = a})
@@ -1799,15 +1973,54 @@ instance FromJSON ElectoralDistrict where
1799 = withObject "ElectoralDistrict"
1973 = withObject "ElectoralDistrict"
1801 ElectoralDistrict' <$>
1975 ElectoralDistrict' <$>
1976+ (o .:? "kgForeignKey") <*> (o .:? "name") <*>
1802− (o .:? "name") <*> (o .:? "scope") <*> (o .:? "id"))
1977+ (o .:? "scope")
1804instance ToJSON ElectoralDistrict where
1980instance ToJSON ElectoralDistrict where
1805 toJSON ElectoralDistrict'{..}
1981 toJSON ElectoralDistrict'{..}
1806 = object
1982 = object
1807 (catMaybes
1983 (catMaybes
1984+ [("kgForeignKey" .=) <$> _edKgForeignKey,
1808− [("name" .=) <$> _edName, ("scope" .=) <$> _edScope,
1985+ ("name" .=) <$> _edName, ("scope" .=) <$> _edScope,
1809 ("id" .=) <$> _edId])
1986 ("id" .=) <$> _edId])
1988+-- | A request for information about a voter.
1990+-- /See:/ 'voterInfoRequest' smart constructor.
1991+newtype VoterInfoRequest = VoterInfoRequest'
1992+ { _virContextParams :: Maybe ContextParams
1993+ } deriving (Eq,Show,Data,Typeable,Generic)
1995+-- | Creates a value of 'VoterInfoRequest' with the minimum fields required to make a request.
1997+-- Use one of the following lenses to modify other fields as desired:
1999+-- * 'virContextParams'
2001+ :: VoterInfoRequest
2004+ { _virContextParams = Nothing
2007+virContextParams :: Lens' VoterInfoRequest (Maybe ContextParams)
2009+ = lens _virContextParams
2010+ (\ s a -> s{_virContextParams = a})
2012+instance FromJSON VoterInfoRequest where
2014+ = withObject "VoterInfoRequest"
2016+ VoterInfoRequest' <$> (o .:? "contextParams"))
2018+instance ToJSON VoterInfoRequest where
2019+ toJSON VoterInfoRequest'{..}
2022+ [("contextParams" .=) <$> _virContextParams])
1811-- | A simple representation of an address.
2024-- | A simple representation of an address.
1813-- /See:/ 'simpleAddressType' smart constructor.
2026-- /See:/ 'simpleAddressType' smart constructor.
@@ -1903,6 +2116,40 @@ instance ToJSON SimpleAddressType where
1903 ("city" .=) <$> _satCity, ("line1" .=) <$> _satLine1,
2116 ("city" .=) <$> _satCity, ("line1" .=) <$> _satLine1,
1904 ("locationName" .=) <$> _satLocationName])
2117 ("locationName" .=) <$> _satLocationName])
2120+-- /See:/ 'contextParams' smart constructor.
2121+newtype ContextParams = ContextParams'
2122+ { _cpClientProFile :: Maybe Text
2123+ } deriving (Eq,Show,Data,Typeable,Generic)
2125+-- | Creates a value of 'ContextParams' with the minimum fields required to make a request.
2127+-- Use one of the following lenses to modify other fields as desired:
2129+-- * 'cpClientProFile'
2134+ { _cpClientProFile = Nothing
2137+cpClientProFile :: Lens' ContextParams (Maybe Text)
2139+ = lens _cpClientProFile
2140+ (\ s a -> s{_cpClientProFile = a})
2142+instance FromJSON ContextParams where
2144+ = withObject "ContextParams"
2145+ (\ o -> ContextParams' <$> (o .:? "clientProfile"))
2147+instance ToJSON ContextParams where
2148+ toJSON ContextParams'{..}
2151+ [("clientProfile" .=) <$> _cpClientProFile])
1906-- | Describes information about a regional election administrative area.
2153-- | Describes information about a regional election administrative area.
1908-- /See:/ 'administrationRegion' smart constructor.
2155-- /See:/ 'administrationRegion' smart constructor.