@@ -519,7 +519,10 @@ cOrderOnBallot
519519 (\ s a -> s{_cOrderOnBallot = a})
520520 . mapping _Coerce
521521
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 \/
525+-- Paul Ryan\"
523526cName :: Lens' Candidate (Maybe Text)
524527cName = lens _cName (\ s a -> s{_cName = a})
525528
@@ -656,6 +659,41 @@ instance ToJSON Office where
656659 ("sources" .=) <$> _oSources, ("name" .=) <$> _oName,
657660 ("levels" .=) <$> _oLevels])
658661
662+--
663+-- /See:/ 'electionsQueryRequest' smart constructor.
664+newtype ElectionsQueryRequest = ElectionsQueryRequest'
665+ { _eqrContextParams :: Maybe ContextParams
666+ } deriving (Eq,Show,Data,Typeable,Generic)
667+
668+-- | Creates a value of 'ElectionsQueryRequest' with the minimum fields required to make a request.
669+--
670+-- Use one of the following lenses to modify other fields as desired:
671+--
672+-- * 'eqrContextParams'
673+electionsQueryRequest
674+ :: ElectionsQueryRequest
675+electionsQueryRequest =
676+ ElectionsQueryRequest'
677+ { _eqrContextParams = Nothing
678+ }
679+
680+eqrContextParams :: Lens' ElectionsQueryRequest (Maybe ContextParams)
681+eqrContextParams
682+ = lens _eqrContextParams
683+ (\ s a -> s{_eqrContextParams = a})
684+
685+instance FromJSON ElectionsQueryRequest where
686+ parseJSON
687+ = withObject "ElectionsQueryRequest"
688+ (\ o ->
689+ ElectionsQueryRequest' <$> (o .:? "contextParams"))
690+
691+instance ToJSON ElectionsQueryRequest where
692+ toJSON ElectionsQueryRequest'{..}
693+ = object
694+ (catMaybes
695+ [("contextParams" .=) <$> _eqrContextParams])
696+
659697-- | A social media or web channel for a candidate.
660698--
661699-- /See:/ 'channel' smart constructor.
@@ -925,6 +963,42 @@ instance ToJSON DivisionSearchResult where
925963 ("name" .=) <$> _dsrName,
926964 ("ocdId" .=) <$> _dsrOcdId])
927965
966+-- | A search request for political geographies.
967+--
968+-- /See:/ 'divisionSearchRequest' smart constructor.
969+newtype DivisionSearchRequest = DivisionSearchRequest'
970+ { _dsrContextParams :: Maybe ContextParams
971+ } deriving (Eq,Show,Data,Typeable,Generic)
972+
973+-- | Creates a value of 'DivisionSearchRequest' with the minimum fields required to make a request.
974+--
975+-- Use one of the following lenses to modify other fields as desired:
976+--
977+-- * 'dsrContextParams'
978+divisionSearchRequest
979+ :: DivisionSearchRequest
980+divisionSearchRequest =
981+ DivisionSearchRequest'
982+ { _dsrContextParams = Nothing
983+ }
984+
985+dsrContextParams :: Lens' DivisionSearchRequest (Maybe ContextParams)
986+dsrContextParams
987+ = lens _dsrContextParams
988+ (\ s a -> s{_dsrContextParams = a})
989+
990+instance FromJSON DivisionSearchRequest where
991+ parseJSON
992+ = withObject "DivisionSearchRequest"
993+ (\ o ->
994+ DivisionSearchRequest' <$> (o .:? "contextParams"))
995+
996+instance ToJSON DivisionSearchRequest where
997+ toJSON DivisionSearchRequest'{..}
998+ = object
999+ (catMaybes
1000+ [("contextParams" .=) <$> _dsrContextParams])
1001+
9281002-- | Information about an election administrative body (e.g. County Board of
9291003-- Elections).
9301004--
@@ -941,6 +1015,7 @@ data AdministrativeBody = AdministrativeBody'
9411015 , _abElectionOfficials :: !(Maybe [ElectionOfficial])
9421016 , _abName :: !(Maybe Text)
9431017 , _abElectionRulesURL :: !(Maybe Text)
1018+ , _abAddressLines :: !(Maybe [Text])
9441019 , _abVoterServices :: !(Maybe [Text])
9451020 , _abElectionRegistrationURL :: !(Maybe Text)
9461021 } deriving (Eq,Show,Data,Typeable,Generic)
@@ -971,6 +1046,8 @@ data AdministrativeBody = AdministrativeBody'
9711046--
9721047-- * 'abElectionRulesURL'
9731048--
1049+-- * 'abAddressLines'
1050+--
9741051-- * 'abVoterServices'
9751052--
9761053-- * 'abElectionRegistrationURL'
@@ -989,6 +1066,7 @@ administrativeBody =
9891066 , _abElectionOfficials = Nothing
9901067 , _abName = Nothing
9911068 , _abElectionRulesURL = Nothing
1069+ , _abAddressLines = Nothing
9921070 , _abVoterServices = Nothing
9931071 , _abElectionRegistrationURL = Nothing
9941072 }
@@ -1065,6 +1143,13 @@ abElectionRulesURL
10651143 = lens _abElectionRulesURL
10661144 (\ s a -> s{_abElectionRulesURL = a})
10671145
1146+abAddressLines :: Lens' AdministrativeBody [Text]
1147+abAddressLines
1148+ = lens _abAddressLines
1149+ (\ s a -> s{_abAddressLines = a})
1150+ . _Default
1151+ . _Coerce
1152+
10681153-- | A description of the services this administrative body may provide.
10691154abVoterServices :: Lens' AdministrativeBody [Text]
10701155abVoterServices
@@ -1096,6 +1181,7 @@ instance FromJSON AdministrativeBody where
10961181 <*> (o .:? "electionOfficials" .!= mempty)
10971182 <*> (o .:? "name")
10981183 <*> (o .:? "electionRulesUrl")
1184+ <*> (o .:? "addressLines" .!= mempty)
10991185 <*> (o .:? "voter_services" .!= mempty)
11001186 <*> (o .:? "electionRegistrationUrl"))
11011187
@@ -1118,10 +1204,49 @@ instance ToJSON AdministrativeBody where
11181204 ("electionOfficials" .=) <$> _abElectionOfficials,
11191205 ("name" .=) <$> _abName,
11201206 ("electionRulesUrl" .=) <$> _abElectionRulesURL,
1207+ ("addressLines" .=) <$> _abAddressLines,
11211208 ("voter_services" .=) <$> _abVoterServices,
11221209 ("electionRegistrationUrl" .=) <$>
11231210 _abElectionRegistrationURL])
11241211
1212+-- | A request for political geography and representative information for an
1213+-- address.
1214+--
1215+-- /See:/ 'representativeInfoRequest' smart constructor.
1216+newtype RepresentativeInfoRequest = RepresentativeInfoRequest'
1217+ { _rirContextParams :: Maybe ContextParams
1218+ } deriving (Eq,Show,Data,Typeable,Generic)
1219+
1220+-- | Creates a value of 'RepresentativeInfoRequest' with the minimum fields required to make a request.
1221+--
1222+-- Use one of the following lenses to modify other fields as desired:
1223+--
1224+-- * 'rirContextParams'
1225+representativeInfoRequest
1226+ :: RepresentativeInfoRequest
1227+representativeInfoRequest =
1228+ RepresentativeInfoRequest'
1229+ { _rirContextParams = Nothing
1230+ }
1231+
1232+rirContextParams :: Lens' RepresentativeInfoRequest (Maybe ContextParams)
1233+rirContextParams
1234+ = lens _rirContextParams
1235+ (\ s a -> s{_rirContextParams = a})
1236+
1237+instance FromJSON RepresentativeInfoRequest where
1238+ parseJSON
1239+ = withObject "RepresentativeInfoRequest"
1240+ (\ o ->
1241+ RepresentativeInfoRequest' <$>
1242+ (o .:? "contextParams"))
1243+
1244+instance ToJSON RepresentativeInfoRequest where
1245+ toJSON RepresentativeInfoRequest'{..}
1246+ = object
1247+ (catMaybes
1248+ [("contextParams" .=) <$> _rirContextParams])
1249+
11251250-- | Information about a contest that appears on a voter\'s ballot.
11261251--
11271252-- /See:/ 'contest' smart constructor.
@@ -1308,8 +1433,8 @@ conReferendumProStatement
13081433
13091434-- | The set of ballot responses for the referendum. A ballot response
13101435-- 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\'.
13131438conReferendumBallotResponses :: Lens' Contest [Text]
13141439conReferendumBallotResponses
13151440 = lens _conReferendumBallotResponses
@@ -1351,7 +1476,8 @@ conId = lens _conId (\ s a -> s{_conId = a})
13511476
13521477-- | The type of contest. Usually this will be \'General\', \'Primary\', or
13531478-- \'Run-off\' for contests with candidates. For referenda this will be
1354−-- \'Referendum\'.
1479+-- \'Referendum\'. For Retention contests this will typically be
1480+-- \'Retention\'.
13551481conType :: Lens' Contest (Maybe Text)
13561482conType = lens _conType (\ s a -> s{_conType = a})
13571483
@@ -1750,19 +1876,61 @@ instance ToJSON Source where
17501876 [("name" .=) <$> _sName,
17511877 ("official" .=) <$> _sOfficial])
17521878
1879+-- | A request to look up representative information for a single division.
1880+--
1881+-- /See:/ 'divisionRepresentativeInfoRequest' smart constructor.
1882+newtype DivisionRepresentativeInfoRequest = DivisionRepresentativeInfoRequest'
1883+ { _drirContextParams :: Maybe ContextParams
1884+ } deriving (Eq,Show,Data,Typeable,Generic)
1885+
1886+-- | Creates a value of 'DivisionRepresentativeInfoRequest' with the minimum fields required to make a request.
1887+--
1888+-- Use one of the following lenses to modify other fields as desired:
1889+--
1890+-- * 'drirContextParams'
1891+divisionRepresentativeInfoRequest
1892+ :: DivisionRepresentativeInfoRequest
1893+divisionRepresentativeInfoRequest =
1894+ DivisionRepresentativeInfoRequest'
1895+ { _drirContextParams = Nothing
1896+ }
1897+
1898+drirContextParams :: Lens' DivisionRepresentativeInfoRequest (Maybe ContextParams)
1899+drirContextParams
1900+ = lens _drirContextParams
1901+ (\ s a -> s{_drirContextParams = a})
1902+
1903+instance FromJSON DivisionRepresentativeInfoRequest
1904+ where
1905+ parseJSON
1906+ = withObject "DivisionRepresentativeInfoRequest"
1907+ (\ o ->
1908+ DivisionRepresentativeInfoRequest' <$>
1909+ (o .:? "contextParams"))
1910+
1911+instance ToJSON DivisionRepresentativeInfoRequest
1912+ where
1913+ toJSON DivisionRepresentativeInfoRequest'{..}
1914+ = object
1915+ (catMaybes
1916+ [("contextParams" .=) <$> _drirContextParams])
1917+
17531918-- | Describes the geographic scope of a contest.
17541919--
17551920-- /See:/ 'electoralDistrict' smart constructor.
17561921data ElectoralDistrict = ElectoralDistrict'
1757− { _edName :: !(Maybe Text)
1758− , _edScope :: !(Maybe Text)
1759− , _edId :: !(Maybe Text)
1922+ { _edKgForeignKey :: !(Maybe Text)
1923+ , _edName :: !(Maybe Text)
1924+ , _edScope :: !(Maybe Text)
1925+ , _edId :: !(Maybe Text)
17601926 } deriving (Eq,Show,Data,Typeable,Generic)
17611927
17621928-- | Creates a value of 'ElectoralDistrict' with the minimum fields required to make a request.
17631929--
17641930-- Use one of the following lenses to modify other fields as desired:
17651931--
1932+-- * 'edKgForeignKey'
1933+--
17661934-- * 'edName'
17671935--
17681936-- * 'edScope'
@@ -1772,11 +1940,17 @@ electoralDistrict
17721940 :: ElectoralDistrict
17731941electoralDistrict =
17741942 ElectoralDistrict'
1775− { _edName = Nothing
1943+ { _edKgForeignKey = Nothing
1944+ , _edName = Nothing
17761945 , _edScope = Nothing
17771946 , _edId = Nothing
17781947 }
17791948
1949+edKgForeignKey :: Lens' ElectoralDistrict (Maybe Text)
1950+edKgForeignKey
1951+ = lens _edKgForeignKey
1952+ (\ s a -> s{_edKgForeignKey = a})
1953+
17801954-- | The name of the district.
17811955edName :: Lens' ElectoralDistrict (Maybe Text)
17821956edName = lens _edName (\ s a -> s{_edName = a})
@@ -1799,15 +1973,54 @@ instance FromJSON ElectoralDistrict where
17991973 = withObject "ElectoralDistrict"
18001974 (\ o ->
18011975 ElectoralDistrict' <$>
1802− (o .:? "name") <*> (o .:? "scope") <*> (o .:? "id"))
1976+ (o .:? "kgForeignKey") <*> (o .:? "name") <*>
1977+ (o .:? "scope")
1978+ <*> (o .:? "id"))
18031979
18041980instance ToJSON ElectoralDistrict where
18051981 toJSON ElectoralDistrict'{..}
18061982 = object
18071983 (catMaybes
1808− [("name" .=) <$> _edName, ("scope" .=) <$> _edScope,
1984+ [("kgForeignKey" .=) <$> _edKgForeignKey,
1985+ ("name" .=) <$> _edName, ("scope" .=) <$> _edScope,
18091986 ("id" .=) <$> _edId])
18101987
1988+-- | A request for information about a voter.
1989+--
1990+-- /See:/ 'voterInfoRequest' smart constructor.
1991+newtype VoterInfoRequest = VoterInfoRequest'
1992+ { _virContextParams :: Maybe ContextParams
1993+ } deriving (Eq,Show,Data,Typeable,Generic)
1994+
1995+-- | Creates a value of 'VoterInfoRequest' with the minimum fields required to make a request.
1996+--
1997+-- Use one of the following lenses to modify other fields as desired:
1998+--
1999+-- * 'virContextParams'
2000+voterInfoRequest
2001+ :: VoterInfoRequest
2002+voterInfoRequest =
2003+ VoterInfoRequest'
2004+ { _virContextParams = Nothing
2005+ }
2006+
2007+virContextParams :: Lens' VoterInfoRequest (Maybe ContextParams)
2008+virContextParams
2009+ = lens _virContextParams
2010+ (\ s a -> s{_virContextParams = a})
2011+
2012+instance FromJSON VoterInfoRequest where
2013+ parseJSON
2014+ = withObject "VoterInfoRequest"
2015+ (\ o ->
2016+ VoterInfoRequest' <$> (o .:? "contextParams"))
2017+
2018+instance ToJSON VoterInfoRequest where
2019+ toJSON VoterInfoRequest'{..}
2020+ = object
2021+ (catMaybes
2022+ [("contextParams" .=) <$> _virContextParams])
2023+
18112024-- | A simple representation of an address.
18122025--
18132026-- /See:/ 'simpleAddressType' smart constructor.
@@ -1903,6 +2116,40 @@ instance ToJSON SimpleAddressType where
19032116 ("city" .=) <$> _satCity, ("line1" .=) <$> _satLine1,
19042117 ("locationName" .=) <$> _satLocationName])
19052118
2119+--
2120+-- /See:/ 'contextParams' smart constructor.
2121+newtype ContextParams = ContextParams'
2122+ { _cpClientProFile :: Maybe Text
2123+ } deriving (Eq,Show,Data,Typeable,Generic)
2124+
2125+-- | Creates a value of 'ContextParams' with the minimum fields required to make a request.
2126+--
2127+-- Use one of the following lenses to modify other fields as desired:
2128+--
2129+-- * 'cpClientProFile'
2130+contextParams
2131+ :: ContextParams
2132+contextParams =
2133+ ContextParams'
2134+ { _cpClientProFile = Nothing
2135+ }
2136+
2137+cpClientProFile :: Lens' ContextParams (Maybe Text)
2138+cpClientProFile
2139+ = lens _cpClientProFile
2140+ (\ s a -> s{_cpClientProFile = a})
2141+
2142+instance FromJSON ContextParams where
2143+ parseJSON
2144+ = withObject "ContextParams"
2145+ (\ o -> ContextParams' <$> (o .:? "clientProfile"))
2146+
2147+instance ToJSON ContextParams where
2148+ toJSON ContextParams'{..}
2149+ = object
2150+ (catMaybes
2151+ [("clientProfile" .=) <$> _cpClientProFile])
2152+
19062153-- | Describes information about a regional election administrative area.
19072154--
19082155-- /See:/ 'administrationRegion' smart constructor.